Do not make bitmap buttons with standard width (like in wxComboBox drop down button).
[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
RD
5
6#// Give a reference to the dictionary of this module to the C++ extension
7#// code.
54f9ee45 8_core_._wxPySetDictionary(vars())
d14a1e28
RD
9
10#// A little trick to make 'wx' be a reference to this module so wx.Names can
11#// be used here.
12import sys as _sys
13wx = _sys.modules[__name__]
14
66c033b4
RD
15
16#----------------------------------------------------------------------------
17
18def _deprecated(callable, msg=None):
19 """
20 Create a wrapper function that will raise a DeprecationWarning
21 before calling the callable.
22 """
23 if msg is None:
24 msg = "%s is deprecated" % callable
25 def deprecatedWrapper(*args, **kwargs):
26 import warnings
27 warnings.warn(msg, DeprecationWarning, stacklevel=2)
28 return callable(*args, **kwargs)
29 deprecatedWrapper.__doc__ = msg
30 return deprecatedWrapper
31
32
33#----------------------------------------------------------------------------
34
54f9ee45
RD
35NOT_FOUND = _core_.NOT_FOUND
36VSCROLL = _core_.VSCROLL
37HSCROLL = _core_.HSCROLL
38CAPTION = _core_.CAPTION
39DOUBLE_BORDER = _core_.DOUBLE_BORDER
40SUNKEN_BORDER = _core_.SUNKEN_BORDER
41RAISED_BORDER = _core_.RAISED_BORDER
42BORDER = _core_.BORDER
43SIMPLE_BORDER = _core_.SIMPLE_BORDER
44STATIC_BORDER = _core_.STATIC_BORDER
45TRANSPARENT_WINDOW = _core_.TRANSPARENT_WINDOW
46NO_BORDER = _core_.NO_BORDER
47TAB_TRAVERSAL = _core_.TAB_TRAVERSAL
48WANTS_CHARS = _core_.WANTS_CHARS
49POPUP_WINDOW = _core_.POPUP_WINDOW
50CENTER_FRAME = _core_.CENTER_FRAME
51CENTRE_ON_SCREEN = _core_.CENTRE_ON_SCREEN
52CENTER_ON_SCREEN = _core_.CENTER_ON_SCREEN
53ED_CLIENT_MARGIN = _core_.ED_CLIENT_MARGIN
54ED_BUTTONS_BOTTOM = _core_.ED_BUTTONS_BOTTOM
55ED_BUTTONS_RIGHT = _core_.ED_BUTTONS_RIGHT
56ED_STATIC_LINE = _core_.ED_STATIC_LINE
57EXT_DIALOG_STYLE = _core_.EXT_DIALOG_STYLE
58CLIP_CHILDREN = _core_.CLIP_CHILDREN
59CLIP_SIBLINGS = _core_.CLIP_SIBLINGS
60ALWAYS_SHOW_SB = _core_.ALWAYS_SHOW_SB
61RETAINED = _core_.RETAINED
62BACKINGSTORE = _core_.BACKINGSTORE
63COLOURED = _core_.COLOURED
64FIXED_LENGTH = _core_.FIXED_LENGTH
65LB_NEEDED_SB = _core_.LB_NEEDED_SB
66LB_ALWAYS_SB = _core_.LB_ALWAYS_SB
67LB_SORT = _core_.LB_SORT
68LB_SINGLE = _core_.LB_SINGLE
69LB_MULTIPLE = _core_.LB_MULTIPLE
70LB_EXTENDED = _core_.LB_EXTENDED
71LB_OWNERDRAW = _core_.LB_OWNERDRAW
72LB_HSCROLL = _core_.LB_HSCROLL
73PROCESS_ENTER = _core_.PROCESS_ENTER
74PASSWORD = _core_.PASSWORD
75CB_SIMPLE = _core_.CB_SIMPLE
76CB_DROPDOWN = _core_.CB_DROPDOWN
77CB_SORT = _core_.CB_SORT
78CB_READONLY = _core_.CB_READONLY
79RA_HORIZONTAL = _core_.RA_HORIZONTAL
80RA_VERTICAL = _core_.RA_VERTICAL
81RA_SPECIFY_ROWS = _core_.RA_SPECIFY_ROWS
82RA_SPECIFY_COLS = _core_.RA_SPECIFY_COLS
83RB_GROUP = _core_.RB_GROUP
84RB_SINGLE = _core_.RB_SINGLE
85SL_HORIZONTAL = _core_.SL_HORIZONTAL
86SL_VERTICAL = _core_.SL_VERTICAL
87SL_AUTOTICKS = _core_.SL_AUTOTICKS
88SL_LABELS = _core_.SL_LABELS
89SL_LEFT = _core_.SL_LEFT
90SL_TOP = _core_.SL_TOP
91SL_RIGHT = _core_.SL_RIGHT
92SL_BOTTOM = _core_.SL_BOTTOM
93SL_BOTH = _core_.SL_BOTH
94SL_SELRANGE = _core_.SL_SELRANGE
95SB_HORIZONTAL = _core_.SB_HORIZONTAL
96SB_VERTICAL = _core_.SB_VERTICAL
97ST_SIZEGRIP = _core_.ST_SIZEGRIP
98ST_NO_AUTORESIZE = _core_.ST_NO_AUTORESIZE
99FLOOD_SURFACE = _core_.FLOOD_SURFACE
100FLOOD_BORDER = _core_.FLOOD_BORDER
101ODDEVEN_RULE = _core_.ODDEVEN_RULE
102WINDING_RULE = _core_.WINDING_RULE
103TOOL_TOP = _core_.TOOL_TOP
104TOOL_BOTTOM = _core_.TOOL_BOTTOM
105TOOL_LEFT = _core_.TOOL_LEFT
106TOOL_RIGHT = _core_.TOOL_RIGHT
107OK = _core_.OK
108YES_NO = _core_.YES_NO
109CANCEL = _core_.CANCEL
110YES = _core_.YES
111NO = _core_.NO
112NO_DEFAULT = _core_.NO_DEFAULT
113YES_DEFAULT = _core_.YES_DEFAULT
114ICON_EXCLAMATION = _core_.ICON_EXCLAMATION
115ICON_HAND = _core_.ICON_HAND
116ICON_QUESTION = _core_.ICON_QUESTION
117ICON_INFORMATION = _core_.ICON_INFORMATION
118ICON_STOP = _core_.ICON_STOP
119ICON_ASTERISK = _core_.ICON_ASTERISK
120ICON_MASK = _core_.ICON_MASK
121ICON_WARNING = _core_.ICON_WARNING
122ICON_ERROR = _core_.ICON_ERROR
123FORWARD = _core_.FORWARD
124BACKWARD = _core_.BACKWARD
125RESET = _core_.RESET
126HELP = _core_.HELP
127MORE = _core_.MORE
128SETUP = _core_.SETUP
129SIZE_AUTO_WIDTH = _core_.SIZE_AUTO_WIDTH
130SIZE_AUTO_HEIGHT = _core_.SIZE_AUTO_HEIGHT
131SIZE_AUTO = _core_.SIZE_AUTO
132SIZE_USE_EXISTING = _core_.SIZE_USE_EXISTING
133SIZE_ALLOW_MINUS_ONE = _core_.SIZE_ALLOW_MINUS_ONE
134PORTRAIT = _core_.PORTRAIT
135LANDSCAPE = _core_.LANDSCAPE
136PRINT_QUALITY_HIGH = _core_.PRINT_QUALITY_HIGH
137PRINT_QUALITY_MEDIUM = _core_.PRINT_QUALITY_MEDIUM
138PRINT_QUALITY_LOW = _core_.PRINT_QUALITY_LOW
139PRINT_QUALITY_DRAFT = _core_.PRINT_QUALITY_DRAFT
140ID_ANY = _core_.ID_ANY
141ID_SEPARATOR = _core_.ID_SEPARATOR
142ID_LOWEST = _core_.ID_LOWEST
143ID_OPEN = _core_.ID_OPEN
144ID_CLOSE = _core_.ID_CLOSE
145ID_NEW = _core_.ID_NEW
146ID_SAVE = _core_.ID_SAVE
147ID_SAVEAS = _core_.ID_SAVEAS
148ID_REVERT = _core_.ID_REVERT
149ID_EXIT = _core_.ID_EXIT
150ID_UNDO = _core_.ID_UNDO
151ID_REDO = _core_.ID_REDO
152ID_HELP = _core_.ID_HELP
153ID_PRINT = _core_.ID_PRINT
154ID_PRINT_SETUP = _core_.ID_PRINT_SETUP
155ID_PREVIEW = _core_.ID_PREVIEW
156ID_ABOUT = _core_.ID_ABOUT
157ID_HELP_CONTENTS = _core_.ID_HELP_CONTENTS
158ID_HELP_COMMANDS = _core_.ID_HELP_COMMANDS
159ID_HELP_PROCEDURES = _core_.ID_HELP_PROCEDURES
160ID_HELP_CONTEXT = _core_.ID_HELP_CONTEXT
161ID_CLOSE_ALL = _core_.ID_CLOSE_ALL
162ID_PREFERENCES = _core_.ID_PREFERENCES
163ID_CUT = _core_.ID_CUT
164ID_COPY = _core_.ID_COPY
165ID_PASTE = _core_.ID_PASTE
166ID_CLEAR = _core_.ID_CLEAR
167ID_FIND = _core_.ID_FIND
168ID_DUPLICATE = _core_.ID_DUPLICATE
169ID_SELECTALL = _core_.ID_SELECTALL
170ID_DELETE = _core_.ID_DELETE
171ID_REPLACE = _core_.ID_REPLACE
172ID_REPLACE_ALL = _core_.ID_REPLACE_ALL
173ID_PROPERTIES = _core_.ID_PROPERTIES
174ID_VIEW_DETAILS = _core_.ID_VIEW_DETAILS
175ID_VIEW_LARGEICONS = _core_.ID_VIEW_LARGEICONS
176ID_VIEW_SMALLICONS = _core_.ID_VIEW_SMALLICONS
177ID_VIEW_LIST = _core_.ID_VIEW_LIST
178ID_VIEW_SORTDATE = _core_.ID_VIEW_SORTDATE
179ID_VIEW_SORTNAME = _core_.ID_VIEW_SORTNAME
180ID_VIEW_SORTSIZE = _core_.ID_VIEW_SORTSIZE
181ID_VIEW_SORTTYPE = _core_.ID_VIEW_SORTTYPE
182ID_FILE1 = _core_.ID_FILE1
183ID_FILE2 = _core_.ID_FILE2
184ID_FILE3 = _core_.ID_FILE3
185ID_FILE4 = _core_.ID_FILE4
186ID_FILE5 = _core_.ID_FILE5
187ID_FILE6 = _core_.ID_FILE6
188ID_FILE7 = _core_.ID_FILE7
189ID_FILE8 = _core_.ID_FILE8
190ID_FILE9 = _core_.ID_FILE9
191ID_OK = _core_.ID_OK
192ID_CANCEL = _core_.ID_CANCEL
193ID_APPLY = _core_.ID_APPLY
194ID_YES = _core_.ID_YES
195ID_NO = _core_.ID_NO
196ID_STATIC = _core_.ID_STATIC
197ID_FORWARD = _core_.ID_FORWARD
198ID_BACKWARD = _core_.ID_BACKWARD
199ID_DEFAULT = _core_.ID_DEFAULT
200ID_MORE = _core_.ID_MORE
201ID_SETUP = _core_.ID_SETUP
202ID_RESET = _core_.ID_RESET
203ID_CONTEXT_HELP = _core_.ID_CONTEXT_HELP
204ID_YESTOALL = _core_.ID_YESTOALL
205ID_NOTOALL = _core_.ID_NOTOALL
206ID_ABORT = _core_.ID_ABORT
207ID_RETRY = _core_.ID_RETRY
208ID_IGNORE = _core_.ID_IGNORE
7bc1e663
RD
209ID_ADD = _core_.ID_ADD
210ID_REMOVE = _core_.ID_REMOVE
211ID_UP = _core_.ID_UP
212ID_DOWN = _core_.ID_DOWN
213ID_HOME = _core_.ID_HOME
214ID_REFRESH = _core_.ID_REFRESH
215ID_STOP = _core_.ID_STOP
216ID_INDEX = _core_.ID_INDEX
217ID_BOLD = _core_.ID_BOLD
218ID_ITALIC = _core_.ID_ITALIC
219ID_JUSTIFY_CENTER = _core_.ID_JUSTIFY_CENTER
220ID_JUSTIFY_FILL = _core_.ID_JUSTIFY_FILL
221ID_JUSTIFY_RIGHT = _core_.ID_JUSTIFY_RIGHT
222ID_JUSTIFY_LEFT = _core_.ID_JUSTIFY_LEFT
223ID_UNDERLINE = _core_.ID_UNDERLINE
224ID_INDENT = _core_.ID_INDENT
225ID_UNINDENT = _core_.ID_UNINDENT
226ID_ZOOM_100 = _core_.ID_ZOOM_100
227ID_ZOOM_FIT = _core_.ID_ZOOM_FIT
228ID_ZOOM_IN = _core_.ID_ZOOM_IN
229ID_ZOOM_OUT = _core_.ID_ZOOM_OUT
230ID_UNDELETE = _core_.ID_UNDELETE
231ID_REVERT_TO_SAVED = _core_.ID_REVERT_TO_SAVED
54f9ee45
RD
232ID_HIGHEST = _core_.ID_HIGHEST
233OPEN = _core_.OPEN
234SAVE = _core_.SAVE
235HIDE_READONLY = _core_.HIDE_READONLY
236OVERWRITE_PROMPT = _core_.OVERWRITE_PROMPT
237FILE_MUST_EXIST = _core_.FILE_MUST_EXIST
238MULTIPLE = _core_.MULTIPLE
239CHANGE_DIR = _core_.CHANGE_DIR
240ACCEL_ALT = _core_.ACCEL_ALT
241ACCEL_CTRL = _core_.ACCEL_CTRL
242ACCEL_SHIFT = _core_.ACCEL_SHIFT
243ACCEL_NORMAL = _core_.ACCEL_NORMAL
244PD_AUTO_HIDE = _core_.PD_AUTO_HIDE
245PD_APP_MODAL = _core_.PD_APP_MODAL
246PD_CAN_ABORT = _core_.PD_CAN_ABORT
247PD_ELAPSED_TIME = _core_.PD_ELAPSED_TIME
248PD_ESTIMATED_TIME = _core_.PD_ESTIMATED_TIME
249PD_REMAINING_TIME = _core_.PD_REMAINING_TIME
250DD_NEW_DIR_BUTTON = _core_.DD_NEW_DIR_BUTTON
251DD_DEFAULT_STYLE = _core_.DD_DEFAULT_STYLE
252MENU_TEAROFF = _core_.MENU_TEAROFF
253MB_DOCKABLE = _core_.MB_DOCKABLE
254NO_FULL_REPAINT_ON_RESIZE = _core_.NO_FULL_REPAINT_ON_RESIZE
255FULL_REPAINT_ON_RESIZE = _core_.FULL_REPAINT_ON_RESIZE
256LI_HORIZONTAL = _core_.LI_HORIZONTAL
257LI_VERTICAL = _core_.LI_VERTICAL
258WS_EX_VALIDATE_RECURSIVELY = _core_.WS_EX_VALIDATE_RECURSIVELY
259WS_EX_BLOCK_EVENTS = _core_.WS_EX_BLOCK_EVENTS
260WS_EX_TRANSIENT = _core_.WS_EX_TRANSIENT
261WS_EX_THEMED_BACKGROUND = _core_.WS_EX_THEMED_BACKGROUND
262WS_EX_PROCESS_IDLE = _core_.WS_EX_PROCESS_IDLE
263WS_EX_PROCESS_UI_UPDATES = _core_.WS_EX_PROCESS_UI_UPDATES
264MM_TEXT = _core_.MM_TEXT
265MM_LOMETRIC = _core_.MM_LOMETRIC
266MM_HIMETRIC = _core_.MM_HIMETRIC
267MM_LOENGLISH = _core_.MM_LOENGLISH
268MM_HIENGLISH = _core_.MM_HIENGLISH
269MM_TWIPS = _core_.MM_TWIPS
270MM_ISOTROPIC = _core_.MM_ISOTROPIC
271MM_ANISOTROPIC = _core_.MM_ANISOTROPIC
272MM_POINTS = _core_.MM_POINTS
273MM_METRIC = _core_.MM_METRIC
274CENTRE = _core_.CENTRE
275CENTER = _core_.CENTER
276HORIZONTAL = _core_.HORIZONTAL
277VERTICAL = _core_.VERTICAL
278BOTH = _core_.BOTH
279LEFT = _core_.LEFT
280RIGHT = _core_.RIGHT
281UP = _core_.UP
282DOWN = _core_.DOWN
283TOP = _core_.TOP
284BOTTOM = _core_.BOTTOM
285NORTH = _core_.NORTH
286SOUTH = _core_.SOUTH
287WEST = _core_.WEST
288EAST = _core_.EAST
289ALL = _core_.ALL
290ALIGN_NOT = _core_.ALIGN_NOT
291ALIGN_CENTER_HORIZONTAL = _core_.ALIGN_CENTER_HORIZONTAL
292ALIGN_CENTRE_HORIZONTAL = _core_.ALIGN_CENTRE_HORIZONTAL
293ALIGN_LEFT = _core_.ALIGN_LEFT
294ALIGN_TOP = _core_.ALIGN_TOP
295ALIGN_RIGHT = _core_.ALIGN_RIGHT
296ALIGN_BOTTOM = _core_.ALIGN_BOTTOM
297ALIGN_CENTER_VERTICAL = _core_.ALIGN_CENTER_VERTICAL
298ALIGN_CENTRE_VERTICAL = _core_.ALIGN_CENTRE_VERTICAL
299ALIGN_CENTER = _core_.ALIGN_CENTER
300ALIGN_CENTRE = _core_.ALIGN_CENTRE
301ALIGN_MASK = _core_.ALIGN_MASK
302STRETCH_NOT = _core_.STRETCH_NOT
303SHRINK = _core_.SHRINK
304GROW = _core_.GROW
305EXPAND = _core_.EXPAND
306SHAPED = _core_.SHAPED
307FIXED_MINSIZE = _core_.FIXED_MINSIZE
308TILE = _core_.TILE
309ADJUST_MINSIZE = _core_.ADJUST_MINSIZE
310BORDER_DEFAULT = _core_.BORDER_DEFAULT
311BORDER_NONE = _core_.BORDER_NONE
312BORDER_STATIC = _core_.BORDER_STATIC
313BORDER_SIMPLE = _core_.BORDER_SIMPLE
314BORDER_RAISED = _core_.BORDER_RAISED
315BORDER_SUNKEN = _core_.BORDER_SUNKEN
316BORDER_DOUBLE = _core_.BORDER_DOUBLE
317BORDER_MASK = _core_.BORDER_MASK
7bc1e663
RD
318BG_STYLE_SYSTEM = _core_.BG_STYLE_SYSTEM
319BG_STYLE_COLOUR = _core_.BG_STYLE_COLOUR
320BG_STYLE_CUSTOM = _core_.BG_STYLE_CUSTOM
54f9ee45
RD
321DEFAULT = _core_.DEFAULT
322DECORATIVE = _core_.DECORATIVE
323ROMAN = _core_.ROMAN
324SCRIPT = _core_.SCRIPT
325SWISS = _core_.SWISS
326MODERN = _core_.MODERN
327TELETYPE = _core_.TELETYPE
328VARIABLE = _core_.VARIABLE
329FIXED = _core_.FIXED
330NORMAL = _core_.NORMAL
331LIGHT = _core_.LIGHT
332BOLD = _core_.BOLD
333ITALIC = _core_.ITALIC
334SLANT = _core_.SLANT
335SOLID = _core_.SOLID
336DOT = _core_.DOT
337LONG_DASH = _core_.LONG_DASH
338SHORT_DASH = _core_.SHORT_DASH
339DOT_DASH = _core_.DOT_DASH
340USER_DASH = _core_.USER_DASH
341TRANSPARENT = _core_.TRANSPARENT
342STIPPLE = _core_.STIPPLE
343BDIAGONAL_HATCH = _core_.BDIAGONAL_HATCH
344CROSSDIAG_HATCH = _core_.CROSSDIAG_HATCH
345FDIAGONAL_HATCH = _core_.FDIAGONAL_HATCH
346CROSS_HATCH = _core_.CROSS_HATCH
347HORIZONTAL_HATCH = _core_.HORIZONTAL_HATCH
348VERTICAL_HATCH = _core_.VERTICAL_HATCH
349JOIN_BEVEL = _core_.JOIN_BEVEL
350JOIN_MITER = _core_.JOIN_MITER
351JOIN_ROUND = _core_.JOIN_ROUND
352CAP_ROUND = _core_.CAP_ROUND
353CAP_PROJECTING = _core_.CAP_PROJECTING
354CAP_BUTT = _core_.CAP_BUTT
355CLEAR = _core_.CLEAR
356XOR = _core_.XOR
357INVERT = _core_.INVERT
358OR_REVERSE = _core_.OR_REVERSE
359AND_REVERSE = _core_.AND_REVERSE
360COPY = _core_.COPY
361AND = _core_.AND
362AND_INVERT = _core_.AND_INVERT
363NO_OP = _core_.NO_OP
364NOR = _core_.NOR
365EQUIV = _core_.EQUIV
366SRC_INVERT = _core_.SRC_INVERT
367OR_INVERT = _core_.OR_INVERT
368NAND = _core_.NAND
369OR = _core_.OR
370SET = _core_.SET
371WXK_BACK = _core_.WXK_BACK
372WXK_TAB = _core_.WXK_TAB
373WXK_RETURN = _core_.WXK_RETURN
374WXK_ESCAPE = _core_.WXK_ESCAPE
375WXK_SPACE = _core_.WXK_SPACE
376WXK_DELETE = _core_.WXK_DELETE
377WXK_START = _core_.WXK_START
378WXK_LBUTTON = _core_.WXK_LBUTTON
379WXK_RBUTTON = _core_.WXK_RBUTTON
380WXK_CANCEL = _core_.WXK_CANCEL
381WXK_MBUTTON = _core_.WXK_MBUTTON
382WXK_CLEAR = _core_.WXK_CLEAR
383WXK_SHIFT = _core_.WXK_SHIFT
384WXK_ALT = _core_.WXK_ALT
385WXK_CONTROL = _core_.WXK_CONTROL
386WXK_MENU = _core_.WXK_MENU
387WXK_PAUSE = _core_.WXK_PAUSE
388WXK_CAPITAL = _core_.WXK_CAPITAL
389WXK_PRIOR = _core_.WXK_PRIOR
390WXK_NEXT = _core_.WXK_NEXT
391WXK_END = _core_.WXK_END
392WXK_HOME = _core_.WXK_HOME
393WXK_LEFT = _core_.WXK_LEFT
394WXK_UP = _core_.WXK_UP
395WXK_RIGHT = _core_.WXK_RIGHT
396WXK_DOWN = _core_.WXK_DOWN
397WXK_SELECT = _core_.WXK_SELECT
398WXK_PRINT = _core_.WXK_PRINT
399WXK_EXECUTE = _core_.WXK_EXECUTE
400WXK_SNAPSHOT = _core_.WXK_SNAPSHOT
401WXK_INSERT = _core_.WXK_INSERT
402WXK_HELP = _core_.WXK_HELP
403WXK_NUMPAD0 = _core_.WXK_NUMPAD0
404WXK_NUMPAD1 = _core_.WXK_NUMPAD1
405WXK_NUMPAD2 = _core_.WXK_NUMPAD2
406WXK_NUMPAD3 = _core_.WXK_NUMPAD3
407WXK_NUMPAD4 = _core_.WXK_NUMPAD4
408WXK_NUMPAD5 = _core_.WXK_NUMPAD5
409WXK_NUMPAD6 = _core_.WXK_NUMPAD6
410WXK_NUMPAD7 = _core_.WXK_NUMPAD7
411WXK_NUMPAD8 = _core_.WXK_NUMPAD8
412WXK_NUMPAD9 = _core_.WXK_NUMPAD9
413WXK_MULTIPLY = _core_.WXK_MULTIPLY
414WXK_ADD = _core_.WXK_ADD
415WXK_SEPARATOR = _core_.WXK_SEPARATOR
416WXK_SUBTRACT = _core_.WXK_SUBTRACT
417WXK_DECIMAL = _core_.WXK_DECIMAL
418WXK_DIVIDE = _core_.WXK_DIVIDE
419WXK_F1 = _core_.WXK_F1
420WXK_F2 = _core_.WXK_F2
421WXK_F3 = _core_.WXK_F3
422WXK_F4 = _core_.WXK_F4
423WXK_F5 = _core_.WXK_F5
424WXK_F6 = _core_.WXK_F6
425WXK_F7 = _core_.WXK_F7
426WXK_F8 = _core_.WXK_F8
427WXK_F9 = _core_.WXK_F9
428WXK_F10 = _core_.WXK_F10
429WXK_F11 = _core_.WXK_F11
430WXK_F12 = _core_.WXK_F12
431WXK_F13 = _core_.WXK_F13
432WXK_F14 = _core_.WXK_F14
433WXK_F15 = _core_.WXK_F15
434WXK_F16 = _core_.WXK_F16
435WXK_F17 = _core_.WXK_F17
436WXK_F18 = _core_.WXK_F18
437WXK_F19 = _core_.WXK_F19
438WXK_F20 = _core_.WXK_F20
439WXK_F21 = _core_.WXK_F21
440WXK_F22 = _core_.WXK_F22
441WXK_F23 = _core_.WXK_F23
442WXK_F24 = _core_.WXK_F24
443WXK_NUMLOCK = _core_.WXK_NUMLOCK
444WXK_SCROLL = _core_.WXK_SCROLL
445WXK_PAGEUP = _core_.WXK_PAGEUP
446WXK_PAGEDOWN = _core_.WXK_PAGEDOWN
447WXK_NUMPAD_SPACE = _core_.WXK_NUMPAD_SPACE
448WXK_NUMPAD_TAB = _core_.WXK_NUMPAD_TAB
449WXK_NUMPAD_ENTER = _core_.WXK_NUMPAD_ENTER
450WXK_NUMPAD_F1 = _core_.WXK_NUMPAD_F1
451WXK_NUMPAD_F2 = _core_.WXK_NUMPAD_F2
452WXK_NUMPAD_F3 = _core_.WXK_NUMPAD_F3
453WXK_NUMPAD_F4 = _core_.WXK_NUMPAD_F4
454WXK_NUMPAD_HOME = _core_.WXK_NUMPAD_HOME
455WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT
456WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP
457WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT
458WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN
459WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR
460WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP
461WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT
462WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN
463WXK_NUMPAD_END = _core_.WXK_NUMPAD_END
464WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN
465WXK_NUMPAD_INSERT = _core_.WXK_NUMPAD_INSERT
466WXK_NUMPAD_DELETE = _core_.WXK_NUMPAD_DELETE
467WXK_NUMPAD_EQUAL = _core_.WXK_NUMPAD_EQUAL
468WXK_NUMPAD_MULTIPLY = _core_.WXK_NUMPAD_MULTIPLY
469WXK_NUMPAD_ADD = _core_.WXK_NUMPAD_ADD
470WXK_NUMPAD_SEPARATOR = _core_.WXK_NUMPAD_SEPARATOR
471WXK_NUMPAD_SUBTRACT = _core_.WXK_NUMPAD_SUBTRACT
472WXK_NUMPAD_DECIMAL = _core_.WXK_NUMPAD_DECIMAL
473WXK_NUMPAD_DIVIDE = _core_.WXK_NUMPAD_DIVIDE
474WXK_WINDOWS_LEFT = _core_.WXK_WINDOWS_LEFT
475WXK_WINDOWS_RIGHT = _core_.WXK_WINDOWS_RIGHT
476WXK_WINDOWS_MENU = _core_.WXK_WINDOWS_MENU
477PAPER_NONE = _core_.PAPER_NONE
478PAPER_LETTER = _core_.PAPER_LETTER
479PAPER_LEGAL = _core_.PAPER_LEGAL
480PAPER_A4 = _core_.PAPER_A4
481PAPER_CSHEET = _core_.PAPER_CSHEET
482PAPER_DSHEET = _core_.PAPER_DSHEET
483PAPER_ESHEET = _core_.PAPER_ESHEET
484PAPER_LETTERSMALL = _core_.PAPER_LETTERSMALL
485PAPER_TABLOID = _core_.PAPER_TABLOID
486PAPER_LEDGER = _core_.PAPER_LEDGER
487PAPER_STATEMENT = _core_.PAPER_STATEMENT
488PAPER_EXECUTIVE = _core_.PAPER_EXECUTIVE
489PAPER_A3 = _core_.PAPER_A3
490PAPER_A4SMALL = _core_.PAPER_A4SMALL
491PAPER_A5 = _core_.PAPER_A5
492PAPER_B4 = _core_.PAPER_B4
493PAPER_B5 = _core_.PAPER_B5
494PAPER_FOLIO = _core_.PAPER_FOLIO
495PAPER_QUARTO = _core_.PAPER_QUARTO
496PAPER_10X14 = _core_.PAPER_10X14
497PAPER_11X17 = _core_.PAPER_11X17
498PAPER_NOTE = _core_.PAPER_NOTE
499PAPER_ENV_9 = _core_.PAPER_ENV_9
500PAPER_ENV_10 = _core_.PAPER_ENV_10
501PAPER_ENV_11 = _core_.PAPER_ENV_11
502PAPER_ENV_12 = _core_.PAPER_ENV_12
503PAPER_ENV_14 = _core_.PAPER_ENV_14
504PAPER_ENV_DL = _core_.PAPER_ENV_DL
505PAPER_ENV_C5 = _core_.PAPER_ENV_C5
506PAPER_ENV_C3 = _core_.PAPER_ENV_C3
507PAPER_ENV_C4 = _core_.PAPER_ENV_C4
508PAPER_ENV_C6 = _core_.PAPER_ENV_C6
509PAPER_ENV_C65 = _core_.PAPER_ENV_C65
510PAPER_ENV_B4 = _core_.PAPER_ENV_B4
511PAPER_ENV_B5 = _core_.PAPER_ENV_B5
512PAPER_ENV_B6 = _core_.PAPER_ENV_B6
513PAPER_ENV_ITALY = _core_.PAPER_ENV_ITALY
514PAPER_ENV_MONARCH = _core_.PAPER_ENV_MONARCH
515PAPER_ENV_PERSONAL = _core_.PAPER_ENV_PERSONAL
516PAPER_FANFOLD_US = _core_.PAPER_FANFOLD_US
517PAPER_FANFOLD_STD_GERMAN = _core_.PAPER_FANFOLD_STD_GERMAN
518PAPER_FANFOLD_LGL_GERMAN = _core_.PAPER_FANFOLD_LGL_GERMAN
519PAPER_ISO_B4 = _core_.PAPER_ISO_B4
520PAPER_JAPANESE_POSTCARD = _core_.PAPER_JAPANESE_POSTCARD
521PAPER_9X11 = _core_.PAPER_9X11
522PAPER_10X11 = _core_.PAPER_10X11
523PAPER_15X11 = _core_.PAPER_15X11
524PAPER_ENV_INVITE = _core_.PAPER_ENV_INVITE
525PAPER_LETTER_EXTRA = _core_.PAPER_LETTER_EXTRA
526PAPER_LEGAL_EXTRA = _core_.PAPER_LEGAL_EXTRA
527PAPER_TABLOID_EXTRA = _core_.PAPER_TABLOID_EXTRA
528PAPER_A4_EXTRA = _core_.PAPER_A4_EXTRA
529PAPER_LETTER_TRANSVERSE = _core_.PAPER_LETTER_TRANSVERSE
530PAPER_A4_TRANSVERSE = _core_.PAPER_A4_TRANSVERSE
531PAPER_LETTER_EXTRA_TRANSVERSE = _core_.PAPER_LETTER_EXTRA_TRANSVERSE
532PAPER_A_PLUS = _core_.PAPER_A_PLUS
533PAPER_B_PLUS = _core_.PAPER_B_PLUS
534PAPER_LETTER_PLUS = _core_.PAPER_LETTER_PLUS
535PAPER_A4_PLUS = _core_.PAPER_A4_PLUS
536PAPER_A5_TRANSVERSE = _core_.PAPER_A5_TRANSVERSE
537PAPER_B5_TRANSVERSE = _core_.PAPER_B5_TRANSVERSE
538PAPER_A3_EXTRA = _core_.PAPER_A3_EXTRA
539PAPER_A5_EXTRA = _core_.PAPER_A5_EXTRA
540PAPER_B5_EXTRA = _core_.PAPER_B5_EXTRA
541PAPER_A2 = _core_.PAPER_A2
542PAPER_A3_TRANSVERSE = _core_.PAPER_A3_TRANSVERSE
543PAPER_A3_EXTRA_TRANSVERSE = _core_.PAPER_A3_EXTRA_TRANSVERSE
544DUPLEX_SIMPLEX = _core_.DUPLEX_SIMPLEX
545DUPLEX_HORIZONTAL = _core_.DUPLEX_HORIZONTAL
546DUPLEX_VERTICAL = _core_.DUPLEX_VERTICAL
547ITEM_SEPARATOR = _core_.ITEM_SEPARATOR
548ITEM_NORMAL = _core_.ITEM_NORMAL
549ITEM_CHECK = _core_.ITEM_CHECK
550ITEM_RADIO = _core_.ITEM_RADIO
551ITEM_MAX = _core_.ITEM_MAX
552HT_NOWHERE = _core_.HT_NOWHERE
553HT_SCROLLBAR_FIRST = _core_.HT_SCROLLBAR_FIRST
554HT_SCROLLBAR_ARROW_LINE_1 = _core_.HT_SCROLLBAR_ARROW_LINE_1
555HT_SCROLLBAR_ARROW_LINE_2 = _core_.HT_SCROLLBAR_ARROW_LINE_2
556HT_SCROLLBAR_ARROW_PAGE_1 = _core_.HT_SCROLLBAR_ARROW_PAGE_1
557HT_SCROLLBAR_ARROW_PAGE_2 = _core_.HT_SCROLLBAR_ARROW_PAGE_2
558HT_SCROLLBAR_THUMB = _core_.HT_SCROLLBAR_THUMB
559HT_SCROLLBAR_BAR_1 = _core_.HT_SCROLLBAR_BAR_1
560HT_SCROLLBAR_BAR_2 = _core_.HT_SCROLLBAR_BAR_2
561HT_SCROLLBAR_LAST = _core_.HT_SCROLLBAR_LAST
562HT_WINDOW_OUTSIDE = _core_.HT_WINDOW_OUTSIDE
563HT_WINDOW_INSIDE = _core_.HT_WINDOW_INSIDE
564HT_WINDOW_VERT_SCROLLBAR = _core_.HT_WINDOW_VERT_SCROLLBAR
565HT_WINDOW_HORZ_SCROLLBAR = _core_.HT_WINDOW_HORZ_SCROLLBAR
566HT_WINDOW_CORNER = _core_.HT_WINDOW_CORNER
567HT_MAX = _core_.HT_MAX
568MOD_NONE = _core_.MOD_NONE
569MOD_ALT = _core_.MOD_ALT
570MOD_CONTROL = _core_.MOD_CONTROL
571MOD_SHIFT = _core_.MOD_SHIFT
572MOD_WIN = _core_.MOD_WIN
573UPDATE_UI_NONE = _core_.UPDATE_UI_NONE
574UPDATE_UI_RECURSE = _core_.UPDATE_UI_RECURSE
575UPDATE_UI_FROMIDLE = _core_.UPDATE_UI_FROMIDLE
d14a1e28
RD
576#---------------------------------------------------------------------------
577
578class Object(object):
0df68c9f
RD
579 """
580 The base class for most wx objects, although in wxPython not
581 much functionality is needed nor exposed.
582 """
d14a1e28
RD
583 def __init__(self): raise RuntimeError, "No constructor defined"
584 def __repr__(self):
585 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 586 def GetClassName(*args, **kwargs):
0df68c9f 587 """
a95a7133 588 GetClassName(self) -> String
e811c8ce 589
a95a7133 590 Returns the class name of the C++ class using wxRTTI.
0df68c9f 591 """
54f9ee45 592 return _core_.Object_GetClassName(*args, **kwargs)
e811c8ce
RD
593
594 def Destroy(*args, **kwargs):
0df68c9f 595 """
a95a7133 596 Destroy(self)
e811c8ce 597
0df68c9f
RD
598 Deletes the C++ object this Python object is a proxy for.
599 """
54f9ee45 600 return _core_.Object_Destroy(*args, **kwargs)
e811c8ce 601
d14a1e28
RD
602
603class ObjectPtr(Object):
604 def __init__(self, this):
605 self.this = this
606 if not hasattr(self,"thisown"): self.thisown = 0
607 self.__class__ = Object
54f9ee45
RD
608_core_.Object_swigregister(ObjectPtr)
609_wxPySetDictionary = _core_._wxPySetDictionary
d14a1e28 610
54f9ee45 611_wxPyFixStockObjects = _core_._wxPyFixStockObjects
3a04f143 612
54f9ee45 613cvar = _core_.cvar
196addbf 614EmptyString = cvar.EmptyString
d14a1e28
RD
615
616#---------------------------------------------------------------------------
617
54f9ee45
RD
618BITMAP_TYPE_INVALID = _core_.BITMAP_TYPE_INVALID
619BITMAP_TYPE_BMP = _core_.BITMAP_TYPE_BMP
620BITMAP_TYPE_ICO = _core_.BITMAP_TYPE_ICO
621BITMAP_TYPE_CUR = _core_.BITMAP_TYPE_CUR
622BITMAP_TYPE_XBM = _core_.BITMAP_TYPE_XBM
623BITMAP_TYPE_XBM_DATA = _core_.BITMAP_TYPE_XBM_DATA
624BITMAP_TYPE_XPM = _core_.BITMAP_TYPE_XPM
625BITMAP_TYPE_XPM_DATA = _core_.BITMAP_TYPE_XPM_DATA
626BITMAP_TYPE_TIF = _core_.BITMAP_TYPE_TIF
627BITMAP_TYPE_GIF = _core_.BITMAP_TYPE_GIF
628BITMAP_TYPE_PNG = _core_.BITMAP_TYPE_PNG
629BITMAP_TYPE_JPEG = _core_.BITMAP_TYPE_JPEG
630BITMAP_TYPE_PNM = _core_.BITMAP_TYPE_PNM
631BITMAP_TYPE_PCX = _core_.BITMAP_TYPE_PCX
632BITMAP_TYPE_PICT = _core_.BITMAP_TYPE_PICT
633BITMAP_TYPE_ICON = _core_.BITMAP_TYPE_ICON
634BITMAP_TYPE_ANI = _core_.BITMAP_TYPE_ANI
635BITMAP_TYPE_IFF = _core_.BITMAP_TYPE_IFF
636BITMAP_TYPE_MACCURSOR = _core_.BITMAP_TYPE_MACCURSOR
637BITMAP_TYPE_ANY = _core_.BITMAP_TYPE_ANY
638CURSOR_NONE = _core_.CURSOR_NONE
639CURSOR_ARROW = _core_.CURSOR_ARROW
640CURSOR_RIGHT_ARROW = _core_.CURSOR_RIGHT_ARROW
641CURSOR_BULLSEYE = _core_.CURSOR_BULLSEYE
642CURSOR_CHAR = _core_.CURSOR_CHAR
643CURSOR_CROSS = _core_.CURSOR_CROSS
644CURSOR_HAND = _core_.CURSOR_HAND
645CURSOR_IBEAM = _core_.CURSOR_IBEAM
646CURSOR_LEFT_BUTTON = _core_.CURSOR_LEFT_BUTTON
647CURSOR_MAGNIFIER = _core_.CURSOR_MAGNIFIER
648CURSOR_MIDDLE_BUTTON = _core_.CURSOR_MIDDLE_BUTTON
649CURSOR_NO_ENTRY = _core_.CURSOR_NO_ENTRY
650CURSOR_PAINT_BRUSH = _core_.CURSOR_PAINT_BRUSH
651CURSOR_PENCIL = _core_.CURSOR_PENCIL
652CURSOR_POINT_LEFT = _core_.CURSOR_POINT_LEFT
653CURSOR_POINT_RIGHT = _core_.CURSOR_POINT_RIGHT
654CURSOR_QUESTION_ARROW = _core_.CURSOR_QUESTION_ARROW
655CURSOR_RIGHT_BUTTON = _core_.CURSOR_RIGHT_BUTTON
656CURSOR_SIZENESW = _core_.CURSOR_SIZENESW
657CURSOR_SIZENS = _core_.CURSOR_SIZENS
658CURSOR_SIZENWSE = _core_.CURSOR_SIZENWSE
659CURSOR_SIZEWE = _core_.CURSOR_SIZEWE
660CURSOR_SIZING = _core_.CURSOR_SIZING
661CURSOR_SPRAYCAN = _core_.CURSOR_SPRAYCAN
662CURSOR_WAIT = _core_.CURSOR_WAIT
663CURSOR_WATCH = _core_.CURSOR_WATCH
664CURSOR_BLANK = _core_.CURSOR_BLANK
665CURSOR_DEFAULT = _core_.CURSOR_DEFAULT
666CURSOR_COPY_ARROW = _core_.CURSOR_COPY_ARROW
667CURSOR_ARROWWAIT = _core_.CURSOR_ARROWWAIT
668CURSOR_MAX = _core_.CURSOR_MAX
d14a1e28
RD
669#---------------------------------------------------------------------------
670
671class Size(object):
0df68c9f 672 """
41e2b43e
RD
673 wx.Size is a useful data structure used to represent the size of
674 something. It simply contians integer width and height proprtites.
675 In most places in wxPython where a wx.Size is expected a
676 (width,height) tuple can be used instead.
0df68c9f 677 """
e811c8ce
RD
678 def __repr__(self):
679 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
680 width = property(_core_.Size_width_get, _core_.Size_width_set)
681 height = property(_core_.Size_height_get, _core_.Size_height_set)
242b7b46 682 x = width; y = height
d14a1e28 683 def __init__(self, *args, **kwargs):
0df68c9f 684 """
a95a7133 685 __init__(self, int w=0, int h=0) -> Size
e811c8ce 686
0df68c9f
RD
687 Creates a size object.
688 """
54f9ee45 689 newobj = _core_.new_Size(*args, **kwargs)
d14a1e28
RD
690 self.this = newobj.this
691 self.thisown = 1
692 del newobj.thisown
54f9ee45 693 def __del__(self, destroy=_core_.delete_Size):
a95a7133 694 """__del__(self)"""
d14a1e28
RD
695 try:
696 if self.thisown: destroy(self)
697 except: pass
e811c8ce
RD
698
699 def __eq__(*args, **kwargs):
0df68c9f 700 """
a95a7133 701 __eq__(self, Size sz) -> bool
e811c8ce 702
0df68c9f
RD
703 Test for equality of wx.Size objects.
704 """
54f9ee45 705 return _core_.Size___eq__(*args, **kwargs)
e811c8ce
RD
706
707 def __ne__(*args, **kwargs):
0df68c9f 708 """
a95a7133 709 __ne__(self, Size sz) -> bool
e811c8ce 710
0df68c9f
RD
711 Test for inequality.
712 """
54f9ee45 713 return _core_.Size___ne__(*args, **kwargs)
e811c8ce
RD
714
715 def __add__(*args, **kwargs):
0df68c9f 716 """
a95a7133 717 __add__(self, Size sz) -> Size
e811c8ce 718
0df68c9f
RD
719 Add sz's proprties to this and return the result.
720 """
54f9ee45 721 return _core_.Size___add__(*args, **kwargs)
e811c8ce
RD
722
723 def __sub__(*args, **kwargs):
0df68c9f 724 """
a95a7133 725 __sub__(self, Size sz) -> Size
e811c8ce 726
0df68c9f
RD
727 Subtract sz's properties from this and return the result.
728 """
54f9ee45 729 return _core_.Size___sub__(*args, **kwargs)
e811c8ce
RD
730
731 def IncTo(*args, **kwargs):
0df68c9f 732 """
a95a7133 733 IncTo(self, Size sz)
e811c8ce 734
0df68c9f
RD
735 Increments this object so that both of its dimensions are not less
736 than the corresponding dimensions of the size.
737 """
54f9ee45 738 return _core_.Size_IncTo(*args, **kwargs)
e811c8ce
RD
739
740 def DecTo(*args, **kwargs):
0df68c9f 741 """
a95a7133 742 DecTo(self, Size sz)
e811c8ce 743
0df68c9f
RD
744 Decrements this object so that both of its dimensions are not greater
745 than the corresponding dimensions of the size.
746 """
54f9ee45 747 return _core_.Size_DecTo(*args, **kwargs)
e811c8ce
RD
748
749 def Set(*args, **kwargs):
0df68c9f 750 """
a95a7133 751 Set(self, int w, int h)
e811c8ce 752
0df68c9f
RD
753 Set both width and height.
754 """
54f9ee45 755 return _core_.Size_Set(*args, **kwargs)
e811c8ce
RD
756
757 def SetWidth(*args, **kwargs):
a95a7133 758 """SetWidth(self, int w)"""
54f9ee45 759 return _core_.Size_SetWidth(*args, **kwargs)
e811c8ce
RD
760
761 def SetHeight(*args, **kwargs):
a95a7133 762 """SetHeight(self, int h)"""
54f9ee45 763 return _core_.Size_SetHeight(*args, **kwargs)
e811c8ce
RD
764
765 def GetWidth(*args, **kwargs):
a95a7133 766 """GetWidth(self) -> int"""
54f9ee45 767 return _core_.Size_GetWidth(*args, **kwargs)
e811c8ce
RD
768
769 def GetHeight(*args, **kwargs):
a95a7133 770 """GetHeight(self) -> int"""
54f9ee45 771 return _core_.Size_GetHeight(*args, **kwargs)
e811c8ce 772
74a57fcd
RD
773 def IsFullySpecified(*args, **kwargs):
774 """
a95a7133 775 IsFullySpecified(self) -> bool
74a57fcd
RD
776
777 Returns True if both components of the size are non-default values.
778 """
54f9ee45 779 return _core_.Size_IsFullySpecified(*args, **kwargs)
74a57fcd
RD
780
781 def SetDefaults(*args, **kwargs):
782 """
a95a7133 783 SetDefaults(self, Size size)
74a57fcd 784
41e2b43e
RD
785 Combine this size with the other one replacing the default components
786 of this object (i.e. equal to -1) with those of the other.
74a57fcd 787 """
54f9ee45 788 return _core_.Size_SetDefaults(*args, **kwargs)
74a57fcd 789
e811c8ce 790 def Get(*args, **kwargs):
0df68c9f
RD
791 """
792 Get() -> (width,height)
e811c8ce 793
0df68c9f
RD
794 Returns the width and height properties as a tuple.
795 """
54f9ee45 796 return _core_.Size_Get(*args, **kwargs)
e811c8ce 797
41e2b43e 798 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
799 def __str__(self): return str(self.Get())
800 def __repr__(self): return 'wx.Size'+str(self.Get())
801 def __len__(self): return len(self.Get())
802 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
803 def __setitem__(self, index, val):
804 if index == 0: self.width = val
805 elif index == 1: self.height = val
806 else: raise IndexError
e811c8ce 807 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
808 __safe_for_unpickling__ = True
809 def __reduce__(self): return (wx.Size, self.Get())
d14a1e28
RD
810
811
812class SizePtr(Size):
813 def __init__(self, this):
814 self.this = this
815 if not hasattr(self,"thisown"): self.thisown = 0
816 self.__class__ = Size
54f9ee45 817_core_.Size_swigregister(SizePtr)
d14a1e28
RD
818
819#---------------------------------------------------------------------------
820
821class RealPoint(object):
0df68c9f 822 """
41e2b43e
RD
823 A data structure for representing a point or position with floating
824 point x and y properties. In wxPython most places that expect a
825 wx.RealPoint can also accept a (x,y) tuple.
0df68c9f 826 """
e811c8ce
RD
827 def __repr__(self):
828 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
829 x = property(_core_.RealPoint_x_get, _core_.RealPoint_x_set)
830 y = property(_core_.RealPoint_y_get, _core_.RealPoint_y_set)
d14a1e28 831 def __init__(self, *args, **kwargs):
0df68c9f 832 """
a95a7133 833 __init__(self, double x=0.0, double y=0.0) -> RealPoint
e811c8ce 834
0df68c9f
RD
835 Create a wx.RealPoint object
836 """
54f9ee45 837 newobj = _core_.new_RealPoint(*args, **kwargs)
d14a1e28
RD
838 self.this = newobj.this
839 self.thisown = 1
840 del newobj.thisown
54f9ee45 841 def __del__(self, destroy=_core_.delete_RealPoint):
a95a7133 842 """__del__(self)"""
d14a1e28
RD
843 try:
844 if self.thisown: destroy(self)
845 except: pass
e811c8ce
RD
846
847 def __eq__(*args, **kwargs):
0df68c9f 848 """
a95a7133 849 __eq__(self, RealPoint pt) -> bool
e811c8ce 850
0df68c9f
RD
851 Test for equality of wx.RealPoint objects.
852 """
54f9ee45 853 return _core_.RealPoint___eq__(*args, **kwargs)
e811c8ce
RD
854
855 def __ne__(*args, **kwargs):
0df68c9f 856 """
a95a7133 857 __ne__(self, RealPoint pt) -> bool
e811c8ce 858
0df68c9f
RD
859 Test for inequality of wx.RealPoint objects.
860 """
54f9ee45 861 return _core_.RealPoint___ne__(*args, **kwargs)
e811c8ce
RD
862
863 def __add__(*args, **kwargs):
0df68c9f 864 """
a95a7133 865 __add__(self, RealPoint pt) -> RealPoint
e811c8ce 866
0df68c9f
RD
867 Add pt's proprties to this and return the result.
868 """
54f9ee45 869 return _core_.RealPoint___add__(*args, **kwargs)
e811c8ce
RD
870
871 def __sub__(*args, **kwargs):
0df68c9f 872 """
a95a7133 873 __sub__(self, RealPoint pt) -> RealPoint
e811c8ce 874
0df68c9f
RD
875 Subtract pt's proprties from this and return the result
876 """
54f9ee45 877 return _core_.RealPoint___sub__(*args, **kwargs)
e811c8ce
RD
878
879 def Set(*args, **kwargs):
0df68c9f 880 """
a95a7133 881 Set(self, double x, double y)
e811c8ce 882
0df68c9f
RD
883 Set both the x and y properties
884 """
54f9ee45 885 return _core_.RealPoint_Set(*args, **kwargs)
e811c8ce
RD
886
887 def Get(*args, **kwargs):
0df68c9f
RD
888 """
889 Get() -> (x,y)
e811c8ce 890
0df68c9f
RD
891 Return the x and y properties as a tuple.
892 """
54f9ee45 893 return _core_.RealPoint_Get(*args, **kwargs)
e811c8ce 894
41e2b43e 895 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
896 def __str__(self): return str(self.Get())
897 def __repr__(self): return 'wx.RealPoint'+str(self.Get())
898 def __len__(self): return len(self.Get())
899 def __getitem__(self, index): return self.Get()[index]
d14a1e28 900 def __setitem__(self, index, val):
e811c8ce
RD
901 if index == 0: self.x = val
902 elif index == 1: self.y = val
d14a1e28 903 else: raise IndexError
e811c8ce 904 def __nonzero__(self): return self.Get() != (0.0, 0.0)
74e96f3d
RD
905 __safe_for_unpickling__ = True
906 def __reduce__(self): return (wx.RealPoint, self.Get())
d14a1e28
RD
907
908
909class RealPointPtr(RealPoint):
910 def __init__(self, this):
911 self.this = this
912 if not hasattr(self,"thisown"): self.thisown = 0
913 self.__class__ = RealPoint
54f9ee45 914_core_.RealPoint_swigregister(RealPointPtr)
d14a1e28
RD
915
916#---------------------------------------------------------------------------
917
918class Point(object):
0df68c9f 919 """
41e2b43e
RD
920 A data structure for representing a point or position with integer x
921 and y properties. Most places in wxPython that expect a wx.Point can
922 also accept a (x,y) tuple.
0df68c9f 923 """
e811c8ce
RD
924 def __repr__(self):
925 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
926 x = property(_core_.Point_x_get, _core_.Point_x_set)
927 y = property(_core_.Point_y_get, _core_.Point_y_set)
d14a1e28 928 def __init__(self, *args, **kwargs):
0df68c9f 929 """
a95a7133 930 __init__(self, int x=0, int y=0) -> Point
e811c8ce 931
0df68c9f
RD
932 Create a wx.Point object
933 """
54f9ee45 934 newobj = _core_.new_Point(*args, **kwargs)
d14a1e28
RD
935 self.this = newobj.this
936 self.thisown = 1
937 del newobj.thisown
54f9ee45 938 def __del__(self, destroy=_core_.delete_Point):
a95a7133 939 """__del__(self)"""
d14a1e28
RD
940 try:
941 if self.thisown: destroy(self)
942 except: pass
e811c8ce
RD
943
944 def __eq__(*args, **kwargs):
0df68c9f 945 """
a95a7133 946 __eq__(self, Point pt) -> bool
e811c8ce 947
0df68c9f
RD
948 Test for equality of wx.Point objects.
949 """
54f9ee45 950 return _core_.Point___eq__(*args, **kwargs)
e811c8ce
RD
951
952 def __ne__(*args, **kwargs):
0df68c9f 953 """
a95a7133 954 __ne__(self, Point pt) -> bool
e811c8ce 955
0df68c9f
RD
956 Test for inequality of wx.Point objects.
957 """
54f9ee45 958 return _core_.Point___ne__(*args, **kwargs)
e811c8ce
RD
959
960 def __add__(*args, **kwargs):
0df68c9f 961 """
a95a7133 962 __add__(self, Point pt) -> Point
e811c8ce 963
0df68c9f
RD
964 Add pt's proprties to this and return the result.
965 """
54f9ee45 966 return _core_.Point___add__(*args, **kwargs)
e811c8ce
RD
967
968 def __sub__(*args, **kwargs):
0df68c9f 969 """
a95a7133 970 __sub__(self, Point pt) -> Point
e811c8ce 971
0df68c9f
RD
972 Subtract pt's proprties from this and return the result
973 """
54f9ee45 974 return _core_.Point___sub__(*args, **kwargs)
e811c8ce
RD
975
976 def __iadd__(*args, **kwargs):
0df68c9f 977 """
a95a7133 978 __iadd__(self, Point pt) -> Point
e811c8ce 979
0df68c9f
RD
980 Add pt to this object.
981 """
54f9ee45 982 return _core_.Point___iadd__(*args, **kwargs)
e811c8ce
RD
983
984 def __isub__(*args, **kwargs):
0df68c9f 985 """
a95a7133 986 __isub__(self, Point pt) -> Point
e811c8ce 987
0df68c9f
RD
988 Subtract pt from this object.
989 """
54f9ee45 990 return _core_.Point___isub__(*args, **kwargs)
e811c8ce
RD
991
992 def Set(*args, **kwargs):
0df68c9f 993 """
a95a7133 994 Set(self, long x, long y)
e811c8ce 995
0df68c9f
RD
996 Set both the x and y properties
997 """
54f9ee45 998 return _core_.Point_Set(*args, **kwargs)
e811c8ce
RD
999
1000 def Get(*args, **kwargs):
0df68c9f
RD
1001 """
1002 Get() -> (x,y)
e811c8ce 1003
0df68c9f
RD
1004 Return the x and y properties as a tuple.
1005 """
54f9ee45 1006 return _core_.Point_Get(*args, **kwargs)
e811c8ce 1007
41e2b43e 1008 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
1009 def __str__(self): return str(self.Get())
1010 def __repr__(self): return 'wx.Point'+str(self.Get())
1011 def __len__(self): return len(self.Get())
1012 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
1013 def __setitem__(self, index, val):
1014 if index == 0: self.x = val
1015 elif index == 1: self.y = val
1016 else: raise IndexError
e811c8ce 1017 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
1018 __safe_for_unpickling__ = True
1019 def __reduce__(self): return (wx.Point, self.Get())
d14a1e28
RD
1020
1021
1022class PointPtr(Point):
1023 def __init__(self, this):
1024 self.this = this
1025 if not hasattr(self,"thisown"): self.thisown = 0
1026 self.__class__ = Point
54f9ee45 1027_core_.Point_swigregister(PointPtr)
d14a1e28
RD
1028
1029#---------------------------------------------------------------------------
1030
1031class Rect(object):
0df68c9f 1032 """
41e2b43e
RD
1033 A class for representing and manipulating rectangles. It has x, y,
1034 width and height properties. In wxPython most palces that expect a
1035 wx.Rect can also accept a (x,y,width,height) tuple.
0df68c9f 1036 """
e811c8ce
RD
1037 def __repr__(self):
1038 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1039 def __init__(self, *args, **kwargs):
0df68c9f 1040 """
a95a7133 1041 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
e811c8ce 1042
0df68c9f
RD
1043 Create a new Rect object.
1044 """
54f9ee45 1045 newobj = _core_.new_Rect(*args, **kwargs)
d14a1e28
RD
1046 self.this = newobj.this
1047 self.thisown = 1
1048 del newobj.thisown
54f9ee45 1049 def __del__(self, destroy=_core_.delete_Rect):
a95a7133 1050 """__del__(self)"""
d14a1e28
RD
1051 try:
1052 if self.thisown: destroy(self)
1053 except: pass
e811c8ce
RD
1054
1055 def GetX(*args, **kwargs):
a95a7133 1056 """GetX(self) -> int"""
54f9ee45 1057 return _core_.Rect_GetX(*args, **kwargs)
e811c8ce
RD
1058
1059 def SetX(*args, **kwargs):
a95a7133 1060 """SetX(self, int x)"""
54f9ee45 1061 return _core_.Rect_SetX(*args, **kwargs)
e811c8ce
RD
1062
1063 def GetY(*args, **kwargs):
a95a7133 1064 """GetY(self) -> int"""
54f9ee45 1065 return _core_.Rect_GetY(*args, **kwargs)
e811c8ce
RD
1066
1067 def SetY(*args, **kwargs):
a95a7133 1068 """SetY(self, int y)"""
54f9ee45 1069 return _core_.Rect_SetY(*args, **kwargs)
e811c8ce
RD
1070
1071 def GetWidth(*args, **kwargs):
a95a7133 1072 """GetWidth(self) -> int"""
54f9ee45 1073 return _core_.Rect_GetWidth(*args, **kwargs)
e811c8ce
RD
1074
1075 def SetWidth(*args, **kwargs):
a95a7133 1076 """SetWidth(self, int w)"""
54f9ee45 1077 return _core_.Rect_SetWidth(*args, **kwargs)
e811c8ce
RD
1078
1079 def GetHeight(*args, **kwargs):
a95a7133 1080 """GetHeight(self) -> int"""
54f9ee45 1081 return _core_.Rect_GetHeight(*args, **kwargs)
e811c8ce
RD
1082
1083 def SetHeight(*args, **kwargs):
a95a7133 1084 """SetHeight(self, int h)"""
54f9ee45 1085 return _core_.Rect_SetHeight(*args, **kwargs)
e811c8ce
RD
1086
1087 def GetPosition(*args, **kwargs):
a95a7133 1088 """GetPosition(self) -> Point"""
54f9ee45 1089 return _core_.Rect_GetPosition(*args, **kwargs)
e811c8ce
RD
1090
1091 def SetPosition(*args, **kwargs):
a95a7133 1092 """SetPosition(self, Point p)"""
54f9ee45 1093 return _core_.Rect_SetPosition(*args, **kwargs)
e811c8ce
RD
1094
1095 def GetSize(*args, **kwargs):
a95a7133 1096 """GetSize(self) -> Size"""
54f9ee45 1097 return _core_.Rect_GetSize(*args, **kwargs)
e811c8ce
RD
1098
1099 def SetSize(*args, **kwargs):
a95a7133 1100 """SetSize(self, Size s)"""
54f9ee45 1101 return _core_.Rect_SetSize(*args, **kwargs)
e811c8ce 1102
c9c7117a 1103 def GetTopLeft(*args, **kwargs):
a95a7133 1104 """GetTopLeft(self) -> Point"""
54f9ee45 1105 return _core_.Rect_GetTopLeft(*args, **kwargs)
c9c7117a
RD
1106
1107 def SetTopLeft(*args, **kwargs):
a95a7133 1108 """SetTopLeft(self, Point p)"""
54f9ee45 1109 return _core_.Rect_SetTopLeft(*args, **kwargs)
c9c7117a
RD
1110
1111 def GetBottomRight(*args, **kwargs):
a95a7133 1112 """GetBottomRight(self) -> Point"""
54f9ee45 1113 return _core_.Rect_GetBottomRight(*args, **kwargs)
c9c7117a
RD
1114
1115 def SetBottomRight(*args, **kwargs):
a95a7133 1116 """SetBottomRight(self, Point p)"""
54f9ee45 1117 return _core_.Rect_SetBottomRight(*args, **kwargs)
c9c7117a 1118
e811c8ce 1119 def GetLeft(*args, **kwargs):
a95a7133 1120 """GetLeft(self) -> int"""
54f9ee45 1121 return _core_.Rect_GetLeft(*args, **kwargs)
e811c8ce
RD
1122
1123 def GetTop(*args, **kwargs):
a95a7133 1124 """GetTop(self) -> int"""
54f9ee45 1125 return _core_.Rect_GetTop(*args, **kwargs)
e811c8ce
RD
1126
1127 def GetBottom(*args, **kwargs):
a95a7133 1128 """GetBottom(self) -> int"""
54f9ee45 1129 return _core_.Rect_GetBottom(*args, **kwargs)
e811c8ce
RD
1130
1131 def GetRight(*args, **kwargs):
a95a7133 1132 """GetRight(self) -> int"""
54f9ee45 1133 return _core_.Rect_GetRight(*args, **kwargs)
e811c8ce
RD
1134
1135 def SetLeft(*args, **kwargs):
a95a7133 1136 """SetLeft(self, int left)"""
54f9ee45 1137 return _core_.Rect_SetLeft(*args, **kwargs)
e811c8ce
RD
1138
1139 def SetRight(*args, **kwargs):
a95a7133 1140 """SetRight(self, int right)"""
54f9ee45 1141 return _core_.Rect_SetRight(*args, **kwargs)
e811c8ce
RD
1142
1143 def SetTop(*args, **kwargs):
a95a7133 1144 """SetTop(self, int top)"""
54f9ee45 1145 return _core_.Rect_SetTop(*args, **kwargs)
e811c8ce
RD
1146
1147 def SetBottom(*args, **kwargs):
a95a7133 1148 """SetBottom(self, int bottom)"""
54f9ee45 1149 return _core_.Rect_SetBottom(*args, **kwargs)
e811c8ce
RD
1150
1151 position = property(GetPosition, SetPosition)
1152 size = property(GetSize, SetSize)
1153 left = property(GetLeft, SetLeft)
1154 right = property(GetRight, SetRight)
1155 top = property(GetTop, SetTop)
1156 bottom = property(GetBottom, SetBottom)
1157
1158 def Inflate(*args, **kwargs):
0df68c9f 1159 """
a95a7133 1160 Inflate(self, int dx, int dy) -> Rect
e811c8ce 1161
41e2b43e
RD
1162 Increase the rectangle size by dx in x direction and dy in y
1163 direction. Both or one of) parameters may be negative to decrease the
1164 rectangle size.
0df68c9f 1165 """
54f9ee45 1166 return _core_.Rect_Inflate(*args, **kwargs)
e811c8ce
RD
1167
1168 def Deflate(*args, **kwargs):
0df68c9f 1169 """
a95a7133 1170 Deflate(self, int dx, int dy) -> Rect
e811c8ce 1171
41e2b43e
RD
1172 Decrease the rectangle size by dx in x direction and dy in y
1173 direction. Both or one of) parameters may be negative to increase the
1174 rectngle size. This method is the opposite of Inflate.
0df68c9f 1175 """
54f9ee45 1176 return _core_.Rect_Deflate(*args, **kwargs)
e811c8ce
RD
1177
1178 def OffsetXY(*args, **kwargs):
0df68c9f 1179 """
a95a7133 1180 OffsetXY(self, int dx, int dy)
e811c8ce 1181
41e2b43e
RD
1182 Moves the rectangle by the specified offset. If dx is positive, the
1183 rectangle is moved to the right, if dy is positive, it is moved to the
1184 bottom, otherwise it is moved to the left or top respectively.
0df68c9f 1185 """
54f9ee45 1186 return _core_.Rect_OffsetXY(*args, **kwargs)
e811c8ce
RD
1187
1188 def Offset(*args, **kwargs):
0df68c9f 1189 """
a95a7133 1190 Offset(self, Point pt)
e811c8ce 1191
0df68c9f
RD
1192 Same as OffsetXY but uses dx,dy from Point
1193 """
54f9ee45 1194 return _core_.Rect_Offset(*args, **kwargs)
e811c8ce
RD
1195
1196 def Intersect(*args, **kwargs):
0df68c9f 1197 """
a95a7133 1198 Intersect(self, Rect rect) -> Rect
e811c8ce 1199
0df68c9f
RD
1200 Return the intersectsion of this rectangle and rect.
1201 """
54f9ee45 1202 return _core_.Rect_Intersect(*args, **kwargs)
e811c8ce
RD
1203
1204 def __add__(*args, **kwargs):
0df68c9f 1205 """
a95a7133 1206 __add__(self, Rect rect) -> Rect
e811c8ce 1207
0df68c9f
RD
1208 Add the properties of rect to this rectangle and return the result.
1209 """
54f9ee45 1210 return _core_.Rect___add__(*args, **kwargs)
e811c8ce
RD
1211
1212 def __iadd__(*args, **kwargs):
0df68c9f 1213 """
a95a7133 1214 __iadd__(self, Rect rect) -> Rect
e811c8ce 1215
0df68c9f
RD
1216 Add the properties of rect to this rectangle, updating this rectangle.
1217 """
54f9ee45 1218 return _core_.Rect___iadd__(*args, **kwargs)
e811c8ce
RD
1219
1220 def __eq__(*args, **kwargs):
0df68c9f 1221 """
a95a7133 1222 __eq__(self, Rect rect) -> bool
e811c8ce 1223
0df68c9f
RD
1224 Test for equality.
1225 """
54f9ee45 1226 return _core_.Rect___eq__(*args, **kwargs)
e811c8ce
RD
1227
1228 def __ne__(*args, **kwargs):
0df68c9f 1229 """
a95a7133 1230 __ne__(self, Rect rect) -> bool
e811c8ce 1231
0df68c9f
RD
1232 Test for inequality.
1233 """
54f9ee45 1234 return _core_.Rect___ne__(*args, **kwargs)
e811c8ce
RD
1235
1236 def InsideXY(*args, **kwargs):
0df68c9f 1237 """
a95a7133 1238 InsideXY(self, int x, int y) -> bool
e811c8ce 1239
0df68c9f
RD
1240 Return True if the point is (not strcitly) inside the rect.
1241 """
54f9ee45 1242 return _core_.Rect_InsideXY(*args, **kwargs)
e811c8ce
RD
1243
1244 def Inside(*args, **kwargs):
0df68c9f 1245 """
a95a7133 1246 Inside(self, Point pt) -> bool
e811c8ce 1247
0df68c9f
RD
1248 Return True if the point is (not strcitly) inside the rect.
1249 """
54f9ee45 1250 return _core_.Rect_Inside(*args, **kwargs)
e811c8ce
RD
1251
1252 def Intersects(*args, **kwargs):
0df68c9f 1253 """
a95a7133 1254 Intersects(self, Rect rect) -> bool
e811c8ce 1255
0df68c9f
RD
1256 Returns True if the rectangles have a non empty intersection.
1257 """
54f9ee45 1258 return _core_.Rect_Intersects(*args, **kwargs)
e811c8ce 1259
54f9ee45
RD
1260 x = property(_core_.Rect_x_get, _core_.Rect_x_set)
1261 y = property(_core_.Rect_y_get, _core_.Rect_y_set)
1262 width = property(_core_.Rect_width_get, _core_.Rect_width_set)
1263 height = property(_core_.Rect_height_get, _core_.Rect_height_set)
e811c8ce 1264 def Set(*args, **kwargs):
0df68c9f 1265 """
a95a7133 1266 Set(self, int x=0, int y=0, int width=0, int height=0)
e811c8ce 1267
0df68c9f
RD
1268 Set all rectangle properties.
1269 """
54f9ee45 1270 return _core_.Rect_Set(*args, **kwargs)
e811c8ce
RD
1271
1272 def Get(*args, **kwargs):
0df68c9f
RD
1273 """
1274 Get() -> (x,y,width,height)
e811c8ce 1275
0df68c9f
RD
1276 Return the rectangle properties as a tuple.
1277 """
54f9ee45 1278 return _core_.Rect_Get(*args, **kwargs)
e811c8ce 1279
41e2b43e 1280 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
1281 def __str__(self): return str(self.Get())
1282 def __repr__(self): return 'wx.Rect'+str(self.Get())
1283 def __len__(self): return len(self.Get())
1284 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
1285 def __setitem__(self, index, val):
1286 if index == 0: self.x = val
1287 elif index == 1: self.y = val
1288 elif index == 2: self.width = val
1289 elif index == 3: self.height = val
1290 else: raise IndexError
e811c8ce 1291 def __nonzero__(self): return self.Get() != (0,0,0,0)
74e96f3d
RD
1292 __safe_for_unpickling__ = True
1293 def __reduce__(self): return (wx.Rect, self.Get())
d14a1e28
RD
1294
1295
1296class RectPtr(Rect):
1297 def __init__(self, this):
1298 self.this = this
1299 if not hasattr(self,"thisown"): self.thisown = 0
1300 self.__class__ = Rect
54f9ee45 1301_core_.Rect_swigregister(RectPtr)
d14a1e28
RD
1302
1303def RectPP(*args, **kwargs):
0df68c9f
RD
1304 """
1305 RectPP(Point topLeft, Point bottomRight) -> Rect
e811c8ce 1306
0df68c9f
RD
1307 Create a new Rect object from Points representing two corners.
1308 """
54f9ee45 1309 val = _core_.new_RectPP(*args, **kwargs)
d14a1e28
RD
1310 val.thisown = 1
1311 return val
1312
1313def RectPS(*args, **kwargs):
0df68c9f
RD
1314 """
1315 RectPS(Point pos, Size size) -> Rect
e811c8ce 1316
0df68c9f
RD
1317 Create a new Rect from a position and size.
1318 """
54f9ee45 1319 val = _core_.new_RectPS(*args, **kwargs)
d14a1e28
RD
1320 val.thisown = 1
1321 return val
1322
d3b6e4ff
RD
1323def RectS(*args, **kwargs):
1324 """
1325 RectS(Size size) -> Rect
1326
1327 Create a new Rect from a size only.
1328 """
1329 val = _core_.new_RectS(*args, **kwargs)
1330 val.thisown = 1
1331 return val
1332
d14a1e28 1333
e811c8ce 1334def IntersectRect(*args, **kwargs):
0df68c9f
RD
1335 """
1336 IntersectRect(Rect r1, Rect r2) -> Rect
e811c8ce 1337
0df68c9f
RD
1338 Calculate and return the intersection of r1 and r2.
1339 """
54f9ee45 1340 return _core_.IntersectRect(*args, **kwargs)
d14a1e28
RD
1341#---------------------------------------------------------------------------
1342
1343class Point2D(object):
41e2b43e
RD
1344 """
1345 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1346 with floating point values.
1347 """
e811c8ce
RD
1348 def __repr__(self):
1349 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1350 def __init__(self, *args, **kwargs):
0df68c9f 1351 """
a95a7133 1352 __init__(self, double x=0.0, double y=0.0) -> Point2D
e811c8ce 1353
0df68c9f
RD
1354 Create a w.Point2D object.
1355 """
54f9ee45 1356 newobj = _core_.new_Point2D(*args, **kwargs)
d14a1e28
RD
1357 self.this = newobj.this
1358 self.thisown = 1
1359 del newobj.thisown
e811c8ce 1360 def GetFloor(*args, **kwargs):
fd2dc343
RD
1361 """
1362 GetFloor() -> (x,y)
1363
1364 Convert to integer
1365 """
54f9ee45 1366 return _core_.Point2D_GetFloor(*args, **kwargs)
e811c8ce
RD
1367
1368 def GetRounded(*args, **kwargs):
fd2dc343
RD
1369 """
1370 GetRounded() -> (x,y)
1371
1372 Convert to integer
1373 """
54f9ee45 1374 return _core_.Point2D_GetRounded(*args, **kwargs)
e811c8ce
RD
1375
1376 def GetVectorLength(*args, **kwargs):
a95a7133 1377 """GetVectorLength(self) -> double"""
54f9ee45 1378 return _core_.Point2D_GetVectorLength(*args, **kwargs)
e811c8ce
RD
1379
1380 def GetVectorAngle(*args, **kwargs):
a95a7133 1381 """GetVectorAngle(self) -> double"""
54f9ee45 1382 return _core_.Point2D_GetVectorAngle(*args, **kwargs)
e811c8ce
RD
1383
1384 def SetVectorLength(*args, **kwargs):
a95a7133 1385 """SetVectorLength(self, double length)"""
54f9ee45 1386 return _core_.Point2D_SetVectorLength(*args, **kwargs)
e811c8ce
RD
1387
1388 def SetVectorAngle(*args, **kwargs):
a95a7133 1389 """SetVectorAngle(self, double degrees)"""
54f9ee45 1390 return _core_.Point2D_SetVectorAngle(*args, **kwargs)
e811c8ce 1391
d14a1e28
RD
1392 def SetPolarCoordinates(self, angle, length):
1393 self.SetVectorLength(length)
1394 self.SetVectorAngle(angle)
1395 def Normalize(self):
1396 self.SetVectorLength(1.0)
1397
e811c8ce 1398 def GetDistance(*args, **kwargs):
a95a7133 1399 """GetDistance(self, Point2D pt) -> double"""
54f9ee45 1400 return _core_.Point2D_GetDistance(*args, **kwargs)
e811c8ce
RD
1401
1402 def GetDistanceSquare(*args, **kwargs):
a95a7133 1403 """GetDistanceSquare(self, Point2D pt) -> double"""
54f9ee45 1404 return _core_.Point2D_GetDistanceSquare(*args, **kwargs)
e811c8ce
RD
1405
1406 def GetDotProduct(*args, **kwargs):
a95a7133 1407 """GetDotProduct(self, Point2D vec) -> double"""
54f9ee45 1408 return _core_.Point2D_GetDotProduct(*args, **kwargs)
e811c8ce
RD
1409
1410 def GetCrossProduct(*args, **kwargs):
a95a7133 1411 """GetCrossProduct(self, Point2D vec) -> double"""
54f9ee45 1412 return _core_.Point2D_GetCrossProduct(*args, **kwargs)
e811c8ce
RD
1413
1414 def __neg__(*args, **kwargs):
0df68c9f 1415 """
a95a7133 1416 __neg__(self) -> Point2D
e811c8ce 1417
0df68c9f
RD
1418 the reflection of this point
1419 """
54f9ee45 1420 return _core_.Point2D___neg__(*args, **kwargs)
e811c8ce
RD
1421
1422 def __iadd__(*args, **kwargs):
a95a7133 1423 """__iadd__(self, Point2D pt) -> Point2D"""
54f9ee45 1424 return _core_.Point2D___iadd__(*args, **kwargs)
e811c8ce
RD
1425
1426 def __isub__(*args, **kwargs):
a95a7133 1427 """__isub__(self, Point2D pt) -> Point2D"""
54f9ee45 1428 return _core_.Point2D___isub__(*args, **kwargs)
e811c8ce
RD
1429
1430 def __imul__(*args, **kwargs):
a95a7133 1431 """__imul__(self, Point2D pt) -> Point2D"""
54f9ee45 1432 return _core_.Point2D___imul__(*args, **kwargs)
e811c8ce
RD
1433
1434 def __idiv__(*args, **kwargs):
a95a7133 1435 """__idiv__(self, Point2D pt) -> Point2D"""
54f9ee45 1436 return _core_.Point2D___idiv__(*args, **kwargs)
e811c8ce
RD
1437
1438 def __eq__(*args, **kwargs):
0df68c9f 1439 """
a95a7133 1440 __eq__(self, Point2D pt) -> bool
e811c8ce 1441
0df68c9f
RD
1442 Test for equality
1443 """
54f9ee45 1444 return _core_.Point2D___eq__(*args, **kwargs)
e811c8ce
RD
1445
1446 def __ne__(*args, **kwargs):
0df68c9f 1447 """
a95a7133 1448 __ne__(self, Point2D pt) -> bool
e811c8ce 1449
0df68c9f
RD
1450 Test for inequality
1451 """
54f9ee45 1452 return _core_.Point2D___ne__(*args, **kwargs)
e811c8ce 1453
54f9ee45
RD
1454 x = property(_core_.Point2D_x_get, _core_.Point2D_x_set)
1455 y = property(_core_.Point2D_y_get, _core_.Point2D_y_set)
e811c8ce 1456 def Set(*args, **kwargs):
a95a7133 1457 """Set(self, double x=0, double y=0)"""
54f9ee45 1458 return _core_.Point2D_Set(*args, **kwargs)
e811c8ce
RD
1459
1460 def Get(*args, **kwargs):
0df68c9f
RD
1461 """
1462 Get() -> (x,y)
e811c8ce 1463
0df68c9f
RD
1464 Return x and y properties as a tuple.
1465 """
54f9ee45 1466 return _core_.Point2D_Get(*args, **kwargs)
e811c8ce 1467
41e2b43e 1468 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
1469 def __str__(self): return str(self.Get())
1470 def __repr__(self): return 'wx.Point2D'+str(self.Get())
1471 def __len__(self): return len(self.Get())
1472 def __getitem__(self, index): return self.Get()[index]
d14a1e28 1473 def __setitem__(self, index, val):
e811c8ce
RD
1474 if index == 0: self.x = val
1475 elif index == 1: self.y = val
d14a1e28 1476 else: raise IndexError
e811c8ce 1477 def __nonzero__(self): return self.Get() != (0.0, 0.0)
74e96f3d
RD
1478 __safe_for_unpickling__ = True
1479 def __reduce__(self): return (wx.Point2D, self.Get())
d14a1e28
RD
1480
1481
1482class Point2DPtr(Point2D):
1483 def __init__(self, this):
1484 self.this = this
1485 if not hasattr(self,"thisown"): self.thisown = 0
1486 self.__class__ = Point2D
54f9ee45 1487_core_.Point2D_swigregister(Point2DPtr)
d14a1e28
RD
1488
1489def Point2DCopy(*args, **kwargs):
0df68c9f
RD
1490 """
1491 Point2DCopy(Point2D pt) -> Point2D
e811c8ce 1492
0df68c9f
RD
1493 Create a w.Point2D object.
1494 """
54f9ee45 1495 val = _core_.new_Point2DCopy(*args, **kwargs)
d14a1e28
RD
1496 val.thisown = 1
1497 return val
1498
1499def Point2DFromPoint(*args, **kwargs):
0df68c9f
RD
1500 """
1501 Point2DFromPoint(Point pt) -> Point2D
e811c8ce 1502
0df68c9f
RD
1503 Create a w.Point2D object.
1504 """
54f9ee45 1505 val = _core_.new_Point2DFromPoint(*args, **kwargs)
d14a1e28
RD
1506 val.thisown = 1
1507 return val
1508
1509#---------------------------------------------------------------------------
1510
54f9ee45
RD
1511FromStart = _core_.FromStart
1512FromCurrent = _core_.FromCurrent
1513FromEnd = _core_.FromEnd
d14a1e28 1514class InputStream(object):
e811c8ce
RD
1515 def __repr__(self):
1516 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1517 def __init__(self, *args, **kwargs):
a95a7133 1518 """__init__(self, PyObject p) -> InputStream"""
54f9ee45 1519 newobj = _core_.new_InputStream(*args, **kwargs)
d14a1e28
RD
1520 self.this = newobj.this
1521 self.thisown = 1
1522 del newobj.thisown
e811c8ce 1523 def close(*args, **kwargs):
a95a7133 1524 """close(self)"""
54f9ee45 1525 return _core_.InputStream_close(*args, **kwargs)
e811c8ce
RD
1526
1527 def flush(*args, **kwargs):
a95a7133 1528 """flush(self)"""
54f9ee45 1529 return _core_.InputStream_flush(*args, **kwargs)
e811c8ce
RD
1530
1531 def eof(*args, **kwargs):
a95a7133 1532 """eof(self) -> bool"""
54f9ee45 1533 return _core_.InputStream_eof(*args, **kwargs)
e811c8ce
RD
1534
1535 def read(*args, **kwargs):
a95a7133 1536 """read(self, int size=-1) -> PyObject"""
54f9ee45 1537 return _core_.InputStream_read(*args, **kwargs)
e811c8ce
RD
1538
1539 def readline(*args, **kwargs):
a95a7133 1540 """readline(self, int size=-1) -> PyObject"""
54f9ee45 1541 return _core_.InputStream_readline(*args, **kwargs)
e811c8ce
RD
1542
1543 def readlines(*args, **kwargs):
a95a7133 1544 """readlines(self, int sizehint=-1) -> PyObject"""
54f9ee45 1545 return _core_.InputStream_readlines(*args, **kwargs)
e811c8ce
RD
1546
1547 def seek(*args, **kwargs):
a95a7133 1548 """seek(self, int offset, int whence=0)"""
54f9ee45 1549 return _core_.InputStream_seek(*args, **kwargs)
e811c8ce
RD
1550
1551 def tell(*args, **kwargs):
a95a7133 1552 """tell(self) -> int"""
54f9ee45 1553 return _core_.InputStream_tell(*args, **kwargs)
e811c8ce
RD
1554
1555 def Peek(*args, **kwargs):
a95a7133 1556 """Peek(self) -> char"""
54f9ee45 1557 return _core_.InputStream_Peek(*args, **kwargs)
e811c8ce
RD
1558
1559 def GetC(*args, **kwargs):
a95a7133 1560 """GetC(self) -> char"""
54f9ee45 1561 return _core_.InputStream_GetC(*args, **kwargs)
e811c8ce
RD
1562
1563 def LastRead(*args, **kwargs):
a95a7133 1564 """LastRead(self) -> size_t"""
54f9ee45 1565 return _core_.InputStream_LastRead(*args, **kwargs)
e811c8ce
RD
1566
1567 def CanRead(*args, **kwargs):
a95a7133 1568 """CanRead(self) -> bool"""
54f9ee45 1569 return _core_.InputStream_CanRead(*args, **kwargs)
e811c8ce
RD
1570
1571 def Eof(*args, **kwargs):
a95a7133 1572 """Eof(self) -> bool"""
54f9ee45 1573 return _core_.InputStream_Eof(*args, **kwargs)
e811c8ce
RD
1574
1575 def Ungetch(*args, **kwargs):
a95a7133 1576 """Ungetch(self, char c) -> bool"""
54f9ee45 1577 return _core_.InputStream_Ungetch(*args, **kwargs)
e811c8ce
RD
1578
1579 def SeekI(*args, **kwargs):
a95a7133 1580 """SeekI(self, long pos, int mode=FromStart) -> long"""
54f9ee45 1581 return _core_.InputStream_SeekI(*args, **kwargs)
e811c8ce
RD
1582
1583 def TellI(*args, **kwargs):
a95a7133 1584 """TellI(self) -> long"""
54f9ee45 1585 return _core_.InputStream_TellI(*args, **kwargs)
e811c8ce 1586
d14a1e28
RD
1587
1588class InputStreamPtr(InputStream):
1589 def __init__(self, this):
1590 self.this = this
1591 if not hasattr(self,"thisown"): self.thisown = 0
1592 self.__class__ = InputStream
54f9ee45 1593_core_.InputStream_swigregister(InputStreamPtr)
d14a1e28
RD
1594DefaultPosition = cvar.DefaultPosition
1595DefaultSize = cvar.DefaultSize
1596
1597class OutputStream(object):
d14a1e28
RD
1598 def __init__(self): raise RuntimeError, "No constructor defined"
1599 def __repr__(self):
1600 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 1601 def write(*args, **kwargs):
a95a7133 1602 """write(self, PyObject obj)"""
54f9ee45 1603 return _core_.OutputStream_write(*args, **kwargs)
e811c8ce 1604
d14a1e28
RD
1605
1606class OutputStreamPtr(OutputStream):
1607 def __init__(self, this):
1608 self.this = this
1609 if not hasattr(self,"thisown"): self.thisown = 0
1610 self.__class__ = OutputStream
54f9ee45 1611_core_.OutputStream_swigregister(OutputStreamPtr)
d14a1e28
RD
1612
1613#---------------------------------------------------------------------------
1614
1615class FSFile(Object):
e811c8ce
RD
1616 def __repr__(self):
1617 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1618 def __init__(self, *args, **kwargs):
0df68c9f 1619 """
a95a7133 1620 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
196addbf 1621 DateTime modif) -> FSFile
0df68c9f 1622 """
54f9ee45 1623 newobj = _core_.new_FSFile(*args, **kwargs)
d14a1e28
RD
1624 self.this = newobj.this
1625 self.thisown = 1
1626 del newobj.thisown
4cf4100f
RD
1627 self.thisown = 0 # It will normally be deleted by the user of the wxFileSystem
1628
54f9ee45 1629 def __del__(self, destroy=_core_.delete_FSFile):
a95a7133 1630 """__del__(self)"""
d14a1e28
RD
1631 try:
1632 if self.thisown: destroy(self)
1633 except: pass
e811c8ce
RD
1634
1635 def GetStream(*args, **kwargs):
a95a7133 1636 """GetStream(self) -> InputStream"""
54f9ee45 1637 return _core_.FSFile_GetStream(*args, **kwargs)
e811c8ce
RD
1638
1639 def GetMimeType(*args, **kwargs):
a95a7133 1640 """GetMimeType(self) -> String"""
54f9ee45 1641 return _core_.FSFile_GetMimeType(*args, **kwargs)
e811c8ce
RD
1642
1643 def GetLocation(*args, **kwargs):
a95a7133 1644 """GetLocation(self) -> String"""
54f9ee45 1645 return _core_.FSFile_GetLocation(*args, **kwargs)
e811c8ce
RD
1646
1647 def GetAnchor(*args, **kwargs):
a95a7133 1648 """GetAnchor(self) -> String"""
54f9ee45 1649 return _core_.FSFile_GetAnchor(*args, **kwargs)
e811c8ce
RD
1650
1651 def GetModificationTime(*args, **kwargs):
a95a7133 1652 """GetModificationTime(self) -> DateTime"""
54f9ee45 1653 return _core_.FSFile_GetModificationTime(*args, **kwargs)
e811c8ce 1654
d14a1e28
RD
1655
1656class FSFilePtr(FSFile):
1657 def __init__(self, this):
1658 self.this = this
1659 if not hasattr(self,"thisown"): self.thisown = 0
1660 self.__class__ = FSFile
54f9ee45 1661_core_.FSFile_swigregister(FSFilePtr)
d14a1e28
RD
1662
1663class CPPFileSystemHandler(object):
1664 def __init__(self): raise RuntimeError, "No constructor defined"
1665 def __repr__(self):
1666 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1667
1668class CPPFileSystemHandlerPtr(CPPFileSystemHandler):
1669 def __init__(self, this):
1670 self.this = this
1671 if not hasattr(self,"thisown"): self.thisown = 0
1672 self.__class__ = CPPFileSystemHandler
54f9ee45 1673_core_.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr)
d14a1e28
RD
1674
1675class FileSystemHandler(CPPFileSystemHandler):
e811c8ce
RD
1676 def __repr__(self):
1677 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1678 def __init__(self, *args, **kwargs):
a95a7133 1679 """__init__(self) -> FileSystemHandler"""
54f9ee45 1680 newobj = _core_.new_FileSystemHandler(*args, **kwargs)
d14a1e28
RD
1681 self.this = newobj.this
1682 self.thisown = 1
1683 del newobj.thisown
1684 self._setCallbackInfo(self, FileSystemHandler)
e811c8ce
RD
1685
1686 def _setCallbackInfo(*args, **kwargs):
a95a7133 1687 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
54f9ee45 1688 return _core_.FileSystemHandler__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
1689
1690 def CanOpen(*args, **kwargs):
a95a7133 1691 """CanOpen(self, String location) -> bool"""
54f9ee45 1692 return _core_.FileSystemHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
1693
1694 def OpenFile(*args, **kwargs):
a95a7133 1695 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 1696 return _core_.FileSystemHandler_OpenFile(*args, **kwargs)
e811c8ce
RD
1697
1698 def FindFirst(*args, **kwargs):
a95a7133 1699 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 1700 return _core_.FileSystemHandler_FindFirst(*args, **kwargs)
e811c8ce
RD
1701
1702 def FindNext(*args, **kwargs):
a95a7133 1703 """FindNext(self) -> String"""
54f9ee45 1704 return _core_.FileSystemHandler_FindNext(*args, **kwargs)
e811c8ce
RD
1705
1706 def GetProtocol(*args, **kwargs):
a95a7133 1707 """GetProtocol(self, String location) -> String"""
54f9ee45 1708 return _core_.FileSystemHandler_GetProtocol(*args, **kwargs)
e811c8ce
RD
1709
1710 def GetLeftLocation(*args, **kwargs):
a95a7133 1711 """GetLeftLocation(self, String location) -> String"""
54f9ee45 1712 return _core_.FileSystemHandler_GetLeftLocation(*args, **kwargs)
e811c8ce
RD
1713
1714 def GetAnchor(*args, **kwargs):
a95a7133 1715 """GetAnchor(self, String location) -> String"""
54f9ee45 1716 return _core_.FileSystemHandler_GetAnchor(*args, **kwargs)
e811c8ce
RD
1717
1718 def GetRightLocation(*args, **kwargs):
a95a7133 1719 """GetRightLocation(self, String location) -> String"""
54f9ee45 1720 return _core_.FileSystemHandler_GetRightLocation(*args, **kwargs)
e811c8ce
RD
1721
1722 def GetMimeTypeFromExt(*args, **kwargs):
a95a7133 1723 """GetMimeTypeFromExt(self, String location) -> String"""
54f9ee45 1724 return _core_.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs)
e811c8ce 1725
d14a1e28
RD
1726
1727class FileSystemHandlerPtr(FileSystemHandler):
1728 def __init__(self, this):
1729 self.this = this
1730 if not hasattr(self,"thisown"): self.thisown = 0
1731 self.__class__ = FileSystemHandler
54f9ee45 1732_core_.FileSystemHandler_swigregister(FileSystemHandlerPtr)
d14a1e28
RD
1733
1734class FileSystem(Object):
e811c8ce
RD
1735 def __repr__(self):
1736 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1737 def __init__(self, *args, **kwargs):
a95a7133 1738 """__init__(self) -> FileSystem"""
54f9ee45 1739 newobj = _core_.new_FileSystem(*args, **kwargs)
d14a1e28
RD
1740 self.this = newobj.this
1741 self.thisown = 1
1742 del newobj.thisown
54f9ee45 1743 def __del__(self, destroy=_core_.delete_FileSystem):
a95a7133 1744 """__del__(self)"""
d14a1e28
RD
1745 try:
1746 if self.thisown: destroy(self)
1747 except: pass
e811c8ce
RD
1748
1749 def ChangePathTo(*args, **kwargs):
a95a7133 1750 """ChangePathTo(self, String location, bool is_dir=False)"""
54f9ee45 1751 return _core_.FileSystem_ChangePathTo(*args, **kwargs)
e811c8ce
RD
1752
1753 def GetPath(*args, **kwargs):
a95a7133 1754 """GetPath(self) -> String"""
54f9ee45 1755 return _core_.FileSystem_GetPath(*args, **kwargs)
e811c8ce
RD
1756
1757 def OpenFile(*args, **kwargs):
a95a7133 1758 """OpenFile(self, String location) -> FSFile"""
54f9ee45 1759 return _core_.FileSystem_OpenFile(*args, **kwargs)
e811c8ce
RD
1760
1761 def FindFirst(*args, **kwargs):
a95a7133 1762 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 1763 return _core_.FileSystem_FindFirst(*args, **kwargs)
e811c8ce
RD
1764
1765 def FindNext(*args, **kwargs):
a95a7133 1766 """FindNext(self) -> String"""
54f9ee45 1767 return _core_.FileSystem_FindNext(*args, **kwargs)
e811c8ce
RD
1768
1769 def AddHandler(*args, **kwargs):
66c033b4 1770 """AddHandler(CPPFileSystemHandler handler)"""
54f9ee45 1771 return _core_.FileSystem_AddHandler(*args, **kwargs)
e811c8ce
RD
1772
1773 AddHandler = staticmethod(AddHandler)
1774 def CleanUpHandlers(*args, **kwargs):
66c033b4 1775 """CleanUpHandlers()"""
54f9ee45 1776 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
e811c8ce
RD
1777
1778 CleanUpHandlers = staticmethod(CleanUpHandlers)
1779 def FileNameToURL(*args, **kwargs):
66c033b4 1780 """FileNameToURL(String filename) -> String"""
54f9ee45 1781 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
e811c8ce
RD
1782
1783 FileNameToURL = staticmethod(FileNameToURL)
2ef75293
RD
1784 def URLToFileName(*args, **kwargs):
1785 """URLToFileName(String url) -> String"""
1786 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1787
1788 URLToFileName = staticmethod(URLToFileName)
d14a1e28
RD
1789
1790class FileSystemPtr(FileSystem):
1791 def __init__(self, this):
1792 self.this = this
1793 if not hasattr(self,"thisown"): self.thisown = 0
1794 self.__class__ = FileSystem
54f9ee45 1795_core_.FileSystem_swigregister(FileSystemPtr)
d14a1e28 1796
e811c8ce
RD
1797def FileSystem_AddHandler(*args, **kwargs):
1798 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
54f9ee45 1799 return _core_.FileSystem_AddHandler(*args, **kwargs)
d14a1e28 1800
e811c8ce
RD
1801def FileSystem_CleanUpHandlers(*args, **kwargs):
1802 """FileSystem_CleanUpHandlers()"""
54f9ee45 1803 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
d14a1e28 1804
e811c8ce 1805def FileSystem_FileNameToURL(*args, **kwargs):
196addbf 1806 """FileSystem_FileNameToURL(String filename) -> String"""
54f9ee45 1807 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
d14a1e28 1808
e811c8ce 1809def FileSystem_URLToFileName(*args, **kwargs):
196addbf 1810 """FileSystem_URLToFileName(String url) -> String"""
54f9ee45 1811 return _core_.FileSystem_URLToFileName(*args, **kwargs)
2ef75293 1812
d14a1e28 1813class InternetFSHandler(CPPFileSystemHandler):
e811c8ce
RD
1814 def __repr__(self):
1815 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1816 def __init__(self, *args, **kwargs):
a95a7133 1817 """__init__(self) -> InternetFSHandler"""
54f9ee45 1818 newobj = _core_.new_InternetFSHandler(*args, **kwargs)
d14a1e28
RD
1819 self.this = newobj.this
1820 self.thisown = 1
1821 del newobj.thisown
e811c8ce 1822 def CanOpen(*args, **kwargs):
a95a7133 1823 """CanOpen(self, String location) -> bool"""
54f9ee45 1824 return _core_.InternetFSHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
1825
1826 def OpenFile(*args, **kwargs):
a95a7133 1827 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 1828 return _core_.InternetFSHandler_OpenFile(*args, **kwargs)
e811c8ce 1829
d14a1e28
RD
1830
1831class InternetFSHandlerPtr(InternetFSHandler):
1832 def __init__(self, this):
1833 self.this = this
1834 if not hasattr(self,"thisown"): self.thisown = 0
1835 self.__class__ = InternetFSHandler
54f9ee45 1836_core_.InternetFSHandler_swigregister(InternetFSHandlerPtr)
d14a1e28
RD
1837
1838class ZipFSHandler(CPPFileSystemHandler):
e811c8ce
RD
1839 def __repr__(self):
1840 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1841 def __init__(self, *args, **kwargs):
a95a7133 1842 """__init__(self) -> ZipFSHandler"""
54f9ee45 1843 newobj = _core_.new_ZipFSHandler(*args, **kwargs)
d14a1e28
RD
1844 self.this = newobj.this
1845 self.thisown = 1
1846 del newobj.thisown
e811c8ce 1847 def CanOpen(*args, **kwargs):
a95a7133 1848 """CanOpen(self, String location) -> bool"""
54f9ee45 1849 return _core_.ZipFSHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
1850
1851 def OpenFile(*args, **kwargs):
a95a7133 1852 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 1853 return _core_.ZipFSHandler_OpenFile(*args, **kwargs)
e811c8ce
RD
1854
1855 def FindFirst(*args, **kwargs):
a95a7133 1856 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 1857 return _core_.ZipFSHandler_FindFirst(*args, **kwargs)
e811c8ce
RD
1858
1859 def FindNext(*args, **kwargs):
a95a7133 1860 """FindNext(self) -> String"""
54f9ee45 1861 return _core_.ZipFSHandler_FindNext(*args, **kwargs)
e811c8ce 1862
d14a1e28
RD
1863
1864class ZipFSHandlerPtr(ZipFSHandler):
1865 def __init__(self, this):
1866 self.this = this
1867 if not hasattr(self,"thisown"): self.thisown = 0
1868 self.__class__ = ZipFSHandler
54f9ee45 1869_core_.ZipFSHandler_swigregister(ZipFSHandlerPtr)
d14a1e28
RD
1870
1871
e811c8ce 1872def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs):
196addbf 1873 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
54f9ee45 1874 return _core_.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs)
d14a1e28 1875
e811c8ce 1876def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs):
196addbf 1877 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
54f9ee45 1878 return _core_.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs)
d14a1e28 1879
e811c8ce 1880def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs):
196addbf 1881 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
54f9ee45 1882 return _core_.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs)
2ef75293
RD
1883def MemoryFSHandler_AddFile(filename, dataItem, imgType=-1):
1884 """
1885 Add 'file' to the memory filesystem. The dataItem parameter can
1886 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1887 arbitrary data. If a bitmap or image is used then the imgType
1888 parameter should specify what kind of image file it should be
1889 written as, wx.BITMAP_TYPE_PNG, etc.
1890 """
1891 if isinstance(dataItem, wx.Image):
1892 __wxMemoryFSHandler_AddFile_wxImage(filename, dataItem, imgType)
1893 elif isinstance(dataItem, wx.Bitmap):
1894 __wxMemoryFSHandler_AddFile_wxBitmap(filename, dataItem, imgType)
1895 elif type(dataItem) == str:
1896 __wxMemoryFSHandler_AddFile_Data(filename, dataItem)
1897 else:
1898 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
d14a1e28
RD
1899
1900class MemoryFSHandler(CPPFileSystemHandler):
e811c8ce
RD
1901 def __repr__(self):
1902 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1903 def __init__(self, *args, **kwargs):
a95a7133 1904 """__init__(self) -> MemoryFSHandler"""
54f9ee45 1905 newobj = _core_.new_MemoryFSHandler(*args, **kwargs)
d14a1e28
RD
1906 self.this = newobj.this
1907 self.thisown = 1
1908 del newobj.thisown
e811c8ce 1909 def RemoveFile(*args, **kwargs):
66c033b4 1910 """RemoveFile(String filename)"""
54f9ee45 1911 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
e811c8ce
RD
1912
1913 RemoveFile = staticmethod(RemoveFile)
d14a1e28 1914 AddFile = staticmethod(MemoryFSHandler_AddFile)
e811c8ce 1915 def CanOpen(*args, **kwargs):
a95a7133 1916 """CanOpen(self, String location) -> bool"""
54f9ee45 1917 return _core_.MemoryFSHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
1918
1919 def OpenFile(*args, **kwargs):
a95a7133 1920 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 1921 return _core_.MemoryFSHandler_OpenFile(*args, **kwargs)
e811c8ce
RD
1922
1923 def FindFirst(*args, **kwargs):
a95a7133 1924 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 1925 return _core_.MemoryFSHandler_FindFirst(*args, **kwargs)
e811c8ce
RD
1926
1927 def FindNext(*args, **kwargs):
a95a7133 1928 """FindNext(self) -> String"""
54f9ee45 1929 return _core_.MemoryFSHandler_FindNext(*args, **kwargs)
e811c8ce 1930
d14a1e28
RD
1931
1932class MemoryFSHandlerPtr(MemoryFSHandler):
1933 def __init__(self, this):
1934 self.this = this
1935 if not hasattr(self,"thisown"): self.thisown = 0
1936 self.__class__ = MemoryFSHandler
54f9ee45 1937_core_.MemoryFSHandler_swigregister(MemoryFSHandlerPtr)
d14a1e28 1938
e811c8ce 1939def MemoryFSHandler_RemoveFile(*args, **kwargs):
196addbf 1940 """MemoryFSHandler_RemoveFile(String filename)"""
54f9ee45 1941 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
d14a1e28
RD
1942
1943#---------------------------------------------------------------------------
1944
1945class ImageHandler(Object):
d14a1e28
RD
1946 def __init__(self): raise RuntimeError, "No constructor defined"
1947 def __repr__(self):
1948 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 1949 def GetName(*args, **kwargs):
a95a7133 1950 """GetName(self) -> String"""
54f9ee45 1951 return _core_.ImageHandler_GetName(*args, **kwargs)
e811c8ce
RD
1952
1953 def GetExtension(*args, **kwargs):
a95a7133 1954 """GetExtension(self) -> String"""
54f9ee45 1955 return _core_.ImageHandler_GetExtension(*args, **kwargs)
e811c8ce
RD
1956
1957 def GetType(*args, **kwargs):
a95a7133 1958 """GetType(self) -> long"""
54f9ee45 1959 return _core_.ImageHandler_GetType(*args, **kwargs)
e811c8ce
RD
1960
1961 def GetMimeType(*args, **kwargs):
a95a7133 1962 """GetMimeType(self) -> String"""
54f9ee45 1963 return _core_.ImageHandler_GetMimeType(*args, **kwargs)
e811c8ce
RD
1964
1965 def CanRead(*args, **kwargs):
a95a7133 1966 """CanRead(self, String name) -> bool"""
54f9ee45 1967 return _core_.ImageHandler_CanRead(*args, **kwargs)
e811c8ce
RD
1968
1969 def SetName(*args, **kwargs):
a95a7133 1970 """SetName(self, String name)"""
54f9ee45 1971 return _core_.ImageHandler_SetName(*args, **kwargs)
e811c8ce
RD
1972
1973 def SetExtension(*args, **kwargs):
a95a7133 1974 """SetExtension(self, String extension)"""
54f9ee45 1975 return _core_.ImageHandler_SetExtension(*args, **kwargs)
e811c8ce
RD
1976
1977 def SetType(*args, **kwargs):
a95a7133 1978 """SetType(self, long type)"""
54f9ee45 1979 return _core_.ImageHandler_SetType(*args, **kwargs)
e811c8ce
RD
1980
1981 def SetMimeType(*args, **kwargs):
a95a7133 1982 """SetMimeType(self, String mimetype)"""
54f9ee45 1983 return _core_.ImageHandler_SetMimeType(*args, **kwargs)
e811c8ce 1984
d14a1e28
RD
1985
1986class ImageHandlerPtr(ImageHandler):
1987 def __init__(self, this):
1988 self.this = this
1989 if not hasattr(self,"thisown"): self.thisown = 0
1990 self.__class__ = ImageHandler
54f9ee45 1991_core_.ImageHandler_swigregister(ImageHandlerPtr)
d14a1e28
RD
1992
1993class ImageHistogram(object):
e811c8ce
RD
1994 def __repr__(self):
1995 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1996 def __init__(self, *args, **kwargs):
a95a7133 1997 """__init__(self) -> ImageHistogram"""
54f9ee45 1998 newobj = _core_.new_ImageHistogram(*args, **kwargs)
d14a1e28
RD
1999 self.this = newobj.this
2000 self.thisown = 1
2001 del newobj.thisown
e811c8ce 2002 def MakeKey(*args, **kwargs):
0df68c9f 2003 """
66c033b4 2004 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
e811c8ce 2005
0df68c9f
RD
2006 Get the key in the histogram for the given RGB values
2007 """
54f9ee45 2008 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
e811c8ce
RD
2009
2010 MakeKey = staticmethod(MakeKey)
2011 def FindFirstUnusedColour(*args, **kwargs):
fd2dc343
RD
2012 """
2013 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2014
2015 Find first colour that is not used in the image and has higher RGB
2016 values than startR, startG, startB. Returns a tuple consisting of a
2017 success flag and rgb values.
2018 """
54f9ee45 2019 return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs)
e811c8ce 2020
d14a1e28
RD
2021
2022class ImageHistogramPtr(ImageHistogram):
2023 def __init__(self, this):
2024 self.this = this
2025 if not hasattr(self,"thisown"): self.thisown = 0
2026 self.__class__ = ImageHistogram
54f9ee45 2027_core_.ImageHistogram_swigregister(ImageHistogramPtr)
d14a1e28 2028
e811c8ce 2029def ImageHistogram_MakeKey(*args, **kwargs):
0df68c9f
RD
2030 """
2031 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
e811c8ce 2032
0df68c9f
RD
2033 Get the key in the histogram for the given RGB values
2034 """
54f9ee45 2035 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
d14a1e28
RD
2036
2037class Image(Object):
e811c8ce
RD
2038 def __repr__(self):
2039 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2040 def __init__(self, *args, **kwargs):
a95a7133 2041 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
54f9ee45 2042 newobj = _core_.new_Image(*args, **kwargs)
d14a1e28
RD
2043 self.this = newobj.this
2044 self.thisown = 1
2045 del newobj.thisown
54f9ee45 2046 def __del__(self, destroy=_core_.delete_Image):
a95a7133 2047 """__del__(self)"""
d14a1e28
RD
2048 try:
2049 if self.thisown: destroy(self)
2050 except: pass
e811c8ce
RD
2051
2052 def Create(*args, **kwargs):
a95a7133 2053 """Create(self, int width, int height)"""
54f9ee45 2054 return _core_.Image_Create(*args, **kwargs)
e811c8ce
RD
2055
2056 def Destroy(*args, **kwargs):
0df68c9f 2057 """
a95a7133 2058 Destroy(self)
e811c8ce 2059
0df68c9f
RD
2060 Deletes the C++ object this Python object is a proxy for.
2061 """
54f9ee45 2062 return _core_.Image_Destroy(*args, **kwargs)
e811c8ce
RD
2063
2064 def Scale(*args, **kwargs):
a95a7133 2065 """Scale(self, int width, int height) -> Image"""
54f9ee45 2066 return _core_.Image_Scale(*args, **kwargs)
e811c8ce
RD
2067
2068 def ShrinkBy(*args, **kwargs):
a95a7133 2069 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
54f9ee45 2070 return _core_.Image_ShrinkBy(*args, **kwargs)
e811c8ce
RD
2071
2072 def Rescale(*args, **kwargs):
a95a7133 2073 """Rescale(self, int width, int height) -> Image"""
54f9ee45 2074 return _core_.Image_Rescale(*args, **kwargs)
e811c8ce
RD
2075
2076 def SetRGB(*args, **kwargs):
a95a7133 2077 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
54f9ee45 2078 return _core_.Image_SetRGB(*args, **kwargs)
e811c8ce
RD
2079
2080 def GetRed(*args, **kwargs):
a95a7133 2081 """GetRed(self, int x, int y) -> unsigned char"""
54f9ee45 2082 return _core_.Image_GetRed(*args, **kwargs)
e811c8ce
RD
2083
2084 def GetGreen(*args, **kwargs):
a95a7133 2085 """GetGreen(self, int x, int y) -> unsigned char"""
54f9ee45 2086 return _core_.Image_GetGreen(*args, **kwargs)
e811c8ce
RD
2087
2088 def GetBlue(*args, **kwargs):
a95a7133 2089 """GetBlue(self, int x, int y) -> unsigned char"""
54f9ee45 2090 return _core_.Image_GetBlue(*args, **kwargs)
e811c8ce
RD
2091
2092 def SetAlpha(*args, **kwargs):
a95a7133 2093 """SetAlpha(self, int x, int y, unsigned char alpha)"""
54f9ee45 2094 return _core_.Image_SetAlpha(*args, **kwargs)
e811c8ce
RD
2095
2096 def GetAlpha(*args, **kwargs):
a95a7133 2097 """GetAlpha(self, int x, int y) -> unsigned char"""
54f9ee45 2098 return _core_.Image_GetAlpha(*args, **kwargs)
e811c8ce
RD
2099
2100 def HasAlpha(*args, **kwargs):
a95a7133 2101 """HasAlpha(self) -> bool"""
54f9ee45 2102 return _core_.Image_HasAlpha(*args, **kwargs)
e811c8ce
RD
2103
2104 def FindFirstUnusedColour(*args, **kwargs):
fd2dc343
RD
2105 """
2106 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2107
2108 Find first colour that is not used in the image and has higher RGB
2109 values than startR, startG, startB. Returns a tuple consisting of a
2110 success flag and rgb values.
2111 """
54f9ee45 2112 return _core_.Image_FindFirstUnusedColour(*args, **kwargs)
e811c8ce 2113
4cf4100f
RD
2114 def ConvertAlphaToMask(*args, **kwargs):
2115 """
2116 ConvertAlphaToMask(self, byte threshold=128) -> bool
2117
2118 If the image has alpha channel, this method converts it to mask. All pixels
2119 with alpha value less than ``threshold`` are replaced with mask colour and the
2120 alpha channel is removed. Mask colour is chosen automatically using
2121 `FindFirstUnusedColour`.
2122
2123 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2124 nothing.
2125 """
2126 return _core_.Image_ConvertAlphaToMask(*args, **kwargs)
2127
e811c8ce 2128 def SetMaskFromImage(*args, **kwargs):
a95a7133 2129 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
54f9ee45 2130 return _core_.Image_SetMaskFromImage(*args, **kwargs)
e811c8ce
RD
2131
2132 def CanRead(*args, **kwargs):
66c033b4 2133 """CanRead(String name) -> bool"""
54f9ee45 2134 return _core_.Image_CanRead(*args, **kwargs)
e811c8ce
RD
2135
2136 CanRead = staticmethod(CanRead)
2137 def GetImageCount(*args, **kwargs):
66c033b4 2138 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
54f9ee45 2139 return _core_.Image_GetImageCount(*args, **kwargs)
e811c8ce
RD
2140
2141 GetImageCount = staticmethod(GetImageCount)
2142 def LoadFile(*args, **kwargs):
a95a7133 2143 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
54f9ee45 2144 return _core_.Image_LoadFile(*args, **kwargs)
e811c8ce
RD
2145
2146 def LoadMimeFile(*args, **kwargs):
a95a7133 2147 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
54f9ee45 2148 return _core_.Image_LoadMimeFile(*args, **kwargs)
e811c8ce
RD
2149
2150 def SaveFile(*args, **kwargs):
a95a7133 2151 """SaveFile(self, String name, int type) -> bool"""
54f9ee45 2152 return _core_.Image_SaveFile(*args, **kwargs)
e811c8ce
RD
2153
2154 def SaveMimeFile(*args, **kwargs):
a95a7133 2155 """SaveMimeFile(self, String name, String mimetype) -> bool"""
54f9ee45 2156 return _core_.Image_SaveMimeFile(*args, **kwargs)
e811c8ce
RD
2157
2158 def CanReadStream(*args, **kwargs):
66c033b4 2159 """CanReadStream(InputStream stream) -> bool"""
54f9ee45 2160 return _core_.Image_CanReadStream(*args, **kwargs)
e811c8ce
RD
2161
2162 CanReadStream = staticmethod(CanReadStream)
2163 def LoadStream(*args, **kwargs):
a95a7133 2164 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
54f9ee45 2165 return _core_.Image_LoadStream(*args, **kwargs)
e811c8ce
RD
2166
2167 def LoadMimeStream(*args, **kwargs):
a95a7133 2168 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
54f9ee45 2169 return _core_.Image_LoadMimeStream(*args, **kwargs)
e811c8ce
RD
2170
2171 def Ok(*args, **kwargs):
a95a7133 2172 """Ok(self) -> bool"""
54f9ee45 2173 return _core_.Image_Ok(*args, **kwargs)
e811c8ce
RD
2174
2175 def GetWidth(*args, **kwargs):
a95a7133 2176 """GetWidth(self) -> int"""
54f9ee45 2177 return _core_.Image_GetWidth(*args, **kwargs)
e811c8ce
RD
2178
2179 def GetHeight(*args, **kwargs):
a95a7133 2180 """GetHeight(self) -> int"""
54f9ee45 2181 return _core_.Image_GetHeight(*args, **kwargs)
e811c8ce 2182
b2df227b 2183 def GetSize(*args, **kwargs):
a95a7133 2184 """GetSize(self) -> Size"""
54f9ee45 2185 return _core_.Image_GetSize(*args, **kwargs)
b2df227b 2186
e811c8ce 2187 def GetSubImage(*args, **kwargs):
a95a7133 2188 """GetSubImage(self, Rect rect) -> Image"""
54f9ee45 2189 return _core_.Image_GetSubImage(*args, **kwargs)
e811c8ce
RD
2190
2191 def Copy(*args, **kwargs):
a95a7133 2192 """Copy(self) -> Image"""
54f9ee45 2193 return _core_.Image_Copy(*args, **kwargs)
e811c8ce
RD
2194
2195 def Paste(*args, **kwargs):
a95a7133 2196 """Paste(self, Image image, int x, int y)"""
54f9ee45 2197 return _core_.Image_Paste(*args, **kwargs)
e811c8ce
RD
2198
2199 def GetData(*args, **kwargs):
a95a7133 2200 """GetData(self) -> PyObject"""
54f9ee45 2201 return _core_.Image_GetData(*args, **kwargs)
e811c8ce
RD
2202
2203 def SetData(*args, **kwargs):
a95a7133 2204 """SetData(self, PyObject data)"""
54f9ee45 2205 return _core_.Image_SetData(*args, **kwargs)
e811c8ce
RD
2206
2207 def GetDataBuffer(*args, **kwargs):
a95a7133 2208 """GetDataBuffer(self) -> PyObject"""
54f9ee45 2209 return _core_.Image_GetDataBuffer(*args, **kwargs)
e811c8ce
RD
2210
2211 def SetDataBuffer(*args, **kwargs):
a95a7133 2212 """SetDataBuffer(self, PyObject data)"""
54f9ee45 2213 return _core_.Image_SetDataBuffer(*args, **kwargs)
e811c8ce
RD
2214
2215 def GetAlphaData(*args, **kwargs):
a95a7133 2216 """GetAlphaData(self) -> PyObject"""
54f9ee45 2217 return _core_.Image_GetAlphaData(*args, **kwargs)
e811c8ce
RD
2218
2219 def SetAlphaData(*args, **kwargs):
a95a7133 2220 """SetAlphaData(self, PyObject data)"""
54f9ee45 2221 return _core_.Image_SetAlphaData(*args, **kwargs)
e811c8ce
RD
2222
2223 def GetAlphaBuffer(*args, **kwargs):
a95a7133 2224 """GetAlphaBuffer(self) -> PyObject"""
54f9ee45 2225 return _core_.Image_GetAlphaBuffer(*args, **kwargs)
e811c8ce
RD
2226
2227 def SetAlphaBuffer(*args, **kwargs):
a95a7133 2228 """SetAlphaBuffer(self, PyObject data)"""
54f9ee45 2229 return _core_.Image_SetAlphaBuffer(*args, **kwargs)
e811c8ce
RD
2230
2231 def SetMaskColour(*args, **kwargs):
a95a7133 2232 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
54f9ee45 2233 return _core_.Image_SetMaskColour(*args, **kwargs)
e811c8ce
RD
2234
2235 def GetMaskRed(*args, **kwargs):
a95a7133 2236 """GetMaskRed(self) -> unsigned char"""
54f9ee45 2237 return _core_.Image_GetMaskRed(*args, **kwargs)
e811c8ce
RD
2238
2239 def GetMaskGreen(*args, **kwargs):
a95a7133 2240 """GetMaskGreen(self) -> unsigned char"""
54f9ee45 2241 return _core_.Image_GetMaskGreen(*args, **kwargs)
e811c8ce
RD
2242
2243 def GetMaskBlue(*args, **kwargs):
a95a7133 2244 """GetMaskBlue(self) -> unsigned char"""
54f9ee45 2245 return _core_.Image_GetMaskBlue(*args, **kwargs)
e811c8ce
RD
2246
2247 def SetMask(*args, **kwargs):
a95a7133 2248 """SetMask(self, bool mask=True)"""
54f9ee45 2249 return _core_.Image_SetMask(*args, **kwargs)
e811c8ce
RD
2250
2251 def HasMask(*args, **kwargs):
a95a7133 2252 """HasMask(self) -> bool"""
54f9ee45 2253 return _core_.Image_HasMask(*args, **kwargs)
e811c8ce
RD
2254
2255 def Rotate(*args, **kwargs):
0df68c9f 2256 """
a95a7133 2257 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
0df68c9f
RD
2258 Point offset_after_rotation=None) -> Image
2259 """
54f9ee45 2260 return _core_.Image_Rotate(*args, **kwargs)
e811c8ce
RD
2261
2262 def Rotate90(*args, **kwargs):
a95a7133 2263 """Rotate90(self, bool clockwise=True) -> Image"""
54f9ee45 2264 return _core_.Image_Rotate90(*args, **kwargs)
e811c8ce
RD
2265
2266 def Mirror(*args, **kwargs):
a95a7133 2267 """Mirror(self, bool horizontally=True) -> Image"""
54f9ee45 2268 return _core_.Image_Mirror(*args, **kwargs)
e811c8ce
RD
2269
2270 def Replace(*args, **kwargs):
0df68c9f 2271 """
a95a7133 2272 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
0df68c9f
RD
2273 unsigned char r2, unsigned char g2, unsigned char b2)
2274 """
54f9ee45 2275 return _core_.Image_Replace(*args, **kwargs)
e811c8ce
RD
2276
2277 def ConvertToMono(*args, **kwargs):
a95a7133 2278 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
54f9ee45 2279 return _core_.Image_ConvertToMono(*args, **kwargs)
e811c8ce
RD
2280
2281 def SetOption(*args, **kwargs):
a95a7133 2282 """SetOption(self, String name, String value)"""
54f9ee45 2283 return _core_.Image_SetOption(*args, **kwargs)
e811c8ce
RD
2284
2285 def SetOptionInt(*args, **kwargs):
a95a7133 2286 """SetOptionInt(self, String name, int value)"""
54f9ee45 2287 return _core_.Image_SetOptionInt(*args, **kwargs)
e811c8ce
RD
2288
2289 def GetOption(*args, **kwargs):
a95a7133 2290 """GetOption(self, String name) -> String"""
54f9ee45 2291 return _core_.Image_GetOption(*args, **kwargs)
e811c8ce
RD
2292
2293 def GetOptionInt(*args, **kwargs):
a95a7133 2294 """GetOptionInt(self, String name) -> int"""
54f9ee45 2295 return _core_.Image_GetOptionInt(*args, **kwargs)
e811c8ce
RD
2296
2297 def HasOption(*args, **kwargs):
a95a7133 2298 """HasOption(self, String name) -> bool"""
54f9ee45 2299 return _core_.Image_HasOption(*args, **kwargs)
e811c8ce
RD
2300
2301 def CountColours(*args, **kwargs):
a95a7133 2302 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
54f9ee45 2303 return _core_.Image_CountColours(*args, **kwargs)
e811c8ce
RD
2304
2305 def ComputeHistogram(*args, **kwargs):
a95a7133 2306 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
54f9ee45 2307 return _core_.Image_ComputeHistogram(*args, **kwargs)
e811c8ce
RD
2308
2309 def AddHandler(*args, **kwargs):
66c033b4 2310 """AddHandler(ImageHandler handler)"""
54f9ee45 2311 return _core_.Image_AddHandler(*args, **kwargs)
e811c8ce
RD
2312
2313 AddHandler = staticmethod(AddHandler)
2314 def InsertHandler(*args, **kwargs):
66c033b4 2315 """InsertHandler(ImageHandler handler)"""
54f9ee45 2316 return _core_.Image_InsertHandler(*args, **kwargs)
e811c8ce
RD
2317
2318 InsertHandler = staticmethod(InsertHandler)
2319 def RemoveHandler(*args, **kwargs):
66c033b4 2320 """RemoveHandler(String name) -> bool"""
54f9ee45 2321 return _core_.Image_RemoveHandler(*args, **kwargs)
e811c8ce
RD
2322
2323 RemoveHandler = staticmethod(RemoveHandler)
2324 def GetImageExtWildcard(*args, **kwargs):
66c033b4 2325 """GetImageExtWildcard() -> String"""
54f9ee45 2326 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
e811c8ce
RD
2327
2328 GetImageExtWildcard = staticmethod(GetImageExtWildcard)
2329 def ConvertToBitmap(*args, **kwargs):
1fbf26be 2330 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
54f9ee45 2331 return _core_.Image_ConvertToBitmap(*args, **kwargs)
e811c8ce
RD
2332
2333 def ConvertToMonoBitmap(*args, **kwargs):
a95a7133 2334 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
54f9ee45 2335 return _core_.Image_ConvertToMonoBitmap(*args, **kwargs)
e811c8ce
RD
2336
2337 def __nonzero__(self): return self.Ok()
d14a1e28
RD
2338
2339class ImagePtr(Image):
2340 def __init__(self, this):
2341 self.this = this
2342 if not hasattr(self,"thisown"): self.thisown = 0
2343 self.__class__ = Image
54f9ee45 2344_core_.Image_swigregister(ImagePtr)
d14a1e28
RD
2345
2346def ImageFromMime(*args, **kwargs):
196addbf 2347 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
54f9ee45 2348 val = _core_.new_ImageFromMime(*args, **kwargs)
d14a1e28
RD
2349 val.thisown = 1
2350 return val
2351
2352def ImageFromStream(*args, **kwargs):
196addbf 2353 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
54f9ee45 2354 val = _core_.new_ImageFromStream(*args, **kwargs)
d14a1e28
RD
2355 val.thisown = 1
2356 return val
2357
2358def ImageFromStreamMime(*args, **kwargs):
196addbf 2359 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
54f9ee45 2360 val = _core_.new_ImageFromStreamMime(*args, **kwargs)
d14a1e28
RD
2361 val.thisown = 1
2362 return val
2363
66c033b4
RD
2364def EmptyImage(*args, **kwargs):
2365 """EmptyImage(int width=0, int height=0, bool clear=True) -> Image"""
2366 val = _core_.new_EmptyImage(*args, **kwargs)
d14a1e28
RD
2367 val.thisown = 1
2368 return val
2369
2370def ImageFromBitmap(*args, **kwargs):
196addbf 2371 """ImageFromBitmap(Bitmap bitmap) -> Image"""
54f9ee45 2372 val = _core_.new_ImageFromBitmap(*args, **kwargs)
d14a1e28
RD
2373 val.thisown = 1
2374 return val
2375
2376def ImageFromData(*args, **kwargs):
e811c8ce 2377 """ImageFromData(int width, int height, unsigned char data) -> Image"""
54f9ee45 2378 val = _core_.new_ImageFromData(*args, **kwargs)
d14a1e28
RD
2379 val.thisown = 1
2380 return val
2381
e811c8ce 2382def Image_CanRead(*args, **kwargs):
196addbf 2383 """Image_CanRead(String name) -> bool"""
54f9ee45 2384 return _core_.Image_CanRead(*args, **kwargs)
d14a1e28 2385
e811c8ce 2386def Image_GetImageCount(*args, **kwargs):
196addbf 2387 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
54f9ee45 2388 return _core_.Image_GetImageCount(*args, **kwargs)
d14a1e28 2389
e811c8ce 2390def Image_CanReadStream(*args, **kwargs):
196addbf 2391 """Image_CanReadStream(InputStream stream) -> bool"""
54f9ee45 2392 return _core_.Image_CanReadStream(*args, **kwargs)
d14a1e28 2393
e811c8ce
RD
2394def Image_AddHandler(*args, **kwargs):
2395 """Image_AddHandler(ImageHandler handler)"""
54f9ee45 2396 return _core_.Image_AddHandler(*args, **kwargs)
d14a1e28 2397
e811c8ce
RD
2398def Image_InsertHandler(*args, **kwargs):
2399 """Image_InsertHandler(ImageHandler handler)"""
54f9ee45 2400 return _core_.Image_InsertHandler(*args, **kwargs)
d14a1e28 2401
e811c8ce 2402def Image_RemoveHandler(*args, **kwargs):
196addbf 2403 """Image_RemoveHandler(String name) -> bool"""
54f9ee45 2404 return _core_.Image_RemoveHandler(*args, **kwargs)
d14a1e28 2405
e811c8ce 2406def Image_GetImageExtWildcard(*args, **kwargs):
196addbf 2407 """Image_GetImageExtWildcard() -> String"""
54f9ee45 2408 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
d14a1e28 2409
5e4ca4a8
RD
2410def InitAllImageHandlers():
2411 """
2412 The former functionality of InitAllImageHanders is now done internal to
2413 the _core_ extension module and so this function has become a simple NOP.
2414 """
2415 pass
d14a1e28 2416
54f9ee45
RD
2417IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES
2418IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM
2419BMP_24BPP = _core_.BMP_24BPP
2420BMP_8BPP = _core_.BMP_8BPP
2421BMP_8BPP_GREY = _core_.BMP_8BPP_GREY
2422BMP_8BPP_GRAY = _core_.BMP_8BPP_GRAY
2423BMP_8BPP_RED = _core_.BMP_8BPP_RED
2424BMP_8BPP_PALETTE = _core_.BMP_8BPP_PALETTE
2425BMP_4BPP = _core_.BMP_4BPP
2426BMP_1BPP = _core_.BMP_1BPP
2427BMP_1BPP_BW = _core_.BMP_1BPP_BW
d14a1e28 2428class BMPHandler(ImageHandler):
e811c8ce
RD
2429 def __repr__(self):
2430 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2431 def __init__(self, *args, **kwargs):
a95a7133 2432 """__init__(self) -> BMPHandler"""
54f9ee45 2433 newobj = _core_.new_BMPHandler(*args, **kwargs)
d14a1e28
RD
2434 self.this = newobj.this
2435 self.thisown = 1
2436 del newobj.thisown
d14a1e28
RD
2437
2438class BMPHandlerPtr(BMPHandler):
2439 def __init__(self, this):
2440 self.this = this
2441 if not hasattr(self,"thisown"): self.thisown = 0
2442 self.__class__ = BMPHandler
54f9ee45 2443_core_.BMPHandler_swigregister(BMPHandlerPtr)
d14a1e28
RD
2444NullImage = cvar.NullImage
2445IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT
2446IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X
2447IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y
2448IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION
2449IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT
2450
2451class ICOHandler(BMPHandler):
e811c8ce
RD
2452 def __repr__(self):
2453 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2454 def __init__(self, *args, **kwargs):
a95a7133 2455 """__init__(self) -> ICOHandler"""
54f9ee45 2456 newobj = _core_.new_ICOHandler(*args, **kwargs)
d14a1e28
RD
2457 self.this = newobj.this
2458 self.thisown = 1
2459 del newobj.thisown
d14a1e28
RD
2460
2461class ICOHandlerPtr(ICOHandler):
2462 def __init__(self, this):
2463 self.this = this
2464 if not hasattr(self,"thisown"): self.thisown = 0
2465 self.__class__ = ICOHandler
54f9ee45 2466_core_.ICOHandler_swigregister(ICOHandlerPtr)
d14a1e28
RD
2467
2468class CURHandler(ICOHandler):
e811c8ce
RD
2469 def __repr__(self):
2470 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2471 def __init__(self, *args, **kwargs):
a95a7133 2472 """__init__(self) -> CURHandler"""
54f9ee45 2473 newobj = _core_.new_CURHandler(*args, **kwargs)
d14a1e28
RD
2474 self.this = newobj.this
2475 self.thisown = 1
2476 del newobj.thisown
d14a1e28
RD
2477
2478class CURHandlerPtr(CURHandler):
2479 def __init__(self, this):
2480 self.this = this
2481 if not hasattr(self,"thisown"): self.thisown = 0
2482 self.__class__ = CURHandler
54f9ee45 2483_core_.CURHandler_swigregister(CURHandlerPtr)
d14a1e28
RD
2484
2485class ANIHandler(CURHandler):
e811c8ce
RD
2486 def __repr__(self):
2487 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2488 def __init__(self, *args, **kwargs):
a95a7133 2489 """__init__(self) -> ANIHandler"""
54f9ee45 2490 newobj = _core_.new_ANIHandler(*args, **kwargs)
d14a1e28
RD
2491 self.this = newobj.this
2492 self.thisown = 1
2493 del newobj.thisown
d14a1e28
RD
2494
2495class ANIHandlerPtr(ANIHandler):
2496 def __init__(self, this):
2497 self.this = this
2498 if not hasattr(self,"thisown"): self.thisown = 0
2499 self.__class__ = ANIHandler
54f9ee45 2500_core_.ANIHandler_swigregister(ANIHandlerPtr)
d14a1e28
RD
2501
2502class PNGHandler(ImageHandler):
e811c8ce
RD
2503 def __repr__(self):
2504 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2505 def __init__(self, *args, **kwargs):
a95a7133 2506 """__init__(self) -> PNGHandler"""
54f9ee45 2507 newobj = _core_.new_PNGHandler(*args, **kwargs)
d14a1e28
RD
2508 self.this = newobj.this
2509 self.thisown = 1
2510 del newobj.thisown
d14a1e28
RD
2511
2512class PNGHandlerPtr(PNGHandler):
2513 def __init__(self, this):
2514 self.this = this
2515 if not hasattr(self,"thisown"): self.thisown = 0
2516 self.__class__ = PNGHandler
54f9ee45 2517_core_.PNGHandler_swigregister(PNGHandlerPtr)
d14a1e28
RD
2518
2519class GIFHandler(ImageHandler):
e811c8ce
RD
2520 def __repr__(self):
2521 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2522 def __init__(self, *args, **kwargs):
a95a7133 2523 """__init__(self) -> GIFHandler"""
54f9ee45 2524 newobj = _core_.new_GIFHandler(*args, **kwargs)
d14a1e28
RD
2525 self.this = newobj.this
2526 self.thisown = 1
2527 del newobj.thisown
d14a1e28
RD
2528
2529class GIFHandlerPtr(GIFHandler):
2530 def __init__(self, this):
2531 self.this = this
2532 if not hasattr(self,"thisown"): self.thisown = 0
2533 self.__class__ = GIFHandler
54f9ee45 2534_core_.GIFHandler_swigregister(GIFHandlerPtr)
d14a1e28
RD
2535
2536class PCXHandler(ImageHandler):
e811c8ce
RD
2537 def __repr__(self):
2538 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2539 def __init__(self, *args, **kwargs):
a95a7133 2540 """__init__(self) -> PCXHandler"""
54f9ee45 2541 newobj = _core_.new_PCXHandler(*args, **kwargs)
d14a1e28
RD
2542 self.this = newobj.this
2543 self.thisown = 1
2544 del newobj.thisown
d14a1e28
RD
2545
2546class PCXHandlerPtr(PCXHandler):
2547 def __init__(self, this):
2548 self.this = this
2549 if not hasattr(self,"thisown"): self.thisown = 0
2550 self.__class__ = PCXHandler
54f9ee45 2551_core_.PCXHandler_swigregister(PCXHandlerPtr)
d14a1e28
RD
2552
2553class JPEGHandler(ImageHandler):
e811c8ce
RD
2554 def __repr__(self):
2555 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2556 def __init__(self, *args, **kwargs):
a95a7133 2557 """__init__(self) -> JPEGHandler"""
54f9ee45 2558 newobj = _core_.new_JPEGHandler(*args, **kwargs)
d14a1e28
RD
2559 self.this = newobj.this
2560 self.thisown = 1
2561 del newobj.thisown
d14a1e28
RD
2562
2563class JPEGHandlerPtr(JPEGHandler):
2564 def __init__(self, this):
2565 self.this = this
2566 if not hasattr(self,"thisown"): self.thisown = 0
2567 self.__class__ = JPEGHandler
54f9ee45 2568_core_.JPEGHandler_swigregister(JPEGHandlerPtr)
d14a1e28
RD
2569
2570class PNMHandler(ImageHandler):
e811c8ce
RD
2571 def __repr__(self):
2572 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2573 def __init__(self, *args, **kwargs):
a95a7133 2574 """__init__(self) -> PNMHandler"""
54f9ee45 2575 newobj = _core_.new_PNMHandler(*args, **kwargs)
d14a1e28
RD
2576 self.this = newobj.this
2577 self.thisown = 1
2578 del newobj.thisown
d14a1e28
RD
2579
2580class PNMHandlerPtr(PNMHandler):
2581 def __init__(self, this):
2582 self.this = this
2583 if not hasattr(self,"thisown"): self.thisown = 0
2584 self.__class__ = PNMHandler
54f9ee45 2585_core_.PNMHandler_swigregister(PNMHandlerPtr)
d14a1e28
RD
2586
2587class XPMHandler(ImageHandler):
e811c8ce
RD
2588 def __repr__(self):
2589 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2590 def __init__(self, *args, **kwargs):
a95a7133 2591 """__init__(self) -> XPMHandler"""
54f9ee45 2592 newobj = _core_.new_XPMHandler(*args, **kwargs)
d14a1e28
RD
2593 self.this = newobj.this
2594 self.thisown = 1
2595 del newobj.thisown
d14a1e28
RD
2596
2597class XPMHandlerPtr(XPMHandler):
2598 def __init__(self, this):
2599 self.this = this
2600 if not hasattr(self,"thisown"): self.thisown = 0
2601 self.__class__ = XPMHandler
54f9ee45 2602_core_.XPMHandler_swigregister(XPMHandlerPtr)
d14a1e28
RD
2603
2604class TIFFHandler(ImageHandler):
e811c8ce
RD
2605 def __repr__(self):
2606 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2607 def __init__(self, *args, **kwargs):
a95a7133 2608 """__init__(self) -> TIFFHandler"""
54f9ee45 2609 newobj = _core_.new_TIFFHandler(*args, **kwargs)
d14a1e28
RD
2610 self.this = newobj.this
2611 self.thisown = 1
2612 del newobj.thisown
d14a1e28
RD
2613
2614class TIFFHandlerPtr(TIFFHandler):
2615 def __init__(self, this):
2616 self.this = this
2617 if not hasattr(self,"thisown"): self.thisown = 0
2618 self.__class__ = TIFFHandler
54f9ee45 2619_core_.TIFFHandler_swigregister(TIFFHandlerPtr)
d14a1e28 2620
c0de73ae
RD
2621QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2622QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE
2623class Quantize(object):
2624 """Performs quantization, or colour reduction, on a wxImage."""
2625 def __init__(self): raise RuntimeError, "No constructor defined"
2626 def __repr__(self):
2627 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2628 def Quantize(*args, **kwargs):
2629 """
2630 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2631
2632 Reduce the colours in the source image and put the result into the
2633 destination image, setting the palette in the destination if
2634 needed. Both images may be the same, to overwrite the source image.
2635 """
2636 return _core_.Quantize_Quantize(*args, **kwargs)
2637
2638 Quantize = staticmethod(Quantize)
2639
2640class QuantizePtr(Quantize):
2641 def __init__(self, this):
2642 self.this = this
2643 if not hasattr(self,"thisown"): self.thisown = 0
2644 self.__class__ = Quantize
2645_core_.Quantize_swigregister(QuantizePtr)
2646
2647def Quantize_Quantize(*args, **kwargs):
2648 """
2649 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2650
2651 Reduce the colours in the source image and put the result into the
2652 destination image, setting the palette in the destination if
2653 needed. Both images may be the same, to overwrite the source image.
2654 """
2655 return _core_.Quantize_Quantize(*args, **kwargs)
2656
d14a1e28
RD
2657#---------------------------------------------------------------------------
2658
2659class EvtHandler(Object):
e811c8ce
RD
2660 def __repr__(self):
2661 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2662 def __init__(self, *args, **kwargs):
a95a7133 2663 """__init__(self) -> EvtHandler"""
54f9ee45 2664 newobj = _core_.new_EvtHandler(*args, **kwargs)
d14a1e28
RD
2665 self.this = newobj.this
2666 self.thisown = 1
2667 del newobj.thisown
e811c8ce 2668 def GetNextHandler(*args, **kwargs):
a95a7133 2669 """GetNextHandler(self) -> EvtHandler"""
54f9ee45 2670 return _core_.EvtHandler_GetNextHandler(*args, **kwargs)
e811c8ce
RD
2671
2672 def GetPreviousHandler(*args, **kwargs):
a95a7133 2673 """GetPreviousHandler(self) -> EvtHandler"""
54f9ee45 2674 return _core_.EvtHandler_GetPreviousHandler(*args, **kwargs)
e811c8ce
RD
2675
2676 def SetNextHandler(*args, **kwargs):
a95a7133 2677 """SetNextHandler(self, EvtHandler handler)"""
54f9ee45 2678 return _core_.EvtHandler_SetNextHandler(*args, **kwargs)
e811c8ce
RD
2679
2680 def SetPreviousHandler(*args, **kwargs):
a95a7133 2681 """SetPreviousHandler(self, EvtHandler handler)"""
54f9ee45 2682 return _core_.EvtHandler_SetPreviousHandler(*args, **kwargs)
e811c8ce
RD
2683
2684 def GetEvtHandlerEnabled(*args, **kwargs):
a95a7133 2685 """GetEvtHandlerEnabled(self) -> bool"""
54f9ee45 2686 return _core_.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs)
e811c8ce
RD
2687
2688 def SetEvtHandlerEnabled(*args, **kwargs):
a95a7133 2689 """SetEvtHandlerEnabled(self, bool enabled)"""
54f9ee45 2690 return _core_.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs)
e811c8ce
RD
2691
2692 def ProcessEvent(*args, **kwargs):
a95a7133 2693 """ProcessEvent(self, Event event) -> bool"""
54f9ee45 2694 return _core_.EvtHandler_ProcessEvent(*args, **kwargs)
e811c8ce
RD
2695
2696 def AddPendingEvent(*args, **kwargs):
a95a7133 2697 """AddPendingEvent(self, Event event)"""
54f9ee45 2698 return _core_.EvtHandler_AddPendingEvent(*args, **kwargs)
e811c8ce
RD
2699
2700 def ProcessPendingEvents(*args, **kwargs):
a95a7133 2701 """ProcessPendingEvents(self)"""
54f9ee45 2702 return _core_.EvtHandler_ProcessPendingEvents(*args, **kwargs)
e811c8ce
RD
2703
2704 def Connect(*args, **kwargs):
a95a7133 2705 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
54f9ee45 2706 return _core_.EvtHandler_Connect(*args, **kwargs)
e811c8ce
RD
2707
2708 def Disconnect(*args, **kwargs):
a95a7133 2709 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
54f9ee45 2710 return _core_.EvtHandler_Disconnect(*args, **kwargs)
e811c8ce
RD
2711
2712 def _setOORInfo(*args, **kwargs):
a95a7133 2713 """_setOORInfo(self, PyObject _self)"""
54f9ee45 2714 return _core_.EvtHandler__setOORInfo(*args, **kwargs)
e811c8ce 2715
d14a1e28
RD
2716 def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2717 """
2718 Bind an event to an event handler.
2719
db3e571a
RD
2720 :param event: One of the EVT_* objects that specifies the
2721 type of event to bind,
d14a1e28 2722
db3e571a
RD
2723 :param handler: A callable object to be invoked when the
2724 event is delivered to self. Pass None to
2725 disconnect an event handler.
d14a1e28 2726
db3e571a
RD
2727 :param source: Sometimes the event originates from a
2728 different window than self, but you still
2729 want to catch it in self. (For example, a
2730 button event delivered to a frame.) By
2731 passing the source of the event, the event
2732 handling system is able to differentiate
2733 between the same event type from different
2734 controls.
d14a1e28 2735
db3e571a
RD
2736 :param id: Used to spcify the event source by ID instead
2737 of instance.
2738
2739 :param id2: Used when it is desirable to bind a handler
2740 to a range of IDs, such as with EVT_MENU_RANGE.
d14a1e28
RD
2741 """
2742 if source is not None:
2743 id = source.GetId()
2744 event.Bind(self, id, id2, handler)
2745
66c033b4
RD
2746 def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2747 """
2748 Disconencts the event handler binding for event from self.
2749 Returns True if successful.
2750 """
2751 if source is not None:
2752 id = source.GetId()
2753 return event.Unbind(self, id, id2)
d14a1e28 2754
d14a1e28
RD
2755
2756class EvtHandlerPtr(EvtHandler):
2757 def __init__(self, this):
2758 self.this = this
2759 if not hasattr(self,"thisown"): self.thisown = 0
2760 self.__class__ = EvtHandler
54f9ee45 2761_core_.EvtHandler_swigregister(EvtHandlerPtr)
d14a1e28
RD
2762
2763#---------------------------------------------------------------------------
2764
2765class PyEventBinder(object):
2766 """
2767 Instances of this class are used to bind specific events to event
2768 handlers.
2769 """
2770 def __init__(self, evtType, expectedIDs=0):
2771 if expectedIDs not in [0, 1, 2]:
2772 raise ValueError, "Invalid number of expectedIDs"
2773 self.expectedIDs = expectedIDs
2774
2775 if type(evtType) == list or type(evtType) == tuple:
2776 self.evtType = evtType
2777 else:
2778 self.evtType = [evtType]
2779
2780
2781 def Bind(self, target, id1, id2, function):
2782 """Bind this set of event types to target."""
2783 for et in self.evtType:
2784 target.Connect(id1, id2, et, function)
2785
66c033b4
RD
2786
2787 def Unbind(self, target, id1, id2):
2788 """Remove an event binding."""
2789 success = 0
2790 for et in self.evtType:
2791 success += target.Disconnect(id1, id2, et)
2792 return success != 0
2793
d14a1e28
RD
2794
2795 def __call__(self, *args):
2796 """
2797 For backwards compatibility with the old EVT_* functions.
2798 Should be called with either (window, func), (window, ID,
2799 func) or (window, ID1, ID2, func) parameters depending on the
2800 type of the event.
2801 """
2802 assert len(args) == 2 + self.expectedIDs
2803 id1 = wx.ID_ANY
2804 id2 = wx.ID_ANY
2805 target = args[0]
2806 if self.expectedIDs == 0:
2807 func = args[1]
2808 elif self.expectedIDs == 1:
2809 id1 = args[1]
2810 func = args[2]
2811 elif self.expectedIDs == 2:
2812 id1 = args[1]
2813 id2 = args[2]
2814 func = args[3]
2815 else:
2816 raise ValueError, "Unexpected number of IDs"
2817
2818 self.Bind(target, id1, id2, func)
2819
2820
2821# These two are square pegs that don't fit the PyEventBinder hole...
2822def EVT_COMMAND(win, id, cmd, func):
2823 win.Connect(id, -1, cmd, func)
2824def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
2825 win.Connect(id1, id2, cmd, func)
2826
2827
2828#---------------------------------------------------------------------------
2829
2830#---------------------------------------------------------------------------
2831
54f9ee45
RD
2832EVENT_PROPAGATE_NONE = _core_.EVENT_PROPAGATE_NONE
2833EVENT_PROPAGATE_MAX = _core_.EVENT_PROPAGATE_MAX
d14a1e28 2834
e811c8ce
RD
2835def NewEventType(*args, **kwargs):
2836 """NewEventType() -> wxEventType"""
54f9ee45
RD
2837 return _core_.NewEventType(*args, **kwargs)
2838wxEVT_NULL = _core_.wxEVT_NULL
2839wxEVT_FIRST = _core_.wxEVT_FIRST
2840wxEVT_USER_FIRST = _core_.wxEVT_USER_FIRST
2841wxEVT_COMMAND_BUTTON_CLICKED = _core_.wxEVT_COMMAND_BUTTON_CLICKED
2842wxEVT_COMMAND_CHECKBOX_CLICKED = _core_.wxEVT_COMMAND_CHECKBOX_CLICKED
2843wxEVT_COMMAND_CHOICE_SELECTED = _core_.wxEVT_COMMAND_CHOICE_SELECTED
2844wxEVT_COMMAND_LISTBOX_SELECTED = _core_.wxEVT_COMMAND_LISTBOX_SELECTED
2845wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core_.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
2846wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core_.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
2847wxEVT_COMMAND_MENU_SELECTED = _core_.wxEVT_COMMAND_MENU_SELECTED
2848wxEVT_COMMAND_TOOL_CLICKED = _core_.wxEVT_COMMAND_TOOL_CLICKED
2849wxEVT_COMMAND_SLIDER_UPDATED = _core_.wxEVT_COMMAND_SLIDER_UPDATED
2850wxEVT_COMMAND_RADIOBOX_SELECTED = _core_.wxEVT_COMMAND_RADIOBOX_SELECTED
2851wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core_.wxEVT_COMMAND_RADIOBUTTON_SELECTED
2852wxEVT_COMMAND_SCROLLBAR_UPDATED = _core_.wxEVT_COMMAND_SCROLLBAR_UPDATED
2853wxEVT_COMMAND_VLBOX_SELECTED = _core_.wxEVT_COMMAND_VLBOX_SELECTED
2854wxEVT_COMMAND_COMBOBOX_SELECTED = _core_.wxEVT_COMMAND_COMBOBOX_SELECTED
2855wxEVT_COMMAND_TOOL_RCLICKED = _core_.wxEVT_COMMAND_TOOL_RCLICKED
2856wxEVT_COMMAND_TOOL_ENTER = _core_.wxEVT_COMMAND_TOOL_ENTER
2857wxEVT_LEFT_DOWN = _core_.wxEVT_LEFT_DOWN
2858wxEVT_LEFT_UP = _core_.wxEVT_LEFT_UP
2859wxEVT_MIDDLE_DOWN = _core_.wxEVT_MIDDLE_DOWN
2860wxEVT_MIDDLE_UP = _core_.wxEVT_MIDDLE_UP
2861wxEVT_RIGHT_DOWN = _core_.wxEVT_RIGHT_DOWN
2862wxEVT_RIGHT_UP = _core_.wxEVT_RIGHT_UP
2863wxEVT_MOTION = _core_.wxEVT_MOTION
2864wxEVT_ENTER_WINDOW = _core_.wxEVT_ENTER_WINDOW
2865wxEVT_LEAVE_WINDOW = _core_.wxEVT_LEAVE_WINDOW
2866wxEVT_LEFT_DCLICK = _core_.wxEVT_LEFT_DCLICK
2867wxEVT_MIDDLE_DCLICK = _core_.wxEVT_MIDDLE_DCLICK
2868wxEVT_RIGHT_DCLICK = _core_.wxEVT_RIGHT_DCLICK
2869wxEVT_SET_FOCUS = _core_.wxEVT_SET_FOCUS
2870wxEVT_KILL_FOCUS = _core_.wxEVT_KILL_FOCUS
2871wxEVT_CHILD_FOCUS = _core_.wxEVT_CHILD_FOCUS
2872wxEVT_MOUSEWHEEL = _core_.wxEVT_MOUSEWHEEL
2873wxEVT_NC_LEFT_DOWN = _core_.wxEVT_NC_LEFT_DOWN
2874wxEVT_NC_LEFT_UP = _core_.wxEVT_NC_LEFT_UP
2875wxEVT_NC_MIDDLE_DOWN = _core_.wxEVT_NC_MIDDLE_DOWN
2876wxEVT_NC_MIDDLE_UP = _core_.wxEVT_NC_MIDDLE_UP
2877wxEVT_NC_RIGHT_DOWN = _core_.wxEVT_NC_RIGHT_DOWN
2878wxEVT_NC_RIGHT_UP = _core_.wxEVT_NC_RIGHT_UP
2879wxEVT_NC_MOTION = _core_.wxEVT_NC_MOTION
2880wxEVT_NC_ENTER_WINDOW = _core_.wxEVT_NC_ENTER_WINDOW
2881wxEVT_NC_LEAVE_WINDOW = _core_.wxEVT_NC_LEAVE_WINDOW
2882wxEVT_NC_LEFT_DCLICK = _core_.wxEVT_NC_LEFT_DCLICK
2883wxEVT_NC_MIDDLE_DCLICK = _core_.wxEVT_NC_MIDDLE_DCLICK
2884wxEVT_NC_RIGHT_DCLICK = _core_.wxEVT_NC_RIGHT_DCLICK
2885wxEVT_CHAR = _core_.wxEVT_CHAR
2886wxEVT_CHAR_HOOK = _core_.wxEVT_CHAR_HOOK
2887wxEVT_NAVIGATION_KEY = _core_.wxEVT_NAVIGATION_KEY
2888wxEVT_KEY_DOWN = _core_.wxEVT_KEY_DOWN
2889wxEVT_KEY_UP = _core_.wxEVT_KEY_UP
2890wxEVT_HOTKEY = _core_.wxEVT_HOTKEY
2891wxEVT_SET_CURSOR = _core_.wxEVT_SET_CURSOR
2892wxEVT_SCROLL_TOP = _core_.wxEVT_SCROLL_TOP
2893wxEVT_SCROLL_BOTTOM = _core_.wxEVT_SCROLL_BOTTOM
2894wxEVT_SCROLL_LINEUP = _core_.wxEVT_SCROLL_LINEUP
2895wxEVT_SCROLL_LINEDOWN = _core_.wxEVT_SCROLL_LINEDOWN
2896wxEVT_SCROLL_PAGEUP = _core_.wxEVT_SCROLL_PAGEUP
2897wxEVT_SCROLL_PAGEDOWN = _core_.wxEVT_SCROLL_PAGEDOWN
2898wxEVT_SCROLL_THUMBTRACK = _core_.wxEVT_SCROLL_THUMBTRACK
2899wxEVT_SCROLL_THUMBRELEASE = _core_.wxEVT_SCROLL_THUMBRELEASE
2900wxEVT_SCROLL_ENDSCROLL = _core_.wxEVT_SCROLL_ENDSCROLL
2901wxEVT_SCROLLWIN_TOP = _core_.wxEVT_SCROLLWIN_TOP
2902wxEVT_SCROLLWIN_BOTTOM = _core_.wxEVT_SCROLLWIN_BOTTOM
2903wxEVT_SCROLLWIN_LINEUP = _core_.wxEVT_SCROLLWIN_LINEUP
2904wxEVT_SCROLLWIN_LINEDOWN = _core_.wxEVT_SCROLLWIN_LINEDOWN
2905wxEVT_SCROLLWIN_PAGEUP = _core_.wxEVT_SCROLLWIN_PAGEUP
2906wxEVT_SCROLLWIN_PAGEDOWN = _core_.wxEVT_SCROLLWIN_PAGEDOWN
2907wxEVT_SCROLLWIN_THUMBTRACK = _core_.wxEVT_SCROLLWIN_THUMBTRACK
2908wxEVT_SCROLLWIN_THUMBRELEASE = _core_.wxEVT_SCROLLWIN_THUMBRELEASE
2909wxEVT_SIZE = _core_.wxEVT_SIZE
2910wxEVT_MOVE = _core_.wxEVT_MOVE
2911wxEVT_CLOSE_WINDOW = _core_.wxEVT_CLOSE_WINDOW
2912wxEVT_END_SESSION = _core_.wxEVT_END_SESSION
2913wxEVT_QUERY_END_SESSION = _core_.wxEVT_QUERY_END_SESSION
2914wxEVT_ACTIVATE_APP = _core_.wxEVT_ACTIVATE_APP
2915wxEVT_POWER = _core_.wxEVT_POWER
2916wxEVT_ACTIVATE = _core_.wxEVT_ACTIVATE
2917wxEVT_CREATE = _core_.wxEVT_CREATE
2918wxEVT_DESTROY = _core_.wxEVT_DESTROY
2919wxEVT_SHOW = _core_.wxEVT_SHOW
2920wxEVT_ICONIZE = _core_.wxEVT_ICONIZE
2921wxEVT_MAXIMIZE = _core_.wxEVT_MAXIMIZE
2922wxEVT_MOUSE_CAPTURE_CHANGED = _core_.wxEVT_MOUSE_CAPTURE_CHANGED
2923wxEVT_PAINT = _core_.wxEVT_PAINT
2924wxEVT_ERASE_BACKGROUND = _core_.wxEVT_ERASE_BACKGROUND
2925wxEVT_NC_PAINT = _core_.wxEVT_NC_PAINT
2926wxEVT_PAINT_ICON = _core_.wxEVT_PAINT_ICON
2927wxEVT_MENU_OPEN = _core_.wxEVT_MENU_OPEN
2928wxEVT_MENU_CLOSE = _core_.wxEVT_MENU_CLOSE
2929wxEVT_MENU_HIGHLIGHT = _core_.wxEVT_MENU_HIGHLIGHT
2930wxEVT_CONTEXT_MENU = _core_.wxEVT_CONTEXT_MENU
2931wxEVT_SYS_COLOUR_CHANGED = _core_.wxEVT_SYS_COLOUR_CHANGED
2932wxEVT_DISPLAY_CHANGED = _core_.wxEVT_DISPLAY_CHANGED
2933wxEVT_SETTING_CHANGED = _core_.wxEVT_SETTING_CHANGED
2934wxEVT_QUERY_NEW_PALETTE = _core_.wxEVT_QUERY_NEW_PALETTE
2935wxEVT_PALETTE_CHANGED = _core_.wxEVT_PALETTE_CHANGED
2936wxEVT_DROP_FILES = _core_.wxEVT_DROP_FILES
2937wxEVT_DRAW_ITEM = _core_.wxEVT_DRAW_ITEM
2938wxEVT_MEASURE_ITEM = _core_.wxEVT_MEASURE_ITEM
2939wxEVT_COMPARE_ITEM = _core_.wxEVT_COMPARE_ITEM
2940wxEVT_INIT_DIALOG = _core_.wxEVT_INIT_DIALOG
2941wxEVT_IDLE = _core_.wxEVT_IDLE
2942wxEVT_UPDATE_UI = _core_.wxEVT_UPDATE_UI
2943wxEVT_SIZING = _core_.wxEVT_SIZING
2944wxEVT_MOVING = _core_.wxEVT_MOVING
2945wxEVT_COMMAND_LEFT_CLICK = _core_.wxEVT_COMMAND_LEFT_CLICK
2946wxEVT_COMMAND_LEFT_DCLICK = _core_.wxEVT_COMMAND_LEFT_DCLICK
2947wxEVT_COMMAND_RIGHT_CLICK = _core_.wxEVT_COMMAND_RIGHT_CLICK
2948wxEVT_COMMAND_RIGHT_DCLICK = _core_.wxEVT_COMMAND_RIGHT_DCLICK
2949wxEVT_COMMAND_SET_FOCUS = _core_.wxEVT_COMMAND_SET_FOCUS
2950wxEVT_COMMAND_KILL_FOCUS = _core_.wxEVT_COMMAND_KILL_FOCUS
2951wxEVT_COMMAND_ENTER = _core_.wxEVT_COMMAND_ENTER
d14a1e28
RD
2952#
2953# Create some event binders
2954EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE )
2955EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING )
2956EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE )
2957EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING )
2958EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW )
2959EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
2960EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
2961EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT )
2962EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT )
2963EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND )
2964EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR )
2965EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN )
2966EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP )
2967EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1)
2968EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK )
2969EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN )
2970EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE )
2971EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1)
2972EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT )
2973EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS )
2974EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS )
2975EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS )
2976EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE )
2977EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP )
2978EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
2979EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
2980EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES )
2981EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG )
2982EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED )
2983EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED )
2984EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW )
2985EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE )
2986EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE )
2987EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY )
2988EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED )
2989EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE )
2990EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE )
2991EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY )
2992EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR )
2993EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED )
2994
2995EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN )
2996EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP )
2997EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN )
2998EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP )
2999EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN )
3000EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP )
3001EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION )
3002EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK )
3003EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK )
3004EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK )
3005EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW )
3006EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW )
3007EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL )
3008
3009EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN,
3010 wxEVT_LEFT_UP,
3011 wxEVT_MIDDLE_DOWN,
3012 wxEVT_MIDDLE_UP,
3013 wxEVT_RIGHT_DOWN,
3014 wxEVT_RIGHT_UP,
3015 wxEVT_MOTION,
3016 wxEVT_LEFT_DCLICK,
3017 wxEVT_MIDDLE_DCLICK,
3018 wxEVT_RIGHT_DCLICK,
3019 wxEVT_ENTER_WINDOW,
3020 wxEVT_LEAVE_WINDOW,
3021 wxEVT_MOUSEWHEEL
3022 ])
3023
3024
3025# Scrolling from wxWindow (sent to wxScrolledWindow)
3026EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP,
3027 wxEVT_SCROLLWIN_BOTTOM,
3028 wxEVT_SCROLLWIN_LINEUP,
3029 wxEVT_SCROLLWIN_LINEDOWN,
3030 wxEVT_SCROLLWIN_PAGEUP,
3031 wxEVT_SCROLLWIN_PAGEDOWN,
3032 wxEVT_SCROLLWIN_THUMBTRACK,
3033 wxEVT_SCROLLWIN_THUMBRELEASE,
3034 ])
3035
3036EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP )
3037EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM )
3038EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP )
3039EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN )
3040EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP )
3041EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN )
3042EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK )
3043EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE )
3044
3045# Scrolling from wxSlider and wxScrollBar
3046EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3047 wxEVT_SCROLL_BOTTOM,
3048 wxEVT_SCROLL_LINEUP,
3049 wxEVT_SCROLL_LINEDOWN,
3050 wxEVT_SCROLL_PAGEUP,
3051 wxEVT_SCROLL_PAGEDOWN,
3052 wxEVT_SCROLL_THUMBTRACK,
3053 wxEVT_SCROLL_THUMBRELEASE,
3054 wxEVT_SCROLL_ENDSCROLL,
3055 ])
3056
3057EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP )
3058EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM )
3059EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP )
3060EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN )
3061EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP )
3062EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN )
3063EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK )
3064EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE )
3065EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL )
3066
3067# Scrolling from wxSlider and wxScrollBar, with an id
3068EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3069 wxEVT_SCROLL_BOTTOM,
3070 wxEVT_SCROLL_LINEUP,
3071 wxEVT_SCROLL_LINEDOWN,
3072 wxEVT_SCROLL_PAGEUP,
3073 wxEVT_SCROLL_PAGEDOWN,
3074 wxEVT_SCROLL_THUMBTRACK,
3075 wxEVT_SCROLL_THUMBRELEASE,
3076 wxEVT_SCROLL_ENDSCROLL,
3077 ], 1)
3078
3079EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1)
3080EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1)
3081EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
3082EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
3083EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1)
3084EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1)
3085EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
3086EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
3087EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1)
3088
d14a1e28
RD
3089EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
3090EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
3091EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
3092EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1)
3093EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1)
3094EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1)
3095EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2)
3096EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1)
3097EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1)
3098EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1)
3099
3100EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1)
3101EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1)
3102EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1)
3103EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1)
3104EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2)
3105EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1)
3106EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2)
3107EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1)
3108EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1)
3109
3110
3111EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1)
3112EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1)
3113EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1)
3114EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1)
3115EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1)
3116EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1)
3117EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1)
3118
3119EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE )
3120
3121EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1)
3122EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2)
3123
3124EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU )
3125
3126
3127
3128#---------------------------------------------------------------------------
3129
3130class Event(Object):
e811c8ce
RD
3131 def __init__(self): raise RuntimeError, "No constructor defined"
3132 def __repr__(self):
3133 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45 3134 def __del__(self, destroy=_core_.delete_Event):
a95a7133 3135 """__del__(self)"""
d14a1e28
RD
3136 try:
3137 if self.thisown: destroy(self)
3138 except: pass
e811c8ce
RD
3139
3140 def SetEventType(*args, **kwargs):
a95a7133 3141 """SetEventType(self, wxEventType typ)"""
54f9ee45 3142 return _core_.Event_SetEventType(*args, **kwargs)
e811c8ce
RD
3143
3144 def GetEventType(*args, **kwargs):
a95a7133 3145 """GetEventType(self) -> wxEventType"""
54f9ee45 3146 return _core_.Event_GetEventType(*args, **kwargs)
e811c8ce
RD
3147
3148 def GetEventObject(*args, **kwargs):
a95a7133 3149 """GetEventObject(self) -> Object"""
54f9ee45 3150 return _core_.Event_GetEventObject(*args, **kwargs)
e811c8ce
RD
3151
3152 def SetEventObject(*args, **kwargs):
a95a7133 3153 """SetEventObject(self, Object obj)"""
54f9ee45 3154 return _core_.Event_SetEventObject(*args, **kwargs)
e811c8ce
RD
3155
3156 def GetTimestamp(*args, **kwargs):
a95a7133 3157 """GetTimestamp(self) -> long"""
54f9ee45 3158 return _core_.Event_GetTimestamp(*args, **kwargs)
e811c8ce
RD
3159
3160 def SetTimestamp(*args, **kwargs):
a95a7133 3161 """SetTimestamp(self, long ts=0)"""
54f9ee45 3162 return _core_.Event_SetTimestamp(*args, **kwargs)
e811c8ce
RD
3163
3164 def GetId(*args, **kwargs):
a95a7133 3165 """GetId(self) -> int"""
54f9ee45 3166 return _core_.Event_GetId(*args, **kwargs)
e811c8ce
RD
3167
3168 def SetId(*args, **kwargs):
a95a7133 3169 """SetId(self, int Id)"""
54f9ee45 3170 return _core_.Event_SetId(*args, **kwargs)
e811c8ce
RD
3171
3172 def IsCommandEvent(*args, **kwargs):
a95a7133 3173 """IsCommandEvent(self) -> bool"""
54f9ee45 3174 return _core_.Event_IsCommandEvent(*args, **kwargs)
e811c8ce
RD
3175
3176 def Skip(*args, **kwargs):
a95a7133 3177 """Skip(self, bool skip=True)"""
54f9ee45 3178 return _core_.Event_Skip(*args, **kwargs)
e811c8ce
RD
3179
3180 def GetSkipped(*args, **kwargs):
a95a7133 3181 """GetSkipped(self) -> bool"""
54f9ee45 3182 return _core_.Event_GetSkipped(*args, **kwargs)
e811c8ce
RD
3183
3184 def ShouldPropagate(*args, **kwargs):
a95a7133 3185 """ShouldPropagate(self) -> bool"""
54f9ee45 3186 return _core_.Event_ShouldPropagate(*args, **kwargs)
e811c8ce
RD
3187
3188 def StopPropagation(*args, **kwargs):
a95a7133 3189 """StopPropagation(self) -> int"""
54f9ee45 3190 return _core_.Event_StopPropagation(*args, **kwargs)
e811c8ce
RD
3191
3192 def ResumePropagation(*args, **kwargs):
a95a7133 3193 """ResumePropagation(self, int propagationLevel)"""
54f9ee45 3194 return _core_.Event_ResumePropagation(*args, **kwargs)
e811c8ce
RD
3195
3196 def Clone(*args, **kwargs):
a95a7133 3197 """Clone(self) -> Event"""
54f9ee45 3198 return _core_.Event_Clone(*args, **kwargs)
e811c8ce 3199
d14a1e28
RD
3200
3201class EventPtr(Event):
3202 def __init__(self, this):
3203 self.this = this
3204 if not hasattr(self,"thisown"): self.thisown = 0
3205 self.__class__ = Event
54f9ee45 3206_core_.Event_swigregister(EventPtr)
d14a1e28
RD
3207
3208#---------------------------------------------------------------------------
3209
3210class PropagationDisabler(object):
e811c8ce
RD
3211 def __repr__(self):
3212 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3213 def __init__(self, *args, **kwargs):
a95a7133 3214 """__init__(self, Event event) -> PropagationDisabler"""
54f9ee45 3215 newobj = _core_.new_PropagationDisabler(*args, **kwargs)
d14a1e28
RD
3216 self.this = newobj.this
3217 self.thisown = 1
3218 del newobj.thisown
54f9ee45 3219 def __del__(self, destroy=_core_.delete_PropagationDisabler):
a95a7133 3220 """__del__(self)"""
d14a1e28
RD
3221 try:
3222 if self.thisown: destroy(self)
3223 except: pass
e811c8ce 3224
d14a1e28
RD
3225
3226class PropagationDisablerPtr(PropagationDisabler):
3227 def __init__(self, this):
3228 self.this = this
3229 if not hasattr(self,"thisown"): self.thisown = 0
3230 self.__class__ = PropagationDisabler
54f9ee45 3231_core_.PropagationDisabler_swigregister(PropagationDisablerPtr)
d14a1e28
RD
3232
3233class PropagateOnce(object):
e811c8ce
RD
3234 def __repr__(self):
3235 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3236 def __init__(self, *args, **kwargs):
a95a7133 3237 """__init__(self, Event event) -> PropagateOnce"""
54f9ee45 3238 newobj = _core_.new_PropagateOnce(*args, **kwargs)
d14a1e28
RD
3239 self.this = newobj.this
3240 self.thisown = 1
3241 del newobj.thisown
54f9ee45 3242 def __del__(self, destroy=_core_.delete_PropagateOnce):
a95a7133 3243 """__del__(self)"""
d14a1e28
RD
3244 try:
3245 if self.thisown: destroy(self)
3246 except: pass
e811c8ce 3247
d14a1e28
RD
3248
3249class PropagateOncePtr(PropagateOnce):
3250 def __init__(self, this):
3251 self.this = this
3252 if not hasattr(self,"thisown"): self.thisown = 0
3253 self.__class__ = PropagateOnce
54f9ee45 3254_core_.PropagateOnce_swigregister(PropagateOncePtr)
d14a1e28
RD
3255
3256#---------------------------------------------------------------------------
3257
3258class CommandEvent(Event):
e811c8ce
RD
3259 def __repr__(self):
3260 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3261 def __init__(self, *args, **kwargs):
a95a7133 3262 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
54f9ee45 3263 newobj = _core_.new_CommandEvent(*args, **kwargs)
d14a1e28
RD
3264 self.this = newobj.this
3265 self.thisown = 1
3266 del newobj.thisown
e811c8ce 3267 def GetSelection(*args, **kwargs):
a95a7133 3268 """GetSelection(self) -> int"""
54f9ee45 3269 return _core_.CommandEvent_GetSelection(*args, **kwargs)
e811c8ce
RD
3270
3271 def SetString(*args, **kwargs):
a95a7133 3272 """SetString(self, String s)"""
54f9ee45 3273 return _core_.CommandEvent_SetString(*args, **kwargs)
e811c8ce
RD
3274
3275 def GetString(*args, **kwargs):
a95a7133 3276 """GetString(self) -> String"""
54f9ee45 3277 return _core_.CommandEvent_GetString(*args, **kwargs)
e811c8ce
RD
3278
3279 def IsChecked(*args, **kwargs):
a95a7133 3280 """IsChecked(self) -> bool"""
54f9ee45 3281 return _core_.CommandEvent_IsChecked(*args, **kwargs)
e811c8ce 3282
242b7b46 3283 Checked = IsChecked
e811c8ce 3284 def IsSelection(*args, **kwargs):
a95a7133 3285 """IsSelection(self) -> bool"""
54f9ee45 3286 return _core_.CommandEvent_IsSelection(*args, **kwargs)
e811c8ce
RD
3287
3288 def SetExtraLong(*args, **kwargs):
a95a7133 3289 """SetExtraLong(self, long extraLong)"""
54f9ee45 3290 return _core_.CommandEvent_SetExtraLong(*args, **kwargs)
e811c8ce
RD
3291
3292 def GetExtraLong(*args, **kwargs):
a95a7133 3293 """GetExtraLong(self) -> long"""
54f9ee45 3294 return _core_.CommandEvent_GetExtraLong(*args, **kwargs)
e811c8ce
RD
3295
3296 def SetInt(*args, **kwargs):
a95a7133 3297 """SetInt(self, int i)"""
54f9ee45 3298 return _core_.CommandEvent_SetInt(*args, **kwargs)
e811c8ce
RD
3299
3300 def GetInt(*args, **kwargs):
a95a7133 3301 """GetInt(self) -> long"""
54f9ee45 3302 return _core_.CommandEvent_GetInt(*args, **kwargs)
e811c8ce
RD
3303
3304 def Clone(*args, **kwargs):
a95a7133 3305 """Clone(self) -> Event"""
54f9ee45 3306 return _core_.CommandEvent_Clone(*args, **kwargs)
e811c8ce 3307
d14a1e28
RD
3308
3309class CommandEventPtr(CommandEvent):
3310 def __init__(self, this):
3311 self.this = this
3312 if not hasattr(self,"thisown"): self.thisown = 0
3313 self.__class__ = CommandEvent
54f9ee45 3314_core_.CommandEvent_swigregister(CommandEventPtr)
d14a1e28
RD
3315
3316#---------------------------------------------------------------------------
3317
3318class NotifyEvent(CommandEvent):
e811c8ce
RD
3319 def __repr__(self):
3320 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3321 def __init__(self, *args, **kwargs):
a95a7133 3322 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
54f9ee45 3323 newobj = _core_.new_NotifyEvent(*args, **kwargs)
d14a1e28
RD
3324 self.this = newobj.this
3325 self.thisown = 1
3326 del newobj.thisown
e811c8ce 3327 def Veto(*args, **kwargs):
a95a7133 3328 """Veto(self)"""
54f9ee45 3329 return _core_.NotifyEvent_Veto(*args, **kwargs)
e811c8ce
RD
3330
3331 def Allow(*args, **kwargs):
a95a7133 3332 """Allow(self)"""
54f9ee45 3333 return _core_.NotifyEvent_Allow(*args, **kwargs)
e811c8ce
RD
3334
3335 def IsAllowed(*args, **kwargs):
a95a7133 3336 """IsAllowed(self) -> bool"""
54f9ee45 3337 return _core_.NotifyEvent_IsAllowed(*args, **kwargs)
e811c8ce 3338
d14a1e28
RD
3339
3340class NotifyEventPtr(NotifyEvent):
3341 def __init__(self, this):
3342 self.this = this
3343 if not hasattr(self,"thisown"): self.thisown = 0
3344 self.__class__ = NotifyEvent
54f9ee45 3345_core_.NotifyEvent_swigregister(NotifyEventPtr)
d14a1e28
RD
3346
3347#---------------------------------------------------------------------------
3348
3349class ScrollEvent(CommandEvent):
e811c8ce
RD
3350 def __repr__(self):
3351 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3352 def __init__(self, *args, **kwargs):
0df68c9f 3353 """
a95a7133 3354 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
0df68c9f
RD
3355 int orient=0) -> ScrollEvent
3356 """
54f9ee45 3357 newobj = _core_.new_ScrollEvent(*args, **kwargs)
d14a1e28
RD
3358 self.this = newobj.this
3359 self.thisown = 1
3360 del newobj.thisown
e811c8ce 3361 def GetOrientation(*args, **kwargs):
a95a7133 3362 """GetOrientation(self) -> int"""
54f9ee45 3363 return _core_.ScrollEvent_GetOrientation(*args, **kwargs)
e811c8ce
RD
3364
3365 def GetPosition(*args, **kwargs):
a95a7133 3366 """GetPosition(self) -> int"""
54f9ee45 3367 return _core_.ScrollEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3368
3369 def SetOrientation(*args, **kwargs):
a95a7133 3370 """SetOrientation(self, int orient)"""
54f9ee45 3371 return _core_.ScrollEvent_SetOrientation(*args, **kwargs)
e811c8ce
RD
3372
3373 def SetPosition(*args, **kwargs):
a95a7133 3374 """SetPosition(self, int pos)"""
54f9ee45 3375 return _core_.ScrollEvent_SetPosition(*args, **kwargs)
e811c8ce 3376
d14a1e28
RD
3377
3378class ScrollEventPtr(ScrollEvent):
3379 def __init__(self, this):
3380 self.this = this
3381 if not hasattr(self,"thisown"): self.thisown = 0
3382 self.__class__ = ScrollEvent
54f9ee45 3383_core_.ScrollEvent_swigregister(ScrollEventPtr)
d14a1e28
RD
3384
3385#---------------------------------------------------------------------------
3386
3387class ScrollWinEvent(Event):
e811c8ce
RD
3388 def __repr__(self):
3389 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3390 def __init__(self, *args, **kwargs):
a95a7133 3391 """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
54f9ee45 3392 newobj = _core_.new_ScrollWinEvent(*args, **kwargs)
d14a1e28
RD
3393 self.this = newobj.this
3394 self.thisown = 1
3395 del newobj.thisown
e811c8ce 3396 def GetOrientation(*args, **kwargs):
a95a7133 3397 """GetOrientation(self) -> int"""
54f9ee45 3398 return _core_.ScrollWinEvent_GetOrientation(*args, **kwargs)
e811c8ce
RD
3399
3400 def GetPosition(*args, **kwargs):
a95a7133 3401 """GetPosition(self) -> int"""
54f9ee45 3402 return _core_.ScrollWinEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3403
3404 def SetOrientation(*args, **kwargs):
a95a7133 3405 """SetOrientation(self, int orient)"""
54f9ee45 3406 return _core_.ScrollWinEvent_SetOrientation(*args, **kwargs)
e811c8ce
RD
3407
3408 def SetPosition(*args, **kwargs):
a95a7133 3409 """SetPosition(self, int pos)"""
54f9ee45 3410 return _core_.ScrollWinEvent_SetPosition(*args, **kwargs)
e811c8ce 3411
d14a1e28
RD
3412
3413class ScrollWinEventPtr(ScrollWinEvent):
3414 def __init__(self, this):
3415 self.this = this
3416 if not hasattr(self,"thisown"): self.thisown = 0
3417 self.__class__ = ScrollWinEvent
54f9ee45 3418_core_.ScrollWinEvent_swigregister(ScrollWinEventPtr)
d14a1e28
RD
3419
3420#---------------------------------------------------------------------------
3421
54f9ee45
RD
3422MOUSE_BTN_ANY = _core_.MOUSE_BTN_ANY
3423MOUSE_BTN_NONE = _core_.MOUSE_BTN_NONE
3424MOUSE_BTN_LEFT = _core_.MOUSE_BTN_LEFT
3425MOUSE_BTN_MIDDLE = _core_.MOUSE_BTN_MIDDLE
3426MOUSE_BTN_RIGHT = _core_.MOUSE_BTN_RIGHT
d14a1e28 3427class MouseEvent(Event):
e811c8ce
RD
3428 def __repr__(self):
3429 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3430 def __init__(self, *args, **kwargs):
a95a7133 3431 """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
54f9ee45 3432 newobj = _core_.new_MouseEvent(*args, **kwargs)
d14a1e28
RD
3433 self.this = newobj.this
3434 self.thisown = 1
3435 del newobj.thisown
e811c8ce 3436 def IsButton(*args, **kwargs):
a95a7133 3437 """IsButton(self) -> bool"""
54f9ee45 3438 return _core_.MouseEvent_IsButton(*args, **kwargs)
e811c8ce
RD
3439
3440 def ButtonDown(*args, **kwargs):
a95a7133 3441 """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool"""
54f9ee45 3442 return _core_.MouseEvent_ButtonDown(*args, **kwargs)
e811c8ce
RD
3443
3444 def ButtonDClick(*args, **kwargs):
a95a7133 3445 """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool"""
54f9ee45 3446 return _core_.MouseEvent_ButtonDClick(*args, **kwargs)
e811c8ce
RD
3447
3448 def ButtonUp(*args, **kwargs):
a95a7133 3449 """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool"""
54f9ee45 3450 return _core_.MouseEvent_ButtonUp(*args, **kwargs)
e811c8ce
RD
3451
3452 def Button(*args, **kwargs):
a95a7133 3453 """Button(self, int but) -> bool"""
54f9ee45 3454 return _core_.MouseEvent_Button(*args, **kwargs)
e811c8ce
RD
3455
3456 def ButtonIsDown(*args, **kwargs):
a95a7133 3457 """ButtonIsDown(self, int but) -> bool"""
54f9ee45 3458 return _core_.MouseEvent_ButtonIsDown(*args, **kwargs)
e811c8ce
RD
3459
3460 def GetButton(*args, **kwargs):
a95a7133 3461 """GetButton(self) -> int"""
54f9ee45 3462 return _core_.MouseEvent_GetButton(*args, **kwargs)
e811c8ce
RD
3463
3464 def ControlDown(*args, **kwargs):
a95a7133 3465 """ControlDown(self) -> bool"""
54f9ee45 3466 return _core_.MouseEvent_ControlDown(*args, **kwargs)
e811c8ce
RD
3467
3468 def MetaDown(*args, **kwargs):
a95a7133 3469 """MetaDown(self) -> bool"""
54f9ee45 3470 return _core_.MouseEvent_MetaDown(*args, **kwargs)
e811c8ce
RD
3471
3472 def AltDown(*args, **kwargs):
a95a7133 3473 """AltDown(self) -> bool"""
54f9ee45 3474 return _core_.MouseEvent_AltDown(*args, **kwargs)
e811c8ce
RD
3475
3476 def ShiftDown(*args, **kwargs):
a95a7133 3477 """ShiftDown(self) -> bool"""
54f9ee45 3478 return _core_.MouseEvent_ShiftDown(*args, **kwargs)
e811c8ce 3479
412d302d
RD
3480 def CmdDown(*args, **kwargs):
3481 """
3482 CmdDown(self) -> bool
3483
3484 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3485 platforms but the special "Apple" (a.k.a as "Command") key on
3486 Macs: it makes often sense to use it instead of, say, `ControlDown`
3487 because Cmd key is used for the same thing under Mac as Ctrl
3488 elsewhere. The Ctrl still exists, it's just not used for this
3489 purpose. So for non-Mac platforms this is the same as `ControlDown`
3490 and Macs this is the same as `MetaDown`.
3491 """
3492 return _core_.MouseEvent_CmdDown(*args, **kwargs)
3493
e811c8ce 3494 def LeftDown(*args, **kwargs):
a95a7133 3495 """LeftDown(self) -> bool"""
54f9ee45 3496 return _core_.MouseEvent_LeftDown(*args, **kwargs)
e811c8ce
RD
3497
3498 def MiddleDown(*args, **kwargs):
a95a7133 3499 """MiddleDown(self) -> bool"""
54f9ee45 3500 return _core_.MouseEvent_MiddleDown(*args, **kwargs)
e811c8ce
RD
3501
3502 def RightDown(*args, **kwargs):
a95a7133 3503 """RightDown(self) -> bool"""
54f9ee45 3504 return _core_.MouseEvent_RightDown(*args, **kwargs)
e811c8ce
RD
3505
3506 def LeftUp(*args, **kwargs):
a95a7133 3507 """LeftUp(self) -> bool"""
54f9ee45 3508 return _core_.MouseEvent_LeftUp(*args, **kwargs)
e811c8ce
RD
3509
3510 def MiddleUp(*args, **kwargs):
a95a7133 3511 """MiddleUp(self) -> bool"""
54f9ee45 3512 return _core_.MouseEvent_MiddleUp(*args, **kwargs)
e811c8ce
RD
3513
3514 def RightUp(*args, **kwargs):
a95a7133 3515 """RightUp(self) -> bool"""
54f9ee45 3516 return _core_.MouseEvent_RightUp(*args, **kwargs)
e811c8ce
RD
3517
3518 def LeftDClick(*args, **kwargs):
a95a7133 3519 """LeftDClick(self) -> bool"""
54f9ee45 3520 return _core_.MouseEvent_LeftDClick(*args, **kwargs)
e811c8ce
RD
3521
3522 def MiddleDClick(*args, **kwargs):
a95a7133 3523 """MiddleDClick(self) -> bool"""
54f9ee45 3524 return _core_.MouseEvent_MiddleDClick(*args, **kwargs)
e811c8ce
RD
3525
3526 def RightDClick(*args, **kwargs):
a95a7133 3527 """RightDClick(self) -> bool"""
54f9ee45 3528 return _core_.MouseEvent_RightDClick(*args, **kwargs)
e811c8ce
RD
3529
3530 def LeftIsDown(*args, **kwargs):
a95a7133 3531 """LeftIsDown(self) -> bool"""
54f9ee45 3532 return _core_.MouseEvent_LeftIsDown(*args, **kwargs)
e811c8ce
RD
3533
3534 def MiddleIsDown(*args, **kwargs):
a95a7133 3535 """MiddleIsDown(self) -> bool"""
54f9ee45 3536 return _core_.MouseEvent_MiddleIsDown(*args, **kwargs)
e811c8ce
RD
3537
3538 def RightIsDown(*args, **kwargs):
a95a7133 3539 """RightIsDown(self) -> bool"""
54f9ee45 3540 return _core_.MouseEvent_RightIsDown(*args, **kwargs)
e811c8ce
RD
3541
3542 def Dragging(*args, **kwargs):
a95a7133 3543 """Dragging(self) -> bool"""
54f9ee45 3544 return _core_.MouseEvent_Dragging(*args, **kwargs)
e811c8ce
RD
3545
3546 def Moving(*args, **kwargs):
a95a7133 3547 """Moving(self) -> bool"""
54f9ee45 3548 return _core_.MouseEvent_Moving(*args, **kwargs)
e811c8ce
RD
3549
3550 def Entering(*args, **kwargs):
a95a7133 3551 """Entering(self) -> bool"""
54f9ee45 3552 return _core_.MouseEvent_Entering(*args, **kwargs)
e811c8ce
RD
3553
3554 def Leaving(*args, **kwargs):
a95a7133 3555 """Leaving(self) -> bool"""
54f9ee45 3556 return _core_.MouseEvent_Leaving(*args, **kwargs)
e811c8ce
RD
3557
3558 def GetPosition(*args, **kwargs):
0df68c9f 3559 """
a95a7133 3560 GetPosition(self) -> Point
e811c8ce 3561
41e2b43e
RD
3562 Returns the position of the mouse in window coordinates when the event
3563 happened.
0df68c9f 3564 """
54f9ee45 3565 return _core_.MouseEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3566
3567 def GetPositionTuple(*args, **kwargs):
0df68c9f
RD
3568 """
3569 GetPositionTuple() -> (x,y)
e811c8ce 3570
41e2b43e
RD
3571 Returns the position of the mouse in window coordinates when the event
3572 happened.
0df68c9f 3573 """
54f9ee45 3574 return _core_.MouseEvent_GetPositionTuple(*args, **kwargs)
e811c8ce
RD
3575
3576 def GetLogicalPosition(*args, **kwargs):
a95a7133 3577 """GetLogicalPosition(self, DC dc) -> Point"""
54f9ee45 3578 return _core_.MouseEvent_GetLogicalPosition(*args, **kwargs)
e811c8ce
RD
3579
3580 def GetX(*args, **kwargs):
a95a7133 3581 """GetX(self) -> int"""
54f9ee45 3582 return _core_.MouseEvent_GetX(*args, **kwargs)
e811c8ce
RD
3583
3584 def GetY(*args, **kwargs):
a95a7133 3585 """GetY(self) -> int"""
54f9ee45 3586 return _core_.MouseEvent_GetY(*args, **kwargs)
e811c8ce
RD
3587
3588 def GetWheelRotation(*args, **kwargs):
a95a7133 3589 """GetWheelRotation(self) -> int"""
54f9ee45 3590 return _core_.MouseEvent_GetWheelRotation(*args, **kwargs)
e811c8ce
RD
3591
3592 def GetWheelDelta(*args, **kwargs):
a95a7133 3593 """GetWheelDelta(self) -> int"""
54f9ee45 3594 return _core_.MouseEvent_GetWheelDelta(*args, **kwargs)
e811c8ce
RD
3595
3596 def GetLinesPerAction(*args, **kwargs):
a95a7133 3597 """GetLinesPerAction(self) -> int"""
54f9ee45 3598 return _core_.MouseEvent_GetLinesPerAction(*args, **kwargs)
e811c8ce
RD
3599
3600 def IsPageScroll(*args, **kwargs):
a95a7133 3601 """IsPageScroll(self) -> bool"""
54f9ee45
RD
3602 return _core_.MouseEvent_IsPageScroll(*args, **kwargs)
3603
3604 m_x = property(_core_.MouseEvent_m_x_get, _core_.MouseEvent_m_x_set)
3605 m_y = property(_core_.MouseEvent_m_y_get, _core_.MouseEvent_m_y_set)
3606 m_leftDown = property(_core_.MouseEvent_m_leftDown_get, _core_.MouseEvent_m_leftDown_set)
3607 m_middleDown = property(_core_.MouseEvent_m_middleDown_get, _core_.MouseEvent_m_middleDown_set)
3608 m_rightDown = property(_core_.MouseEvent_m_rightDown_get, _core_.MouseEvent_m_rightDown_set)
3609 m_controlDown = property(_core_.MouseEvent_m_controlDown_get, _core_.MouseEvent_m_controlDown_set)
3610 m_shiftDown = property(_core_.MouseEvent_m_shiftDown_get, _core_.MouseEvent_m_shiftDown_set)
3611 m_altDown = property(_core_.MouseEvent_m_altDown_get, _core_.MouseEvent_m_altDown_set)
3612 m_metaDown = property(_core_.MouseEvent_m_metaDown_get, _core_.MouseEvent_m_metaDown_set)
3613 m_wheelRotation = property(_core_.MouseEvent_m_wheelRotation_get, _core_.MouseEvent_m_wheelRotation_set)
3614 m_wheelDelta = property(_core_.MouseEvent_m_wheelDelta_get, _core_.MouseEvent_m_wheelDelta_set)
3615 m_linesPerAction = property(_core_.MouseEvent_m_linesPerAction_get, _core_.MouseEvent_m_linesPerAction_set)
d14a1e28
RD
3616
3617class MouseEventPtr(MouseEvent):
3618 def __init__(self, this):
3619 self.this = this
3620 if not hasattr(self,"thisown"): self.thisown = 0
3621 self.__class__ = MouseEvent
54f9ee45 3622_core_.MouseEvent_swigregister(MouseEventPtr)
d14a1e28
RD
3623
3624#---------------------------------------------------------------------------
3625
3626class SetCursorEvent(Event):
e811c8ce
RD
3627 def __repr__(self):
3628 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3629 def __init__(self, *args, **kwargs):
a95a7133 3630 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
54f9ee45 3631 newobj = _core_.new_SetCursorEvent(*args, **kwargs)
d14a1e28
RD
3632 self.this = newobj.this
3633 self.thisown = 1
3634 del newobj.thisown
e811c8ce 3635 def GetX(*args, **kwargs):
a95a7133 3636 """GetX(self) -> int"""
54f9ee45 3637 return _core_.SetCursorEvent_GetX(*args, **kwargs)
e811c8ce
RD
3638
3639 def GetY(*args, **kwargs):
a95a7133 3640 """GetY(self) -> int"""
54f9ee45 3641 return _core_.SetCursorEvent_GetY(*args, **kwargs)
e811c8ce
RD
3642
3643 def SetCursor(*args, **kwargs):
a95a7133 3644 """SetCursor(self, Cursor cursor)"""
54f9ee45 3645 return _core_.SetCursorEvent_SetCursor(*args, **kwargs)
e811c8ce
RD
3646
3647 def GetCursor(*args, **kwargs):
a95a7133 3648 """GetCursor(self) -> Cursor"""
54f9ee45 3649 return _core_.SetCursorEvent_GetCursor(*args, **kwargs)
e811c8ce
RD
3650
3651 def HasCursor(*args, **kwargs):
a95a7133 3652 """HasCursor(self) -> bool"""
54f9ee45 3653 return _core_.SetCursorEvent_HasCursor(*args, **kwargs)
e811c8ce 3654
d14a1e28
RD
3655
3656class SetCursorEventPtr(SetCursorEvent):
3657 def __init__(self, this):
3658 self.this = this
3659 if not hasattr(self,"thisown"): self.thisown = 0
3660 self.__class__ = SetCursorEvent
54f9ee45 3661_core_.SetCursorEvent_swigregister(SetCursorEventPtr)
d14a1e28
RD
3662
3663#---------------------------------------------------------------------------
3664
3665class KeyEvent(Event):
e811c8ce
RD
3666 def __repr__(self):
3667 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3668 def __init__(self, *args, **kwargs):
a95a7133 3669 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
54f9ee45 3670 newobj = _core_.new_KeyEvent(*args, **kwargs)
d14a1e28
RD
3671 self.this = newobj.this
3672 self.thisown = 1
3673 del newobj.thisown
e811c8ce 3674 def ControlDown(*args, **kwargs):
a95a7133 3675 """ControlDown(self) -> bool"""
54f9ee45 3676 return _core_.KeyEvent_ControlDown(*args, **kwargs)
e811c8ce
RD
3677
3678 def MetaDown(*args, **kwargs):
a95a7133 3679 """MetaDown(self) -> bool"""
54f9ee45 3680 return _core_.KeyEvent_MetaDown(*args, **kwargs)
e811c8ce
RD
3681
3682 def AltDown(*args, **kwargs):
a95a7133 3683 """AltDown(self) -> bool"""
54f9ee45 3684 return _core_.KeyEvent_AltDown(*args, **kwargs)
e811c8ce
RD
3685
3686 def ShiftDown(*args, **kwargs):
a95a7133 3687 """ShiftDown(self) -> bool"""
54f9ee45 3688 return _core_.KeyEvent_ShiftDown(*args, **kwargs)
e811c8ce 3689
412d302d
RD
3690 def CmdDown(*args, **kwargs):
3691 """
3692 CmdDown(self) -> bool
3693
3694 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3695 platforms but the special "Apple" (a.k.a as "Command") key on
3696 Macs: it makes often sense to use it instead of, say, `ControlDown`
3697 because Cmd key is used for the same thing under Mac as Ctrl
3698 elsewhere. The Ctrl still exists, it's just not used for this
3699 purpose. So for non-Mac platforms this is the same as `ControlDown`
3700 and Macs this is the same as `MetaDown`.
3701 """
3702 return _core_.KeyEvent_CmdDown(*args, **kwargs)
3703
e811c8ce 3704 def HasModifiers(*args, **kwargs):
a95a7133 3705 """HasModifiers(self) -> bool"""
54f9ee45 3706 return _core_.KeyEvent_HasModifiers(*args, **kwargs)
e811c8ce
RD
3707
3708 def GetKeyCode(*args, **kwargs):
a95a7133 3709 """GetKeyCode(self) -> int"""
54f9ee45 3710 return _core_.KeyEvent_GetKeyCode(*args, **kwargs)
e811c8ce 3711
d14a1e28 3712 KeyCode = GetKeyCode
19272049
RD
3713 def GetUnicodeKey(*args, **kwargs):
3714 """GetUnicodeKey(self) -> int"""
3715 return _core_.KeyEvent_GetUnicodeKey(*args, **kwargs)
e811c8ce 3716
19272049 3717 GetUniChar = GetUnicodeKey
e811c8ce 3718 def GetRawKeyCode(*args, **kwargs):
a95a7133 3719 """GetRawKeyCode(self) -> unsigned int"""
54f9ee45 3720 return _core_.KeyEvent_GetRawKeyCode(*args, **kwargs)
e811c8ce
RD
3721
3722 def GetRawKeyFlags(*args, **kwargs):
a95a7133 3723 """GetRawKeyFlags(self) -> unsigned int"""
54f9ee45 3724 return _core_.KeyEvent_GetRawKeyFlags(*args, **kwargs)
e811c8ce
RD
3725
3726 def GetPosition(*args, **kwargs):
0df68c9f 3727 """
a95a7133 3728 GetPosition(self) -> Point
e811c8ce 3729
0df68c9f
RD
3730 Find the position of the event.
3731 """
54f9ee45 3732 return _core_.KeyEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3733
3734 def GetPositionTuple(*args, **kwargs):
0df68c9f
RD
3735 """
3736 GetPositionTuple() -> (x,y)
e811c8ce 3737
0df68c9f
RD
3738 Find the position of the event.
3739 """
54f9ee45 3740 return _core_.KeyEvent_GetPositionTuple(*args, **kwargs)
e811c8ce
RD
3741
3742 def GetX(*args, **kwargs):
a95a7133 3743 """GetX(self) -> int"""
54f9ee45 3744 return _core_.KeyEvent_GetX(*args, **kwargs)
e811c8ce
RD
3745
3746 def GetY(*args, **kwargs):
a95a7133 3747 """GetY(self) -> int"""
54f9ee45
RD
3748 return _core_.KeyEvent_GetY(*args, **kwargs)
3749
3750 m_x = property(_core_.KeyEvent_m_x_get, _core_.KeyEvent_m_x_set)
3751 m_y = property(_core_.KeyEvent_m_y_get, _core_.KeyEvent_m_y_set)
3752 m_keyCode = property(_core_.KeyEvent_m_keyCode_get, _core_.KeyEvent_m_keyCode_set)
3753 m_controlDown = property(_core_.KeyEvent_m_controlDown_get, _core_.KeyEvent_m_controlDown_set)
3754 m_shiftDown = property(_core_.KeyEvent_m_shiftDown_get, _core_.KeyEvent_m_shiftDown_set)
3755 m_altDown = property(_core_.KeyEvent_m_altDown_get, _core_.KeyEvent_m_altDown_set)
3756 m_metaDown = property(_core_.KeyEvent_m_metaDown_get, _core_.KeyEvent_m_metaDown_set)
3757 m_scanCode = property(_core_.KeyEvent_m_scanCode_get, _core_.KeyEvent_m_scanCode_set)
3758 m_rawCode = property(_core_.KeyEvent_m_rawCode_get, _core_.KeyEvent_m_rawCode_set)
3759 m_rawFlags = property(_core_.KeyEvent_m_rawFlags_get, _core_.KeyEvent_m_rawFlags_set)
d14a1e28
RD
3760
3761class KeyEventPtr(KeyEvent):
3762 def __init__(self, this):
3763 self.this = this
3764 if not hasattr(self,"thisown"): self.thisown = 0
3765 self.__class__ = KeyEvent
54f9ee45 3766_core_.KeyEvent_swigregister(KeyEventPtr)
d14a1e28
RD
3767
3768#---------------------------------------------------------------------------
3769
3770class SizeEvent(Event):
e811c8ce
RD
3771 def __repr__(self):
3772 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3773 def __init__(self, *args, **kwargs):
a95a7133 3774 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
54f9ee45 3775 newobj = _core_.new_SizeEvent(*args, **kwargs)
d14a1e28
RD
3776 self.this = newobj.this
3777 self.thisown = 1
3778 del newobj.thisown
e811c8ce 3779 def GetSize(*args, **kwargs):
a95a7133 3780 """GetSize(self) -> Size"""
54f9ee45 3781 return _core_.SizeEvent_GetSize(*args, **kwargs)
e811c8ce
RD
3782
3783 def GetRect(*args, **kwargs):
a95a7133 3784 """GetRect(self) -> Rect"""
54f9ee45 3785 return _core_.SizeEvent_GetRect(*args, **kwargs)
e811c8ce
RD
3786
3787 def SetRect(*args, **kwargs):
a95a7133 3788 """SetRect(self, Rect rect)"""
54f9ee45 3789 return _core_.SizeEvent_SetRect(*args, **kwargs)
e811c8ce
RD
3790
3791 def SetSize(*args, **kwargs):
a95a7133 3792 """SetSize(self, Size size)"""
54f9ee45 3793 return _core_.SizeEvent_SetSize(*args, **kwargs)
e811c8ce 3794
54f9ee45
RD
3795 m_size = property(_core_.SizeEvent_m_size_get, _core_.SizeEvent_m_size_set)
3796 m_rect = property(_core_.SizeEvent_m_rect_get, _core_.SizeEvent_m_rect_set)
d14a1e28
RD
3797
3798class SizeEventPtr(SizeEvent):
3799 def __init__(self, this):
3800 self.this = this
3801 if not hasattr(self,"thisown"): self.thisown = 0
3802 self.__class__ = SizeEvent
54f9ee45 3803_core_.SizeEvent_swigregister(SizeEventPtr)
d14a1e28
RD
3804
3805#---------------------------------------------------------------------------
3806
3807class MoveEvent(Event):
e811c8ce
RD
3808 def __repr__(self):
3809 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3810 def __init__(self, *args, **kwargs):
a95a7133 3811 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
54f9ee45 3812 newobj = _core_.new_MoveEvent(*args, **kwargs)
d14a1e28
RD
3813 self.this = newobj.this
3814 self.thisown = 1
3815 del newobj.thisown
e811c8ce 3816 def GetPosition(*args, **kwargs):
a95a7133 3817 """GetPosition(self) -> Point"""
54f9ee45 3818 return _core_.MoveEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3819
3820 def GetRect(*args, **kwargs):
a95a7133 3821 """GetRect(self) -> Rect"""
54f9ee45 3822 return _core_.MoveEvent_GetRect(*args, **kwargs)
e811c8ce
RD
3823
3824 def SetRect(*args, **kwargs):
a95a7133 3825 """SetRect(self, Rect rect)"""
54f9ee45 3826 return _core_.MoveEvent_SetRect(*args, **kwargs)
e811c8ce
RD
3827
3828 def SetPosition(*args, **kwargs):
a95a7133 3829 """SetPosition(self, Point pos)"""
54f9ee45 3830 return _core_.MoveEvent_SetPosition(*args, **kwargs)
e811c8ce 3831
54f9ee45
RD
3832 m_pos = property(_core_.MoveEvent_m_pos_get, _core_.MoveEvent_m_pos_set)
3833 m_rect = property(_core_.MoveEvent_m_rect_get, _core_.MoveEvent_m_rect_set)
d14a1e28
RD
3834
3835class MoveEventPtr(MoveEvent):
3836 def __init__(self, this):
3837 self.this = this
3838 if not hasattr(self,"thisown"): self.thisown = 0
3839 self.__class__ = MoveEvent
54f9ee45 3840_core_.MoveEvent_swigregister(MoveEventPtr)
d14a1e28
RD
3841
3842#---------------------------------------------------------------------------
3843
3844class PaintEvent(Event):
e811c8ce
RD
3845 def __repr__(self):
3846 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3847 def __init__(self, *args, **kwargs):
a95a7133 3848 """__init__(self, int Id=0) -> PaintEvent"""
54f9ee45 3849 newobj = _core_.new_PaintEvent(*args, **kwargs)
d14a1e28
RD
3850 self.this = newobj.this
3851 self.thisown = 1
3852 del newobj.thisown
d14a1e28
RD
3853
3854class PaintEventPtr(PaintEvent):
3855 def __init__(self, this):
3856 self.this = this
3857 if not hasattr(self,"thisown"): self.thisown = 0
3858 self.__class__ = PaintEvent
54f9ee45 3859_core_.PaintEvent_swigregister(PaintEventPtr)
d14a1e28
RD
3860
3861class NcPaintEvent(Event):
e811c8ce
RD
3862 def __repr__(self):
3863 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3864 def __init__(self, *args, **kwargs):
a95a7133 3865 """__init__(self, int winid=0) -> NcPaintEvent"""
54f9ee45 3866 newobj = _core_.new_NcPaintEvent(*args, **kwargs)
d14a1e28
RD
3867 self.this = newobj.this
3868 self.thisown = 1
3869 del newobj.thisown
d14a1e28
RD
3870
3871class NcPaintEventPtr(NcPaintEvent):
3872 def __init__(self, this):
3873 self.this = this
3874 if not hasattr(self,"thisown"): self.thisown = 0
3875 self.__class__ = NcPaintEvent
54f9ee45 3876_core_.NcPaintEvent_swigregister(NcPaintEventPtr)
d14a1e28
RD
3877
3878#---------------------------------------------------------------------------
3879
3880class EraseEvent(Event):
e811c8ce
RD
3881 def __repr__(self):
3882 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3883 def __init__(self, *args, **kwargs):
a95a7133 3884 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
54f9ee45 3885 newobj = _core_.new_EraseEvent(*args, **kwargs)
d14a1e28
RD
3886 self.this = newobj.this
3887 self.thisown = 1
3888 del newobj.thisown
e811c8ce 3889 def GetDC(*args, **kwargs):
a95a7133 3890 """GetDC(self) -> DC"""
54f9ee45 3891 return _core_.EraseEvent_GetDC(*args, **kwargs)
e811c8ce 3892
d14a1e28
RD
3893
3894class EraseEventPtr(EraseEvent):
3895 def __init__(self, this):
3896 self.this = this
3897 if not hasattr(self,"thisown"): self.thisown = 0
3898 self.__class__ = EraseEvent
54f9ee45 3899_core_.EraseEvent_swigregister(EraseEventPtr)
d14a1e28
RD
3900
3901#---------------------------------------------------------------------------
3902
3903class FocusEvent(Event):
e811c8ce
RD
3904 def __repr__(self):
3905 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3906 def __init__(self, *args, **kwargs):
a95a7133 3907 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
54f9ee45 3908 newobj = _core_.new_FocusEvent(*args, **kwargs)
d14a1e28
RD
3909 self.this = newobj.this
3910 self.thisown = 1
3911 del newobj.thisown
e811c8ce 3912 def GetWindow(*args, **kwargs):
a95a7133 3913 """GetWindow(self) -> Window"""
54f9ee45 3914 return _core_.FocusEvent_GetWindow(*args, **kwargs)
e811c8ce
RD
3915
3916 def SetWindow(*args, **kwargs):
a95a7133 3917 """SetWindow(self, Window win)"""
54f9ee45 3918 return _core_.FocusEvent_SetWindow(*args, **kwargs)
e811c8ce 3919
d14a1e28
RD
3920
3921class FocusEventPtr(FocusEvent):
3922 def __init__(self, this):
3923 self.this = this
3924 if not hasattr(self,"thisown"): self.thisown = 0
3925 self.__class__ = FocusEvent
54f9ee45 3926_core_.FocusEvent_swigregister(FocusEventPtr)
d14a1e28
RD
3927
3928#---------------------------------------------------------------------------
3929
3930class ChildFocusEvent(CommandEvent):
e811c8ce
RD
3931 def __repr__(self):
3932 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3933 def __init__(self, *args, **kwargs):
a95a7133 3934 """__init__(self, Window win=None) -> ChildFocusEvent"""
54f9ee45 3935 newobj = _core_.new_ChildFocusEvent(*args, **kwargs)
d14a1e28
RD
3936 self.this = newobj.this
3937 self.thisown = 1
3938 del newobj.thisown
e811c8ce 3939 def GetWindow(*args, **kwargs):
a95a7133 3940 """GetWindow(self) -> Window"""
54f9ee45 3941 return _core_.ChildFocusEvent_GetWindow(*args, **kwargs)
e811c8ce 3942
d14a1e28
RD
3943
3944class ChildFocusEventPtr(ChildFocusEvent):
3945 def __init__(self, this):
3946 self.this = this
3947 if not hasattr(self,"thisown"): self.thisown = 0
3948 self.__class__ = ChildFocusEvent
54f9ee45 3949_core_.ChildFocusEvent_swigregister(ChildFocusEventPtr)
d14a1e28
RD
3950
3951#---------------------------------------------------------------------------
3952
3953class ActivateEvent(Event):
e811c8ce
RD
3954 def __repr__(self):
3955 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3956 def __init__(self, *args, **kwargs):
a95a7133 3957 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
54f9ee45 3958 newobj = _core_.new_ActivateEvent(*args, **kwargs)
d14a1e28
RD
3959 self.this = newobj.this
3960 self.thisown = 1
3961 del newobj.thisown
e811c8ce 3962 def GetActive(*args, **kwargs):
a95a7133 3963 """GetActive(self) -> bool"""
54f9ee45 3964 return _core_.ActivateEvent_GetActive(*args, **kwargs)
e811c8ce 3965
d14a1e28
RD
3966
3967class ActivateEventPtr(ActivateEvent):
3968 def __init__(self, this):
3969 self.this = this
3970 if not hasattr(self,"thisown"): self.thisown = 0
3971 self.__class__ = ActivateEvent
54f9ee45 3972_core_.ActivateEvent_swigregister(ActivateEventPtr)
d14a1e28
RD
3973
3974#---------------------------------------------------------------------------
3975
3976class InitDialogEvent(Event):
e811c8ce
RD
3977 def __repr__(self):
3978 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3979 def __init__(self, *args, **kwargs):
a95a7133 3980 """__init__(self, int Id=0) -> InitDialogEvent"""
54f9ee45 3981 newobj = _core_.new_InitDialogEvent(*args, **kwargs)
d14a1e28
RD
3982 self.this = newobj.this
3983 self.thisown = 1
3984 del newobj.thisown
d14a1e28
RD
3985
3986class InitDialogEventPtr(InitDialogEvent):
3987 def __init__(self, this):
3988 self.this = this
3989 if not hasattr(self,"thisown"): self.thisown = 0
3990 self.__class__ = InitDialogEvent
54f9ee45 3991_core_.InitDialogEvent_swigregister(InitDialogEventPtr)
d14a1e28
RD
3992
3993#---------------------------------------------------------------------------
3994
3995class MenuEvent(Event):
e811c8ce
RD
3996 def __repr__(self):
3997 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3998 def __init__(self, *args, **kwargs):
a95a7133 3999 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
54f9ee45 4000 newobj = _core_.new_MenuEvent(*args, **kwargs)
d14a1e28
RD
4001 self.this = newobj.this
4002 self.thisown = 1
4003 del newobj.thisown
e811c8ce 4004 def GetMenuId(*args, **kwargs):
a95a7133 4005 """GetMenuId(self) -> int"""
54f9ee45 4006 return _core_.MenuEvent_GetMenuId(*args, **kwargs)
e811c8ce
RD
4007
4008 def IsPopup(*args, **kwargs):
a95a7133 4009 """IsPopup(self) -> bool"""
54f9ee45 4010 return _core_.MenuEvent_IsPopup(*args, **kwargs)
e811c8ce
RD
4011
4012 def GetMenu(*args, **kwargs):
a95a7133 4013 """GetMenu(self) -> Menu"""
54f9ee45 4014 return _core_.MenuEvent_GetMenu(*args, **kwargs)
e811c8ce 4015
d14a1e28
RD
4016
4017class MenuEventPtr(MenuEvent):
4018 def __init__(self, this):
4019 self.this = this
4020 if not hasattr(self,"thisown"): self.thisown = 0
4021 self.__class__ = MenuEvent
54f9ee45 4022_core_.MenuEvent_swigregister(MenuEventPtr)
d14a1e28
RD
4023
4024#---------------------------------------------------------------------------
4025
4026class CloseEvent(Event):
e811c8ce
RD
4027 def __repr__(self):
4028 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4029 def __init__(self, *args, **kwargs):
a95a7133 4030 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
54f9ee45 4031 newobj = _core_.new_CloseEvent(*args, **kwargs)
d14a1e28
RD
4032 self.this = newobj.this
4033 self.thisown = 1
4034 del newobj.thisown
e811c8ce 4035 def SetLoggingOff(*args, **kwargs):
a95a7133 4036 """SetLoggingOff(self, bool logOff)"""
54f9ee45 4037 return _core_.CloseEvent_SetLoggingOff(*args, **kwargs)
e811c8ce
RD
4038
4039 def GetLoggingOff(*args, **kwargs):
a95a7133 4040 """GetLoggingOff(self) -> bool"""
54f9ee45 4041 return _core_.CloseEvent_GetLoggingOff(*args, **kwargs)
e811c8ce
RD
4042
4043 def Veto(*args, **kwargs):
a95a7133 4044 """Veto(self, bool veto=True)"""
54f9ee45 4045 return _core_.CloseEvent_Veto(*args, **kwargs)
e811c8ce
RD
4046
4047 def SetCanVeto(*args, **kwargs):
a95a7133 4048 """SetCanVeto(self, bool canVeto)"""
54f9ee45 4049 return _core_.CloseEvent_SetCanVeto(*args, **kwargs)
e811c8ce
RD
4050
4051 def CanVeto(*args, **kwargs):
a95a7133 4052 """CanVeto(self) -> bool"""
54f9ee45 4053 return _core_.CloseEvent_CanVeto(*args, **kwargs)
e811c8ce
RD
4054
4055 def GetVeto(*args, **kwargs):
a95a7133 4056 """GetVeto(self) -> bool"""
54f9ee45 4057 return _core_.CloseEvent_GetVeto(*args, **kwargs)
e811c8ce 4058
d14a1e28
RD
4059
4060class CloseEventPtr(CloseEvent):
4061 def __init__(self, this):
4062 self.this = this
4063 if not hasattr(self,"thisown"): self.thisown = 0
4064 self.__class__ = CloseEvent
54f9ee45 4065_core_.CloseEvent_swigregister(CloseEventPtr)
d14a1e28
RD
4066
4067#---------------------------------------------------------------------------
4068
4069class ShowEvent(Event):
e811c8ce
RD
4070 def __repr__(self):
4071 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4072 def __init__(self, *args, **kwargs):
a95a7133 4073 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
54f9ee45 4074 newobj = _core_.new_ShowEvent(*args, **kwargs)
d14a1e28
RD
4075 self.this = newobj.this
4076 self.thisown = 1
4077 del newobj.thisown
e811c8ce 4078 def SetShow(*args, **kwargs):
a95a7133 4079 """SetShow(self, bool show)"""
54f9ee45 4080 return _core_.ShowEvent_SetShow(*args, **kwargs)
e811c8ce
RD
4081
4082 def GetShow(*args, **kwargs):
a95a7133 4083 """GetShow(self) -> bool"""
54f9ee45 4084 return _core_.ShowEvent_GetShow(*args, **kwargs)
e811c8ce 4085
d14a1e28
RD
4086
4087class ShowEventPtr(ShowEvent):
4088 def __init__(self, this):
4089 self.this = this
4090 if not hasattr(self,"thisown"): self.thisown = 0
4091 self.__class__ = ShowEvent
54f9ee45 4092_core_.ShowEvent_swigregister(ShowEventPtr)
d14a1e28
RD
4093
4094#---------------------------------------------------------------------------
4095
4096class IconizeEvent(Event):
e811c8ce
RD
4097 def __repr__(self):
4098 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4099 def __init__(self, *args, **kwargs):
a95a7133 4100 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
54f9ee45 4101 newobj = _core_.new_IconizeEvent(*args, **kwargs)
d14a1e28
RD
4102 self.this = newobj.this
4103 self.thisown = 1
4104 del newobj.thisown
e811c8ce 4105 def Iconized(*args, **kwargs):
a95a7133 4106 """Iconized(self) -> bool"""
54f9ee45 4107 return _core_.IconizeEvent_Iconized(*args, **kwargs)
e811c8ce 4108
d14a1e28
RD
4109
4110class IconizeEventPtr(IconizeEvent):
4111 def __init__(self, this):
4112 self.this = this
4113 if not hasattr(self,"thisown"): self.thisown = 0
4114 self.__class__ = IconizeEvent
54f9ee45 4115_core_.IconizeEvent_swigregister(IconizeEventPtr)
d14a1e28
RD
4116
4117#---------------------------------------------------------------------------
4118
4119class MaximizeEvent(Event):
e811c8ce
RD
4120 def __repr__(self):
4121 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4122 def __init__(self, *args, **kwargs):
a95a7133 4123 """__init__(self, int id=0) -> MaximizeEvent"""
54f9ee45 4124 newobj = _core_.new_MaximizeEvent(*args, **kwargs)
d14a1e28
RD
4125 self.this = newobj.this
4126 self.thisown = 1
4127 del newobj.thisown
d14a1e28
RD
4128
4129class MaximizeEventPtr(MaximizeEvent):
4130 def __init__(self, this):
4131 self.this = this
4132 if not hasattr(self,"thisown"): self.thisown = 0
4133 self.__class__ = MaximizeEvent
54f9ee45 4134_core_.MaximizeEvent_swigregister(MaximizeEventPtr)
d14a1e28
RD
4135
4136#---------------------------------------------------------------------------
4137
4138class DropFilesEvent(Event):
d14a1e28
RD
4139 def __init__(self): raise RuntimeError, "No constructor defined"
4140 def __repr__(self):
4141 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 4142 def GetPosition(*args, **kwargs):
a95a7133 4143 """GetPosition(self) -> Point"""
54f9ee45 4144 return _core_.DropFilesEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
4145
4146 def GetNumberOfFiles(*args, **kwargs):
a95a7133 4147 """GetNumberOfFiles(self) -> int"""
54f9ee45 4148 return _core_.DropFilesEvent_GetNumberOfFiles(*args, **kwargs)
e811c8ce
RD
4149
4150 def GetFiles(*args, **kwargs):
a95a7133 4151 """GetFiles(self) -> PyObject"""
54f9ee45 4152 return _core_.DropFilesEvent_GetFiles(*args, **kwargs)
e811c8ce 4153
d14a1e28
RD
4154
4155class DropFilesEventPtr(DropFilesEvent):
4156 def __init__(self, this):
4157 self.this = this
4158 if not hasattr(self,"thisown"): self.thisown = 0
4159 self.__class__ = DropFilesEvent
54f9ee45 4160_core_.DropFilesEvent_swigregister(DropFilesEventPtr)
d14a1e28
RD
4161
4162#---------------------------------------------------------------------------
4163
54f9ee45
RD
4164UPDATE_UI_PROCESS_ALL = _core_.UPDATE_UI_PROCESS_ALL
4165UPDATE_UI_PROCESS_SPECIFIED = _core_.UPDATE_UI_PROCESS_SPECIFIED
d14a1e28 4166class UpdateUIEvent(CommandEvent):
e811c8ce
RD
4167 def __repr__(self):
4168 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4169 def __init__(self, *args, **kwargs):
a95a7133 4170 """__init__(self, int commandId=0) -> UpdateUIEvent"""
54f9ee45 4171 newobj = _core_.new_UpdateUIEvent(*args, **kwargs)
d14a1e28
RD
4172 self.this = newobj.this
4173 self.thisown = 1
4174 del newobj.thisown
e811c8ce 4175 def GetChecked(*args, **kwargs):
a95a7133 4176 """GetChecked(self) -> bool"""
54f9ee45 4177 return _core_.UpdateUIEvent_GetChecked(*args, **kwargs)
e811c8ce
RD
4178
4179 def GetEnabled(*args, **kwargs):
a95a7133 4180 """GetEnabled(self) -> bool"""
54f9ee45 4181 return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs)
e811c8ce
RD
4182
4183 def GetText(*args, **kwargs):
a95a7133 4184 """GetText(self) -> String"""
54f9ee45 4185 return _core_.UpdateUIEvent_GetText(*args, **kwargs)
e811c8ce
RD
4186
4187 def GetSetText(*args, **kwargs):
a95a7133 4188 """GetSetText(self) -> bool"""
54f9ee45 4189 return _core_.UpdateUIEvent_GetSetText(*args, **kwargs)
e811c8ce
RD
4190
4191 def GetSetChecked(*args, **kwargs):
a95a7133 4192 """GetSetChecked(self) -> bool"""
54f9ee45 4193 return _core_.UpdateUIEvent_GetSetChecked(*args, **kwargs)
e811c8ce
RD
4194
4195 def GetSetEnabled(*args, **kwargs):
a95a7133 4196 """GetSetEnabled(self) -> bool"""
54f9ee45 4197 return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs)
e811c8ce
RD
4198
4199 def Check(*args, **kwargs):
a95a7133 4200 """Check(self, bool check)"""
54f9ee45 4201 return _core_.UpdateUIEvent_Check(*args, **kwargs)
e811c8ce
RD
4202
4203 def Enable(*args, **kwargs):
a95a7133 4204 """Enable(self, bool enable)"""
54f9ee45 4205 return _core_.UpdateUIEvent_Enable(*args, **kwargs)
e811c8ce
RD
4206
4207 def SetText(*args, **kwargs):
a95a7133 4208 """SetText(self, String text)"""
54f9ee45 4209 return _core_.UpdateUIEvent_SetText(*args, **kwargs)
e811c8ce
RD
4210
4211 def SetUpdateInterval(*args, **kwargs):
66c033b4 4212 """SetUpdateInterval(long updateInterval)"""
54f9ee45 4213 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
e811c8ce
RD
4214
4215 SetUpdateInterval = staticmethod(SetUpdateInterval)
4216 def GetUpdateInterval(*args, **kwargs):
66c033b4 4217 """GetUpdateInterval() -> long"""
54f9ee45 4218 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
e811c8ce
RD
4219
4220 GetUpdateInterval = staticmethod(GetUpdateInterval)
4221 def CanUpdate(*args, **kwargs):
66c033b4 4222 """CanUpdate(Window win) -> bool"""
54f9ee45 4223 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
e811c8ce
RD
4224
4225 CanUpdate = staticmethod(CanUpdate)
4226 def ResetUpdateTime(*args, **kwargs):
66c033b4 4227 """ResetUpdateTime()"""
54f9ee45 4228 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
e811c8ce
RD
4229
4230 ResetUpdateTime = staticmethod(ResetUpdateTime)
4231 def SetMode(*args, **kwargs):
66c033b4 4232 """SetMode(int mode)"""
54f9ee45 4233 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
e811c8ce
RD
4234
4235 SetMode = staticmethod(SetMode)
4236 def GetMode(*args, **kwargs):
66c033b4 4237 """GetMode() -> int"""
54f9ee45 4238 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
e811c8ce
RD
4239
4240 GetMode = staticmethod(GetMode)
d14a1e28
RD
4241
4242class UpdateUIEventPtr(UpdateUIEvent):
4243 def __init__(self, this):
4244 self.this = this
4245 if not hasattr(self,"thisown"): self.thisown = 0
4246 self.__class__ = UpdateUIEvent
54f9ee45 4247_core_.UpdateUIEvent_swigregister(UpdateUIEventPtr)
d14a1e28 4248
e811c8ce
RD
4249def UpdateUIEvent_SetUpdateInterval(*args, **kwargs):
4250 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
54f9ee45 4251 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
d14a1e28 4252
e811c8ce
RD
4253def UpdateUIEvent_GetUpdateInterval(*args, **kwargs):
4254 """UpdateUIEvent_GetUpdateInterval() -> long"""
54f9ee45 4255 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
d14a1e28 4256
e811c8ce
RD
4257def UpdateUIEvent_CanUpdate(*args, **kwargs):
4258 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
54f9ee45 4259 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
d14a1e28 4260
e811c8ce
RD
4261def UpdateUIEvent_ResetUpdateTime(*args, **kwargs):
4262 """UpdateUIEvent_ResetUpdateTime()"""
54f9ee45 4263 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
d14a1e28 4264
e811c8ce 4265def UpdateUIEvent_SetMode(*args, **kwargs):
196addbf 4266 """UpdateUIEvent_SetMode(int mode)"""
54f9ee45 4267 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
d14a1e28 4268
e811c8ce 4269def UpdateUIEvent_GetMode(*args, **kwargs):
196addbf 4270 """UpdateUIEvent_GetMode() -> int"""
54f9ee45 4271 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
d14a1e28
RD
4272
4273#---------------------------------------------------------------------------
4274
4275class SysColourChangedEvent(Event):
e811c8ce
RD
4276 def __repr__(self):
4277 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4278 def __init__(self, *args, **kwargs):
a95a7133 4279 """__init__(self) -> SysColourChangedEvent"""
54f9ee45 4280 newobj = _core_.new_SysColourChangedEvent(*args, **kwargs)
d14a1e28
RD
4281 self.this = newobj.this
4282 self.thisown = 1
4283 del newobj.thisown
d14a1e28
RD
4284
4285class SysColourChangedEventPtr(SysColourChangedEvent):
4286 def __init__(self, this):
4287 self.this = this
4288 if not hasattr(self,"thisown"): self.thisown = 0
4289 self.__class__ = SysColourChangedEvent
54f9ee45 4290_core_.SysColourChangedEvent_swigregister(SysColourChangedEventPtr)
d14a1e28
RD
4291
4292#---------------------------------------------------------------------------
4293
4294class MouseCaptureChangedEvent(Event):
e811c8ce
RD
4295 def __repr__(self):
4296 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4297 def __init__(self, *args, **kwargs):
a95a7133 4298 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
54f9ee45 4299 newobj = _core_.new_MouseCaptureChangedEvent(*args, **kwargs)
d14a1e28
RD
4300 self.this = newobj.this
4301 self.thisown = 1
4302 del newobj.thisown
e811c8ce 4303 def GetCapturedWindow(*args, **kwargs):
a95a7133 4304 """GetCapturedWindow(self) -> Window"""
54f9ee45 4305 return _core_.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs)
e811c8ce 4306
d14a1e28
RD
4307
4308class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent):
4309 def __init__(self, this):
4310 self.this = this
4311 if not hasattr(self,"thisown"): self.thisown = 0
4312 self.__class__ = MouseCaptureChangedEvent
54f9ee45 4313_core_.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr)
d14a1e28
RD
4314
4315#---------------------------------------------------------------------------
4316
4317class DisplayChangedEvent(Event):
e811c8ce
RD
4318 def __repr__(self):
4319 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4320 def __init__(self, *args, **kwargs):
a95a7133 4321 """__init__(self) -> DisplayChangedEvent"""
54f9ee45 4322 newobj = _core_.new_DisplayChangedEvent(*args, **kwargs)
d14a1e28
RD
4323 self.this = newobj.this
4324 self.thisown = 1
4325 del newobj.thisown
d14a1e28
RD
4326
4327class DisplayChangedEventPtr(DisplayChangedEvent):
4328 def __init__(self, this):
4329 self.this = this
4330 if not hasattr(self,"thisown"): self.thisown = 0
4331 self.__class__ = DisplayChangedEvent
54f9ee45 4332_core_.DisplayChangedEvent_swigregister(DisplayChangedEventPtr)
d14a1e28
RD
4333
4334#---------------------------------------------------------------------------
4335
4336class PaletteChangedEvent(Event):
e811c8ce
RD
4337 def __repr__(self):
4338 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4339 def __init__(self, *args, **kwargs):
a95a7133 4340 """__init__(self, int id=0) -> PaletteChangedEvent"""
54f9ee45 4341 newobj = _core_.new_PaletteChangedEvent(*args, **kwargs)
d14a1e28
RD
4342 self.this = newobj.this
4343 self.thisown = 1
4344 del newobj.thisown
e811c8ce 4345 def SetChangedWindow(*args, **kwargs):
a95a7133 4346 """SetChangedWindow(self, Window win)"""
54f9ee45 4347 return _core_.PaletteChangedEvent_SetChangedWindow(*args, **kwargs)
e811c8ce
RD
4348
4349 def GetChangedWindow(*args, **kwargs):
a95a7133 4350 """GetChangedWindow(self) -> Window"""
54f9ee45 4351 return _core_.PaletteChangedEvent_GetChangedWindow(*args, **kwargs)
e811c8ce 4352
d14a1e28
RD
4353
4354class PaletteChangedEventPtr(PaletteChangedEvent):
4355 def __init__(self, this):
4356 self.this = this
4357 if not hasattr(self,"thisown"): self.thisown = 0
4358 self.__class__ = PaletteChangedEvent
54f9ee45 4359_core_.PaletteChangedEvent_swigregister(PaletteChangedEventPtr)
d14a1e28
RD
4360
4361#---------------------------------------------------------------------------
4362
4363class QueryNewPaletteEvent(Event):
e811c8ce
RD
4364 def __repr__(self):
4365 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4366 def __init__(self, *args, **kwargs):
a95a7133 4367 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
54f9ee45 4368 newobj = _core_.new_QueryNewPaletteEvent(*args, **kwargs)
d14a1e28
RD
4369 self.this = newobj.this
4370 self.thisown = 1
4371 del newobj.thisown
e811c8ce 4372 def SetPaletteRealized(*args, **kwargs):
a95a7133 4373 """SetPaletteRealized(self, bool realized)"""
54f9ee45 4374 return _core_.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs)
e811c8ce
RD
4375
4376 def GetPaletteRealized(*args, **kwargs):
a95a7133 4377 """GetPaletteRealized(self) -> bool"""
54f9ee45 4378 return _core_.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs)
e811c8ce 4379
d14a1e28
RD
4380
4381class QueryNewPaletteEventPtr(QueryNewPaletteEvent):
4382 def __init__(self, this):
4383 self.this = this
4384 if not hasattr(self,"thisown"): self.thisown = 0
4385 self.__class__ = QueryNewPaletteEvent
54f9ee45 4386_core_.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr)
d14a1e28
RD
4387
4388#---------------------------------------------------------------------------
4389
4390class NavigationKeyEvent(Event):
e811c8ce
RD
4391 def __repr__(self):
4392 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4393 def __init__(self, *args, **kwargs):
a95a7133 4394 """__init__(self) -> NavigationKeyEvent"""
54f9ee45 4395 newobj = _core_.new_NavigationKeyEvent(*args, **kwargs)
d14a1e28
RD
4396 self.this = newobj.this
4397 self.thisown = 1
4398 del newobj.thisown
e811c8ce 4399 def GetDirection(*args, **kwargs):
a95a7133 4400 """GetDirection(self) -> bool"""
54f9ee45 4401 return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs)
e811c8ce
RD
4402
4403 def SetDirection(*args, **kwargs):
908b74cd 4404 """SetDirection(self, bool forward)"""
54f9ee45 4405 return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs)
e811c8ce
RD
4406
4407 def IsWindowChange(*args, **kwargs):
a95a7133 4408 """IsWindowChange(self) -> bool"""
54f9ee45 4409 return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs)
e811c8ce
RD
4410
4411 def SetWindowChange(*args, **kwargs):
908b74cd 4412 """SetWindowChange(self, bool ischange)"""
54f9ee45 4413 return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs)
e811c8ce 4414
908b74cd
RD
4415 def SetFlags(*args, **kwargs):
4416 """SetFlags(self, long flags)"""
4417 return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs)
4418
e811c8ce 4419 def GetCurrentFocus(*args, **kwargs):
a95a7133 4420 """GetCurrentFocus(self) -> Window"""
54f9ee45 4421 return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs)
e811c8ce
RD
4422
4423 def SetCurrentFocus(*args, **kwargs):
a95a7133 4424 """SetCurrentFocus(self, Window win)"""
54f9ee45 4425 return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs)
e811c8ce 4426
b0f7404b 4427 IsBackward = _core_.NavigationKeyEvent_IsBackward
908b74cd
RD
4428 IsForward = _core_.NavigationKeyEvent_IsForward
4429 WinChange = _core_.NavigationKeyEvent_WinChange
d14a1e28
RD
4430
4431class NavigationKeyEventPtr(NavigationKeyEvent):
4432 def __init__(self, this):
4433 self.this = this
4434 if not hasattr(self,"thisown"): self.thisown = 0
4435 self.__class__ = NavigationKeyEvent
54f9ee45 4436_core_.NavigationKeyEvent_swigregister(NavigationKeyEventPtr)
d14a1e28
RD
4437
4438#---------------------------------------------------------------------------
4439
4440class WindowCreateEvent(CommandEvent):
e811c8ce
RD
4441 def __repr__(self):
4442 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4443 def __init__(self, *args, **kwargs):
a95a7133 4444 """__init__(self, Window win=None) -> WindowCreateEvent"""
54f9ee45 4445 newobj = _core_.new_WindowCreateEvent(*args, **kwargs)
d14a1e28
RD
4446 self.this = newobj.this
4447 self.thisown = 1
4448 del newobj.thisown
e811c8ce 4449 def GetWindow(*args, **kwargs):
a95a7133 4450 """GetWindow(self) -> Window"""
54f9ee45 4451 return _core_.WindowCreateEvent_GetWindow(*args, **kwargs)
e811c8ce 4452
d14a1e28
RD
4453
4454class WindowCreateEventPtr(WindowCreateEvent):
4455 def __init__(self, this):
4456 self.this = this
4457 if not hasattr(self,"thisown"): self.thisown = 0
4458 self.__class__ = WindowCreateEvent
54f9ee45 4459_core_.WindowCreateEvent_swigregister(WindowCreateEventPtr)
d14a1e28
RD
4460
4461class WindowDestroyEvent(CommandEvent):
e811c8ce
RD
4462 def __repr__(self):
4463 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4464 def __init__(self, *args, **kwargs):
a95a7133 4465 """__init__(self, Window win=None) -> WindowDestroyEvent"""
54f9ee45 4466 newobj = _core_.new_WindowDestroyEvent(*args, **kwargs)
d14a1e28
RD
4467 self.this = newobj.this
4468 self.thisown = 1
4469 del newobj.thisown
e811c8ce 4470 def GetWindow(*args, **kwargs):
a95a7133 4471 """GetWindow(self) -> Window"""
54f9ee45 4472 return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs)
e811c8ce 4473
d14a1e28
RD
4474
4475class WindowDestroyEventPtr(WindowDestroyEvent):
4476 def __init__(self, this):
4477 self.this = this
4478 if not hasattr(self,"thisown"): self.thisown = 0
4479 self.__class__ = WindowDestroyEvent
54f9ee45 4480_core_.WindowDestroyEvent_swigregister(WindowDestroyEventPtr)
d14a1e28
RD
4481
4482#---------------------------------------------------------------------------
4483
4484class ContextMenuEvent(CommandEvent):
e811c8ce
RD
4485 def __repr__(self):
4486 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4487 def __init__(self, *args, **kwargs):
a95a7133 4488 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
54f9ee45 4489 newobj = _core_.new_ContextMenuEvent(*args, **kwargs)
d14a1e28
RD
4490 self.this = newobj.this
4491 self.thisown = 1
4492 del newobj.thisown
e811c8ce 4493 def GetPosition(*args, **kwargs):
a95a7133 4494 """GetPosition(self) -> Point"""
54f9ee45 4495 return _core_.ContextMenuEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
4496
4497 def SetPosition(*args, **kwargs):
a95a7133 4498 """SetPosition(self, Point pos)"""
54f9ee45 4499 return _core_.ContextMenuEvent_SetPosition(*args, **kwargs)
e811c8ce 4500
d14a1e28
RD
4501
4502class ContextMenuEventPtr(ContextMenuEvent):
4503 def __init__(self, this):
4504 self.this = this
4505 if not hasattr(self,"thisown"): self.thisown = 0
4506 self.__class__ = ContextMenuEvent
54f9ee45 4507_core_.ContextMenuEvent_swigregister(ContextMenuEventPtr)
d14a1e28
RD
4508
4509#---------------------------------------------------------------------------
4510
54f9ee45
RD
4511IDLE_PROCESS_ALL = _core_.IDLE_PROCESS_ALL
4512IDLE_PROCESS_SPECIFIED = _core_.IDLE_PROCESS_SPECIFIED
d14a1e28 4513class IdleEvent(Event):
e811c8ce
RD
4514 def __repr__(self):
4515 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4516 def __init__(self, *args, **kwargs):
a95a7133 4517 """__init__(self) -> IdleEvent"""
54f9ee45 4518 newobj = _core_.new_IdleEvent(*args, **kwargs)
d14a1e28
RD
4519 self.this = newobj.this
4520 self.thisown = 1
4521 del newobj.thisown
e811c8ce 4522 def RequestMore(*args, **kwargs):
a95a7133 4523 """RequestMore(self, bool needMore=True)"""
54f9ee45 4524 return _core_.IdleEvent_RequestMore(*args, **kwargs)
e811c8ce
RD
4525
4526 def MoreRequested(*args, **kwargs):
a95a7133 4527 """MoreRequested(self) -> bool"""
54f9ee45 4528 return _core_.IdleEvent_MoreRequested(*args, **kwargs)
e811c8ce
RD
4529
4530 def SetMode(*args, **kwargs):
66c033b4 4531 """SetMode(int mode)"""
54f9ee45 4532 return _core_.IdleEvent_SetMode(*args, **kwargs)
e811c8ce
RD
4533
4534 SetMode = staticmethod(SetMode)
4535 def GetMode(*args, **kwargs):
66c033b4 4536 """GetMode() -> int"""
54f9ee45 4537 return _core_.IdleEvent_GetMode(*args, **kwargs)
e811c8ce
RD
4538
4539 GetMode = staticmethod(GetMode)
4540 def CanSend(*args, **kwargs):
66c033b4 4541 """CanSend(Window win) -> bool"""
54f9ee45 4542 return _core_.IdleEvent_CanSend(*args, **kwargs)
e811c8ce
RD
4543
4544 CanSend = staticmethod(CanSend)
d14a1e28
RD
4545
4546class IdleEventPtr(IdleEvent):
4547 def __init__(self, this):
4548 self.this = this
4549 if not hasattr(self,"thisown"): self.thisown = 0
4550 self.__class__ = IdleEvent
54f9ee45 4551_core_.IdleEvent_swigregister(IdleEventPtr)
d14a1e28 4552
e811c8ce 4553def IdleEvent_SetMode(*args, **kwargs):
196addbf 4554 """IdleEvent_SetMode(int mode)"""
54f9ee45 4555 return _core_.IdleEvent_SetMode(*args, **kwargs)
d14a1e28 4556
e811c8ce 4557def IdleEvent_GetMode(*args, **kwargs):
196addbf 4558 """IdleEvent_GetMode() -> int"""
54f9ee45 4559 return _core_.IdleEvent_GetMode(*args, **kwargs)
d14a1e28 4560
e811c8ce
RD
4561def IdleEvent_CanSend(*args, **kwargs):
4562 """IdleEvent_CanSend(Window win) -> bool"""
54f9ee45 4563 return _core_.IdleEvent_CanSend(*args, **kwargs)
d14a1e28
RD
4564
4565#---------------------------------------------------------------------------
4566
4567class PyEvent(Event):
e811c8ce
RD
4568 def __repr__(self):
4569 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4570 def __init__(self, *args, **kwargs):
a95a7133 4571 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
54f9ee45 4572 newobj = _core_.new_PyEvent(*args, **kwargs)
d14a1e28
RD
4573 self.this = newobj.this
4574 self.thisown = 1
4575 del newobj.thisown
4576 self.SetSelf(self)
e811c8ce 4577
54f9ee45 4578 def __del__(self, destroy=_core_.delete_PyEvent):
a95a7133 4579 """__del__(self)"""
d14a1e28
RD
4580 try:
4581 if self.thisown: destroy(self)
4582 except: pass
e811c8ce
RD
4583
4584 def SetSelf(*args, **kwargs):
a95a7133 4585 """SetSelf(self, PyObject self)"""
54f9ee45 4586 return _core_.PyEvent_SetSelf(*args, **kwargs)
e811c8ce
RD
4587
4588 def GetSelf(*args, **kwargs):
a95a7133 4589 """GetSelf(self) -> PyObject"""
54f9ee45 4590 return _core_.PyEvent_GetSelf(*args, **kwargs)
e811c8ce 4591
d14a1e28
RD
4592
4593class PyEventPtr(PyEvent):
4594 def __init__(self, this):
4595 self.this = this
4596 if not hasattr(self,"thisown"): self.thisown = 0
4597 self.__class__ = PyEvent
54f9ee45 4598_core_.PyEvent_swigregister(PyEventPtr)
d14a1e28
RD
4599
4600class PyCommandEvent(CommandEvent):
e811c8ce
RD
4601 def __repr__(self):
4602 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4603 def __init__(self, *args, **kwargs):
a95a7133 4604 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
54f9ee45 4605 newobj = _core_.new_PyCommandEvent(*args, **kwargs)
d14a1e28
RD
4606 self.this = newobj.this
4607 self.thisown = 1
4608 del newobj.thisown
4609 self.SetSelf(self)
e811c8ce 4610
54f9ee45 4611 def __del__(self, destroy=_core_.delete_PyCommandEvent):
a95a7133 4612 """__del__(self)"""
d14a1e28
RD
4613 try:
4614 if self.thisown: destroy(self)
4615 except: pass
e811c8ce
RD
4616
4617 def SetSelf(*args, **kwargs):
a95a7133 4618 """SetSelf(self, PyObject self)"""
54f9ee45 4619 return _core_.PyCommandEvent_SetSelf(*args, **kwargs)
e811c8ce
RD
4620
4621 def GetSelf(*args, **kwargs):
a95a7133 4622 """GetSelf(self) -> PyObject"""
54f9ee45 4623 return _core_.PyCommandEvent_GetSelf(*args, **kwargs)
e811c8ce 4624
d14a1e28
RD
4625
4626class PyCommandEventPtr(PyCommandEvent):
4627 def __init__(self, this):
4628 self.this = this
4629 if not hasattr(self,"thisown"): self.thisown = 0
4630 self.__class__ = PyCommandEvent
54f9ee45 4631_core_.PyCommandEvent_swigregister(PyCommandEventPtr)
d14a1e28
RD
4632
4633#---------------------------------------------------------------------------
4634
54f9ee45
RD
4635PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS
4636PYAPP_ASSERT_EXCEPTION = _core_.PYAPP_ASSERT_EXCEPTION
4637PYAPP_ASSERT_DIALOG = _core_.PYAPP_ASSERT_DIALOG
4638PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG
4639PRINT_WINDOWS = _core_.PRINT_WINDOWS
4640PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT
d14a1e28 4641class PyApp(EvtHandler):
66c033b4
RD
4642 """
4643 The ``wx.PyApp`` class is an *implementation detail*, please use the
4644 `wx.App` class (or some other derived class) instead.
4645 """
e811c8ce
RD
4646 def __repr__(self):
4647 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4648 def __init__(self, *args, **kwargs):
98e665d3 4649 """
a95a7133 4650 __init__(self) -> PyApp
98e665d3
RD
4651
4652 Create a new application object, starting the bootstrap process.
4653 """
54f9ee45 4654 newobj = _core_.new_PyApp(*args, **kwargs)
d14a1e28
RD
4655 self.this = newobj.this
4656 self.thisown = 1
4657 del newobj.thisown
4658 self._setCallbackInfo(self, PyApp)
4659 self._setOORInfo(self)
e811c8ce 4660
54f9ee45 4661 def __del__(self, destroy=_core_.delete_PyApp):
a95a7133 4662 """__del__(self)"""
d14a1e28
RD
4663 try:
4664 if self.thisown: destroy(self)
4665 except: pass
e811c8ce
RD
4666
4667 def _setCallbackInfo(*args, **kwargs):
a95a7133 4668 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
54f9ee45 4669 return _core_.PyApp__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
4670
4671 def GetAppName(*args, **kwargs):
0df68c9f 4672 """
a95a7133 4673 GetAppName(self) -> String
6c3b4aae 4674
0df68c9f
RD
4675 Get the application name.
4676 """
54f9ee45 4677 return _core_.PyApp_GetAppName(*args, **kwargs)
e811c8ce
RD
4678
4679 def SetAppName(*args, **kwargs):
0df68c9f 4680 """
a95a7133 4681 SetAppName(self, String name)
6c3b4aae 4682
66c033b4
RD
4683 Set the application name. This value may be used automatically by
4684 `wx.Config` and such.
0df68c9f 4685 """
54f9ee45 4686 return _core_.PyApp_SetAppName(*args, **kwargs)
e811c8ce
RD
4687
4688 def GetClassName(*args, **kwargs):
0df68c9f 4689 """
a95a7133 4690 GetClassName(self) -> String
e811c8ce 4691
0df68c9f
RD
4692 Get the application's class name.
4693 """
54f9ee45 4694 return _core_.PyApp_GetClassName(*args, **kwargs)
e811c8ce
RD
4695
4696 def SetClassName(*args, **kwargs):
0df68c9f 4697 """
a95a7133 4698 SetClassName(self, String name)
6c3b4aae 4699
66c033b4
RD
4700 Set the application's class name. This value may be used for
4701 X-resources if applicable for the platform
0df68c9f 4702 """
54f9ee45 4703 return _core_.PyApp_SetClassName(*args, **kwargs)
e811c8ce
RD
4704
4705 def GetVendorName(*args, **kwargs):
0df68c9f 4706 """
a95a7133 4707 GetVendorName(self) -> String
6c3b4aae 4708
0df68c9f
RD
4709 Get the application's vendor name.
4710 """
54f9ee45 4711 return _core_.PyApp_GetVendorName(*args, **kwargs)
e811c8ce
RD
4712
4713 def SetVendorName(*args, **kwargs):
0df68c9f 4714 """
a95a7133 4715 SetVendorName(self, String name)
6c3b4aae 4716
66c033b4
RD
4717 Set the application's vendor name. This value may be used
4718 automatically by `wx.Config` and such.
0df68c9f 4719 """
54f9ee45 4720 return _core_.PyApp_SetVendorName(*args, **kwargs)
e811c8ce
RD
4721
4722 def GetTraits(*args, **kwargs):
0df68c9f 4723 """
a95a7133 4724 GetTraits(self) -> wxAppTraits
6c3b4aae 4725
66c033b4
RD
4726 Return (and create if necessary) the app traits object to which we
4727 delegate for everything which either should be configurable by the
4728 user (then he can change the default behaviour simply by overriding
4729 CreateTraits() and returning his own traits object) or which is
4730 GUI/console dependent as then wx.AppTraits allows us to abstract the
4731 differences behind the common facade.
4732
4733 :todo: Add support for overriding CreateAppTraits in wxPython.
0df68c9f 4734 """
54f9ee45 4735 return _core_.PyApp_GetTraits(*args, **kwargs)
e811c8ce
RD
4736
4737 def ProcessPendingEvents(*args, **kwargs):
0df68c9f 4738 """
a95a7133 4739 ProcessPendingEvents(self)
6c3b4aae 4740
66c033b4
RD
4741 Process all events in the Pending Events list -- it is necessary to
4742 call this function to process posted events. This normally happens
4743 during each event loop iteration.
0df68c9f 4744 """
54f9ee45 4745 return _core_.PyApp_ProcessPendingEvents(*args, **kwargs)
e811c8ce
RD
4746
4747 def Yield(*args, **kwargs):
0df68c9f 4748 """
a95a7133 4749 Yield(self, bool onlyIfNeeded=False) -> bool
6c3b4aae 4750
66c033b4
RD
4751 Process all currently pending events right now, instead of waiting
4752 until return to the event loop. It is an error to call ``Yield``
4753 recursively unless the value of ``onlyIfNeeded`` is True.
6c3b4aae 4754
66c033b4 4755 :warning: This function is dangerous as it can lead to unexpected
41e2b43e
RD
4756 reentrancies (i.e. when called from an event handler it may
4757 result in calling the same event handler again), use with
4758 extreme care or, better, don't use at all!
0df68c9f 4759
66c033b4 4760 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
41e2b43e 4761
0df68c9f 4762 """
54f9ee45 4763 return _core_.PyApp_Yield(*args, **kwargs)
e811c8ce
RD
4764
4765 def WakeUpIdle(*args, **kwargs):
0df68c9f 4766 """
a95a7133 4767 WakeUpIdle(self)
6c3b4aae 4768
66c033b4
RD
4769 Make sure that idle events are sent again.
4770 :see: `wx.WakeUpIdle`
0df68c9f 4771 """
54f9ee45 4772 return _core_.PyApp_WakeUpIdle(*args, **kwargs)
e811c8ce 4773
1fc3b23a
RD
4774 def IsMainLoopRunning(*args, **kwargs):
4775 """
4776 IsMainLoopRunning() -> bool
4777
4778 Returns True if we're running the main loop, i.e. if the events can
4779 currently be dispatched.
4780 """
4781 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
4782
4783 IsMainLoopRunning = staticmethod(IsMainLoopRunning)
e811c8ce 4784 def MainLoop(*args, **kwargs):
0df68c9f 4785 """
a95a7133 4786 MainLoop(self) -> int
6c3b4aae 4787
66c033b4
RD
4788 Execute the main GUI loop, the function doesn't normally return until
4789 all top level windows have been closed and destroyed.
0df68c9f 4790 """
54f9ee45 4791 return _core_.PyApp_MainLoop(*args, **kwargs)
e811c8ce
RD
4792
4793 def Exit(*args, **kwargs):
0df68c9f 4794 """
a95a7133 4795 Exit(self)
6c3b4aae 4796
0df68c9f 4797 Exit the main loop thus terminating the application.
66c033b4 4798 :see: `wx.Exit`
0df68c9f 4799 """
54f9ee45 4800 return _core_.PyApp_Exit(*args, **kwargs)
e811c8ce
RD
4801
4802 def ExitMainLoop(*args, **kwargs):
0df68c9f 4803 """
a95a7133 4804 ExitMainLoop(self)
6c3b4aae 4805
66c033b4
RD
4806 Exit the main GUI loop during the next iteration of the main
4807 loop, (i.e. it does not stop the program immediately!)
0df68c9f 4808 """
54f9ee45 4809 return _core_.PyApp_ExitMainLoop(*args, **kwargs)
e811c8ce
RD
4810
4811 def Pending(*args, **kwargs):
0df68c9f 4812 """
a95a7133 4813 Pending(self) -> bool
6c3b4aae 4814
0df68c9f
RD
4815 Returns True if there are unprocessed events in the event queue.
4816 """
54f9ee45 4817 return _core_.PyApp_Pending(*args, **kwargs)
e811c8ce
RD
4818
4819 def Dispatch(*args, **kwargs):
0df68c9f 4820 """
a95a7133 4821 Dispatch(self) -> bool
6c3b4aae 4822
0df68c9f
RD
4823 Process the first event in the event queue (blocks until an event
4824 appears if there are none currently)
4825 """
54f9ee45 4826 return _core_.PyApp_Dispatch(*args, **kwargs)
e811c8ce
RD
4827
4828 def ProcessIdle(*args, **kwargs):
0df68c9f 4829 """
a95a7133 4830 ProcessIdle(self) -> bool
6c3b4aae 4831
66c033b4
RD
4832 Called from the MainLoop when the application becomes idle (there are
4833 no pending events) and sends a `wx.IdleEvent` to all interested
4834 parties. Returns True if more idle events are needed, False if not.
0df68c9f 4835 """
54f9ee45 4836 return _core_.PyApp_ProcessIdle(*args, **kwargs)
e811c8ce
RD
4837
4838 def SendIdleEvents(*args, **kwargs):
0df68c9f 4839 """
a95a7133 4840 SendIdleEvents(self, Window win, IdleEvent event) -> bool
e811c8ce 4841
66c033b4
RD
4842 Send idle event to window and all subwindows. Returns True if more
4843 idle time is requested.
0df68c9f 4844 """
54f9ee45 4845 return _core_.PyApp_SendIdleEvents(*args, **kwargs)
e811c8ce
RD
4846
4847 def IsActive(*args, **kwargs):
0df68c9f 4848 """
a95a7133 4849 IsActive(self) -> bool
6c3b4aae 4850
0df68c9f
RD
4851 Return True if our app has focus.
4852 """
54f9ee45 4853 return _core_.PyApp_IsActive(*args, **kwargs)
e811c8ce
RD
4854
4855 def SetTopWindow(*args, **kwargs):
0df68c9f 4856 """
a95a7133 4857 SetTopWindow(self, Window win)
6c3b4aae 4858
66c033b4 4859 Set the *main* top level window
0df68c9f 4860 """
54f9ee45 4861 return _core_.PyApp_SetTopWindow(*args, **kwargs)
e811c8ce
RD
4862
4863 def GetTopWindow(*args, **kwargs):
0df68c9f 4864 """
a95a7133 4865 GetTopWindow(self) -> Window
6c3b4aae 4866
66c033b4
RD
4867 Return the *main* top level window (if it hadn't been set previously
4868 with SetTopWindow(), will return just some top level window and, if
4869 there not any, will return None)
0df68c9f 4870 """
54f9ee45 4871 return _core_.PyApp_GetTopWindow(*args, **kwargs)
e811c8ce
RD
4872
4873 def SetExitOnFrameDelete(*args, **kwargs):
0df68c9f 4874 """
a95a7133 4875 SetExitOnFrameDelete(self, bool flag)
0df68c9f 4876
66c033b4
RD
4877 Control the exit behaviour: by default, the program will exit the main
4878 loop (and so, usually, terminate) when the last top-level program
4879 window is deleted. Beware that if you disable this behaviour (with
4880 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
4881 explicitly from somewhere.
0df68c9f 4882 """
54f9ee45 4883 return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs)
e811c8ce
RD
4884
4885 def GetExitOnFrameDelete(*args, **kwargs):
0df68c9f 4886 """
a95a7133 4887 GetExitOnFrameDelete(self) -> bool
6c3b4aae 4888
0df68c9f
RD
4889 Get the current exit behaviour setting.
4890 """
54f9ee45 4891 return _core_.PyApp_GetExitOnFrameDelete(*args, **kwargs)
e811c8ce
RD
4892
4893 def SetUseBestVisual(*args, **kwargs):
0df68c9f 4894 """
a95a7133 4895 SetUseBestVisual(self, bool flag)
6c3b4aae 4896
66c033b4
RD
4897 Set whether the app should try to use the best available visual on
4898 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
0df68c9f 4899 """
54f9ee45 4900 return _core_.PyApp_SetUseBestVisual(*args, **kwargs)
e811c8ce
RD
4901
4902 def GetUseBestVisual(*args, **kwargs):
0df68c9f 4903 """
a95a7133 4904 GetUseBestVisual(self) -> bool
6c3b4aae 4905
0df68c9f
RD
4906 Get current UseBestVisual setting.
4907 """
54f9ee45 4908 return _core_.PyApp_GetUseBestVisual(*args, **kwargs)
e811c8ce
RD
4909
4910 def SetPrintMode(*args, **kwargs):
a95a7133 4911 """SetPrintMode(self, int mode)"""
54f9ee45 4912 return _core_.PyApp_SetPrintMode(*args, **kwargs)
e811c8ce
RD
4913
4914 def GetPrintMode(*args, **kwargs):
a95a7133 4915 """GetPrintMode(self) -> int"""
54f9ee45 4916 return _core_.PyApp_GetPrintMode(*args, **kwargs)
e811c8ce 4917
e811c8ce 4918 def SetAssertMode(*args, **kwargs):
0df68c9f 4919 """
a95a7133 4920 SetAssertMode(self, int mode)
6c3b4aae 4921
41e2b43e 4922 Set the OnAssert behaviour for debug and hybrid builds.
0df68c9f 4923 """
54f9ee45 4924 return _core_.PyApp_SetAssertMode(*args, **kwargs)
e811c8ce 4925
6c3b4aae 4926 def GetAssertMode(*args, **kwargs):
0df68c9f 4927 """
a95a7133 4928 GetAssertMode(self) -> int
6c3b4aae 4929
0df68c9f
RD
4930 Get the current OnAssert behaviour setting.
4931 """
54f9ee45 4932 return _core_.PyApp_GetAssertMode(*args, **kwargs)
6c3b4aae 4933
e811c8ce 4934 def GetMacSupportPCMenuShortcuts(*args, **kwargs):
66c033b4 4935 """GetMacSupportPCMenuShortcuts() -> bool"""
54f9ee45 4936 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
e811c8ce
RD
4937
4938 GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts)
4939 def GetMacAboutMenuItemId(*args, **kwargs):
66c033b4 4940 """GetMacAboutMenuItemId() -> long"""
54f9ee45 4941 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
e811c8ce
RD
4942
4943 GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId)
4944 def GetMacPreferencesMenuItemId(*args, **kwargs):
66c033b4 4945 """GetMacPreferencesMenuItemId() -> long"""
54f9ee45 4946 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
e811c8ce
RD
4947
4948 GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId)
4949 def GetMacExitMenuItemId(*args, **kwargs):
66c033b4 4950 """GetMacExitMenuItemId() -> long"""
54f9ee45 4951 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
e811c8ce
RD
4952
4953 GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId)
4954 def GetMacHelpMenuTitleName(*args, **kwargs):
66c033b4 4955 """GetMacHelpMenuTitleName() -> String"""
54f9ee45 4956 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
e811c8ce
RD
4957
4958 GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName)
4959 def SetMacSupportPCMenuShortcuts(*args, **kwargs):
66c033b4 4960 """SetMacSupportPCMenuShortcuts(bool val)"""
54f9ee45 4961 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
e811c8ce
RD
4962
4963 SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts)
4964 def SetMacAboutMenuItemId(*args, **kwargs):
66c033b4 4965 """SetMacAboutMenuItemId(long val)"""
54f9ee45 4966 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
e811c8ce
RD
4967
4968 SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId)
4969 def SetMacPreferencesMenuItemId(*args, **kwargs):
66c033b4 4970 """SetMacPreferencesMenuItemId(long val)"""
54f9ee45 4971 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
e811c8ce
RD
4972
4973 SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId)
4974 def SetMacExitMenuItemId(*args, **kwargs):
66c033b4 4975 """SetMacExitMenuItemId(long val)"""
54f9ee45 4976 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
e811c8ce
RD
4977
4978 SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId)
4979 def SetMacHelpMenuTitleName(*args, **kwargs):
66c033b4 4980 """SetMacHelpMenuTitleName(String val)"""
54f9ee45 4981 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
e811c8ce
RD
4982
4983 SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName)
4984 def _BootstrapApp(*args, **kwargs):
0df68c9f 4985 """
a95a7133 4986 _BootstrapApp(self)
6c3b4aae 4987
0df68c9f
RD
4988 For internal use only
4989 """
54f9ee45 4990 return _core_.PyApp__BootstrapApp(*args, **kwargs)
e811c8ce
RD
4991
4992 def GetComCtl32Version(*args, **kwargs):
0df68c9f 4993 """
66c033b4 4994 GetComCtl32Version() -> int
6c3b4aae 4995
66c033b4
RD
4996 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
4997 it wasn't found at all. Raises an exception on non-Windows platforms.
0df68c9f 4998 """
54f9ee45 4999 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
e811c8ce
RD
5000
5001 GetComCtl32Version = staticmethod(GetComCtl32Version)
d14a1e28
RD
5002
5003class PyAppPtr(PyApp):
5004 def __init__(self, this):
5005 self.this = this
5006 if not hasattr(self,"thisown"): self.thisown = 0
5007 self.__class__ = PyApp
54f9ee45 5008_core_.PyApp_swigregister(PyAppPtr)
d14a1e28 5009
1fc3b23a
RD
5010def PyApp_IsMainLoopRunning(*args, **kwargs):
5011 """
5012 PyApp_IsMainLoopRunning() -> bool
5013
5014 Returns True if we're running the main loop, i.e. if the events can
5015 currently be dispatched.
5016 """
5017 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5018
e811c8ce
RD
5019def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs):
5020 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
54f9ee45 5021 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
d14a1e28 5022
e811c8ce
RD
5023def PyApp_GetMacAboutMenuItemId(*args, **kwargs):
5024 """PyApp_GetMacAboutMenuItemId() -> long"""
54f9ee45 5025 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
d14a1e28 5026
e811c8ce
RD
5027def PyApp_GetMacPreferencesMenuItemId(*args, **kwargs):
5028 """PyApp_GetMacPreferencesMenuItemId() -> long"""
54f9ee45 5029 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
d14a1e28 5030
e811c8ce
RD
5031def PyApp_GetMacExitMenuItemId(*args, **kwargs):
5032 """PyApp_GetMacExitMenuItemId() -> long"""
54f9ee45 5033 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
d14a1e28 5034
e811c8ce 5035def PyApp_GetMacHelpMenuTitleName(*args, **kwargs):
196addbf 5036 """PyApp_GetMacHelpMenuTitleName() -> String"""
54f9ee45 5037 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
d14a1e28 5038
e811c8ce
RD
5039def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs):
5040 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
54f9ee45 5041 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
d14a1e28 5042
e811c8ce
RD
5043def PyApp_SetMacAboutMenuItemId(*args, **kwargs):
5044 """PyApp_SetMacAboutMenuItemId(long val)"""
54f9ee45 5045 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
d14a1e28 5046
e811c8ce
RD
5047def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs):
5048 """PyApp_SetMacPreferencesMenuItemId(long val)"""
54f9ee45 5049 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
d14a1e28 5050
e811c8ce
RD
5051def PyApp_SetMacExitMenuItemId(*args, **kwargs):
5052 """PyApp_SetMacExitMenuItemId(long val)"""
54f9ee45 5053 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
d14a1e28 5054
e811c8ce 5055def PyApp_SetMacHelpMenuTitleName(*args, **kwargs):
196addbf 5056 """PyApp_SetMacHelpMenuTitleName(String val)"""
54f9ee45 5057 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
d14a1e28 5058
e811c8ce 5059def PyApp_GetComCtl32Version(*args, **kwargs):
0df68c9f
RD
5060 """
5061 PyApp_GetComCtl32Version() -> int
6c3b4aae 5062
66c033b4
RD
5063 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5064 it wasn't found at all. Raises an exception on non-Windows platforms.
0df68c9f 5065 """
54f9ee45 5066 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
d14a1e28
RD
5067
5068#---------------------------------------------------------------------------
5069
5070
e811c8ce 5071def Exit(*args, **kwargs):
0df68c9f
RD
5072 """
5073 Exit()
6c3b4aae 5074
0df68c9f
RD
5075 Force an exit of the application. Convenience for wx.GetApp().Exit()
5076 """
54f9ee45 5077 return _core_.Exit(*args, **kwargs)
d14a1e28 5078
e811c8ce 5079def Yield(*args, **kwargs):
0df68c9f
RD
5080 """
5081 Yield() -> bool
6c3b4aae 5082
0df68c9f
RD
5083 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5084 """
54f9ee45 5085 return _core_.Yield(*args, **kwargs)
d14a1e28 5086
e811c8ce 5087def YieldIfNeeded(*args, **kwargs):
0df68c9f
RD
5088 """
5089 YieldIfNeeded() -> bool
6c3b4aae 5090
0df68c9f
RD
5091 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5092 """
54f9ee45 5093 return _core_.YieldIfNeeded(*args, **kwargs)
d14a1e28 5094
e811c8ce 5095def SafeYield(*args, **kwargs):
0df68c9f
RD
5096 """
5097 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
6c3b4aae 5098
66c033b4
RD
5099 This function is similar to `wx.Yield`, except that it disables the
5100 user input to all program windows before calling `wx.Yield` and
5101 re-enables it again afterwards. If ``win`` is not None, this window
5102 will remain enabled, allowing the implementation of some limited user
5103 interaction.
6c3b4aae 5104
66c033b4 5105 :Returns: the result of the call to `wx.Yield`.
0df68c9f 5106 """
54f9ee45 5107 return _core_.SafeYield(*args, **kwargs)
d14a1e28 5108
e811c8ce 5109def WakeUpIdle(*args, **kwargs):
0df68c9f
RD
5110 """
5111 WakeUpIdle()
6c3b4aae 5112
66c033b4
RD
5113 Cause the message queue to become empty again, so idle events will be
5114 sent.
0df68c9f 5115 """
54f9ee45 5116 return _core_.WakeUpIdle(*args, **kwargs)
d14a1e28 5117
e811c8ce 5118def PostEvent(*args, **kwargs):
0df68c9f
RD
5119 """
5120 PostEvent(EvtHandler dest, Event event)
6c3b4aae 5121
66c033b4
RD
5122 Send an event to a window or other wx.EvtHandler to be processed
5123 later.
0df68c9f 5124 """
54f9ee45 5125 return _core_.PostEvent(*args, **kwargs)
d14a1e28 5126
e811c8ce 5127def App_CleanUp(*args, **kwargs):
0df68c9f
RD
5128 """
5129 App_CleanUp()
6c3b4aae 5130
41e2b43e 5131 For internal use only, it is used to cleanup after wxWidgets when
66c033b4 5132 Python shuts down.
0df68c9f 5133 """
54f9ee45 5134 return _core_.App_CleanUp(*args, **kwargs)
d14a1e28 5135
e811c8ce 5136def GetApp(*args, **kwargs):
0df68c9f
RD
5137 """
5138 GetApp() -> PyApp
6c3b4aae 5139
196addbf 5140 Return a reference to the current wx.App object.
0df68c9f 5141 """
54f9ee45 5142 return _core_.GetApp(*args, **kwargs)
d14a1e28
RD
5143#----------------------------------------------------------------------
5144
5145class PyOnDemandOutputWindow:
6c3b4aae
RD
5146 """
5147 A class that can be used for redirecting Python's stdout and
5148 stderr streams. It will do nothing until something is wrriten to
5149 the stream at which point it will create a Frame with a text area
5150 and write the text there.
5151 """
d14a1e28
RD
5152 def __init__(self, title = "wxPython: stdout/stderr"):
5153 self.frame = None
5154 self.title = title
412d302d
RD
5155 self.pos = wx.DefaultPosition
5156 self.size = (450, 300)
d14a1e28
RD
5157 self.parent = None
5158
5159 def SetParent(self, parent):
6c3b4aae 5160 """Set the window to be used as the popup Frame's parent."""
d14a1e28
RD
5161 self.parent = parent
5162
6c3b4aae
RD
5163
5164 def CreateOutputWindow(self, st):
412d302d
RD
5165 self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size,
5166 style=wx.DEFAULT_FRAME_STYLE)
196addbf 5167 self.text = wx.TextCtrl(self.frame, -1, "",
412d302d 5168 style=wx.TE_MULTILINE|wx.TE_READONLY)
d1e20054 5169 self.text.AppendText(st)
6c3b4aae
RD
5170 self.frame.Show(True)
5171 EVT_CLOSE(self.frame, self.OnCloseWindow)
5172
d14a1e28 5173
7409c0c6
RD
5174 def OnCloseWindow(self, event):
5175 if self.frame is not None:
5176 self.frame.Destroy()
5177 self.frame = None
5178 self.text = None
5179
5180
d14a1e28 5181 # These methods provide the file-like output behaviour.
6c3b4aae
RD
5182 def write(self, text):
5183 """
5184 Create the output window if needed and write the string to it.
5185 If not called in the context of the gui thread then uses
5186 CallAfter to do the work there.
5187 """
5188 if self.frame is None:
5189 if not wx.Thread_IsMain():
5190 wx.CallAfter(self.CreateOutputWindow, text)
5191 else:
5192 self.CreateOutputWindow(text)
5193 else:
5194 if not wx.Thread_IsMain():
5195 wx.CallAfter(self.text.AppendText, text)
5196 else:
5197 self.text.AppendText(text)
5198
d14a1e28
RD
5199
5200 def close(self):
6c3b4aae
RD
5201 if self.frame is not None:
5202 wx.CallAfter(self.frame.Close)
5203
d14a1e28 5204
19272049
RD
5205 def flush(self):
5206 pass
5207
5208
d14a1e28
RD
5209
5210#----------------------------------------------------------------------
d14a1e28
RD
5211
5212_defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
5213
5214class App(wx.PyApp):
6c3b4aae 5215 """
66c033b4
RD
5216 The ``wx.App`` class represents the application and is used to:
5217
5218 * bootstrap the wxPython system and initialize the underlying
5219 gui toolkit
5220 * set and get application-wide properties
5221 * implement the windowing system main message or event loop,
5222 and to dispatch events to window instances
5223 * etc.
5224
5225 Every application must have a ``wx.App`` instance, and all
5226 creation of UI objects should be delayed until after the
03e37cd5
RD
5227 ``wx.App`` object has been created in order to ensure that the gui
5228 platform and wxWidgets have been fully initialized.
66c033b4
RD
5229
5230 Normally you would derive from this class and implement an
5231 ``OnInit`` method that creates a frame and then calls
5232 ``self.SetTopWindow(frame)``.
5233
03e37cd5 5234 :see: `wx.PySimpleApp` for a simpler app class that can be used
1c0f361b 5235 directly.
6c3b4aae 5236 """
66c033b4 5237
d14a1e28
RD
5238 outputWindowClass = PyOnDemandOutputWindow
5239
03e37cd5
RD
5240 def __init__(self, redirect=_defRedirect, filename=None,
5241 useBestVisual=False, clearSigInt=True):
66c033b4
RD
5242 """
5243 Construct a ``wx.App`` object.
5244
03e37cd5
RD
5245 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
5246 redirected? Defaults to True on Windows and Mac, False
5247 otherwise. If `filename` is None then output will be
5248 redirected to a window that pops up as needed. (You can
5249 control what kind of window is created for the output by
5250 resetting the class variable ``outputWindowClass`` to a
5251 class of your choosing.)
66c033b4 5252
03e37cd5
RD
5253 :param filename: The name of a file to redirect output to, if
5254 redirect is True.
66c033b4
RD
5255
5256 :param useBestVisual: Should the app try to use the best
03e37cd5
RD
5257 available visual provided by the system (only relevant on
5258 systems that have more than one visual.) This parameter
5259 must be used instead of calling `SetUseBestVisual` later
5260 on because it must be set before the underlying GUI
5261 toolkit is initialized.
5262
5263 :param clearSigInt: Should SIGINT be cleared? This allows the
5264 app to terminate upon a Ctrl-C in the console like other
5265 GUI apps will.
66c033b4
RD
5266
5267 :note: You should override OnInit to do applicaition
5268 initialization to ensure that the system, toolkit and
5269 wxWidgets are fully initialized.
5270 """
d14a1e28
RD
5271 wx.PyApp.__init__(self)
5272
5273 if wx.Platform == "__WXMAC__":
5274 try:
5275 import MacOS
5276 if not MacOS.WMAvailable():
5277 print """\
5278This program needs access to the screen. Please run with 'pythonw',
5279not 'python', and only when you are logged in on the main display of
5280your Mac."""
5281 _sys.exit(1)
36cadbf7
RD
5282 except SystemExit:
5283 raise
d14a1e28
RD
5284 except:
5285 pass
5286
5287 # This has to be done before OnInit
5288 self.SetUseBestVisual(useBestVisual)
5289
5290 # Set the default handler for SIGINT. This fixes a problem
5291 # where if Ctrl-C is pressed in the console that started this
5292 # app then it will not appear to do anything, (not even send
5293 # KeyboardInterrupt???) but will later segfault on exit. By
5294 # setting the default handler then the app will exit, as
5295 # expected (depending on platform.)
03e37cd5
RD
5296 if clearSigInt:
5297 try:
5298 import signal
5299 signal.signal(signal.SIGINT, signal.SIG_DFL)
5300 except:
5301 pass
d14a1e28
RD
5302
5303 # Save and redirect the stdio to a window?
5304 self.stdioWin = None
5305 self.saveStdio = (_sys.stdout, _sys.stderr)
5306 if redirect:
5307 self.RedirectStdio(filename)
5308
5309 # This finishes the initialization of wxWindows and then calls
5310 # the OnInit that should be present in the derived class
5311 self._BootstrapApp()
5312
5313
5314 def __del__(self):
5315 try:
5316 self.RestoreStdio() # Just in case the MainLoop was overridden
5317 except:
5318 pass
5319
5320
5321 def SetTopWindow(self, frame):
1e0c8722 5322 """Set the \"main\" top level window"""
d14a1e28
RD
5323 if self.stdioWin:
5324 self.stdioWin.SetParent(frame)
5325 wx.PyApp.SetTopWindow(self, frame)
5326
5327
5328 def MainLoop(self):
1e0c8722 5329 """Execute the main GUI event loop"""
d14a1e28
RD
5330 wx.PyApp.MainLoop(self)
5331 self.RestoreStdio()
5332
5333
7409c0c6 5334 def RedirectStdio(self, filename=None):
1e0c8722 5335 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
d14a1e28
RD
5336 if filename:
5337 _sys.stdout = _sys.stderr = open(filename, 'a')
5338 else:
5339 self.stdioWin = self.outputWindowClass()
5340 _sys.stdout = _sys.stderr = self.stdioWin
5341
5342
5343 def RestoreStdio(self):
5344 _sys.stdout, _sys.stderr = self.saveStdio
5345
5346
412d302d
RD
5347 def SetOutputWindowAttributes(self, title=None, pos=None, size=None):
5348 """
5349 Set the title, position and/or size of the output window if
f5b96ee1
RD
5350 the stdio has been redirected. This should be called before
5351 any output would cause the output window to be created.
412d302d
RD
5352 """
5353 if self.stdioWin:
5354 if title is not None:
5355 self.stdioWin.title = title
5356 if pos is not None:
5357 self.stdioWin.pos = pos
5358 if size is not None:
5359 self.stdioWin.size = size
5360
5361
5362
d14a1e28 5363
66c033b4 5364# change from wx.PyApp_XX to wx.App_XX
54f9ee45
RD
5365App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts
5366App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId
5367App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId
5368App_GetMacExitMenuItemId = _core_.PyApp_GetMacExitMenuItemId
5369App_GetMacHelpMenuTitleName = _core_.PyApp_GetMacHelpMenuTitleName
5370App_SetMacSupportPCMenuShortcuts = _core_.PyApp_SetMacSupportPCMenuShortcuts
5371App_SetMacAboutMenuItemId = _core_.PyApp_SetMacAboutMenuItemId
5372App_SetMacPreferencesMenuItemId = _core_.PyApp_SetMacPreferencesMenuItemId
5373App_SetMacExitMenuItemId = _core_.PyApp_SetMacExitMenuItemId
5374App_SetMacHelpMenuTitleName = _core_.PyApp_SetMacHelpMenuTitleName
5375App_GetComCtl32Version = _core_.PyApp_GetComCtl32Version
d14a1e28
RD
5376
5377#----------------------------------------------------------------------------
5378
5379class PySimpleApp(wx.App):
6c3b4aae
RD
5380 """
5381 A simple application class. You can just create one of these and
5382 then then make your top level windows later, and not have to worry
66c033b4
RD
5383 about OnInit. For example::
5384
5385 app = wx.PySimpleApp()
5386 frame = wx.Frame(None, title='Hello World')
5387 frame.Show()
5388 app.MainLoop()
5389
5390 :see: `wx.App`
5391 """
6c3b4aae 5392
03e37cd5
RD
5393 def __init__(self, redirect=False, filename=None,
5394 useBestVisual=False, clearSigInt=True):
66c033b4
RD
5395 """
5396 :see: `wx.App.__init__`
5397 """
03e37cd5 5398 wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt)
6c3b4aae 5399
d14a1e28 5400 def OnInit(self):
d14a1e28
RD
5401 return True
5402
5403
66c033b4 5404
6c3b4aae 5405# Is anybody using this one?
d14a1e28
RD
5406class PyWidgetTester(wx.App):
5407 def __init__(self, size = (250, 100)):
5408 self.size = size
5409 wx.App.__init__(self, 0)
5410
5411 def OnInit(self):
196addbf 5412 self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
d14a1e28
RD
5413 self.SetTopWindow(self.frame)
5414 return True
5415
66c033b4
RD
5416 def SetWidget(self, widgetClass, *args, **kwargs):
5417 w = widgetClass(self.frame, *args, **kwargs)
d14a1e28
RD
5418 self.frame.Show(True)
5419
5420#----------------------------------------------------------------------------
5421# DO NOT hold any other references to this object. This is how we
66c033b4 5422# know when to cleanup system resources that wxWidgets is holding. When
d14a1e28 5423# the sys module is unloaded, the refcount on sys.__wxPythonCleanup
66c033b4 5424# goes to zero and it calls the wx.App_CleanUp function.
d14a1e28
RD
5425
5426class __wxPyCleanup:
5427 def __init__(self):
54f9ee45 5428 self.cleanup = _core_.App_CleanUp
d14a1e28
RD
5429 def __del__(self):
5430 self.cleanup()
5431
5432_sys.__wxPythonCleanup = __wxPyCleanup()
5433
5434## # another possible solution, but it gets called too early...
66c033b4
RD
5435## import atexit
5436## atexit.register(_core_.wxApp_CleanUp)
d14a1e28
RD
5437
5438
5439#----------------------------------------------------------------------------
5440
5441#---------------------------------------------------------------------------
2ef75293
RD
5442
5443class EventLoop(object):
5444 def __repr__(self):
5445 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5446 def __init__(self, *args, **kwargs):
5447 """__init__(self) -> EventLoop"""
5448 newobj = _core_.new_EventLoop(*args, **kwargs)
5449 self.this = newobj.this
5450 self.thisown = 1
5451 del newobj.thisown
5452 def __del__(self, destroy=_core_.delete_EventLoop):
5453 """__del__(self)"""
5454 try:
5455 if self.thisown: destroy(self)
5456 except: pass
5457
5458 def Run(*args, **kwargs):
5459 """Run(self) -> int"""
5460 return _core_.EventLoop_Run(*args, **kwargs)
5461
5462 def Exit(*args, **kwargs):
5463 """Exit(self, int rc=0)"""
5464 return _core_.EventLoop_Exit(*args, **kwargs)
5465
5466 def Pending(*args, **kwargs):
5467 """Pending(self) -> bool"""
5468 return _core_.EventLoop_Pending(*args, **kwargs)
5469
5470 def Dispatch(*args, **kwargs):
5471 """Dispatch(self) -> bool"""
5472 return _core_.EventLoop_Dispatch(*args, **kwargs)
5473
5474 def IsRunning(*args, **kwargs):
5475 """IsRunning(self) -> bool"""
5476 return _core_.EventLoop_IsRunning(*args, **kwargs)
5477
5478 def GetActive(*args, **kwargs):
5479 """GetActive() -> EventLoop"""
5480 return _core_.EventLoop_GetActive(*args, **kwargs)
5481
5482 GetActive = staticmethod(GetActive)
5483 def SetActive(*args, **kwargs):
5484 """SetActive(EventLoop loop)"""
5485 return _core_.EventLoop_SetActive(*args, **kwargs)
5486
5487 SetActive = staticmethod(SetActive)
5488
5489class EventLoopPtr(EventLoop):
5490 def __init__(self, this):
5491 self.this = this
5492 if not hasattr(self,"thisown"): self.thisown = 0
5493 self.__class__ = EventLoop
5494_core_.EventLoop_swigregister(EventLoopPtr)
5495
5496def EventLoop_GetActive(*args, **kwargs):
5497 """EventLoop_GetActive() -> EventLoop"""
5498 return _core_.EventLoop_GetActive(*args, **kwargs)
5499
5500def EventLoop_SetActive(*args, **kwargs):
5501 """EventLoop_SetActive(EventLoop loop)"""
5502 return _core_.EventLoop_SetActive(*args, **kwargs)
5503
5504#---------------------------------------------------------------------------
d14a1e28 5505
1e0c8722 5506class AcceleratorEntry(object):
66c033b4
RD
5507 """
5508 A class used to define items in an `wx.AcceleratorTable`. wxPython
5509 programs can choose to use wx.AcceleratorEntry objects, but using a
5510 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
41e2b43e 5511 as well. See `__init__` for of the tuple values.
66c033b4
RD
5512
5513 :see: `wx.AcceleratorTable`
5514 """
1e0c8722
RD
5515 def __repr__(self):
5516 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5517 def __init__(self, *args, **kwargs):
66c033b4
RD
5518 """
5519 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
5520
5521 Construct a wx.AcceleratorEntry.
66c033b4 5522 """
54f9ee45 5523 newobj = _core_.new_AcceleratorEntry(*args, **kwargs)
1e0c8722
RD
5524 self.this = newobj.this
5525 self.thisown = 1
5526 del newobj.thisown
54f9ee45 5527 def __del__(self, destroy=_core_.delete_AcceleratorEntry):
a95a7133 5528 """__del__(self)"""
1e0c8722
RD
5529 try:
5530 if self.thisown: destroy(self)
5531 except: pass
5532
5533 def Set(*args, **kwargs):
66c033b4
RD
5534 """
5535 Set(self, int flags, int keyCode, int cmd)
1e0c8722 5536
66c033b4
RD
5537 (Re)set the attributes of a wx.AcceleratorEntry.
5538 :see `__init__`
5539 """
5540 return _core_.AcceleratorEntry_Set(*args, **kwargs)
1e0c8722
RD
5541
5542 def GetFlags(*args, **kwargs):
66c033b4
RD
5543 """
5544 GetFlags(self) -> int
5545
5546 Get the AcceleratorEntry's flags.
5547 """
54f9ee45 5548 return _core_.AcceleratorEntry_GetFlags(*args, **kwargs)
1e0c8722
RD
5549
5550 def GetKeyCode(*args, **kwargs):
66c033b4
RD
5551 """
5552 GetKeyCode(self) -> int
5553
5554 Get the AcceleratorEntry's keycode.
5555 """
54f9ee45 5556 return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs)
1e0c8722
RD
5557
5558 def GetCommand(*args, **kwargs):
66c033b4
RD
5559 """
5560 GetCommand(self) -> int
5561
5562 Get the AcceleratorEntry's command ID.
5563 """
54f9ee45 5564 return _core_.AcceleratorEntry_GetCommand(*args, **kwargs)
1e0c8722
RD
5565
5566
5567class AcceleratorEntryPtr(AcceleratorEntry):
5568 def __init__(self, this):
5569 self.this = this
5570 if not hasattr(self,"thisown"): self.thisown = 0
5571 self.__class__ = AcceleratorEntry
54f9ee45 5572_core_.AcceleratorEntry_swigregister(AcceleratorEntryPtr)
1e0c8722
RD
5573
5574class AcceleratorTable(Object):
66c033b4
RD
5575 """
5576 An accelerator table allows the application to specify a table of
5577 keyboard shortcuts for menus or other commands. On Windows, menu or
5578 button commands are supported; on GTK, only menu commands are
5579 supported.
66c033b4 5580 """
1e0c8722
RD
5581 def __repr__(self):
5582 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5583 def __init__(self, *args, **kwargs):
0df68c9f
RD
5584 """
5585 __init__(entries) -> AcceleratorTable
1e0c8722 5586
66c033b4
RD
5587 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
5588 items or or of 3-tuples (flags, keyCode, cmdID)
5589
5590 :see: `wx.AcceleratorEntry`
0df68c9f 5591 """
54f9ee45 5592 newobj = _core_.new_AcceleratorTable(*args, **kwargs)
1e0c8722
RD
5593 self.this = newobj.this
5594 self.thisown = 1
5595 del newobj.thisown
54f9ee45 5596 def __del__(self, destroy=_core_.delete_AcceleratorTable):
a95a7133 5597 """__del__(self)"""
1e0c8722
RD
5598 try:
5599 if self.thisown: destroy(self)
5600 except: pass
5601
5602 def Ok(*args, **kwargs):
a95a7133 5603 """Ok(self) -> bool"""
54f9ee45 5604 return _core_.AcceleratorTable_Ok(*args, **kwargs)
1e0c8722
RD
5605
5606
5607class AcceleratorTablePtr(AcceleratorTable):
5608 def __init__(self, this):
5609 self.this = this
5610 if not hasattr(self,"thisown"): self.thisown = 0
5611 self.__class__ = AcceleratorTable
54f9ee45 5612_core_.AcceleratorTable_swigregister(AcceleratorTablePtr)
1e0c8722
RD
5613
5614
5615def GetAccelFromString(*args, **kwargs):
196addbf 5616 """GetAccelFromString(String label) -> AcceleratorEntry"""
54f9ee45 5617 return _core_.GetAccelFromString(*args, **kwargs)
1e0c8722
RD
5618#---------------------------------------------------------------------------
5619
74a57fcd
RD
5620class VisualAttributes(object):
5621 """struct containing all the visual attributes of a control"""
5622 def __repr__(self):
5623 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5624 def __init__(self, *args, **kwargs):
5625 """
a95a7133 5626 __init__(self) -> VisualAttributes
74a57fcd
RD
5627
5628 struct containing all the visual attributes of a control
5629 """
54f9ee45 5630 newobj = _core_.new_VisualAttributes(*args, **kwargs)
74a57fcd
RD
5631 self.this = newobj.this
5632 self.thisown = 1
5633 del newobj.thisown
54f9ee45 5634 def __del__(self, destroy=_core_.delete_VisualAttributes):
a95a7133 5635 """__del__(self)"""
74a57fcd
RD
5636 try:
5637 if self.thisown: destroy(self)
5638 except: pass
5639
54f9ee45
RD
5640 font = property(_core_.VisualAttributes_font_get, _core_.VisualAttributes_font_set)
5641 colFg = property(_core_.VisualAttributes_colFg_get, _core_.VisualAttributes_colFg_set)
5642 colBg = property(_core_.VisualAttributes_colBg_get, _core_.VisualAttributes_colBg_set)
74a57fcd
RD
5643
5644class VisualAttributesPtr(VisualAttributes):
5645 def __init__(self, this):
5646 self.this = this
5647 if not hasattr(self,"thisown"): self.thisown = 0
5648 self.__class__ = VisualAttributes
54f9ee45 5649_core_.VisualAttributes_swigregister(VisualAttributesPtr)
74a57fcd
RD
5650NullAcceleratorTable = cvar.NullAcceleratorTable
5651PanelNameStr = cvar.PanelNameStr
5652
54f9ee45
RD
5653WINDOW_VARIANT_NORMAL = _core_.WINDOW_VARIANT_NORMAL
5654WINDOW_VARIANT_SMALL = _core_.WINDOW_VARIANT_SMALL
5655WINDOW_VARIANT_MINI = _core_.WINDOW_VARIANT_MINI
5656WINDOW_VARIANT_LARGE = _core_.WINDOW_VARIANT_LARGE
5657WINDOW_VARIANT_MAX = _core_.WINDOW_VARIANT_MAX
d14a1e28 5658class Window(EvtHandler):
15afbcd0
RD
5659 """
5660 wx.Window is the base class for all windows and represents any visible
5661 object on the screen. All controls, top level windows and so on are
5662 wx.Windows. Sizers and device contexts are not however, as they don't
5663 appear on screen themselves.
5664
5665 """
e811c8ce
RD
5666 def __repr__(self):
5667 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5668 def __init__(self, *args, **kwargs):
0df68c9f 5669 """
a95a7133 5670 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
74a57fcd 5671 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
15afbcd0
RD
5672
5673 Construct and show a generic Window.
0df68c9f 5674 """
54f9ee45 5675 newobj = _core_.new_Window(*args, **kwargs)
d14a1e28
RD
5676 self.this = newobj.this
5677 self.thisown = 1
5678 del newobj.thisown
5679 self._setOORInfo(self)
d14a1e28 5680
e811c8ce 5681 def Create(*args, **kwargs):
0df68c9f 5682 """
a95a7133 5683 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
74a57fcd 5684 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
15afbcd0
RD
5685
5686 Create the GUI part of the Window for 2-phase creation mode.
0df68c9f 5687 """
54f9ee45 5688 return _core_.Window_Create(*args, **kwargs)
d14a1e28 5689
e811c8ce 5690 def Close(*args, **kwargs):
15afbcd0 5691 """
a95a7133 5692 Close(self, bool force=False) -> bool
15afbcd0
RD
5693
5694 This function simply generates a EVT_CLOSE event whose handler usually
5695 tries to close the window. It doesn't close the window itself,
5696 however. If force is False (the default) then the window's close
5697 handler will be allowed to veto the destruction of the window.
15afbcd0 5698 """
54f9ee45 5699 return _core_.Window_Close(*args, **kwargs)
d14a1e28 5700
e811c8ce 5701 def Destroy(*args, **kwargs):
0df68c9f 5702 """
a95a7133 5703 Destroy(self) -> bool
d14a1e28 5704
15afbcd0
RD
5705 Destroys the window safely. Frames and dialogs are not destroyed
5706 immediately when this function is called -- they are added to a list
5707 of windows to be deleted on idle time, when all the window's events
5708 have been processed. This prevents problems with events being sent to
5709 non-existent windows.
5710
5711 Returns True if the window has either been successfully deleted, or it
5712 has been added to the list of windows pending real deletion.
0df68c9f 5713 """
54f9ee45 5714 return _core_.Window_Destroy(*args, **kwargs)
d14a1e28 5715
e811c8ce 5716 def DestroyChildren(*args, **kwargs):
15afbcd0 5717 """
a95a7133 5718 DestroyChildren(self) -> bool
15afbcd0 5719
41e2b43e
RD
5720 Destroys all children of a window. Called automatically by the
5721 destructor.
15afbcd0 5722 """
54f9ee45 5723 return _core_.Window_DestroyChildren(*args, **kwargs)
d14a1e28 5724
e811c8ce 5725 def IsBeingDeleted(*args, **kwargs):
15afbcd0 5726 """
a95a7133 5727 IsBeingDeleted(self) -> bool
15afbcd0
RD
5728
5729 Is the window in the process of being deleted?
5730 """
54f9ee45 5731 return _core_.Window_IsBeingDeleted(*args, **kwargs)
d14a1e28 5732
e811c8ce 5733 def SetTitle(*args, **kwargs):
15afbcd0 5734 """
a95a7133 5735 SetTitle(self, String title)
15afbcd0
RD
5736
5737 Sets the window's title. Applicable only to frames and dialogs.
5738 """
54f9ee45 5739 return _core_.Window_SetTitle(*args, **kwargs)
d14a1e28 5740
e811c8ce 5741 def GetTitle(*args, **kwargs):
15afbcd0 5742 """
a95a7133 5743 GetTitle(self) -> String
15afbcd0
RD
5744
5745 Gets the window's title. Applicable only to frames and dialogs.
5746 """
54f9ee45 5747 return _core_.Window_GetTitle(*args, **kwargs)
d14a1e28 5748
e811c8ce 5749 def SetLabel(*args, **kwargs):
15afbcd0 5750 """
a95a7133 5751 SetLabel(self, String label)
15afbcd0
RD
5752
5753 Set the text which the window shows in its label if applicable.
5754 """
54f9ee45 5755 return _core_.Window_SetLabel(*args, **kwargs)
d14a1e28 5756
e811c8ce 5757 def GetLabel(*args, **kwargs):
15afbcd0 5758 """
a95a7133 5759 GetLabel(self) -> String
15afbcd0 5760
41e2b43e
RD
5761 Generic way of getting a label from any window, for identification
5762 purposes. The interpretation of this function differs from class to
5763 class. For frames and dialogs, the value returned is the title. For
5764 buttons or static text controls, it is the button text. This function
5765 can be useful for meta-programs such as testing tools or special-needs
5766 access programs)which need to identify windows by name.
15afbcd0 5767 """
54f9ee45 5768 return _core_.Window_GetLabel(*args, **kwargs)
d14a1e28 5769
e811c8ce 5770 def SetName(*args, **kwargs):
15afbcd0 5771 """
a95a7133 5772 SetName(self, String name)
15afbcd0 5773
41e2b43e
RD
5774 Sets the window's name. The window name is used for ressource setting
5775 in X, it is not the same as the window title/label
15afbcd0 5776 """
54f9ee45 5777 return _core_.Window_SetName(*args, **kwargs)
d14a1e28 5778
e811c8ce 5779 def GetName(*args, **kwargs):
15afbcd0 5780 """
a95a7133 5781 GetName(self) -> String
15afbcd0 5782
41e2b43e
RD
5783 Returns the windows name. This name is not guaranteed to be unique;
5784 it is up to the programmer to supply an appropriate name in the window
5785 constructor or via wx.Window.SetName.
15afbcd0 5786 """
54f9ee45 5787 return _core_.Window_GetName(*args, **kwargs)
d14a1e28 5788
4276dc52
RD
5789 def SetWindowVariant(*args, **kwargs):
5790 """
a95a7133 5791 SetWindowVariant(self, int variant)
4276dc52 5792
41e2b43e
RD
5793 Sets the variant of the window/font size to use for this window, if
5794 the platform supports variants, for example, wxMac.
4276dc52 5795 """
54f9ee45 5796 return _core_.Window_SetWindowVariant(*args, **kwargs)
4276dc52
RD
5797
5798 def GetWindowVariant(*args, **kwargs):
a95a7133 5799 """GetWindowVariant(self) -> int"""
54f9ee45 5800 return _core_.Window_GetWindowVariant(*args, **kwargs)
4276dc52 5801
e811c8ce 5802 def SetId(*args, **kwargs):
15afbcd0 5803 """
a95a7133 5804 SetId(self, int winid)
15afbcd0
RD
5805
5806 Sets the identifier of the window. Each window has an integer
5807 identifier. If the application has not provided one, an identifier
5808 will be generated. Normally, the identifier should be provided on
5809 creation and should not be modified subsequently.
5810 """
54f9ee45 5811 return _core_.Window_SetId(*args, **kwargs)
d14a1e28 5812
e811c8ce 5813 def GetId(*args, **kwargs):
15afbcd0 5814 """
a95a7133 5815 GetId(self) -> int
15afbcd0
RD
5816
5817 Returns the identifier of the window. Each window has an integer
5818 identifier. If the application has not provided one (or the default Id
5819 -1 is used) then an unique identifier with a negative value will be
5820 generated.
5821 """
54f9ee45 5822 return _core_.Window_GetId(*args, **kwargs)
d14a1e28 5823
e811c8ce 5824 def NewControlId(*args, **kwargs):
15afbcd0 5825 """
66c033b4 5826 NewControlId() -> int
15afbcd0
RD
5827
5828 Generate a control id for the controls which were not given one.
5829 """
54f9ee45 5830 return _core_.Window_NewControlId(*args, **kwargs)
d14a1e28 5831
e811c8ce
RD
5832 NewControlId = staticmethod(NewControlId)
5833 def NextControlId(*args, **kwargs):
15afbcd0 5834 """
66c033b4 5835 NextControlId(int winid) -> int
15afbcd0
RD
5836
5837 Get the id of the control following the one with the given
41e2b43e 5838 autogenerated) id
15afbcd0 5839 """
54f9ee45 5840 return _core_.Window_NextControlId(*args, **kwargs)
d14a1e28 5841
e811c8ce
RD
5842 NextControlId = staticmethod(NextControlId)
5843 def PrevControlId(*args, **kwargs):
15afbcd0 5844 """
66c033b4 5845 PrevControlId(int winid) -> int
15afbcd0
RD
5846
5847 Get the id of the control preceding the one with the given
41e2b43e 5848 autogenerated) id
15afbcd0 5849 """
54f9ee45 5850 return _core_.Window_PrevControlId(*args, **kwargs)
d14a1e28 5851
e811c8ce
RD
5852 PrevControlId = staticmethod(PrevControlId)
5853 def SetSize(*args, **kwargs):
15afbcd0 5854 """
a95a7133 5855 SetSize(self, Size size)
15afbcd0
RD
5856
5857 Sets the size of the window in pixels.
5858 """
54f9ee45 5859 return _core_.Window_SetSize(*args, **kwargs)
d14a1e28 5860
e811c8ce 5861 def SetDimensions(*args, **kwargs):
15afbcd0 5862 """
a95a7133 5863 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
15afbcd0
RD
5864
5865 Sets the position and size of the window in pixels. The sizeFlags
5866 parameter indicates the interpretation of the other params if they are
5867 -1. wx.SIZE_AUTO*: a -1 indicates that a class-specific default
5868 shoudl be used. wx.SIZE_USE_EXISTING: existing dimensions should be
5869 used if -1 values are supplied. wxSIZE_ALLOW_MINUS_ONE: allow
5870 dimensions of -1 and less to be interpreted as real dimensions, not
5871 default values.
5872 """
54f9ee45 5873 return _core_.Window_SetDimensions(*args, **kwargs)
d14a1e28 5874
e811c8ce 5875 def SetRect(*args, **kwargs):
15afbcd0 5876 """
a95a7133 5877 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
15afbcd0
RD
5878
5879 Sets the position and size of the window in pixels using a wx.Rect.
5880 """
54f9ee45 5881 return _core_.Window_SetRect(*args, **kwargs)
d14a1e28 5882
e811c8ce 5883 def SetSizeWH(*args, **kwargs):
15afbcd0 5884 """
a95a7133 5885 SetSizeWH(self, int width, int height)
15afbcd0
RD
5886
5887 Sets the size of the window in pixels.
5888 """
54f9ee45 5889 return _core_.Window_SetSizeWH(*args, **kwargs)
d14a1e28 5890
e811c8ce 5891 def Move(*args, **kwargs):
15afbcd0 5892 """
a95a7133 5893 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
15afbcd0
RD
5894
5895 Moves the window to the given position.
5896 """
54f9ee45 5897 return _core_.Window_Move(*args, **kwargs)
d14a1e28 5898
e811c8ce
RD
5899 SetPosition = Move
5900 def MoveXY(*args, **kwargs):
15afbcd0 5901 """
a95a7133 5902 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
15afbcd0
RD
5903
5904 Moves the window to the given position.
5905 """
54f9ee45 5906 return _core_.Window_MoveXY(*args, **kwargs)
e811c8ce 5907
f8167d6e
RD
5908 def SetBestFittingSize(*args, **kwargs):
5909 """
5910 SetBestFittingSize(self, Size size=DefaultSize)
5911
5912 A 'Smart' SetSize that will fill in default size components with the
5913 window's *best size* values. Also set's the minsize for use with sizers.
5914 """
5915 return _core_.Window_SetBestFittingSize(*args, **kwargs)
5916
e811c8ce 5917 def Raise(*args, **kwargs):
15afbcd0 5918 """
a95a7133 5919 Raise(self)
15afbcd0
RD
5920
5921 Raises the window to the top of the window hierarchy if it is a
5922 managed window (dialog or frame).
5923 """
54f9ee45 5924 return _core_.Window_Raise(*args, **kwargs)
e811c8ce
RD
5925
5926 def Lower(*args, **kwargs):
15afbcd0 5927 """
a95a7133 5928 Lower(self)
15afbcd0
RD
5929
5930 Lowers the window to the bottom of the window hierarchy if it is a
5931 managed window (dialog or frame).
5932 """
54f9ee45 5933 return _core_.Window_Lower(*args, **kwargs)
e811c8ce
RD
5934
5935 def SetClientSize(*args, **kwargs):
15afbcd0 5936 """
a95a7133 5937 SetClientSize(self, Size size)
15afbcd0
RD
5938
5939 This sets the size of the window client area in pixels. Using this
5940 function to size a window tends to be more device-independent than
5941 wx.Window.SetSize, since the application need not worry about what
5942 dimensions the border or title bar have when trying to fit the window
5943 around panel items, for example.
5944 """
54f9ee45 5945 return _core_.Window_SetClientSize(*args, **kwargs)
e811c8ce
RD
5946
5947 def SetClientSizeWH(*args, **kwargs):
15afbcd0 5948 """
a95a7133 5949 SetClientSizeWH(self, int width, int height)
15afbcd0
RD
5950
5951 This sets the size of the window client area in pixels. Using this
5952 function to size a window tends to be more device-independent than
5953 wx.Window.SetSize, since the application need not worry about what
5954 dimensions the border or title bar have when trying to fit the window
5955 around panel items, for example.
5956 """
54f9ee45 5957 return _core_.Window_SetClientSizeWH(*args, **kwargs)
e811c8ce
RD
5958
5959 def SetClientRect(*args, **kwargs):
15afbcd0 5960 """
a95a7133 5961 SetClientRect(self, Rect rect)
15afbcd0
RD
5962
5963 This sets the size of the window client area in pixels. Using this
5964 function to size a window tends to be more device-independent than
5965 wx.Window.SetSize, since the application need not worry about what
5966 dimensions the border or title bar have when trying to fit the window
5967 around panel items, for example.
5968 """
54f9ee45 5969 return _core_.Window_SetClientRect(*args, **kwargs)
e811c8ce
RD
5970
5971 def GetPosition(*args, **kwargs):
0df68c9f 5972 """
a95a7133 5973 GetPosition(self) -> Point
e811c8ce 5974
0df68c9f
RD
5975 Get the window's position.
5976 """
54f9ee45 5977 return _core_.Window_GetPosition(*args, **kwargs)
e811c8ce
RD
5978
5979 def GetPositionTuple(*args, **kwargs):
0df68c9f
RD
5980 """
5981 GetPositionTuple() -> (x,y)
e811c8ce 5982
0df68c9f
RD
5983 Get the window's position.
5984 """
54f9ee45 5985 return _core_.Window_GetPositionTuple(*args, **kwargs)
e811c8ce
RD
5986
5987 def GetSize(*args, **kwargs):
0df68c9f 5988 """
a95a7133 5989 GetSize(self) -> Size
e811c8ce 5990
0df68c9f
RD
5991 Get the window size.
5992 """
54f9ee45 5993 return _core_.Window_GetSize(*args, **kwargs)
e811c8ce
RD
5994
5995 def GetSizeTuple(*args, **kwargs):
0df68c9f
RD
5996 """
5997 GetSizeTuple() -> (width, height)
e811c8ce 5998
0df68c9f
RD
5999 Get the window size.
6000 """
54f9ee45 6001 return _core_.Window_GetSizeTuple(*args, **kwargs)
e811c8ce
RD
6002
6003 def GetRect(*args, **kwargs):
15afbcd0 6004 """
a95a7133 6005 GetRect(self) -> Rect
15afbcd0
RD
6006
6007 Returns the size and position of the window as a wx.Rect object.
6008 """
54f9ee45 6009 return _core_.Window_GetRect(*args, **kwargs)
e811c8ce
RD
6010
6011 def GetClientSize(*args, **kwargs):
0df68c9f 6012 """
a95a7133 6013 GetClientSize(self) -> Size
e811c8ce 6014
15afbcd0
RD
6015 This gets the size of the window's 'client area' in pixels. The client
6016 area is the area which may be drawn on by the programmer, excluding
6017 title bar, border, scrollbars, etc.
0df68c9f 6018 """
54f9ee45 6019 return _core_.Window_GetClientSize(*args, **kwargs)
e811c8ce
RD
6020
6021 def GetClientSizeTuple(*args, **kwargs):
0df68c9f
RD
6022 """
6023 GetClientSizeTuple() -> (width, height)
e811c8ce 6024
15afbcd0
RD
6025 This gets the size of the window's 'client area' in pixels. The client
6026 area is the area which may be drawn on by the programmer, excluding
6027 title bar, border, scrollbars, etc.
0df68c9f 6028 """
54f9ee45 6029 return _core_.Window_GetClientSizeTuple(*args, **kwargs)
e811c8ce
RD
6030
6031 def GetClientAreaOrigin(*args, **kwargs):
15afbcd0 6032 """
a95a7133 6033 GetClientAreaOrigin(self) -> Point
15afbcd0
RD
6034
6035 Get the origin of the client area of the window relative to the
6036 window's top left corner (the client area may be shifted because of
6037 the borders, scrollbars, other decorations...)
6038 """
54f9ee45 6039 return _core_.Window_GetClientAreaOrigin(*args, **kwargs)
e811c8ce
RD
6040
6041 def GetClientRect(*args, **kwargs):
15afbcd0 6042 """
a95a7133 6043 GetClientRect(self) -> Rect
15afbcd0 6044
61863841 6045 Get the client area position and size as a `wx.Rect` object.
15afbcd0 6046 """
54f9ee45 6047 return _core_.Window_GetClientRect(*args, **kwargs)
e811c8ce
RD
6048
6049 def GetBestSize(*args, **kwargs):
0df68c9f 6050 """
a95a7133 6051 GetBestSize(self) -> Size
e811c8ce 6052
248ed943 6053 This function returns the best acceptable minimal size for the
41e2b43e
RD
6054 window, if applicable. For example, for a static text control, it will
6055 be the minimal size such that the control label is not truncated. For
6056 windows containing subwindows (suzh aswx.Panel), the size returned by
6057 this function will be the same as the size the window would have had
6058 after calling Fit.
0df68c9f 6059 """
54f9ee45 6060 return _core_.Window_GetBestSize(*args, **kwargs)
e811c8ce
RD
6061
6062 def GetBestSizeTuple(*args, **kwargs):
0df68c9f
RD
6063 """
6064 GetBestSizeTuple() -> (width, height)
e811c8ce 6065
248ed943 6066 This function returns the best acceptable minimal size for the
41e2b43e
RD
6067 window, if applicable. For example, for a static text control, it will
6068 be the minimal size such that the control label is not truncated. For
6069 windows containing subwindows (suzh aswx.Panel), the size returned by
6070 this function will be the same as the size the window would have had
6071 after calling Fit.
0df68c9f 6072 """
54f9ee45 6073 return _core_.Window_GetBestSizeTuple(*args, **kwargs)
e811c8ce 6074
dfbb5885
RD
6075 def InvalidateBestSize(*args, **kwargs):
6076 """
6077 InvalidateBestSize(self)
6078
6079 Reset the cached best size value so it will be recalculated the next
6080 time it is needed.
6081 """
6082 return _core_.Window_InvalidateBestSize(*args, **kwargs)
6083
6084 def GetBestFittingSize(*args, **kwargs):
6085 """
6086 GetBestFittingSize(self) -> Size
6087
6088 This function will merge the window's best size into the window's
6089 minimum size, giving priority to the min size components, and returns
6090 the results.
6091
6092 """
6093 return _core_.Window_GetBestFittingSize(*args, **kwargs)
6094
e811c8ce 6095 def GetAdjustedBestSize(*args, **kwargs):
15afbcd0 6096 """
a95a7133 6097 GetAdjustedBestSize(self) -> Size
15afbcd0
RD
6098
6099 This method is similar to GetBestSize, except in one
6100 thing. GetBestSize should return the minimum untruncated size of the
6101 window, while this method will return the largest of BestSize and any
6102 user specified minimum size. ie. it is the minimum size the window
6103 should currently be drawn at, not the minimal size it can possibly
6104 tolerate.
6105 """
54f9ee45 6106 return _core_.Window_GetAdjustedBestSize(*args, **kwargs)
e811c8ce
RD
6107
6108 def Center(*args, **kwargs):
15afbcd0 6109 """
a95a7133 6110 Center(self, int direction=BOTH)
15afbcd0
RD
6111
6112 Centers the window. The parameter specifies the direction for
6113 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6114 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6115 on the entire screen and not on its parent window. If it is a
6116 top-level window and has no parent then it will always be centered
6117 relative to the screen.
6118 """
54f9ee45 6119 return _core_.Window_Center(*args, **kwargs)
e811c8ce
RD
6120
6121 Centre = Center
6122 def CenterOnScreen(*args, **kwargs):
15afbcd0 6123 """
a95a7133 6124 CenterOnScreen(self, int dir=BOTH)
15afbcd0
RD
6125
6126 Center on screen (only works for top level windows)
6127 """
54f9ee45 6128 return _core_.Window_CenterOnScreen(*args, **kwargs)
e811c8ce
RD
6129
6130 CentreOnScreen = CenterOnScreen
6131 def CenterOnParent(*args, **kwargs):
15afbcd0 6132 """
a95a7133 6133 CenterOnParent(self, int dir=BOTH)
15afbcd0
RD
6134
6135 Center with respect to the the parent window
6136 """
54f9ee45 6137 return _core_.Window_CenterOnParent(*args, **kwargs)
e811c8ce
RD
6138
6139 CentreOnParent = CenterOnParent
6140 def Fit(*args, **kwargs):
15afbcd0 6141 """
a95a7133 6142 Fit(self)
15afbcd0
RD
6143
6144 Sizes the window so that it fits around its subwindows. This function
6145 won't do anything if there are no subwindows and will only really work
6146 correctly if sizers are used for the subwindows layout. Also, if the
6147 window has exactly one subwindow it is better (faster and the result
6148 is more precise as Fit adds some margin to account for fuzziness of
6149 its calculations) to call window.SetClientSize(child.GetSize())
6150 instead of calling Fit.
6151 """
54f9ee45 6152 return _core_.Window_Fit(*args, **kwargs)
e811c8ce
RD
6153
6154 def FitInside(*args, **kwargs):
15afbcd0 6155 """
a95a7133 6156 FitInside(self)
15afbcd0
RD
6157
6158 Similar to Fit, but sizes the interior (virtual) size of a
6159 window. Mainly useful with scrolled windows to reset scrollbars after
6160 sizing changes that do not trigger a size event, and/or scrolled
6161 windows without an interior sizer. This function similarly won't do
6162 anything if there are no subwindows.
6163 """
54f9ee45 6164 return _core_.Window_FitInside(*args, **kwargs)
e811c8ce 6165
f16ab95d 6166 def SetSizeHints(*args, **kwargs):
0df68c9f 6167 """
a95a7133 6168 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
0df68c9f 6169 int incH=-1)
15afbcd0
RD
6170
6171 Allows specification of minimum and maximum window sizes, and window
6172 size increments. If a pair of values is not set (or set to -1), the
6173 default values will be used. If this function is called, the user
908b74cd
RD
6174 will not be able to size the window outside the given bounds (if it is
6175 a top-level window.) Sizers will also inspect the minimum window size
6176 and will use that value if set when calculating layout.
6177
6178 The resizing increments are only significant under Motif or Xt.
0df68c9f 6179 """
f16ab95d 6180 return _core_.Window_SetSizeHints(*args, **kwargs)
e811c8ce 6181
f16ab95d
RD
6182 def SetSizeHintsSz(*args, **kwargs):
6183 """
6184 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
6185
6186 Allows specification of minimum and maximum window sizes, and window
6187 size increments. If a pair of values is not set (or set to -1), the
6188 default values will be used. If this function is called, the user
6189 will not be able to size the window outside the given bounds (if it is
6190 a top-level window.) Sizers will also inspect the minimum window size
6191 and will use that value if set when calculating layout.
6192
6193 The resizing increments are only significant under Motif or Xt.
6194 """
6195 return _core_.Window_SetSizeHintsSz(*args, **kwargs)
6196
6197 def SetVirtualSizeHints(*args, **kwargs):
15afbcd0 6198 """
908b74cd 6199 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
15afbcd0
RD
6200
6201 Allows specification of minimum and maximum virtual window sizes. If a
6202 pair of values is not set (or set to -1), the default values will be
6203 used. If this function is called, the user will not be able to size
6204 the virtual area of the window outside the given bounds.
6205 """
f16ab95d
RD
6206 return _core_.Window_SetVirtualSizeHints(*args, **kwargs)
6207
6208 def SetVirtualSizeHintsSz(*args, **kwargs):
6209 """
6210 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
6211
6212 Allows specification of minimum and maximum virtual window sizes. If a
6213 pair of values is not set (or set to -1), the default values will be
6214 used. If this function is called, the user will not be able to size
6215 the virtual area of the window outside the given bounds.
6216 """
6217 return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs)
e811c8ce 6218
908b74cd
RD
6219 def GetMaxSize(*args, **kwargs):
6220 """GetMaxSize(self) -> Size"""
6221 return _core_.Window_GetMaxSize(*args, **kwargs)
6222
6223 def GetMinSize(*args, **kwargs):
6224 """GetMinSize(self) -> Size"""
6225 return _core_.Window_GetMinSize(*args, **kwargs)
6226
6227 def SetMinSize(*args, **kwargs):
6228 """
6229 SetMinSize(self, Size minSize)
6230
6231 A more convenient method than `SetSizeHints` for setting just the
6232 min size.
6233 """
6234 return _core_.Window_SetMinSize(*args, **kwargs)
6235
6236 def SetMaxSize(*args, **kwargs):
6237 """
6238 SetMaxSize(self, Size maxSize)
6239
6240 A more convenient method than `SetSizeHints` for setting just the
6241 max size.
6242 """
6243 return _core_.Window_SetMaxSize(*args, **kwargs)
6244
e811c8ce 6245 def GetMinWidth(*args, **kwargs):
a95a7133 6246 """GetMinWidth(self) -> int"""
54f9ee45 6247 return _core_.Window_GetMinWidth(*args, **kwargs)
e811c8ce
RD
6248
6249 def GetMinHeight(*args, **kwargs):
a95a7133 6250 """GetMinHeight(self) -> int"""
54f9ee45 6251 return _core_.Window_GetMinHeight(*args, **kwargs)
e811c8ce
RD
6252
6253 def GetMaxWidth(*args, **kwargs):
a95a7133 6254 """GetMaxWidth(self) -> int"""
54f9ee45 6255 return _core_.Window_GetMaxWidth(*args, **kwargs)
e811c8ce
RD
6256
6257 def GetMaxHeight(*args, **kwargs):
a95a7133 6258 """GetMaxHeight(self) -> int"""
54f9ee45 6259 return _core_.Window_GetMaxHeight(*args, **kwargs)
e811c8ce 6260
e811c8ce 6261 def SetVirtualSize(*args, **kwargs):
0df68c9f 6262 """
a95a7133 6263 SetVirtualSize(self, Size size)
e811c8ce 6264
15afbcd0
RD
6265 Set the the virtual size of a window in pixels. For most windows this
6266 is just the client area of the window, but for some like scrolled
6267 windows it is more or less independent of the screen window size.
0df68c9f 6268 """
54f9ee45 6269 return _core_.Window_SetVirtualSize(*args, **kwargs)
e811c8ce
RD
6270
6271 def SetVirtualSizeWH(*args, **kwargs):
0df68c9f 6272 """
a95a7133 6273 SetVirtualSizeWH(self, int w, int h)
e811c8ce 6274
15afbcd0
RD
6275 Set the the virtual size of a window in pixels. For most windows this
6276 is just the client area of the window, but for some like scrolled
6277 windows it is more or less independent of the screen window size.
0df68c9f 6278 """
54f9ee45 6279 return _core_.Window_SetVirtualSizeWH(*args, **kwargs)
e811c8ce
RD
6280
6281 def GetVirtualSize(*args, **kwargs):
0df68c9f 6282 """
a95a7133 6283 GetVirtualSize(self) -> Size
e811c8ce 6284
15afbcd0
RD
6285 Get the the virtual size of the window in pixels. For most windows
6286 this is just the client area of the window, but for some like scrolled
6287 windows it is more or less independent of the screen window size.
0df68c9f 6288 """
54f9ee45 6289 return _core_.Window_GetVirtualSize(*args, **kwargs)
e811c8ce
RD
6290
6291 def GetVirtualSizeTuple(*args, **kwargs):
0df68c9f
RD
6292 """
6293 GetVirtualSizeTuple() -> (width, height)
e811c8ce 6294
15afbcd0
RD
6295 Get the the virtual size of the window in pixels. For most windows
6296 this is just the client area of the window, but for some like scrolled
6297 windows it is more or less independent of the screen window size.
0df68c9f 6298 """
54f9ee45 6299 return _core_.Window_GetVirtualSizeTuple(*args, **kwargs)
e811c8ce
RD
6300
6301 def GetBestVirtualSize(*args, **kwargs):
15afbcd0 6302 """
a95a7133 6303 GetBestVirtualSize(self) -> Size
15afbcd0
RD
6304
6305 Return the largest of ClientSize and BestSize (as determined by a
6306 sizer, interior children, or other means)
6307 """
54f9ee45 6308 return _core_.Window_GetBestVirtualSize(*args, **kwargs)
e811c8ce
RD
6309
6310 def Show(*args, **kwargs):
15afbcd0 6311 """
a95a7133 6312 Show(self, bool show=True) -> bool
15afbcd0
RD
6313
6314 Shows or hides the window. You may need to call Raise for a top level
6315 window if you want to bring it to top, although this is not needed if
6316 Show is called immediately after the frame creation. Returns True if
6317 the window has been shown or hidden or False if nothing was done
6318 because it already was in the requested state.
6319 """
54f9ee45 6320 return _core_.Window_Show(*args, **kwargs)
e811c8ce
RD
6321
6322 def Hide(*args, **kwargs):
15afbcd0 6323 """
a95a7133 6324 Hide(self) -> bool
15afbcd0
RD
6325
6326 Equivalent to calling Show(False).
6327 """
54f9ee45 6328 return _core_.Window_Hide(*args, **kwargs)
e811c8ce
RD
6329
6330 def Enable(*args, **kwargs):
15afbcd0 6331 """
a95a7133 6332 Enable(self, bool enable=True) -> bool
15afbcd0
RD
6333
6334 Enable or disable the window for user input. Note that when a parent
6335 window is disabled, all of its children are disabled as well and they
6336 are reenabled again when the parent is. Returns true if the window
6337 has been enabled or disabled, false if nothing was done, i.e. if the
6338 window had already been in the specified state.
6339 """
54f9ee45 6340 return _core_.Window_Enable(*args, **kwargs)
e811c8ce
RD
6341
6342 def Disable(*args, **kwargs):
15afbcd0 6343 """
a95a7133 6344 Disable(self) -> bool
15afbcd0
RD
6345
6346 Disables the window, same as Enable(false).
6347 """
54f9ee45 6348 return _core_.Window_Disable(*args, **kwargs)
e811c8ce
RD
6349
6350 def IsShown(*args, **kwargs):
15afbcd0 6351 """
a95a7133 6352 IsShown(self) -> bool
15afbcd0
RD
6353
6354 Returns true if the window is shown, false if it has been hidden.
6355 """
54f9ee45 6356 return _core_.Window_IsShown(*args, **kwargs)
e811c8ce
RD
6357
6358 def IsEnabled(*args, **kwargs):
15afbcd0 6359 """
a95a7133 6360 IsEnabled(self) -> bool
15afbcd0
RD
6361
6362 Returns true if the window is enabled for input, false otherwise.
6363 """
54f9ee45 6364 return _core_.Window_IsEnabled(*args, **kwargs)
e811c8ce
RD
6365
6366 def SetWindowStyleFlag(*args, **kwargs):
15afbcd0 6367 """
a95a7133 6368 SetWindowStyleFlag(self, long style)
15afbcd0 6369
41e2b43e
RD
6370 Sets the style of the window. Please note that some styles cannot be
6371 changed after the window creation and that Refresh() might need to be
6372 called after changing the others for the change to take place
6373 immediately.
15afbcd0 6374 """
54f9ee45 6375 return _core_.Window_SetWindowStyleFlag(*args, **kwargs)
e811c8ce
RD
6376
6377 def GetWindowStyleFlag(*args, **kwargs):
15afbcd0 6378 """
a95a7133 6379 GetWindowStyleFlag(self) -> long
e811c8ce 6380
15afbcd0
RD
6381 Gets the window style that was passed to the constructor or Create
6382 method.
6383 """
54f9ee45 6384 return _core_.Window_GetWindowStyleFlag(*args, **kwargs)
e811c8ce 6385
15afbcd0 6386 SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag
e811c8ce 6387 def HasFlag(*args, **kwargs):
15afbcd0 6388 """
a95a7133 6389 HasFlag(self, int flag) -> bool
15afbcd0
RD
6390
6391 Test if the given style is set for this window.
6392 """
54f9ee45 6393 return _core_.Window_HasFlag(*args, **kwargs)
e811c8ce
RD
6394
6395 def IsRetained(*args, **kwargs):
15afbcd0 6396 """
a95a7133 6397 IsRetained(self) -> bool
15afbcd0
RD
6398
6399 Returns true if the window is retained, false otherwise. Retained
6400 windows are only available on X platforms.
6401 """
54f9ee45 6402 return _core_.Window_IsRetained(*args, **kwargs)
e811c8ce
RD
6403
6404 def SetExtraStyle(*args, **kwargs):
15afbcd0 6405 """
a95a7133 6406 SetExtraStyle(self, long exStyle)
15afbcd0
RD
6407
6408 Sets the extra style bits for the window. Extra styles are the less
6409 often used style bits which can't be set with the constructor or with
6410 SetWindowStyleFlag()
6411 """
54f9ee45 6412 return _core_.Window_SetExtraStyle(*args, **kwargs)
e811c8ce
RD
6413
6414 def GetExtraStyle(*args, **kwargs):
15afbcd0 6415 """
a95a7133 6416 GetExtraStyle(self) -> long
15afbcd0
RD
6417
6418 Returns the extra style bits for the window.
6419 """
54f9ee45 6420 return _core_.Window_GetExtraStyle(*args, **kwargs)
e811c8ce
RD
6421
6422 def MakeModal(*args, **kwargs):
15afbcd0 6423 """
a95a7133 6424 MakeModal(self, bool modal=True)
15afbcd0
RD
6425
6426 Disables all other windows in the application so that the user can
6427 only interact with this window. Passing False will reverse this
6428 effect.
6429 """
54f9ee45 6430 return _core_.Window_MakeModal(*args, **kwargs)
e811c8ce
RD
6431
6432 def SetThemeEnabled(*args, **kwargs):
15afbcd0 6433 """
a95a7133 6434 SetThemeEnabled(self, bool enableTheme)
15afbcd0
RD
6435
6436 This function tells a window if it should use the system's "theme"
6437 code to draw the windows' background instead if its own background
6438 drawing code. This will only have an effect on platforms that support
6439 the notion of themes in user defined windows. One such platform is
6440 GTK+ where windows can have (very colourful) backgrounds defined by a
6441 user's selected theme.
6442
6443 Dialogs, notebook pages and the status bar have this flag set to true
6444 by default so that the default look and feel is simulated best.
6445 """
54f9ee45 6446 return _core_.Window_SetThemeEnabled(*args, **kwargs)
e811c8ce
RD
6447
6448 def GetThemeEnabled(*args, **kwargs):
15afbcd0 6449 """
a95a7133 6450 GetThemeEnabled(self) -> bool
e811c8ce 6451
15afbcd0
RD
6452 Return the themeEnabled flag.
6453 """
54f9ee45 6454 return _core_.Window_GetThemeEnabled(*args, **kwargs)
e811c8ce
RD
6455
6456 def SetFocus(*args, **kwargs):
15afbcd0 6457 """
a95a7133 6458 SetFocus(self)
15afbcd0
RD
6459
6460 Set's the focus to this window, allowing it to receive keyboard input.
6461 """
54f9ee45 6462 return _core_.Window_SetFocus(*args, **kwargs)
e811c8ce
RD
6463
6464 def SetFocusFromKbd(*args, **kwargs):
15afbcd0 6465 """
a95a7133 6466 SetFocusFromKbd(self)
15afbcd0
RD
6467
6468 Set focus to this window as the result of a keyboard action. Normally
6469 only called internally.
6470 """
54f9ee45 6471 return _core_.Window_SetFocusFromKbd(*args, **kwargs)
e811c8ce
RD
6472
6473 def FindFocus(*args, **kwargs):
15afbcd0 6474 """
66c033b4 6475 FindFocus() -> Window
15afbcd0
RD
6476
6477 Returns the window or control that currently has the keyboard focus,
6478 or None.
6479 """
54f9ee45 6480 return _core_.Window_FindFocus(*args, **kwargs)
e811c8ce
RD
6481
6482 FindFocus = staticmethod(FindFocus)
6483 def AcceptsFocus(*args, **kwargs):
15afbcd0 6484 """
a95a7133 6485 AcceptsFocus(self) -> bool
15afbcd0
RD
6486
6487 Can this window have focus?
6488 """
54f9ee45 6489 return _core_.Window_AcceptsFocus(*args, **kwargs)
e811c8ce
RD
6490
6491 def AcceptsFocusFromKeyboard(*args, **kwargs):
15afbcd0 6492 """
a95a7133 6493 AcceptsFocusFromKeyboard(self) -> bool
15afbcd0
RD
6494
6495 Can this window be given focus by keyboard navigation? if not, the
6496 only way to give it focus (provided it accepts it at all) is to click
6497 it.
6498 """
54f9ee45 6499 return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs)
e811c8ce
RD
6500
6501 def GetDefaultItem(*args, **kwargs):
15afbcd0 6502 """
a95a7133 6503 GetDefaultItem(self) -> Window
15afbcd0
RD
6504
6505 Get the default child of this parent, i.e. the one which is activated
6506 by pressing <Enter> such as the OK button on a wx.Dialog.
6507 """
54f9ee45 6508 return _core_.Window_GetDefaultItem(*args, **kwargs)
e811c8ce
RD
6509
6510 def SetDefaultItem(*args, **kwargs):
15afbcd0 6511 """
a95a7133 6512 SetDefaultItem(self, Window child) -> Window
15afbcd0
RD
6513
6514 Set this child as default, return the old default.
6515 """
54f9ee45 6516 return _core_.Window_SetDefaultItem(*args, **kwargs)
e811c8ce
RD
6517
6518 def SetTmpDefaultItem(*args, **kwargs):
15afbcd0 6519 """
a95a7133 6520 SetTmpDefaultItem(self, Window win)
15afbcd0
RD
6521
6522 Set this child as temporary default
6523 """
54f9ee45 6524 return _core_.Window_SetTmpDefaultItem(*args, **kwargs)
e811c8ce 6525
908b74cd
RD
6526 def Navigate(*args, **kwargs):
6527 """
6528 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
6529
fd2dc343
RD
6530 Does keyboard navigation from this window to another, by sending a
6531 `wx.NavigationKeyEvent`.
908b74cd
RD
6532 """
6533 return _core_.Window_Navigate(*args, **kwargs)
6534
7f98d120
RD
6535 def MoveAfterInTabOrder(*args, **kwargs):
6536 """
6537 MoveAfterInTabOrder(self, Window win)
6538
6539 Moves this window in the tab navigation order after the specified
6540 sibling window. This means that when the user presses the TAB key on
6541 that other window, the focus switches to this window.
6542
6543 The default tab order is the same as creation order. This function
6544 and `MoveBeforeInTabOrder` allow to change it after creating all the
6545 windows.
6546
6547 """
6548 return _core_.Window_MoveAfterInTabOrder(*args, **kwargs)
6549
6550 def MoveBeforeInTabOrder(*args, **kwargs):
6551 """
6552 MoveBeforeInTabOrder(self, Window win)
6553
6554 Same as `MoveAfterInTabOrder` except that it inserts this window just
6555 before win instead of putting it right after it.
6556 """
6557 return _core_.Window_MoveBeforeInTabOrder(*args, **kwargs)
6558
e811c8ce 6559 def GetChildren(*args, **kwargs):
15afbcd0 6560 """
a95a7133 6561 GetChildren(self) -> PyObject
15afbcd0
RD
6562
6563 Returns a list of the window's children. NOTE: Currently this is a
6564 copy of the child window list maintained by the window, so the return
6565 value of this function is only valid as long as the window's children
6566 do not change.
6567 """
54f9ee45 6568 return _core_.Window_GetChildren(*args, **kwargs)
e811c8ce
RD
6569
6570 def GetParent(*args, **kwargs):
15afbcd0 6571 """
a95a7133 6572 GetParent(self) -> Window
15afbcd0
RD
6573
6574 Returns the parent window of this window, or None if there isn't one.
6575 """
54f9ee45 6576 return _core_.Window_GetParent(*args, **kwargs)
e811c8ce
RD
6577
6578 def GetGrandParent(*args, **kwargs):
15afbcd0 6579 """
a95a7133 6580 GetGrandParent(self) -> Window
15afbcd0 6581
41e2b43e
RD
6582 Returns the parent of the parent of this window, or None if there
6583 isn't one.
15afbcd0 6584 """
54f9ee45 6585 return _core_.Window_GetGrandParent(*args, **kwargs)
e811c8ce
RD
6586
6587 def IsTopLevel(*args, **kwargs):
15afbcd0 6588 """
a95a7133 6589 IsTopLevel(self) -> bool
15afbcd0
RD
6590
6591 Returns true if the given window is a top-level one. Currently all
6592 frames and dialogs are always considered to be top-level windows (even
6593 if they have a parent window).
6594 """
54f9ee45 6595 return _core_.Window_IsTopLevel(*args, **kwargs)
e811c8ce
RD
6596
6597 def Reparent(*args, **kwargs):
15afbcd0 6598 """
a95a7133 6599 Reparent(self, Window newParent) -> bool
15afbcd0
RD
6600
6601 Reparents the window, i.e the window will be removed from its current
6602 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6603 re-inserted into another. Available on Windows and GTK. Returns True
6604 if the parent was changed, False otherwise (error or newParent ==
6605 oldParent)
6606 """
54f9ee45 6607 return _core_.Window_Reparent(*args, **kwargs)
e811c8ce
RD
6608
6609 def AddChild(*args, **kwargs):
15afbcd0 6610 """
a95a7133 6611 AddChild(self, Window child)
15afbcd0
RD
6612
6613 Adds a child window. This is called automatically by window creation
6614 functions so should not be required by the application programmer.
6615 """
54f9ee45 6616 return _core_.Window_AddChild(*args, **kwargs)
e811c8ce
RD
6617
6618 def RemoveChild(*args, **kwargs):
15afbcd0 6619 """
a95a7133 6620 RemoveChild(self, Window child)
15afbcd0
RD
6621
6622 Removes a child window. This is called automatically by window
6623 deletion functions so should not be required by the application
6624 programmer.
6625 """
54f9ee45 6626 return _core_.Window_RemoveChild(*args, **kwargs)
e811c8ce
RD
6627
6628 def FindWindowById(*args, **kwargs):
15afbcd0 6629 """
a95a7133 6630 FindWindowById(self, long winid) -> Window
15afbcd0
RD
6631
6632 Find a chld of this window by window ID
6633 """
54f9ee45 6634 return _core_.Window_FindWindowById(*args, **kwargs)
e811c8ce
RD
6635
6636 def FindWindowByName(*args, **kwargs):
15afbcd0 6637 """
a95a7133 6638 FindWindowByName(self, String name) -> Window
15afbcd0
RD
6639
6640 Find a child of this window by name
6641 """
54f9ee45 6642 return _core_.Window_FindWindowByName(*args, **kwargs)
e811c8ce
RD
6643
6644 def GetEventHandler(*args, **kwargs):
15afbcd0 6645 """
a95a7133 6646 GetEventHandler(self) -> EvtHandler
15afbcd0
RD
6647
6648 Returns the event handler for this window. By default, the window is
6649 its own event handler.
6650 """
54f9ee45 6651 return _core_.Window_GetEventHandler(*args, **kwargs)
e811c8ce
RD
6652
6653 def SetEventHandler(*args, **kwargs):
15afbcd0 6654 """
a95a7133 6655 SetEventHandler(self, EvtHandler handler)
15afbcd0
RD
6656
6657 Sets the event handler for this window. An event handler is an object
6658 that is capable of processing the events sent to a window. By default,
6659 the window is its own event handler, but an application may wish to
6660 substitute another, for example to allow central implementation of
6661 event-handling for a variety of different window classes.
6662
41e2b43e 6663 It is usually better to use `wx.Window.PushEventHandler` since this sets
15afbcd0
RD
6664 up a chain of event handlers, where an event not handled by one event
6665 handler is handed to the next one in the chain.
6666 """
54f9ee45 6667 return _core_.Window_SetEventHandler(*args, **kwargs)
e811c8ce
RD
6668
6669 def PushEventHandler(*args, **kwargs):
15afbcd0 6670 """
a95a7133 6671 PushEventHandler(self, EvtHandler handler)
15afbcd0
RD
6672
6673 Pushes this event handler onto the event handler stack for the window.
6674 An event handler is an object that is capable of processing the events
6675 sent to a window. By default, the window is its own event handler, but
6676 an application may wish to substitute another, for example to allow
6677 central implementation of event-handling for a variety of different
6678 window classes.
6679
6680 wx.Window.PushEventHandler allows an application to set up a chain of
6681 event handlers, where an event not handled by one event handler is
41e2b43e 6682 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
15afbcd0
RD
6683 remove the event handler.
6684 """
54f9ee45 6685 return _core_.Window_PushEventHandler(*args, **kwargs)
e811c8ce
RD
6686
6687 def PopEventHandler(*args, **kwargs):
15afbcd0 6688 """
a95a7133 6689 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
15afbcd0
RD
6690
6691 Removes and returns the top-most event handler on the event handler
6692 stack. If deleteHandler is True then the wx.EvtHandler object will be
6693 destroyed after it is popped.
6694 """
54f9ee45 6695 return _core_.Window_PopEventHandler(*args, **kwargs)
e811c8ce
RD
6696
6697 def RemoveEventHandler(*args, **kwargs):
15afbcd0 6698 """
a95a7133 6699 RemoveEventHandler(self, EvtHandler handler) -> bool
15afbcd0 6700
41e2b43e
RD
6701 Find the given handler in the event handler chain and remove (but not
6702 delete) it from the event handler chain, return True if it was found
6703 and False otherwise (this also results in an assert failure so this
6704 function should only be called when the handler is supposed to be
6705 there.)
15afbcd0 6706 """
54f9ee45 6707 return _core_.Window_RemoveEventHandler(*args, **kwargs)
e811c8ce
RD
6708
6709 def SetValidator(*args, **kwargs):
15afbcd0 6710 """
a95a7133 6711 SetValidator(self, Validator validator)
15afbcd0
RD
6712
6713 Deletes the current validator (if any) and sets the window validator,
6714 having called wx.Validator.Clone to create a new validator of this
6715 type.
6716 """
54f9ee45 6717 return _core_.Window_SetValidator(*args, **kwargs)
e811c8ce
RD
6718
6719 def GetValidator(*args, **kwargs):
15afbcd0 6720 """
a95a7133 6721 GetValidator(self) -> Validator
15afbcd0
RD
6722
6723 Returns a pointer to the current validator for the window, or None if
6724 there is none.
6725 """
54f9ee45 6726 return _core_.Window_GetValidator(*args, **kwargs)
e811c8ce 6727
74a57fcd
RD
6728 def Validate(*args, **kwargs):
6729 """
a95a7133 6730 Validate(self) -> bool
74a57fcd
RD
6731
6732 Validates the current values of the child controls using their
41e2b43e
RD
6733 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6734 style flag set, the method will also call Validate() of all child
6735 windows. Returns false if any of the validations failed.
74a57fcd 6736 """
54f9ee45 6737 return _core_.Window_Validate(*args, **kwargs)
74a57fcd
RD
6738
6739 def TransferDataToWindow(*args, **kwargs):
6740 """
a95a7133 6741 TransferDataToWindow(self) -> bool
74a57fcd 6742
41e2b43e
RD
6743 Transfers values to child controls from data areas specified by their
6744 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6745 style flag set, the method will also call TransferDataToWindow() of
6746 all child windows.
74a57fcd 6747 """
54f9ee45 6748 return _core_.Window_TransferDataToWindow(*args, **kwargs)
74a57fcd
RD
6749
6750 def TransferDataFromWindow(*args, **kwargs):
6751 """
a95a7133 6752 TransferDataFromWindow(self) -> bool
74a57fcd 6753
41e2b43e
RD
6754 Transfers values from child controls to data areas specified by their
6755 validators. Returns false if a transfer failed. If the window has
6756 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
6757 also call TransferDataFromWindow() of all child windows.
74a57fcd 6758 """
54f9ee45 6759 return _core_.Window_TransferDataFromWindow(*args, **kwargs)
74a57fcd
RD
6760
6761 def InitDialog(*args, **kwargs):
6762 """
a95a7133 6763 InitDialog(self)
74a57fcd 6764
41e2b43e
RD
6765 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
6766 to the dialog via validators.
74a57fcd 6767 """
54f9ee45 6768 return _core_.Window_InitDialog(*args, **kwargs)
74a57fcd 6769
e811c8ce 6770 def SetAcceleratorTable(*args, **kwargs):
15afbcd0 6771 """
a95a7133 6772 SetAcceleratorTable(self, AcceleratorTable accel)
15afbcd0
RD
6773
6774 Sets the accelerator table for this window.
6775 """
54f9ee45 6776 return _core_.Window_SetAcceleratorTable(*args, **kwargs)
e811c8ce
RD
6777
6778 def GetAcceleratorTable(*args, **kwargs):
15afbcd0 6779 """
a95a7133 6780 GetAcceleratorTable(self) -> AcceleratorTable
15afbcd0
RD
6781
6782 Gets the accelerator table for this window.
6783 """
54f9ee45 6784 return _core_.Window_GetAcceleratorTable(*args, **kwargs)
e811c8ce
RD
6785
6786 def RegisterHotKey(*args, **kwargs):
15afbcd0 6787 """
a95a7133 6788 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
15afbcd0
RD
6789
6790 Registers a system wide hotkey. Every time the user presses the hotkey
6791 registered here, this window will receive a hotkey event. It will
6792 receive the event even if the application is in the background and
6793 does not have the input focus because the user is working with some
6794 other application. To bind an event handler function to this hotkey
6795 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
6796 hotkey was registered successfully.
6797 """
54f9ee45 6798 return _core_.Window_RegisterHotKey(*args, **kwargs)
e811c8ce
RD
6799
6800 def UnregisterHotKey(*args, **kwargs):
15afbcd0 6801 """
a95a7133 6802 UnregisterHotKey(self, int hotkeyId) -> bool
15afbcd0
RD
6803
6804 Unregisters a system wide hotkey.
6805 """
54f9ee45 6806 return _core_.Window_UnregisterHotKey(*args, **kwargs)
e811c8ce
RD
6807
6808 def ConvertDialogPointToPixels(*args, **kwargs):
15afbcd0 6809 """
a95a7133 6810 ConvertDialogPointToPixels(self, Point pt) -> Point
15afbcd0
RD
6811
6812 Converts a point or size from dialog units to pixels. Dialog units
6813 are used for maintaining a dialog's proportions even if the font
6814 changes. For the x dimension, the dialog units are multiplied by the
6815 average character width and then divided by 4. For the y dimension,
6816 the dialog units are multiplied by the average character height and
6817 then divided by 8.
6818 """
54f9ee45 6819 return _core_.Window_ConvertDialogPointToPixels(*args, **kwargs)
e811c8ce
RD
6820
6821 def ConvertDialogSizeToPixels(*args, **kwargs):
15afbcd0 6822 """
a95a7133 6823 ConvertDialogSizeToPixels(self, Size sz) -> Size
15afbcd0
RD
6824
6825 Converts a point or size from dialog units to pixels. Dialog units
6826 are used for maintaining a dialog's proportions even if the font
6827 changes. For the x dimension, the dialog units are multiplied by the
6828 average character width and then divided by 4. For the y dimension,
6829 the dialog units are multiplied by the average character height and
6830 then divided by 8.
6831 """
54f9ee45 6832 return _core_.Window_ConvertDialogSizeToPixels(*args, **kwargs)
e811c8ce
RD
6833
6834 def DLG_PNT(*args, **kwargs):
15afbcd0 6835 """
a95a7133 6836 DLG_PNT(self, Point pt) -> Point
15afbcd0
RD
6837
6838 Converts a point or size from dialog units to pixels. Dialog units
6839 are used for maintaining a dialog's proportions even if the font
6840 changes. For the x dimension, the dialog units are multiplied by the
6841 average character width and then divided by 4. For the y dimension,
6842 the dialog units are multiplied by the average character height and
6843 then divided by 8.
6844 """
54f9ee45 6845 return _core_.Window_DLG_PNT(*args, **kwargs)
e811c8ce
RD
6846
6847 def DLG_SZE(*args, **kwargs):
15afbcd0 6848 """
a95a7133 6849 DLG_SZE(self, Size sz) -> Size
15afbcd0
RD
6850
6851 Converts a point or size from dialog units to pixels. Dialog units
6852 are used for maintaining a dialog's proportions even if the font
6853 changes. For the x dimension, the dialog units are multiplied by the
6854 average character width and then divided by 4. For the y dimension,
6855 the dialog units are multiplied by the average character height and
6856 then divided by 8.
6857 """
54f9ee45 6858 return _core_.Window_DLG_SZE(*args, **kwargs)
e811c8ce
RD
6859
6860 def ConvertPixelPointToDialog(*args, **kwargs):
a95a7133 6861 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
54f9ee45 6862 return _core_.Window_ConvertPixelPointToDialog(*args, **kwargs)
e811c8ce
RD
6863
6864 def ConvertPixelSizeToDialog(*args, **kwargs):
a95a7133 6865 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
54f9ee45 6866 return _core_.Window_ConvertPixelSizeToDialog(*args, **kwargs)
e811c8ce
RD
6867
6868 def WarpPointer(*args, **kwargs):
15afbcd0 6869 """
a95a7133 6870 WarpPointer(self, int x, int y)
15afbcd0
RD
6871
6872 Moves the pointer to the given position on the window.
6873
6874 NOTE: This function is not supported under Mac because Apple Human
6875 Interface Guidelines forbid moving the mouse cursor programmatically.
6876 """
54f9ee45 6877 return _core_.Window_WarpPointer(*args, **kwargs)
e811c8ce
RD
6878
6879 def CaptureMouse(*args, **kwargs):
15afbcd0 6880 """
a95a7133 6881 CaptureMouse(self)
15afbcd0
RD
6882
6883 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
6884 release the capture.
6885
6886 Note that wxWindows maintains the stack of windows having captured the
6887 mouse and when the mouse is released the capture returns to the window
6888 which had had captured it previously and it is only really released if
6889 there were no previous window. In particular, this means that you must
6890 release the mouse as many times as you capture it.
6891 """
54f9ee45 6892 return _core_.Window_CaptureMouse(*args, **kwargs)
e811c8ce
RD
6893
6894 def ReleaseMouse(*args, **kwargs):
15afbcd0 6895 """
a95a7133 6896 ReleaseMouse(self)
15afbcd0
RD
6897
6898 Releases mouse input captured with wx.Window.CaptureMouse.
6899 """
54f9ee45 6900 return _core_.Window_ReleaseMouse(*args, **kwargs)
e811c8ce
RD
6901
6902 def GetCapture(*args, **kwargs):
15afbcd0 6903 """
66c033b4 6904 GetCapture() -> Window
15afbcd0
RD
6905
6906 Returns the window which currently captures the mouse or None
6907 """
54f9ee45 6908 return _core_.Window_GetCapture(*args, **kwargs)
e811c8ce
RD
6909
6910 GetCapture = staticmethod(GetCapture)
6911 def HasCapture(*args, **kwargs):
15afbcd0 6912 """
a95a7133 6913 HasCapture(self) -> bool
15afbcd0
RD
6914
6915 Returns true if this window has the current mouse capture.
6916 """
54f9ee45 6917 return _core_.Window_HasCapture(*args, **kwargs)
e811c8ce
RD
6918
6919 def Refresh(*args, **kwargs):
15afbcd0 6920 """
a95a7133 6921 Refresh(self, bool eraseBackground=True, Rect rect=None)
15afbcd0
RD
6922
6923 Mark the specified rectangle (or the whole window) as "dirty" so it
6924 will be repainted. Causes an EVT_PAINT event to be generated and sent
6925 to the window.
6926 """
54f9ee45 6927 return _core_.Window_Refresh(*args, **kwargs)
e811c8ce
RD
6928
6929 def RefreshRect(*args, **kwargs):
15afbcd0 6930 """
a95a7133 6931 RefreshRect(self, Rect rect)
15afbcd0
RD
6932
6933 Redraws the contents of the given rectangle: the area inside it will
6934 be repainted. This is the same as Refresh but has a nicer syntax.
6935 """
54f9ee45 6936 return _core_.Window_RefreshRect(*args, **kwargs)
e811c8ce
RD
6937
6938 def Update(*args, **kwargs):
15afbcd0 6939 """
a95a7133 6940 Update(self)
15afbcd0
RD
6941
6942 Calling this method immediately repaints the invalidated area of the
6943 window instead of waiting for the EVT_PAINT event to happen, (normally
6944 this would usually only happen when the flow of control returns to the
6945 event loop.) Notice that this function doesn't refresh the window and
6946 does nothing if the window has been already repainted. Use Refresh
6947 first if you want to immediately redraw the window (or some portion of
6948 it) unconditionally.
6949 """
54f9ee45 6950 return _core_.Window_Update(*args, **kwargs)
e811c8ce
RD
6951
6952 def ClearBackground(*args, **kwargs):
15afbcd0 6953 """
a95a7133 6954 ClearBackground(self)
15afbcd0
RD
6955
6956 Clears the window by filling it with the current background
6957 colour. Does not cause an erase background event to be generated.
6958 """
54f9ee45 6959 return _core_.Window_ClearBackground(*args, **kwargs)
e811c8ce
RD
6960
6961 def Freeze(*args, **kwargs):
15afbcd0 6962 """
a95a7133 6963 Freeze(self)
15afbcd0 6964
41e2b43e
RD
6965 Freezes the window or, in other words, prevents any updates from
6966 taking place on screen, the window is not redrawn at all. Thaw must be
6967 called to reenable window redrawing. Calls to Freeze/Thaw may be
6968 nested, with the actual Thaw being delayed until all the nesting has
6969 been undone.
15afbcd0
RD
6970
6971 This method is useful for visual appearance optimization (for example,
6972 it is a good idea to use it before inserting large amount of text into
6973 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
6974 for all controls so it is mostly just a hint to wxWindows and not a
6975 mandatory directive.
6976 """
54f9ee45 6977 return _core_.Window_Freeze(*args, **kwargs)
e811c8ce
RD
6978
6979 def Thaw(*args, **kwargs):
15afbcd0 6980 """
a95a7133 6981 Thaw(self)
15afbcd0 6982
4276dc52 6983 Reenables window updating after a previous call to Freeze. Calls to
41e2b43e
RD
6984 Freeze/Thaw may be nested, so Thaw must be called the same number of
6985 times that Freeze was before the window will be updated.
15afbcd0 6986 """
54f9ee45 6987 return _core_.Window_Thaw(*args, **kwargs)
e811c8ce
RD
6988
6989 def PrepareDC(*args, **kwargs):
15afbcd0 6990 """
a95a7133 6991 PrepareDC(self, DC dc)
15afbcd0
RD
6992
6993 Call this function to prepare the device context for drawing a
6994 scrolled image. It sets the device origin according to the current
6995 scroll position.
6996 """
54f9ee45 6997 return _core_.Window_PrepareDC(*args, **kwargs)
e811c8ce
RD
6998
6999 def GetUpdateRegion(*args, **kwargs):
15afbcd0 7000 """
a95a7133 7001 GetUpdateRegion(self) -> Region
15afbcd0
RD
7002
7003 Returns the region specifying which parts of the window have been
7004 damaged. Should only be called within an EVT_PAINT handler.
7005 """
54f9ee45 7006 return _core_.Window_GetUpdateRegion(*args, **kwargs)
e811c8ce
RD
7007
7008 def GetUpdateClientRect(*args, **kwargs):
15afbcd0 7009 """
a95a7133 7010 GetUpdateClientRect(self) -> Rect
15afbcd0
RD
7011
7012 Get the update rectangle region bounding box in client coords.
7013 """
54f9ee45 7014 return _core_.Window_GetUpdateClientRect(*args, **kwargs)
e811c8ce
RD
7015
7016 def IsExposed(*args, **kwargs):
15afbcd0 7017 """
a95a7133 7018 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
15afbcd0
RD
7019
7020 Returns true if the given point or rectangle area has been exposed
7021 since the last repaint. Call this in an paint event handler to
7022 optimize redrawing by only redrawing those areas, which have been
7023 exposed.
7024 """
54f9ee45 7025 return _core_.Window_IsExposed(*args, **kwargs)
e811c8ce
RD
7026
7027 def IsExposedPoint(*args, **kwargs):
15afbcd0 7028 """
a95a7133 7029 IsExposedPoint(self, Point pt) -> bool
15afbcd0
RD
7030
7031 Returns true if the given point or rectangle area has been exposed
7032 since the last repaint. Call this in an paint event handler to
7033 optimize redrawing by only redrawing those areas, which have been
7034 exposed.
7035 """
54f9ee45 7036 return _core_.Window_IsExposedPoint(*args, **kwargs)
e811c8ce 7037
4276dc52 7038 def IsExposedRect(*args, **kwargs):
15afbcd0 7039 """
a95a7133 7040 IsExposedRect(self, Rect rect) -> bool
15afbcd0
RD
7041
7042 Returns true if the given point or rectangle area has been exposed
7043 since the last repaint. Call this in an paint event handler to
7044 optimize redrawing by only redrawing those areas, which have been
7045 exposed.
7046 """
54f9ee45 7047 return _core_.Window_IsExposedRect(*args, **kwargs)
e811c8ce 7048
74a57fcd
RD
7049 def GetDefaultAttributes(*args, **kwargs):
7050 """
a95a7133 7051 GetDefaultAttributes(self) -> VisualAttributes
74a57fcd 7052
41e2b43e
RD
7053 Get the default attributes for an instance of this class. This is
7054 useful if you want to use the same font or colour in your own control
7055 as in a standard control -- which is a much better idea than hard
7056 coding specific colours or fonts which might look completely out of
db3e571a 7057 place on the user's system, especially if it uses themes.
74a57fcd 7058 """
54f9ee45 7059 return _core_.Window_GetDefaultAttributes(*args, **kwargs)
74a57fcd
RD
7060
7061 def GetClassDefaultAttributes(*args, **kwargs):
7062 """
66c033b4 7063 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
74a57fcd 7064
41e2b43e
RD
7065 Get the default attributes for this class. This is useful if you want
7066 to use the same font or colour in your own control as in a standard
7067 control -- which is a much better idea than hard coding specific
db3e571a
RD
7068 colours or fonts which might look completely out of place on the
7069 user's system, especially if it uses themes.
74a57fcd
RD
7070
7071 The variant parameter is only relevant under Mac currently and is
41e2b43e 7072 ignore under other platforms. Under Mac, it will change the size of
db3e571a
RD
7073 the returned font. See `wx.Window.SetWindowVariant` for more about
7074 this.
74a57fcd 7075 """
54f9ee45 7076 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd
RD
7077
7078 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
e811c8ce 7079 def SetBackgroundColour(*args, **kwargs):
15afbcd0 7080 """
a95a7133 7081 SetBackgroundColour(self, Colour colour) -> bool
15afbcd0
RD
7082
7083 Sets the background colour of the window. Returns True if the colour
7084 was changed. The background colour is usually painted by the default
7085 EVT_ERASE_BACKGROUND event handler function under Windows and
f8167d6e
RD
7086 automatically under GTK. Using `wx.NullColour` will reset the window
7087 to the default background colour.
15afbcd0 7088
db3e571a 7089 Note that setting the background colour may not cause an immediate
f8167d6e 7090 refresh, so you may wish to call `ClearBackground` or `Refresh` after
15afbcd0
RD
7091 calling this function.
7092
f8167d6e
RD
7093 Using this function will disable attempts to use themes for this
7094 window, if the system supports them. Use with care since usually the
7095 themes represent the appearance chosen by the user to be used for all
7096 applications on the system.
15afbcd0 7097 """
54f9ee45 7098 return _core_.Window_SetBackgroundColour(*args, **kwargs)
e811c8ce 7099
412d302d
RD
7100 def SetOwnBackgroundColour(*args, **kwargs):
7101 """SetOwnBackgroundColour(self, Colour colour)"""
7102 return _core_.Window_SetOwnBackgroundColour(*args, **kwargs)
b2df227b 7103
e811c8ce 7104 def SetForegroundColour(*args, **kwargs):
15afbcd0 7105 """
a95a7133 7106 SetForegroundColour(self, Colour colour) -> bool
15afbcd0
RD
7107
7108 Sets the foreground colour of the window. Returns True is the colour
7109 was changed. The interpretation of foreground colour is dependent on
7110 the window class; it may be the text colour or other colour, or it may
7111 not be used at all.
7112 """
54f9ee45 7113 return _core_.Window_SetForegroundColour(*args, **kwargs)
e811c8ce 7114
fa47d7a7
VS
7115 def SetOwnForegroundColour(*args, **kwargs):
7116 """SetOwnForegroundColour(self, Colour colour)"""
7117 return _core_.Window_SetOwnForegroundColour(*args, **kwargs)
b2df227b 7118
e811c8ce 7119 def GetBackgroundColour(*args, **kwargs):
15afbcd0 7120 """
a95a7133 7121 GetBackgroundColour(self) -> Colour
15afbcd0
RD
7122
7123 Returns the background colour of the window.
7124 """
54f9ee45 7125 return _core_.Window_GetBackgroundColour(*args, **kwargs)
e811c8ce
RD
7126
7127 def GetForegroundColour(*args, **kwargs):
15afbcd0 7128 """
a95a7133 7129 GetForegroundColour(self) -> Colour
15afbcd0
RD
7130
7131 Returns the foreground colour of the window. The interpretation of
7132 foreground colour is dependent on the window class; it may be the text
7133 colour or other colour, or it may not be used at all.
7134 """
54f9ee45 7135 return _core_.Window_GetForegroundColour(*args, **kwargs)
e811c8ce 7136
7bc1e663
RD
7137 def SetBackgroundStyle(*args, **kwargs):
7138 """
7139 SetBackgroundStyle(self, int style) -> bool
7140
7141 Returns the background style of the window. The background style
7142 indicates how the background of the window is drawn.
7143
7144 ====================== ========================================
7145 wx.BG_STYLE_SYSTEM The background colour or pattern should
7146 be determined by the system
7147 wx.BG_STYLE_COLOUR The background should be a solid colour
7148 wx.BG_STYLE_CUSTOM The background will be implemented by the
7149 application.
7150 ====================== ========================================
7151
7152 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
7153 a custom background, such as a tiled bitmap. Currently the style has
7154 no effect on other platforms.
7155
7156 :see: `GetBackgroundStyle`, `SetBackgroundColour`
7157 """
7158 return _core_.Window_SetBackgroundStyle(*args, **kwargs)
7159
7160 def GetBackgroundStyle(*args, **kwargs):
7161 """
7162 GetBackgroundStyle(self) -> int
7163
7164 Returns the background style of the window.
7165
7166 :see: `SetBackgroundStyle`
7167 """
7168 return _core_.Window_GetBackgroundStyle(*args, **kwargs)
7169
e811c8ce 7170 def SetCursor(*args, **kwargs):
15afbcd0 7171 """
a95a7133 7172 SetCursor(self, Cursor cursor) -> bool
15afbcd0
RD
7173
7174 Sets the window's cursor. Notice that the window cursor also sets it
7175 for the children of the window implicitly.
7176
7177 The cursor may be wx.NullCursor in which case the window cursor will
7178 be reset back to default.
7179 """
54f9ee45 7180 return _core_.Window_SetCursor(*args, **kwargs)
e811c8ce
RD
7181
7182 def GetCursor(*args, **kwargs):
15afbcd0 7183 """
a95a7133 7184 GetCursor(self) -> Cursor
15afbcd0
RD
7185
7186 Return the cursor associated with this window.
7187 """
54f9ee45 7188 return _core_.Window_GetCursor(*args, **kwargs)
e811c8ce
RD
7189
7190 def SetFont(*args, **kwargs):
15afbcd0 7191 """
a95a7133 7192 SetFont(self, Font font) -> bool
15afbcd0
RD
7193
7194 Sets the font for this window.
7195 """
54f9ee45 7196 return _core_.Window_SetFont(*args, **kwargs)
e811c8ce 7197
fa47d7a7
VS
7198 def SetOwnFont(*args, **kwargs):
7199 """SetOwnFont(self, Font font)"""
7200 return _core_.Window_SetOwnFont(*args, **kwargs)
b2df227b 7201
e811c8ce 7202 def GetFont(*args, **kwargs):
15afbcd0 7203 """
a95a7133 7204 GetFont(self) -> Font
15afbcd0 7205
4276dc52 7206 Returns the default font used for this window.
15afbcd0 7207 """
54f9ee45 7208 return _core_.Window_GetFont(*args, **kwargs)
e811c8ce
RD
7209
7210 def SetCaret(*args, **kwargs):
15afbcd0 7211 """
a95a7133 7212 SetCaret(self, Caret caret)
15afbcd0
RD
7213
7214 Sets the caret associated with the window.
7215 """
54f9ee45 7216 return _core_.Window_SetCaret(*args, **kwargs)
e811c8ce
RD
7217
7218 def GetCaret(*args, **kwargs):
15afbcd0 7219 """
a95a7133 7220 GetCaret(self) -> Caret
15afbcd0
RD
7221
7222 Returns the caret associated with the window.
7223 """
54f9ee45 7224 return _core_.Window_GetCaret(*args, **kwargs)
e811c8ce
RD
7225
7226 def GetCharHeight(*args, **kwargs):
15afbcd0 7227 """
a95a7133 7228 GetCharHeight(self) -> int
15afbcd0
RD
7229
7230 Get the (average) character size for the current font.
7231 """
54f9ee45 7232 return _core_.Window_GetCharHeight(*args, **kwargs)
e811c8ce
RD
7233
7234 def GetCharWidth(*args, **kwargs):
15afbcd0 7235 """
a95a7133 7236 GetCharWidth(self) -> int
15afbcd0
RD
7237
7238 Get the (average) character size for the current font.
7239 """
54f9ee45 7240 return _core_.Window_GetCharWidth(*args, **kwargs)
e811c8ce
RD
7241
7242 def GetTextExtent(*args, **kwargs):
fd2dc343
RD
7243 """
7244 GetTextExtent(String string) -> (width, height)
7245
7246 Get the width and height of the text using the current font.
7247 """
54f9ee45 7248 return _core_.Window_GetTextExtent(*args, **kwargs)
e811c8ce
RD
7249
7250 def GetFullTextExtent(*args, **kwargs):
0df68c9f 7251 """
196addbf 7252 GetFullTextExtent(String string, Font font=None) ->
0df68c9f 7253 (width, height, descent, externalLeading)
e811c8ce 7254
15afbcd0
RD
7255 Get the width, height, decent and leading of the text using the
7256 current or specified font.
0df68c9f 7257 """
54f9ee45 7258 return _core_.Window_GetFullTextExtent(*args, **kwargs)
e811c8ce
RD
7259
7260 def ClientToScreenXY(*args, **kwargs):
15afbcd0
RD
7261 """
7262 ClientToScreenXY(int x, int y) -> (x,y)
7263
7264 Converts to screen coordinates from coordinates relative to this window.
7265 """
54f9ee45 7266 return _core_.Window_ClientToScreenXY(*args, **kwargs)
e811c8ce
RD
7267
7268 def ScreenToClientXY(*args, **kwargs):
15afbcd0
RD
7269 """
7270 ScreenToClientXY(int x, int y) -> (x,y)
7271
7272 Converts from screen to client window coordinates.
7273 """
54f9ee45 7274 return _core_.Window_ScreenToClientXY(*args, **kwargs)
e811c8ce
RD
7275
7276 def ClientToScreen(*args, **kwargs):
15afbcd0 7277 """
a95a7133 7278 ClientToScreen(self, Point pt) -> Point
15afbcd0
RD
7279
7280 Converts to screen coordinates from coordinates relative to this window.
7281 """
54f9ee45 7282 return _core_.Window_ClientToScreen(*args, **kwargs)
e811c8ce
RD
7283
7284 def ScreenToClient(*args, **kwargs):
15afbcd0 7285 """
a95a7133 7286 ScreenToClient(self, Point pt) -> Point
15afbcd0
RD
7287
7288 Converts from screen to client window coordinates.
7289 """
54f9ee45 7290 return _core_.Window_ScreenToClient(*args, **kwargs)
e811c8ce
RD
7291
7292 def HitTestXY(*args, **kwargs):
15afbcd0 7293 """
a95a7133 7294 HitTestXY(self, int x, int y) -> int
15afbcd0
RD
7295
7296 Test where the given (in client coords) point lies
7297 """
54f9ee45 7298 return _core_.Window_HitTestXY(*args, **kwargs)
e811c8ce
RD
7299
7300 def HitTest(*args, **kwargs):
15afbcd0 7301 """
a95a7133 7302 HitTest(self, Point pt) -> int
15afbcd0
RD
7303
7304 Test where the given (in client coords) point lies
7305 """
54f9ee45 7306 return _core_.Window_HitTest(*args, **kwargs)
e811c8ce 7307
15afbcd0
RD
7308 def GetBorder(*args):
7309 """
a95a7133
RD
7310 GetBorder(self, long flags) -> int
7311 GetBorder(self) -> int
e811c8ce 7312
15afbcd0
RD
7313 Get border for the flags of this window
7314 """
54f9ee45 7315 return _core_.Window_GetBorder(*args)
e811c8ce
RD
7316
7317 def UpdateWindowUI(*args, **kwargs):
15afbcd0 7318 """
a95a7133 7319 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
15afbcd0
RD
7320
7321 This function sends EVT_UPDATE_UI events to the window. The particular
7322 implementation depends on the window; for example a wx.ToolBar will
7323 send an update UI event for each toolbar button, and a wx.Frame will
7324 send an update UI event for each menubar menu item. You can call this
7325 function from your application to ensure that your UI is up-to-date at
7326 a particular point in time (as far as your EVT_UPDATE_UI handlers are
7327 concerned). This may be necessary if you have called
7328 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
7329 limit the overhead that wxWindows incurs by sending update UI events
7330 in idle time.
15afbcd0 7331 """
54f9ee45 7332 return _core_.Window_UpdateWindowUI(*args, **kwargs)
e811c8ce
RD
7333
7334 def PopupMenuXY(*args, **kwargs):
15afbcd0 7335 """
b0503257 7336 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
15afbcd0 7337
b0503257
RD
7338 Pops up the given menu at the specified coordinates, relative to this window,
7339 and returns control when the user has dismissed the menu. If a menu item is
7340 selected, the corresponding menu event is generated and will be processed as
7341 usual. If the default position is given then the current position of the
7342 mouse cursor will be used.
15afbcd0 7343 """
54f9ee45 7344 return _core_.Window_PopupMenuXY(*args, **kwargs)
e811c8ce 7345
15afbcd0
RD
7346 def PopupMenu(*args, **kwargs):
7347 """
b0503257 7348 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
15afbcd0 7349
b0503257
RD
7350 Pops up the given menu at the specified coordinates, relative to this window,
7351 and returns control when the user has dismissed the menu. If a menu item is
7352 selected, the corresponding menu event is generated and will be processed as
7353 usual. If the default position is given then the current position of the
7354 mouse cursor will be used.
15afbcd0 7355 """
54f9ee45 7356 return _core_.Window_PopupMenu(*args, **kwargs)
15afbcd0
RD
7357
7358 def GetHandle(*args, **kwargs):
7359 """
a95a7133 7360 GetHandle(self) -> long
15afbcd0
RD
7361
7362 Returns the platform-specific handle (as a long integer) of the
7363 physical window. Currently on wxMac it returns the handle of the
7364 toplevel parent of the window.
7365 """
54f9ee45 7366 return _core_.Window_GetHandle(*args, **kwargs)
15afbcd0 7367
7e63a440
RD
7368 def AssociateHandle(*args, **kwargs):
7369 """
7370 AssociateHandle(self, long handle)
7371
7372 Associate the window with a new native handle
7373 """
7374 return _core_.Window_AssociateHandle(*args, **kwargs)
7375
7376 def DissociateHandle(*args, **kwargs):
7377 """
7378 DissociateHandle(self)
7379
7380 Dissociate the current native handle from the window
7381 """
7382 return _core_.Window_DissociateHandle(*args, **kwargs)
7383
15afbcd0
RD
7384 def HasScrollbar(*args, **kwargs):
7385 """
a95a7133 7386 HasScrollbar(self, int orient) -> bool
15afbcd0
RD
7387
7388 Does the window have the scrollbar for this orientation?
7389 """
54f9ee45 7390 return _core_.Window_HasScrollbar(*args, **kwargs)
15afbcd0
RD
7391
7392 def SetScrollbar(*args, **kwargs):
7393 """
41e2b43e 7394 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
15afbcd0
RD
7395 bool refresh=True)
7396
7397 Sets the scrollbar properties of a built-in scrollbar.
15afbcd0 7398 """
54f9ee45 7399 return _core_.Window_SetScrollbar(*args, **kwargs)
e811c8ce
RD
7400
7401 def SetScrollPos(*args, **kwargs):
15afbcd0 7402 """
a95a7133 7403 SetScrollPos(self, int orientation, int pos, bool refresh=True)
15afbcd0
RD
7404
7405 Sets the position of one of the built-in scrollbars.
7406 """
54f9ee45 7407 return _core_.Window_SetScrollPos(*args, **kwargs)
e811c8ce
RD
7408
7409 def GetScrollPos(*args, **kwargs):
15afbcd0 7410 """
a95a7133 7411 GetScrollPos(self, int orientation) -> int
15afbcd0
RD
7412
7413 Returns the built-in scrollbar position.
7414 """
54f9ee45 7415 return _core_.Window_GetScrollPos(*args, **kwargs)
e811c8ce
RD
7416
7417 def GetScrollThumb(*args, **kwargs):
15afbcd0 7418 """
a95a7133 7419 GetScrollThumb(self, int orientation) -> int
15afbcd0
RD
7420
7421 Returns the built-in scrollbar thumb size.
7422 """
54f9ee45 7423 return _core_.Window_GetScrollThumb(*args, **kwargs)
e811c8ce
RD
7424
7425 def GetScrollRange(*args, **kwargs):
15afbcd0 7426 """
a95a7133 7427 GetScrollRange(self, int orientation) -> int
15afbcd0
RD
7428
7429 Returns the built-in scrollbar range.
7430 """
54f9ee45 7431 return _core_.Window_GetScrollRange(*args, **kwargs)
e811c8ce
RD
7432
7433 def ScrollWindow(*args, **kwargs):
15afbcd0 7434 """
a95a7133 7435 ScrollWindow(self, int dx, int dy, Rect rect=None)
15afbcd0
RD
7436
7437 Physically scrolls the pixels in the window and move child windows
7438 accordingly. Use this function to optimise your scrolling
7439 implementations, to minimise the area that must be redrawn. Note that
7440 it is rarely required to call this function from a user program.
15afbcd0 7441 """
54f9ee45 7442 return _core_.Window_ScrollWindow(*args, **kwargs)
e811c8ce
RD
7443
7444 def ScrollLines(*args, **kwargs):
15afbcd0 7445 """
a95a7133 7446 ScrollLines(self, int lines) -> bool
15afbcd0
RD
7447
7448 If the platform and window class supports it, scrolls the window by
7449 the given number of lines down, if lines is positive, or up if lines
7450 is negative. Returns True if the window was scrolled, False if it was
7451 already on top/bottom and nothing was done.
7452 """
54f9ee45 7453 return _core_.Window_ScrollLines(*args, **kwargs)
e811c8ce
RD
7454
7455 def ScrollPages(*args, **kwargs):
15afbcd0 7456 """
a95a7133 7457 ScrollPages(self, int pages) -> bool
15afbcd0 7458
41e2b43e 7459 If the platform and window class supports it, scrolls the window by
15afbcd0
RD
7460 the given number of pages down, if pages is positive, or up if pages
7461 is negative. Returns True if the window was scrolled, False if it was
7462 already on top/bottom and nothing was done.
7463 """
54f9ee45 7464 return _core_.Window_ScrollPages(*args, **kwargs)
e811c8ce
RD
7465
7466 def LineUp(*args, **kwargs):
15afbcd0 7467 """
a95a7133 7468 LineUp(self) -> bool
15afbcd0
RD
7469
7470 This is just a wrapper for ScrollLines(-1).
7471 """
54f9ee45 7472 return _core_.Window_LineUp(*args, **kwargs)
e811c8ce
RD
7473
7474 def LineDown(*args, **kwargs):
15afbcd0 7475 """
a95a7133 7476 LineDown(self) -> bool
15afbcd0
RD
7477
7478 This is just a wrapper for ScrollLines(1).
7479 """
54f9ee45 7480 return _core_.Window_LineDown(*args, **kwargs)
e811c8ce
RD
7481
7482 def PageUp(*args, **kwargs):
15afbcd0 7483 """
a95a7133 7484 PageUp(self) -> bool
15afbcd0
RD
7485
7486 This is just a wrapper for ScrollPages(-1).
7487 """
54f9ee45 7488 return _core_.Window_PageUp(*args, **kwargs)
e811c8ce
RD
7489
7490 def PageDown(*args, **kwargs):
15afbcd0 7491 """
a95a7133 7492 PageDown(self) -> bool
15afbcd0
RD
7493
7494 This is just a wrapper for ScrollPages(1).
7495 """
54f9ee45 7496 return _core_.Window_PageDown(*args, **kwargs)
e811c8ce
RD
7497
7498 def SetHelpText(*args, **kwargs):
15afbcd0 7499 """
a95a7133 7500 SetHelpText(self, String text)
15afbcd0
RD
7501
7502 Sets the help text to be used as context-sensitive help for this
7503 window. Note that the text is actually stored by the current
7504 wxHelpProvider implementation, and not in the window object itself.
7505 """
54f9ee45 7506 return _core_.Window_SetHelpText(*args, **kwargs)
e811c8ce
RD
7507
7508 def SetHelpTextForId(*args, **kwargs):
15afbcd0 7509 """
a95a7133 7510 SetHelpTextForId(self, String text)
15afbcd0
RD
7511
7512 Associate this help text with all windows with the same id as this
7513 one.
7514 """
54f9ee45 7515 return _core_.Window_SetHelpTextForId(*args, **kwargs)
e811c8ce
RD
7516
7517 def GetHelpText(*args, **kwargs):
15afbcd0 7518 """
a95a7133 7519 GetHelpText(self) -> String
15afbcd0
RD
7520
7521 Gets the help text to be used as context-sensitive help for this
7522 window. Note that the text is actually stored by the current
7523 wxHelpProvider implementation, and not in the window object itself.
7524 """
54f9ee45 7525 return _core_.Window_GetHelpText(*args, **kwargs)
e811c8ce
RD
7526
7527 def SetToolTipString(*args, **kwargs):
15afbcd0 7528 """
a95a7133 7529 SetToolTipString(self, String tip)
15afbcd0
RD
7530
7531 Attach a tooltip to the window.
7532 """
54f9ee45 7533 return _core_.Window_SetToolTipString(*args, **kwargs)
e811c8ce
RD
7534
7535 def SetToolTip(*args, **kwargs):
15afbcd0 7536 """
a95a7133 7537 SetToolTip(self, ToolTip tip)
15afbcd0
RD
7538
7539 Attach a tooltip to the window.
7540 """
54f9ee45 7541 return _core_.Window_SetToolTip(*args, **kwargs)
e811c8ce
RD
7542
7543 def GetToolTip(*args, **kwargs):
15afbcd0 7544 """
a95a7133 7545 GetToolTip(self) -> ToolTip
15afbcd0
RD
7546
7547 get the associated tooltip or None if none
7548 """
54f9ee45 7549 return _core_.Window_GetToolTip(*args, **kwargs)
e811c8ce
RD
7550
7551 def SetDropTarget(*args, **kwargs):
15afbcd0 7552 """
a95a7133 7553 SetDropTarget(self, DropTarget dropTarget)
15afbcd0
RD
7554
7555 Associates a drop target with this window. If the window already has
7556 a drop target, it is deleted.
7557 """
54f9ee45 7558 return _core_.Window_SetDropTarget(*args, **kwargs)
e811c8ce
RD
7559
7560 def GetDropTarget(*args, **kwargs):
15afbcd0 7561 """
a95a7133 7562 GetDropTarget(self) -> DropTarget
15afbcd0
RD
7563
7564 Returns the associated drop target, which may be None.
7565 """
54f9ee45 7566 return _core_.Window_GetDropTarget(*args, **kwargs)
e811c8ce
RD
7567
7568 def SetConstraints(*args, **kwargs):
15afbcd0 7569 """
a95a7133 7570 SetConstraints(self, LayoutConstraints constraints)
15afbcd0
RD
7571
7572 Sets the window to have the given layout constraints. If an existing
7573 layout constraints object is already owned by the window, it will be
7574 deleted. Pass None to disassociate and delete the window's current
7575 constraints.
7576
7577 You must call SetAutoLayout to tell a window to use the constraints
7578 automatically in its default EVT_SIZE handler; otherwise, you must
7579 handle EVT_SIZE yourself and call Layout() explicitly. When setting
7580 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
7581 effect.
7582 """
54f9ee45 7583 return _core_.Window_SetConstraints(*args, **kwargs)
e811c8ce
RD
7584
7585 def GetConstraints(*args, **kwargs):
15afbcd0 7586 """
a95a7133 7587 GetConstraints(self) -> LayoutConstraints
15afbcd0
RD
7588
7589 Returns a pointer to the window's layout constraints, or None if there
7590 are none.
7591 """
54f9ee45 7592 return _core_.Window_GetConstraints(*args, **kwargs)
e811c8ce
RD
7593
7594 def SetAutoLayout(*args, **kwargs):
15afbcd0 7595 """
a95a7133 7596 SetAutoLayout(self, bool autoLayout)
15afbcd0
RD
7597
7598 Determines whether the Layout function will be called automatically
7599 when the window is resized. It is called implicitly by SetSizer but
7600 if you use SetConstraints you should call it manually or otherwise the
7601 window layout won't be correctly updated when its size changes.
7602 """
54f9ee45 7603 return _core_.Window_SetAutoLayout(*args, **kwargs)
e811c8ce
RD
7604
7605 def GetAutoLayout(*args, **kwargs):
15afbcd0 7606 """
a95a7133 7607 GetAutoLayout(self) -> bool
15afbcd0
RD
7608
7609 Returns the current autoLayout setting
7610 """
54f9ee45 7611 return _core_.Window_GetAutoLayout(*args, **kwargs)
e811c8ce
RD
7612
7613 def Layout(*args, **kwargs):
15afbcd0 7614 """
a95a7133 7615 Layout(self) -> bool
15afbcd0
RD
7616
7617 Invokes the constraint-based layout algorithm or the sizer-based
7618 algorithm for this window. See SetAutoLayout: when auto layout is on,
7619 this function gets called automatically by the default EVT_SIZE
7620 handler when the window is resized.
7621 """
54f9ee45 7622 return _core_.Window_Layout(*args, **kwargs)
e811c8ce
RD
7623
7624 def SetSizer(*args, **kwargs):
15afbcd0 7625 """
a95a7133 7626 SetSizer(self, Sizer sizer, bool deleteOld=True)
15afbcd0
RD
7627
7628 Sets the window to have the given layout sizer. The window will then
7629 own the object, and will take care of its deletion. If an existing
7630 layout sizer object is already owned by the window, it will be deleted
7631 if the deleteOld parameter is true. Note that this function will also
7632 call SetAutoLayout implicitly with a True parameter if the sizer is
ae8162c8 7633 non-None, and False otherwise.
15afbcd0 7634 """
54f9ee45 7635 return _core_.Window_SetSizer(*args, **kwargs)
e811c8ce
RD
7636
7637 def SetSizerAndFit(*args, **kwargs):
15afbcd0 7638 """
a95a7133 7639 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
15afbcd0
RD
7640
7641 The same as SetSizer, except it also sets the size hints for the
7642 window based on the sizer's minimum size.
7643 """
54f9ee45 7644 return _core_.Window_SetSizerAndFit(*args, **kwargs)
e811c8ce
RD
7645
7646 def GetSizer(*args, **kwargs):
15afbcd0 7647 """
a95a7133 7648 GetSizer(self) -> Sizer
15afbcd0
RD
7649
7650 Return the sizer associated with the window by a previous call to
7651 SetSizer or None if there isn't one.
7652 """
54f9ee45 7653 return _core_.Window_GetSizer(*args, **kwargs)
e811c8ce
RD
7654
7655 def SetContainingSizer(*args, **kwargs):
15afbcd0 7656 """
a95a7133 7657 SetContainingSizer(self, Sizer sizer)
15afbcd0
RD
7658
7659 This normally does not need to be called by application code. It is
7660 called internally when a window is added to a sizer, and is used so
7661 the window can remove itself from the sizer when it is destroyed.
7662 """
54f9ee45 7663 return _core_.Window_SetContainingSizer(*args, **kwargs)
e811c8ce
RD
7664
7665 def GetContainingSizer(*args, **kwargs):
15afbcd0 7666 """
a95a7133 7667 GetContainingSizer(self) -> Sizer
15afbcd0
RD
7668
7669 Return the sizer that this window is a member of, if any, otherwise None.
7670 """
54f9ee45 7671 return _core_.Window_GetContainingSizer(*args, **kwargs)
e811c8ce 7672
a95a7133
RD
7673 def InheritAttributes(*args, **kwargs):
7674 """
7675 InheritAttributes(self)
7676
41e2b43e
RD
7677 This function is (or should be, in case of custom controls) called
7678 during window creation to intelligently set up the window visual
7679 attributes, that is the font and the foreground and background
7680 colours.
7681
7682 By 'intelligently' the following is meant: by default, all windows use
7683 their own default attributes. However if some of the parent's
7684 attributes are explicitly changed (that is, using SetFont and not
fa47d7a7 7685 SetOwnFont) and if the corresponding attribute hadn't been
41e2b43e
RD
7686 explicitly set for this window itself, then this window takes the same
7687 value as used by the parent. In addition, if the window overrides
7688 ShouldInheritColours to return false, the colours will not be changed
7689 no matter what and only the font might.
7690
34621cc5 7691 This rather complicated logic is necessary in order to accommodate the
ec9b55ca 7692 different usage scenarios. The most common one is when all default
41e2b43e
RD
7693 attributes are used and in this case, nothing should be inherited as
7694 in modern GUIs different controls use different fonts (and colours)
7695 than their siblings so they can't inherit the same value from the
7696 parent. However it was also deemed desirable to allow to simply change
7697 the attributes of all children at once by just changing the font or
7698 colour of their common parent, hence in this case we do inherit the
7699 parents attributes.
7700
a95a7133 7701 """
54f9ee45 7702 return _core_.Window_InheritAttributes(*args, **kwargs)
a95a7133
RD
7703
7704 def ShouldInheritColours(*args, **kwargs):
7705 """
7706 ShouldInheritColours(self) -> bool
7707
7708 Return true from here to allow the colours of this window to be
41e2b43e
RD
7709 changed by InheritAttributes, returning false forbids inheriting them
7710 from the parent window.
a95a7133 7711
41e2b43e
RD
7712 The base class version returns false, but this method is overridden in
7713 wxControl where it returns true.
a95a7133 7714 """
54f9ee45 7715 return _core_.Window_ShouldInheritColours(*args, **kwargs)
a95a7133 7716
e811c8ce 7717 def PostCreate(self, pre):
15afbcd0
RD
7718 """
7719 Phase 3 of the 2-phase create <wink!>
7720 Call this method after precreating the window with the 2-phase create method.
7721 """
e811c8ce
RD
7722 self.this = pre.this
7723 self.thisown = pre.thisown
7724 pre.thisown = 0
7725 if hasattr(self, '_setOORInfo'):
7726 self._setOORInfo(self)
7727 if hasattr(self, '_setCallbackInfo'):
7728 self._setCallbackInfo(self, self.__class__)
7729
7730
7731class WindowPtr(Window):
7732 def __init__(self, this):
7733 self.this = this
7734 if not hasattr(self,"thisown"): self.thisown = 0
7735 self.__class__ = Window
54f9ee45 7736_core_.Window_swigregister(WindowPtr)
e811c8ce
RD
7737
7738def PreWindow(*args, **kwargs):
15afbcd0
RD
7739 """
7740 PreWindow() -> Window
7741
7742 Precreate a Window for 2-phase creation.
7743 """
54f9ee45 7744 val = _core_.new_PreWindow(*args, **kwargs)
e811c8ce
RD
7745 val.thisown = 1
7746 return val
7747
7748def Window_NewControlId(*args, **kwargs):
15afbcd0
RD
7749 """
7750 Window_NewControlId() -> int
7751
7752 Generate a control id for the controls which were not given one.
7753 """
54f9ee45 7754 return _core_.Window_NewControlId(*args, **kwargs)
e811c8ce
RD
7755
7756def Window_NextControlId(*args, **kwargs):
15afbcd0
RD
7757 """
7758 Window_NextControlId(int winid) -> int
7759
7760 Get the id of the control following the one with the given
41e2b43e 7761 autogenerated) id
15afbcd0 7762 """
54f9ee45 7763 return _core_.Window_NextControlId(*args, **kwargs)
e811c8ce
RD
7764
7765def Window_PrevControlId(*args, **kwargs):
15afbcd0
RD
7766 """
7767 Window_PrevControlId(int winid) -> int
7768
7769 Get the id of the control preceding the one with the given
41e2b43e 7770 autogenerated) id
15afbcd0 7771 """
54f9ee45 7772 return _core_.Window_PrevControlId(*args, **kwargs)
e811c8ce
RD
7773
7774def Window_FindFocus(*args, **kwargs):
15afbcd0
RD
7775 """
7776 Window_FindFocus() -> Window
7777
7778 Returns the window or control that currently has the keyboard focus,
7779 or None.
7780 """
54f9ee45 7781 return _core_.Window_FindFocus(*args, **kwargs)
e811c8ce
RD
7782
7783def Window_GetCapture(*args, **kwargs):
15afbcd0
RD
7784 """
7785 Window_GetCapture() -> Window
7786
7787 Returns the window which currently captures the mouse or None
7788 """
54f9ee45 7789 return _core_.Window_GetCapture(*args, **kwargs)
e811c8ce 7790
74a57fcd
RD
7791def Window_GetClassDefaultAttributes(*args, **kwargs):
7792 """
7793 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7794
41e2b43e
RD
7795 Get the default attributes for this class. This is useful if you want
7796 to use the same font or colour in your own control as in a standard
7797 control -- which is a much better idea than hard coding specific
db3e571a
RD
7798 colours or fonts which might look completely out of place on the
7799 user's system, especially if it uses themes.
74a57fcd
RD
7800
7801 The variant parameter is only relevant under Mac currently and is
41e2b43e 7802 ignore under other platforms. Under Mac, it will change the size of
db3e571a
RD
7803 the returned font. See `wx.Window.SetWindowVariant` for more about
7804 this.
74a57fcd 7805 """
54f9ee45 7806 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd 7807
e811c8ce 7808def DLG_PNT(win, point_or_x, y=None):
15afbcd0
RD
7809 """
7810 Convenience function for converting a Point or (x,y) in
7811 dialog units to pixel units.
7812 """
e811c8ce
RD
7813 if y is None:
7814 return win.ConvertDialogPointToPixels(point_or_x)
7815 else:
fd3f2efe 7816 return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
e811c8ce
RD
7817
7818def DLG_SZE(win, size_width, height=None):
15afbcd0
RD
7819 """
7820 Convenience function for converting a Size or (w,h) in
7821 dialog units to pixel units.
7822 """
e811c8ce
RD
7823 if height is None:
7824 return win.ConvertDialogSizeToPixels(size_width)
7825 else:
fd3f2efe 7826 return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
e811c8ce
RD
7827
7828
7829def FindWindowById(*args, **kwargs):
15afbcd0
RD
7830 """
7831 FindWindowById(long id, Window parent=None) -> Window
7832
7833 Find the first window in the application with the given id. If parent
7834 is None, the search will start from all top-level frames and dialog
7835 boxes; if non-None, the search will be limited to the given window
7836 hierarchy. The search is recursive in both cases.
7837 """
54f9ee45 7838 return _core_.FindWindowById(*args, **kwargs)
e811c8ce
RD
7839
7840def FindWindowByName(*args, **kwargs):
15afbcd0
RD
7841 """
7842 FindWindowByName(String name, Window parent=None) -> Window
7843
7844 Find a window by its name (as given in a window constructor or Create
7845 function call). If parent is None, the search will start from all
7846 top-level frames and dialog boxes; if non-None, the search will be
7847 limited to the given window hierarchy. The search is recursive in both
7848 cases.
7849
7850 If no window with such name is found, wx.FindWindowByLabel is called.
7851 """
54f9ee45 7852 return _core_.FindWindowByName(*args, **kwargs)
e811c8ce
RD
7853
7854def FindWindowByLabel(*args, **kwargs):
15afbcd0
RD
7855 """
7856 FindWindowByLabel(String label, Window parent=None) -> Window
7857
7858 Find a window by its label. Depending on the type of window, the label
7859 may be a window title or panel item label. If parent is None, the
7860 search will start from all top-level frames and dialog boxes; if
7861 non-None, the search will be limited to the given window
7862 hierarchy. The search is recursive in both cases.
7863 """
54f9ee45 7864 return _core_.FindWindowByLabel(*args, **kwargs)
e811c8ce
RD
7865
7866def Window_FromHWND(*args, **kwargs):
4276dc52 7867 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
54f9ee45 7868 return _core_.Window_FromHWND(*args, **kwargs)
e811c8ce
RD
7869#---------------------------------------------------------------------------
7870
7871class Validator(EvtHandler):
e811c8ce
RD
7872 def __repr__(self):
7873 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
7874 def __init__(self, *args, **kwargs):
a95a7133 7875 """__init__(self) -> Validator"""
54f9ee45 7876 newobj = _core_.new_Validator(*args, **kwargs)
d14a1e28
RD
7877 self.this = newobj.this
7878 self.thisown = 1
7879 del newobj.thisown
7880 self._setOORInfo(self)
e811c8ce
RD
7881
7882 def Clone(*args, **kwargs):
a95a7133 7883 """Clone(self) -> Validator"""
54f9ee45 7884 return _core_.Validator_Clone(*args, **kwargs)
e811c8ce
RD
7885
7886 def Validate(*args, **kwargs):
a95a7133 7887 """Validate(self, Window parent) -> bool"""
54f9ee45 7888 return _core_.Validator_Validate(*args, **kwargs)
e811c8ce
RD
7889
7890 def TransferToWindow(*args, **kwargs):
a95a7133 7891 """TransferToWindow(self) -> bool"""
54f9ee45 7892 return _core_.Validator_TransferToWindow(*args, **kwargs)
e811c8ce
RD
7893
7894 def TransferFromWindow(*args, **kwargs):
a95a7133 7895 """TransferFromWindow(self) -> bool"""
54f9ee45 7896 return _core_.Validator_TransferFromWindow(*args, **kwargs)
e811c8ce
RD
7897
7898 def GetWindow(*args, **kwargs):
a95a7133 7899 """GetWindow(self) -> Window"""
54f9ee45 7900 return _core_.Validator_GetWindow(*args, **kwargs)
e811c8ce
RD
7901
7902 def SetWindow(*args, **kwargs):
a95a7133 7903 """SetWindow(self, Window window)"""
54f9ee45 7904 return _core_.Validator_SetWindow(*args, **kwargs)
e811c8ce
RD
7905
7906 def IsSilent(*args, **kwargs):
66c033b4 7907 """IsSilent() -> bool"""
54f9ee45 7908 return _core_.Validator_IsSilent(*args, **kwargs)
e811c8ce
RD
7909
7910 IsSilent = staticmethod(IsSilent)
7911 def SetBellOnError(*args, **kwargs):
66c033b4 7912 """SetBellOnError(int doIt=True)"""
54f9ee45 7913 return _core_.Validator_SetBellOnError(*args, **kwargs)
e811c8ce
RD
7914
7915 SetBellOnError = staticmethod(SetBellOnError)
7916
7917class ValidatorPtr(Validator):
7918 def __init__(self, this):
7919 self.this = this
7920 if not hasattr(self,"thisown"): self.thisown = 0
7921 self.__class__ = Validator
54f9ee45 7922_core_.Validator_swigregister(ValidatorPtr)
e811c8ce
RD
7923
7924def Validator_IsSilent(*args, **kwargs):
7925 """Validator_IsSilent() -> bool"""
54f9ee45 7926 return _core_.Validator_IsSilent(*args, **kwargs)
e811c8ce
RD
7927
7928def Validator_SetBellOnError(*args, **kwargs):
7929 """Validator_SetBellOnError(int doIt=True)"""
54f9ee45 7930 return _core_.Validator_SetBellOnError(*args, **kwargs)
e811c8ce
RD
7931
7932class PyValidator(Validator):
e811c8ce
RD
7933 def __repr__(self):
7934 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
7935 def __init__(self, *args, **kwargs):
a95a7133 7936 """__init__(self) -> PyValidator"""
54f9ee45 7937 newobj = _core_.new_PyValidator(*args, **kwargs)
e811c8ce
RD
7938 self.this = newobj.this
7939 self.thisown = 1
7940 del newobj.thisown
7941
7942 self._setCallbackInfo(self, PyValidator, 1)
7943 self._setOORInfo(self)
7944
7945 def _setCallbackInfo(*args, **kwargs):
a95a7133 7946 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
54f9ee45 7947 return _core_.PyValidator__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
7948
7949
7950class PyValidatorPtr(PyValidator):
7951 def __init__(self, this):
7952 self.this = this
7953 if not hasattr(self,"thisown"): self.thisown = 0
7954 self.__class__ = PyValidator
54f9ee45 7955_core_.PyValidator_swigregister(PyValidatorPtr)
e811c8ce
RD
7956
7957#---------------------------------------------------------------------------
7958
7959class Menu(EvtHandler):
d14a1e28
RD
7960 def __repr__(self):
7961 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 7962 def __init__(self, *args, **kwargs):
a95a7133 7963 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
54f9ee45 7964 newobj = _core_.new_Menu(*args, **kwargs)
e811c8ce
RD
7965 self.this = newobj.this
7966 self.thisown = 1
7967 del newobj.thisown
7968 self._setOORInfo(self)
7969
7970 def Append(*args, **kwargs):
a95a7133 7971 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
54f9ee45 7972 return _core_.Menu_Append(*args, **kwargs)
e811c8ce
RD
7973
7974 def AppendSeparator(*args, **kwargs):
a95a7133 7975 """AppendSeparator(self) -> MenuItem"""
54f9ee45 7976 return _core_.Menu_AppendSeparator(*args, **kwargs)
e811c8ce
RD
7977
7978 def AppendCheckItem(*args, **kwargs):
a95a7133 7979 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 7980 return _core_.Menu_AppendCheckItem(*args, **kwargs)
e811c8ce
RD
7981
7982 def AppendRadioItem(*args, **kwargs):
a95a7133 7983 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 7984 return _core_.Menu_AppendRadioItem(*args, **kwargs)
e811c8ce
RD
7985
7986 def AppendMenu(*args, **kwargs):
a95a7133 7987 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
54f9ee45 7988 return _core_.Menu_AppendMenu(*args, **kwargs)
e811c8ce
RD
7989
7990 def AppendItem(*args, **kwargs):
a95a7133 7991 """AppendItem(self, MenuItem item) -> MenuItem"""
54f9ee45 7992 return _core_.Menu_AppendItem(*args, **kwargs)
e811c8ce
RD
7993
7994 def Break(*args, **kwargs):
a95a7133 7995 """Break(self)"""
54f9ee45 7996 return _core_.Menu_Break(*args, **kwargs)
e811c8ce
RD
7997
7998 def InsertItem(*args, **kwargs):
a95a7133 7999 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
54f9ee45 8000 return _core_.Menu_InsertItem(*args, **kwargs)
e811c8ce
RD
8001
8002 def Insert(*args, **kwargs):
0df68c9f 8003 """
a95a7133 8004 Insert(self, size_t pos, int id, String text, String help=EmptyString,
a41e16b6 8005 int kind=ITEM_NORMAL) -> MenuItem
0df68c9f 8006 """
54f9ee45 8007 return _core_.Menu_Insert(*args, **kwargs)
e811c8ce
RD
8008
8009 def InsertSeparator(*args, **kwargs):
a95a7133 8010 """InsertSeparator(self, size_t pos) -> MenuItem"""
54f9ee45 8011 return _core_.Menu_InsertSeparator(*args, **kwargs)
e811c8ce
RD
8012
8013 def InsertCheckItem(*args, **kwargs):
a95a7133 8014 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8015 return _core_.Menu_InsertCheckItem(*args, **kwargs)
e811c8ce
RD
8016
8017 def InsertRadioItem(*args, **kwargs):
a95a7133 8018 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8019 return _core_.Menu_InsertRadioItem(*args, **kwargs)
e811c8ce
RD
8020
8021 def InsertMenu(*args, **kwargs):
a95a7133 8022 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
54f9ee45 8023 return _core_.Menu_InsertMenu(*args, **kwargs)
e811c8ce
RD
8024
8025 def PrependItem(*args, **kwargs):
a95a7133 8026 """PrependItem(self, MenuItem item) -> MenuItem"""
54f9ee45 8027 return _core_.Menu_PrependItem(*args, **kwargs)
e811c8ce
RD
8028
8029 def Prepend(*args, **kwargs):
a95a7133 8030 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
54f9ee45 8031 return _core_.Menu_Prepend(*args, **kwargs)
e811c8ce
RD
8032
8033 def PrependSeparator(*args, **kwargs):
a95a7133 8034 """PrependSeparator(self) -> MenuItem"""
54f9ee45 8035 return _core_.Menu_PrependSeparator(*args, **kwargs)
e811c8ce
RD
8036
8037 def PrependCheckItem(*args, **kwargs):
a95a7133 8038 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8039 return _core_.Menu_PrependCheckItem(*args, **kwargs)
e811c8ce
RD
8040
8041 def PrependRadioItem(*args, **kwargs):
a95a7133 8042 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8043 return _core_.Menu_PrependRadioItem(*args, **kwargs)
e811c8ce
RD
8044
8045 def PrependMenu(*args, **kwargs):
a95a7133 8046 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
54f9ee45 8047 return _core_.Menu_PrependMenu(*args, **kwargs)
e811c8ce
RD
8048
8049 def Remove(*args, **kwargs):
a95a7133 8050 """Remove(self, int id) -> MenuItem"""
54f9ee45 8051 return _core_.Menu_Remove(*args, **kwargs)
e811c8ce
RD
8052
8053 def RemoveItem(*args, **kwargs):
a95a7133 8054 """RemoveItem(self, MenuItem item) -> MenuItem"""
54f9ee45 8055 return _core_.Menu_RemoveItem(*args, **kwargs)
e811c8ce
RD
8056
8057 def Delete(*args, **kwargs):
a95a7133 8058 """Delete(self, int id) -> bool"""
54f9ee45 8059 return _core_.Menu_Delete(*args, **kwargs)
e811c8ce
RD
8060
8061 def DeleteItem(*args, **kwargs):
a95a7133 8062 """DeleteItem(self, MenuItem item) -> bool"""
54f9ee45 8063 return _core_.Menu_DeleteItem(*args, **kwargs)
e811c8ce
RD
8064
8065 def Destroy(*args, **kwargs):
0df68c9f 8066 """
a95a7133 8067 Destroy(self)
e811c8ce 8068
0df68c9f
RD
8069 Deletes the C++ object this Python object is a proxy for.
8070 """
54f9ee45 8071 return _core_.Menu_Destroy(*args, **kwargs)
e811c8ce
RD
8072
8073 def DestroyId(*args, **kwargs):
0df68c9f 8074 """
a95a7133 8075 DestroyId(self, int id) -> bool
e811c8ce 8076
0df68c9f
RD
8077 Deletes the C++ object this Python object is a proxy for.
8078 """
54f9ee45 8079 return _core_.Menu_DestroyId(*args, **kwargs)
e811c8ce
RD
8080
8081 def DestroyItem(*args, **kwargs):
0df68c9f 8082 """
a95a7133 8083 DestroyItem(self, MenuItem item) -> bool
e811c8ce 8084
0df68c9f
RD
8085 Deletes the C++ object this Python object is a proxy for.
8086 """
54f9ee45 8087 return _core_.Menu_DestroyItem(*args, **kwargs)
e811c8ce
RD
8088
8089 def GetMenuItemCount(*args, **kwargs):
a95a7133 8090 """GetMenuItemCount(self) -> size_t"""
54f9ee45 8091 return _core_.Menu_GetMenuItemCount(*args, **kwargs)
e811c8ce
RD
8092
8093 def GetMenuItems(*args, **kwargs):
a95a7133 8094 """GetMenuItems(self) -> PyObject"""
54f9ee45 8095 return _core_.Menu_GetMenuItems(*args, **kwargs)
e811c8ce
RD
8096
8097 def FindItem(*args, **kwargs):
a95a7133 8098 """FindItem(self, String item) -> int"""
54f9ee45 8099 return _core_.Menu_FindItem(*args, **kwargs)
e811c8ce
RD
8100
8101 def FindItemById(*args, **kwargs):
a95a7133 8102 """FindItemById(self, int id) -> MenuItem"""
54f9ee45 8103 return _core_.Menu_FindItemById(*args, **kwargs)
e811c8ce
RD
8104
8105 def FindItemByPosition(*args, **kwargs):
a95a7133 8106 """FindItemByPosition(self, size_t position) -> MenuItem"""
54f9ee45 8107 return _core_.Menu_FindItemByPosition(*args, **kwargs)
e811c8ce
RD
8108
8109 def Enable(*args, **kwargs):
a95a7133 8110 """Enable(self, int id, bool enable)"""
54f9ee45 8111 return _core_.Menu_Enable(*args, **kwargs)
e811c8ce
RD
8112
8113 def IsEnabled(*args, **kwargs):
a95a7133 8114 """IsEnabled(self, int id) -> bool"""
54f9ee45 8115 return _core_.Menu_IsEnabled(*args, **kwargs)
e811c8ce
RD
8116
8117 def Check(*args, **kwargs):
a95a7133 8118 """Check(self, int id, bool check)"""
54f9ee45 8119 return _core_.Menu_Check(*args, **kwargs)
e811c8ce
RD
8120
8121 def IsChecked(*args, **kwargs):
a95a7133 8122 """IsChecked(self, int id) -> bool"""
54f9ee45 8123 return _core_.Menu_IsChecked(*args, **kwargs)
e811c8ce
RD
8124
8125 def SetLabel(*args, **kwargs):
a95a7133 8126 """SetLabel(self, int id, String label)"""
54f9ee45 8127 return _core_.Menu_SetLabel(*args, **kwargs)
e811c8ce
RD
8128
8129 def GetLabel(*args, **kwargs):
a95a7133 8130 """GetLabel(self, int id) -> String"""
54f9ee45 8131 return _core_.Menu_GetLabel(*args, **kwargs)
e811c8ce
RD
8132
8133 def SetHelpString(*args, **kwargs):
a95a7133 8134 """SetHelpString(self, int id, String helpString)"""
54f9ee45 8135 return _core_.Menu_SetHelpString(*args, **kwargs)
e811c8ce
RD
8136
8137 def GetHelpString(*args, **kwargs):
a95a7133 8138 """GetHelpString(self, int id) -> String"""
54f9ee45 8139 return _core_.Menu_GetHelpString(*args, **kwargs)
e811c8ce
RD
8140
8141 def SetTitle(*args, **kwargs):
a95a7133 8142 """SetTitle(self, String title)"""
54f9ee45 8143 return _core_.Menu_SetTitle(*args, **kwargs)
e811c8ce
RD
8144
8145 def GetTitle(*args, **kwargs):
a95a7133 8146 """GetTitle(self) -> String"""
54f9ee45 8147 return _core_.Menu_GetTitle(*args, **kwargs)
e811c8ce
RD
8148
8149 def SetEventHandler(*args, **kwargs):
a95a7133 8150 """SetEventHandler(self, EvtHandler handler)"""
54f9ee45 8151 return _core_.Menu_SetEventHandler(*args, **kwargs)
e811c8ce
RD
8152
8153 def GetEventHandler(*args, **kwargs):
a95a7133 8154 """GetEventHandler(self) -> EvtHandler"""
54f9ee45 8155 return _core_.Menu_GetEventHandler(*args, **kwargs)
e811c8ce
RD
8156
8157 def SetInvokingWindow(*args, **kwargs):
a95a7133 8158 """SetInvokingWindow(self, Window win)"""
54f9ee45 8159 return _core_.Menu_SetInvokingWindow(*args, **kwargs)
e811c8ce
RD
8160
8161 def GetInvokingWindow(*args, **kwargs):
a95a7133 8162 """GetInvokingWindow(self) -> Window"""
54f9ee45 8163 return _core_.Menu_GetInvokingWindow(*args, **kwargs)
e811c8ce
RD
8164
8165 def GetStyle(*args, **kwargs):
a95a7133 8166 """GetStyle(self) -> long"""
54f9ee45 8167 return _core_.Menu_GetStyle(*args, **kwargs)
e811c8ce
RD
8168
8169 def UpdateUI(*args, **kwargs):
a95a7133 8170 """UpdateUI(self, EvtHandler source=None)"""
54f9ee45 8171 return _core_.Menu_UpdateUI(*args, **kwargs)
e811c8ce
RD
8172
8173 def GetMenuBar(*args, **kwargs):
a95a7133 8174 """GetMenuBar(self) -> MenuBar"""
54f9ee45 8175 return _core_.Menu_GetMenuBar(*args, **kwargs)
e811c8ce
RD
8176
8177 def Attach(*args, **kwargs):
a95a7133 8178 """Attach(self, wxMenuBarBase menubar)"""
54f9ee45 8179 return _core_.Menu_Attach(*args, **kwargs)
e811c8ce
RD
8180
8181 def Detach(*args, **kwargs):
a95a7133 8182 """Detach(self)"""
54f9ee45 8183 return _core_.Menu_Detach(*args, **kwargs)
e811c8ce
RD
8184
8185 def IsAttached(*args, **kwargs):
a95a7133 8186 """IsAttached(self) -> bool"""
54f9ee45 8187 return _core_.Menu_IsAttached(*args, **kwargs)
e811c8ce
RD
8188
8189 def SetParent(*args, **kwargs):
a95a7133 8190 """SetParent(self, Menu parent)"""
54f9ee45 8191 return _core_.Menu_SetParent(*args, **kwargs)
e811c8ce
RD
8192
8193 def GetParent(*args, **kwargs):
a95a7133 8194 """GetParent(self) -> Menu"""
54f9ee45 8195 return _core_.Menu_GetParent(*args, **kwargs)
e811c8ce 8196
d14a1e28
RD
8197
8198class MenuPtr(Menu):
8199 def __init__(self, this):
8200 self.this = this
8201 if not hasattr(self,"thisown"): self.thisown = 0
8202 self.__class__ = Menu
54f9ee45 8203_core_.Menu_swigregister(MenuPtr)
d14a1e28
RD
8204DefaultValidator = cvar.DefaultValidator
8205
8206#---------------------------------------------------------------------------
8207
8208class MenuBar(Window):
e811c8ce
RD
8209 def __repr__(self):
8210 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 8211 def __init__(self, *args, **kwargs):
a95a7133 8212 """__init__(self, long style=0) -> MenuBar"""
54f9ee45 8213 newobj = _core_.new_MenuBar(*args, **kwargs)
d14a1e28
RD
8214 self.this = newobj.this
8215 self.thisown = 1
8216 del newobj.thisown
8217 self._setOORInfo(self)
e811c8ce
RD
8218
8219 def Append(*args, **kwargs):
a95a7133 8220 """Append(self, Menu menu, String title) -> bool"""
54f9ee45 8221 return _core_.MenuBar_Append(*args, **kwargs)
e811c8ce
RD
8222
8223 def Insert(*args, **kwargs):
a95a7133 8224 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
54f9ee45 8225 return _core_.MenuBar_Insert(*args, **kwargs)
e811c8ce
RD
8226
8227 def GetMenuCount(*args, **kwargs):
a95a7133 8228 """GetMenuCount(self) -> size_t"""
54f9ee45 8229 return _core_.MenuBar_GetMenuCount(*args, **kwargs)
e811c8ce
RD
8230
8231 def GetMenu(*args, **kwargs):
a95a7133 8232 """GetMenu(self, size_t pos) -> Menu"""
54f9ee45 8233 return _core_.MenuBar_GetMenu(*args, **kwargs)
e811c8ce
RD
8234
8235 def Replace(*args, **kwargs):
a95a7133 8236 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
54f9ee45 8237 return _core_.MenuBar_Replace(*args, **kwargs)
e811c8ce
RD
8238
8239 def Remove(*args, **kwargs):
a95a7133 8240 """Remove(self, size_t pos) -> Menu"""
54f9ee45 8241 return _core_.MenuBar_Remove(*args, **kwargs)
e811c8ce
RD
8242
8243 def EnableTop(*args, **kwargs):
a95a7133 8244 """EnableTop(self, size_t pos, bool enable)"""
54f9ee45 8245 return _core_.MenuBar_EnableTop(*args, **kwargs)
e811c8ce
RD
8246
8247 def IsEnabledTop(*args, **kwargs):
a95a7133 8248 """IsEnabledTop(self, size_t pos) -> bool"""
54f9ee45 8249 return _core_.MenuBar_IsEnabledTop(*args, **kwargs)
e811c8ce
RD
8250
8251 def SetLabelTop(*args, **kwargs):
a95a7133 8252 """SetLabelTop(self, size_t pos, String label)"""
54f9ee45 8253 return _core_.MenuBar_SetLabelTop(*args, **kwargs)
e811c8ce
RD
8254
8255 def GetLabelTop(*args, **kwargs):
a95a7133 8256 """GetLabelTop(self, size_t pos) -> String"""
54f9ee45 8257 return _core_.MenuBar_GetLabelTop(*args, **kwargs)
e811c8ce
RD
8258
8259 def FindMenuItem(*args, **kwargs):
a95a7133 8260 """FindMenuItem(self, String menu, String item) -> int"""
54f9ee45 8261 return _core_.MenuBar_FindMenuItem(*args, **kwargs)
e811c8ce
RD
8262
8263 def FindItemById(*args, **kwargs):
a95a7133 8264 """FindItemById(self, int id) -> MenuItem"""
54f9ee45 8265 return _core_.MenuBar_FindItemById(*args, **kwargs)
e811c8ce
RD
8266
8267 def FindMenu(*args, **kwargs):
a95a7133 8268 """FindMenu(self, String title) -> int"""
54f9ee45 8269 return _core_.MenuBar_FindMenu(*args, **kwargs)
e811c8ce
RD
8270
8271 def Enable(*args, **kwargs):
a95a7133 8272 """Enable(self, int id, bool enable)"""
54f9ee45 8273 return _core_.MenuBar_Enable(*args, **kwargs)
e811c8ce
RD
8274
8275 def Check(*args, **kwargs):
a95a7133 8276 """Check(self, int id, bool check)"""
54f9ee45 8277 return _core_.MenuBar_Check(*args, **kwargs)
e811c8ce
RD
8278
8279 def IsChecked(*args, **kwargs):
a95a7133 8280 """IsChecked(self, int id) -> bool"""
54f9ee45 8281 return _core_.MenuBar_IsChecked(*args, **kwargs)
e811c8ce
RD
8282
8283 def IsEnabled(*args, **kwargs):
a95a7133 8284 """IsEnabled(self, int id) -> bool"""
54f9ee45 8285 return _core_.MenuBar_IsEnabled(*args, **kwargs)
e811c8ce
RD
8286
8287 def SetLabel(*args, **kwargs):
a95a7133 8288 """SetLabel(self, int id, String label)"""
54f9ee45 8289 return _core_.MenuBar_SetLabel(*args, **kwargs)
e811c8ce
RD
8290
8291 def GetLabel(*args, **kwargs):
a95a7133 8292 """GetLabel(self, int id) -> String"""
54f9ee45 8293 return _core_.MenuBar_GetLabel(*args, **kwargs)
e811c8ce
RD
8294
8295 def SetHelpString(*args, **kwargs):
a95a7133 8296 """SetHelpString(self, int id, String helpString)"""
54f9ee45 8297 return _core_.MenuBar_SetHelpString(*args, **kwargs)
e811c8ce
RD
8298
8299 def GetHelpString(*args, **kwargs):
a95a7133 8300 """GetHelpString(self, int id) -> String"""
54f9ee45 8301 return _core_.MenuBar_GetHelpString(*args, **kwargs)
e811c8ce
RD
8302
8303 def GetFrame(*args, **kwargs):
a95a7133 8304 """GetFrame(self) -> wxFrame"""
54f9ee45 8305 return _core_.MenuBar_GetFrame(*args, **kwargs)
e811c8ce
RD
8306
8307 def IsAttached(*args, **kwargs):
a95a7133 8308 """IsAttached(self) -> bool"""
54f9ee45 8309 return _core_.MenuBar_IsAttached(*args, **kwargs)
e811c8ce
RD
8310
8311 def Attach(*args, **kwargs):
a95a7133 8312 """Attach(self, wxFrame frame)"""
54f9ee45 8313 return _core_.MenuBar_Attach(*args, **kwargs)
e811c8ce
RD
8314
8315 def Detach(*args, **kwargs):
a95a7133 8316 """Detach(self)"""
54f9ee45 8317 return _core_.MenuBar_Detach(*args, **kwargs)
e811c8ce 8318
d14a1e28
RD
8319
8320class MenuBarPtr(MenuBar):
8321 def __init__(self, this):
8322 self.this = this
8323 if not hasattr(self,"thisown"): self.thisown = 0
8324 self.__class__ = MenuBar
54f9ee45 8325_core_.MenuBar_swigregister(MenuBarPtr)
d14a1e28
RD
8326
8327#---------------------------------------------------------------------------
8328
8329class MenuItem(Object):
e811c8ce
RD
8330 def __repr__(self):
8331 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 8332 def __init__(self, *args, **kwargs):
0df68c9f 8333 """
a95a7133 8334 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
196addbf
RD
8335 String help=EmptyString, int kind=ITEM_NORMAL,
8336 Menu subMenu=None) -> MenuItem
0df68c9f 8337 """
54f9ee45 8338 newobj = _core_.new_MenuItem(*args, **kwargs)
d14a1e28
RD
8339 self.this = newobj.this
8340 self.thisown = 1
8341 del newobj.thisown
e811c8ce 8342 def GetMenu(*args, **kwargs):
a95a7133 8343 """GetMenu(self) -> Menu"""
54f9ee45 8344 return _core_.MenuItem_GetMenu(*args, **kwargs)
e811c8ce
RD
8345
8346 def SetMenu(*args, **kwargs):
a95a7133 8347 """SetMenu(self, Menu menu)"""
54f9ee45 8348 return _core_.MenuItem_SetMenu(*args, **kwargs)
e811c8ce
RD
8349
8350 def SetId(*args, **kwargs):
a95a7133 8351 """SetId(self, int id)"""
54f9ee45 8352 return _core_.MenuItem_SetId(*args, **kwargs)
e811c8ce
RD
8353
8354 def GetId(*args, **kwargs):
a95a7133 8355 """GetId(self) -> int"""
54f9ee45 8356 return _core_.MenuItem_GetId(*args, **kwargs)
e811c8ce
RD
8357
8358 def IsSeparator(*args, **kwargs):
a95a7133 8359 """IsSeparator(self) -> bool"""
54f9ee45 8360 return _core_.MenuItem_IsSeparator(*args, **kwargs)
e811c8ce
RD
8361
8362 def SetText(*args, **kwargs):
a95a7133 8363 """SetText(self, String str)"""
54f9ee45 8364 return _core_.MenuItem_SetText(*args, **kwargs)
e811c8ce
RD
8365
8366 def GetLabel(*args, **kwargs):
a95a7133 8367 """GetLabel(self) -> String"""
54f9ee45 8368 return _core_.MenuItem_GetLabel(*args, **kwargs)
e811c8ce
RD
8369
8370 def GetText(*args, **kwargs):
a95a7133 8371 """GetText(self) -> String"""
54f9ee45 8372 return _core_.MenuItem_GetText(*args, **kwargs)
e811c8ce
RD
8373
8374 def GetLabelFromText(*args, **kwargs):
66c033b4 8375 """GetLabelFromText(String text) -> String"""
54f9ee45 8376 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
e811c8ce
RD
8377
8378 GetLabelFromText = staticmethod(GetLabelFromText)
8379 def GetKind(*args, **kwargs):
a95a7133 8380 """GetKind(self) -> int"""
54f9ee45 8381 return _core_.MenuItem_GetKind(*args, **kwargs)
e811c8ce 8382
a95a7133
RD
8383 def SetKind(*args, **kwargs):
8384 """SetKind(self, int kind)"""
54f9ee45 8385 return _core_.MenuItem_SetKind(*args, **kwargs)
a95a7133 8386
e811c8ce 8387 def SetCheckable(*args, **kwargs):
a95a7133 8388 """SetCheckable(self, bool checkable)"""
54f9ee45 8389 return _core_.MenuItem_SetCheckable(*args, **kwargs)
e811c8ce
RD
8390
8391 def IsCheckable(*args, **kwargs):
a95a7133 8392 """IsCheckable(self) -> bool"""
54f9ee45 8393 return _core_.MenuItem_IsCheckable(*args, **kwargs)
e811c8ce
RD
8394
8395 def IsSubMenu(*args, **kwargs):
a95a7133 8396 """IsSubMenu(self) -> bool"""
54f9ee45 8397 return _core_.MenuItem_IsSubMenu(*args, **kwargs)
e811c8ce
RD
8398
8399 def SetSubMenu(*args, **kwargs):
a95a7133 8400 """SetSubMenu(self, Menu menu)"""
54f9ee45 8401 return _core_.MenuItem_SetSubMenu(*args, **kwargs)
e811c8ce
RD
8402
8403 def GetSubMenu(*args, **kwargs):
a95a7133 8404 """GetSubMenu(self) -> Menu"""
54f9ee45 8405 return _core_.MenuItem_GetSubMenu(*args, **kwargs)
e811c8ce
RD
8406
8407 def Enable(*args, **kwargs):
a95a7133 8408 """Enable(self, bool enable=True)"""
54f9ee45 8409 return _core_.MenuItem_Enable(*args, **kwargs)
e811c8ce
RD
8410
8411 def IsEnabled(*args, **kwargs):
a95a7133 8412 """IsEnabled(self) -> bool"""
54f9ee45 8413 return _core_.MenuItem_IsEnabled(*args, **kwargs)
e811c8ce
RD
8414
8415 def Check(*args, **kwargs):
a95a7133 8416 """Check(self, bool check=True)"""
54f9ee45 8417 return _core_.MenuItem_Check(*args, **kwargs)
e811c8ce
RD
8418
8419 def IsChecked(*args, **kwargs):
a95a7133 8420 """IsChecked(self) -> bool"""
54f9ee45 8421 return _core_.MenuItem_IsChecked(*args, **kwargs)
e811c8ce
RD
8422
8423 def Toggle(*args, **kwargs):
a95a7133 8424 """Toggle(self)"""
54f9ee45 8425 return _core_.MenuItem_Toggle(*args, **kwargs)
e811c8ce
RD
8426
8427 def SetHelp(*args, **kwargs):
a95a7133 8428 """SetHelp(self, String str)"""
54f9ee45 8429 return _core_.MenuItem_SetHelp(*args, **kwargs)
e811c8ce
RD
8430
8431 def GetHelp(*args, **kwargs):
a95a7133 8432 """GetHelp(self) -> String"""
54f9ee45 8433 return _core_.MenuItem_GetHelp(*args, **kwargs)
e811c8ce
RD
8434
8435 def GetAccel(*args, **kwargs):
a95a7133 8436 """GetAccel(self) -> AcceleratorEntry"""
54f9ee45 8437 return _core_.MenuItem_GetAccel(*args, **kwargs)
e811c8ce
RD
8438
8439 def SetAccel(*args, **kwargs):
a95a7133 8440 """SetAccel(self, AcceleratorEntry accel)"""
54f9ee45 8441 return _core_.MenuItem_SetAccel(*args, **kwargs)
e811c8ce
RD
8442
8443 def GetDefaultMarginWidth(*args, **kwargs):
66c033b4 8444 """GetDefaultMarginWidth() -> int"""
54f9ee45 8445 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
e811c8ce
RD
8446
8447 GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth)
8448 def SetBitmap(*args, **kwargs):
a95a7133 8449 """SetBitmap(self, Bitmap bitmap)"""
54f9ee45 8450 return _core_.MenuItem_SetBitmap(*args, **kwargs)
e811c8ce
RD
8451
8452 def GetBitmap(*args, **kwargs):
a95a7133 8453 """GetBitmap(self) -> Bitmap"""
54f9ee45 8454 return _core_.MenuItem_GetBitmap(*args, **kwargs)
e811c8ce 8455
d14a1e28
RD
8456
8457class MenuItemPtr(MenuItem):
8458 def __init__(self, this):
8459 self.this = this
8460 if not hasattr(self,"thisown"): self.thisown = 0
8461 self.__class__ = MenuItem
54f9ee45 8462_core_.MenuItem_swigregister(MenuItemPtr)
d14a1e28 8463
e811c8ce 8464def MenuItem_GetLabelFromText(*args, **kwargs):
196addbf 8465 """MenuItem_GetLabelFromText(String text) -> String"""
54f9ee45 8466 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
d14a1e28 8467
e811c8ce
RD
8468def MenuItem_GetDefaultMarginWidth(*args, **kwargs):
8469 """MenuItem_GetDefaultMarginWidth() -> int"""
54f9ee45 8470 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
d14a1e28
RD
8471
8472#---------------------------------------------------------------------------
8473
8474class Control(Window):
15afbcd0
RD
8475 """
8476 This is the base class for a control or 'widget'.
8477
41e2b43e
RD
8478 A control is generally a small window which processes user input
8479 and/or displays one or more item of data.
15afbcd0 8480 """
e811c8ce
RD
8481 def __repr__(self):
8482 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 8483 def __init__(self, *args, **kwargs):
0df68c9f 8484 """
248ed943
RD
8485 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
8486 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
b2dc1044 8487 String name=ControlNameStr) -> Control
15afbcd0 8488
41e2b43e
RD
8489 Create a Control. Normally you should only call this from a subclass'
8490 __init__ as a plain old wx.Control is not very useful.
0df68c9f 8491 """
54f9ee45 8492 newobj = _core_.new_Control(*args, **kwargs)
d14a1e28
RD
8493 self.this = newobj.this
8494 self.thisown = 1
8495 del newobj.thisown
8496 self._setOORInfo(self)
e811c8ce
RD
8497
8498 def Create(*args, **kwargs):
0df68c9f 8499 """
248ed943
RD
8500 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
8501 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
b2dc1044 8502 String name=ControlNameStr) -> bool
15afbcd0
RD
8503
8504 Do the 2nd phase and create the GUI control.
0df68c9f 8505 """
54f9ee45 8506 return _core_.Control_Create(*args, **kwargs)
e811c8ce
RD
8507
8508 def Command(*args, **kwargs):
15afbcd0 8509 """
a95a7133 8510 Command(self, CommandEvent event)
15afbcd0 8511
41e2b43e
RD
8512 Simulates the effect of the user issuing a command to the item.
8513
8514 :see: `wx.CommandEvent`
8515
15afbcd0 8516 """
54f9ee45 8517 return _core_.Control_Command(*args, **kwargs)
e811c8ce
RD
8518
8519 def GetLabel(*args, **kwargs):
15afbcd0 8520 """
a95a7133 8521 GetLabel(self) -> String
15afbcd0
RD
8522
8523 Return a control's text.
8524 """
54f9ee45 8525 return _core_.Control_GetLabel(*args, **kwargs)
e811c8ce
RD
8526
8527 def SetLabel(*args, **kwargs):
15afbcd0 8528 """
a95a7133 8529 SetLabel(self, String label)
15afbcd0
RD
8530
8531 Sets the item's text.
8532 """
54f9ee45 8533 return _core_.Control_SetLabel(*args, **kwargs)
e811c8ce 8534
74a57fcd 8535 def GetClassDefaultAttributes(*args, **kwargs):
110da5b0
RD
8536 """
8537 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8538
8539 Get the default attributes for this class. This is useful if you want
8540 to use the same font or colour in your own control as in a standard
8541 control -- which is a much better idea than hard coding specific
8542 colours or fonts which might look completely out of place on the
8543 user's system, especially if it uses themes.
8544
8545 The variant parameter is only relevant under Mac currently and is
8546 ignore under other platforms. Under Mac, it will change the size of
8547 the returned font. See `wx.Window.SetWindowVariant` for more about
8548 this.
8549 """
54f9ee45 8550 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd
RD
8551
8552 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
d14a1e28
RD
8553
8554class ControlPtr(Control):
8555 def __init__(self, this):
8556 self.this = this
8557 if not hasattr(self,"thisown"): self.thisown = 0
8558 self.__class__ = Control
54f9ee45 8559_core_.Control_swigregister(ControlPtr)
b2dc1044 8560ControlNameStr = cvar.ControlNameStr
d14a1e28
RD
8561
8562def PreControl(*args, **kwargs):
15afbcd0
RD
8563 """
8564 PreControl() -> Control
8565
8566 Precreate a Control control for 2-phase creation
8567 """
54f9ee45 8568 val = _core_.new_PreControl(*args, **kwargs)
d14a1e28
RD
8569 val.thisown = 1
8570 return val
8571
74a57fcd 8572def Control_GetClassDefaultAttributes(*args, **kwargs):
110da5b0
RD
8573 """
8574 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8575
8576 Get the default attributes for this class. This is useful if you want
8577 to use the same font or colour in your own control as in a standard
8578 control -- which is a much better idea than hard coding specific
8579 colours or fonts which might look completely out of place on the
8580 user's system, especially if it uses themes.
8581
8582 The variant parameter is only relevant under Mac currently and is
8583 ignore under other platforms. Under Mac, it will change the size of
8584 the returned font. See `wx.Window.SetWindowVariant` for more about
8585 this.
8586 """
54f9ee45 8587 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd 8588
d14a1e28
RD
8589#---------------------------------------------------------------------------
8590
8591class ItemContainer(object):
15afbcd0
RD
8592 """
8593 wx.ItemContainer defines an interface which is implemented by all
41e2b43e
RD
8594 controls which have string subitems, each of which may be selected,
8595 such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well as
8596 `wx.ComboBox` which implements an extended interface deriving from
8597 this one.
15afbcd0 8598
41e2b43e
RD
8599 It defines the methods for accessing the control's items and although
8600 each of the derived classes implements them differently, they still
8601 all conform to the same interface.
15afbcd0 8602
41e2b43e
RD
8603 The items in a wx.ItemContainer have (non empty) string labels and,
8604 optionally, client data associated with them.
15afbcd0
RD
8605
8606 """
d14a1e28
RD
8607 def __init__(self): raise RuntimeError, "No constructor defined"
8608 def __repr__(self):
8609 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 8610 def Append(*args, **kwargs):
15afbcd0 8611 """
a95a7133 8612 Append(self, String item, PyObject clientData=None) -> int
15afbcd0 8613
41e2b43e
RD
8614 Adds the item to the control, associating the given data with the item
8615 if not None. The return value is the index of the newly added item
8616 which may be different from the last one if the control is sorted (e.g.
8617 has wx.LB_SORT or wx.CB_SORT style).
15afbcd0 8618 """
54f9ee45 8619 return _core_.ItemContainer_Append(*args, **kwargs)
e811c8ce
RD
8620
8621 def AppendItems(*args, **kwargs):
15afbcd0 8622 """
f5b96ee1 8623 AppendItems(self, List strings)
15afbcd0 8624
41e2b43e
RD
8625 Apend several items at once to the control. Notice that calling this
8626 method may be much faster than appending the items one by one if you
8627 need to add a lot of items.
15afbcd0 8628 """
54f9ee45 8629 return _core_.ItemContainer_AppendItems(*args, **kwargs)
e811c8ce
RD
8630
8631 def Insert(*args, **kwargs):
15afbcd0 8632 """
a95a7133 8633 Insert(self, String item, int pos, PyObject clientData=None) -> int
15afbcd0 8634
41e2b43e 8635 Insert an item into the control before the item at the ``pos`` index,
15afbcd0
RD
8636 optionally associating some data object with the item.
8637 """
54f9ee45 8638 return _core_.ItemContainer_Insert(*args, **kwargs)
e811c8ce
RD
8639
8640 def Clear(*args, **kwargs):
15afbcd0 8641 """
a95a7133 8642 Clear(self)
15afbcd0
RD
8643
8644 Removes all items from the control.
8645 """
54f9ee45 8646 return _core_.ItemContainer_Clear(*args, **kwargs)
e811c8ce
RD
8647
8648 def Delete(*args, **kwargs):
15afbcd0 8649 """
a95a7133 8650 Delete(self, int n)
15afbcd0 8651
41e2b43e
RD
8652 Deletes the item at the zero-based index 'n' from the control. Note
8653 that it is an error (signalled by a `wx.PyAssertionError` exception if
8654 enabled) to remove an item with the index negative or greater or equal
8655 than the number of items in the control.
15afbcd0 8656 """
54f9ee45 8657 return _core_.ItemContainer_Delete(*args, **kwargs)
e811c8ce
RD
8658
8659 def GetCount(*args, **kwargs):
15afbcd0 8660 """
a95a7133 8661 GetCount(self) -> int
15afbcd0
RD
8662
8663 Returns the number of items in the control.
8664 """
54f9ee45 8665 return _core_.ItemContainer_GetCount(*args, **kwargs)
e811c8ce
RD
8666
8667 def IsEmpty(*args, **kwargs):
15afbcd0 8668 """
a95a7133 8669 IsEmpty(self) -> bool
15afbcd0
RD
8670
8671 Returns True if the control is empty or False if it has some items.
8672 """
54f9ee45 8673 return _core_.ItemContainer_IsEmpty(*args, **kwargs)
e811c8ce
RD
8674
8675 def GetString(*args, **kwargs):
15afbcd0 8676 """
a95a7133 8677 GetString(self, int n) -> String
15afbcd0
RD
8678
8679 Returns the label of the item with the given index.
8680 """
54f9ee45 8681 return _core_.ItemContainer_GetString(*args, **kwargs)
e811c8ce
RD
8682
8683 def GetStrings(*args, **kwargs):
a95a7133 8684 """GetStrings(self) -> wxArrayString"""
54f9ee45 8685 return _core_.ItemContainer_GetStrings(*args, **kwargs)
e811c8ce
RD
8686
8687 def SetString(*args, **kwargs):
15afbcd0 8688 """
a95a7133 8689 SetString(self, int n, String s)
15afbcd0
RD
8690
8691 Sets the label for the given item.
8692 """
54f9ee45 8693 return _core_.ItemContainer_SetString(*args, **kwargs)
e811c8ce
RD
8694
8695 def FindString(*args, **kwargs):
15afbcd0 8696 """
a95a7133 8697 FindString(self, String s) -> int
15afbcd0
RD
8698
8699 Finds an item whose label matches the given string. Returns the
41e2b43e
RD
8700 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
8701 found.
15afbcd0 8702 """
54f9ee45 8703 return _core_.ItemContainer_FindString(*args, **kwargs)
e811c8ce
RD
8704
8705 def Select(*args, **kwargs):
15afbcd0 8706 """
a95a7133 8707 Select(self, int n)
15afbcd0
RD
8708
8709 Sets the item at index 'n' to be the selected item.
8710 """
54f9ee45 8711 return _core_.ItemContainer_Select(*args, **kwargs)
e811c8ce 8712
15afbcd0 8713 SetSelection = Select
e811c8ce 8714 def GetSelection(*args, **kwargs):
15afbcd0 8715 """
a95a7133 8716 GetSelection(self) -> int
15afbcd0 8717
41e2b43e
RD
8718 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
8719 is selected.
15afbcd0 8720 """
54f9ee45 8721 return _core_.ItemContainer_GetSelection(*args, **kwargs)
e811c8ce
RD
8722
8723 def GetStringSelection(*args, **kwargs):
15afbcd0 8724 """
a95a7133 8725 GetStringSelection(self) -> String
15afbcd0 8726
41e2b43e
RD
8727 Returns the label of the selected item or an empty string if no item
8728 is selected.
15afbcd0 8729 """
54f9ee45 8730 return _core_.ItemContainer_GetStringSelection(*args, **kwargs)
e811c8ce
RD
8731
8732 def GetClientData(*args, **kwargs):
15afbcd0 8733 """
a95a7133 8734 GetClientData(self, int n) -> PyObject
15afbcd0
RD
8735
8736 Returns the client data associated with the given item, (if any.)
8737 """
54f9ee45 8738 return _core_.ItemContainer_GetClientData(*args, **kwargs)
e811c8ce
RD
8739
8740 def SetClientData(*args, **kwargs):
15afbcd0 8741 """
a95a7133 8742 SetClientData(self, int n, PyObject clientData)
15afbcd0
RD
8743
8744 Associate the given client data with the item at position n.
8745 """
54f9ee45 8746 return _core_.ItemContainer_SetClientData(*args, **kwargs)
e811c8ce 8747
d14a1e28
RD
8748
8749class ItemContainerPtr(ItemContainer):
8750 def __init__(self, this):
8751 self.this = this
8752 if not hasattr(self,"thisown"): self.thisown = 0
8753 self.__class__ = ItemContainer
54f9ee45 8754_core_.ItemContainer_swigregister(ItemContainerPtr)
d14a1e28
RD
8755
8756#---------------------------------------------------------------------------
8757
8758class ControlWithItems(Control,ItemContainer):
15afbcd0 8759 """
41e2b43e
RD
8760 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
8761 wx.Control class, and is used for the base class of various controls
8762 that have items.
15afbcd0 8763 """
d14a1e28
RD
8764 def __init__(self): raise RuntimeError, "No constructor defined"
8765 def __repr__(self):
8766 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8767
8768class ControlWithItemsPtr(ControlWithItems):
8769 def __init__(self, this):
8770 self.this = this
8771 if not hasattr(self,"thisown"): self.thisown = 0
8772 self.__class__ = ControlWithItems
54f9ee45 8773_core_.ControlWithItems_swigregister(ControlWithItemsPtr)
d14a1e28
RD
8774
8775#---------------------------------------------------------------------------
8776
8777class SizerItem(Object):
248ed943
RD
8778 """
8779 The wx.SizerItem class is used to track the position, size and other
8780 attributes of each item managed by a `wx.Sizer`. In normal usage user
8781 code should never need to deal directly with a wx.SizerItem, but
8782 custom classes derived from `wx.PySizer` will probably need to use the
8783 collection of wx.SizerItems held by wx.Sizer when calculating layout.
8784
8785 :see: `wx.Sizer`, `wx.GBSizerItem`
8786 """
e811c8ce
RD
8787 def __repr__(self):
8788 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 8789 def __init__(self, *args, **kwargs):
248ed943
RD
8790 """
8791 __init__(self) -> SizerItem
8792
8793 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
8794 size will need to be set before this item can be used in a Sizer.
8795
8796 You will probably never need to create a wx.SizerItem directly as they
8797 are created automatically when the sizer's Add, Insert or Prepend
8798 methods are called.
8799
8800 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
8801 """
54f9ee45 8802 newobj = _core_.new_SizerItem(*args, **kwargs)
d14a1e28
RD
8803 self.this = newobj.this
8804 self.thisown = 1
8805 del newobj.thisown
e811c8ce 8806 def DeleteWindows(*args, **kwargs):
248ed943
RD
8807 """
8808 DeleteWindows(self)
8809
8810 Destroy the window or the windows in a subsizer, depending on the type
8811 of item.
8812 """
54f9ee45 8813 return _core_.SizerItem_DeleteWindows(*args, **kwargs)
e811c8ce
RD
8814
8815 def DetachSizer(*args, **kwargs):
248ed943
RD
8816 """
8817 DetachSizer(self)
8818
8819 Enable deleting the SizerItem without destroying the contained sizer.
8820 """
54f9ee45 8821 return _core_.SizerItem_DetachSizer(*args, **kwargs)
e811c8ce
RD
8822
8823 def GetSize(*args, **kwargs):
248ed943
RD
8824 """
8825 GetSize(self) -> Size
8826
8827 Get the current size of the item, as set in the last Layout.
8828 """
54f9ee45 8829 return _core_.SizerItem_GetSize(*args, **kwargs)
e811c8ce
RD
8830
8831 def CalcMin(*args, **kwargs):
248ed943
RD
8832 """
8833 CalcMin(self) -> Size
8834
8835 Calculates the minimum desired size for the item, including any space
8836 needed by borders.
8837 """
54f9ee45 8838 return _core_.SizerItem_CalcMin(*args, **kwargs)
e811c8ce
RD
8839
8840 def SetDimension(*args, **kwargs):
248ed943
RD
8841 """
8842 SetDimension(self, Point pos, Size size)
8843
8844 Set the position and size of the space allocated for this item by the
8845 sizer, and adjust the position and size of the item (window or
8846 subsizer) to be within that space taking alignment and borders into
8847 account.
8848 """
54f9ee45 8849 return _core_.SizerItem_SetDimension(*args, **kwargs)
e811c8ce
RD
8850
8851 def GetMinSize(*args, **kwargs):
248ed943
RD
8852 """
8853 GetMinSize(self) -> Size
8854
8855 Get the minimum size needed for the item.
8856 """
54f9ee45 8857 return _core_.SizerItem_GetMinSize(*args, **kwargs)
e811c8ce 8858
dfbb5885
RD
8859 def GetMinSizeWithBorder(*args, **kwargs):
8860 """
8861 GetMinSizeWithBorder(self) -> Size
8862
8863 Get the minimum size needed for the item with space for the borders
8864 added, if needed.
8865 """
8866 return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs)
8867
e811c8ce 8868 def SetInitSize(*args, **kwargs):
a95a7133 8869 """SetInitSize(self, int x, int y)"""
54f9ee45 8870 return _core_.SizerItem_SetInitSize(*args, **kwargs)
e811c8ce
RD
8871
8872 def SetRatioWH(*args, **kwargs):
248ed943
RD
8873 """
8874 SetRatioWH(self, int width, int height)
8875
8876 Set the ratio item attribute.
8877 """
54f9ee45 8878 return _core_.SizerItem_SetRatioWH(*args, **kwargs)
e811c8ce
RD
8879
8880 def SetRatioSize(*args, **kwargs):
248ed943
RD
8881 """
8882 SetRatioSize(self, Size size)
8883
8884 Set the ratio item attribute.
8885 """
54f9ee45 8886 return _core_.SizerItem_SetRatioSize(*args, **kwargs)
e811c8ce
RD
8887
8888 def SetRatio(*args, **kwargs):
248ed943
RD
8889 """
8890 SetRatio(self, float ratio)
8891
8892 Set the ratio item attribute.
8893 """
54f9ee45 8894 return _core_.SizerItem_SetRatio(*args, **kwargs)
e811c8ce
RD
8895
8896 def GetRatio(*args, **kwargs):
248ed943
RD
8897 """
8898 GetRatio(self) -> float
8899
8900 Set the ratio item attribute.
8901 """
54f9ee45 8902 return _core_.SizerItem_GetRatio(*args, **kwargs)
e811c8ce 8903
d3b6e4ff
RD
8904 def GetRect(*args, **kwargs):
8905 """
8906 GetRect(self) -> Rect
8907
8908 Returns the rectangle that the sizer item should occupy
8909 """
8910 return _core_.SizerItem_GetRect(*args, **kwargs)
8911
e811c8ce 8912 def IsWindow(*args, **kwargs):
248ed943
RD
8913 """
8914 IsWindow(self) -> bool
8915
8916 Is this sizer item a window?
8917 """
54f9ee45 8918 return _core_.SizerItem_IsWindow(*args, **kwargs)
e811c8ce
RD
8919
8920 def IsSizer(*args, **kwargs):
248ed943
RD
8921 """
8922 IsSizer(self) -> bool
8923
8924 Is this sizer item a subsizer?
8925 """
54f9ee45 8926 return _core_.SizerItem_IsSizer(*args, **kwargs)
e811c8ce
RD
8927
8928 def IsSpacer(*args, **kwargs):
248ed943
RD
8929 """
8930 IsSpacer(self) -> bool
8931
8932 Is this sizer item a spacer?
8933 """
54f9ee45 8934 return _core_.SizerItem_IsSpacer(*args, **kwargs)
e811c8ce
RD
8935
8936 def SetProportion(*args, **kwargs):
248ed943
RD
8937 """
8938 SetProportion(self, int proportion)
8939
8940 Set the proportion value for this item.
8941 """
54f9ee45 8942 return _core_.SizerItem_SetProportion(*args, **kwargs)
e811c8ce
RD
8943
8944 def GetProportion(*args, **kwargs):
248ed943
RD
8945 """
8946 GetProportion(self) -> int
8947
8948 Get the proportion value for this item.
8949 """
54f9ee45 8950 return _core_.SizerItem_GetProportion(*args, **kwargs)
e811c8ce 8951
248ed943
RD
8952 SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.")
8953 GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.")
e811c8ce 8954 def SetFlag(*args, **kwargs):
248ed943
RD
8955 """
8956 SetFlag(self, int flag)
8957
8958 Set the flag value for this item.
8959 """
54f9ee45 8960 return _core_.SizerItem_SetFlag(*args, **kwargs)
e811c8ce
RD
8961
8962 def GetFlag(*args, **kwargs):
248ed943
RD
8963 """
8964 GetFlag(self) -> int
8965
8966 Get the flag value for this item.
8967 """
54f9ee45 8968 return _core_.SizerItem_GetFlag(*args, **kwargs)
e811c8ce
RD
8969
8970 def SetBorder(*args, **kwargs):
248ed943
RD
8971 """
8972 SetBorder(self, int border)
8973
8974 Set the border value for this item.
8975 """
54f9ee45 8976 return _core_.SizerItem_SetBorder(*args, **kwargs)
e811c8ce
RD
8977
8978 def GetBorder(*args, **kwargs):
248ed943
RD
8979 """
8980 GetBorder(self) -> int
8981
8982 Get the border value for this item.
8983 """
54f9ee45 8984 return _core_.SizerItem_GetBorder(*args, **kwargs)
e811c8ce
RD
8985
8986 def GetWindow(*args, **kwargs):
248ed943
RD
8987 """
8988 GetWindow(self) -> Window
8989
8990 Get the window (if any) that is managed by this sizer item.
8991 """
54f9ee45 8992 return _core_.SizerItem_GetWindow(*args, **kwargs)
e811c8ce
RD
8993
8994 def SetWindow(*args, **kwargs):
248ed943
RD
8995 """
8996 SetWindow(self, Window window)
8997
8998 Set the window to be managed by this sizer item.
8999 """
54f9ee45 9000 return _core_.SizerItem_SetWindow(*args, **kwargs)
e811c8ce
RD
9001
9002 def GetSizer(*args, **kwargs):
248ed943
RD
9003 """
9004 GetSizer(self) -> Sizer
9005
9006 Get the subsizer (if any) that is managed by this sizer item.
9007 """
54f9ee45 9008 return _core_.SizerItem_GetSizer(*args, **kwargs)
e811c8ce
RD
9009
9010 def SetSizer(*args, **kwargs):
248ed943
RD
9011 """
9012 SetSizer(self, Sizer sizer)
9013
9014 Set the subsizer to be managed by this sizer item.
9015 """
54f9ee45 9016 return _core_.SizerItem_SetSizer(*args, **kwargs)
e811c8ce
RD
9017
9018 def GetSpacer(*args, **kwargs):
248ed943
RD
9019 """
9020 GetSpacer(self) -> Size
9021
9022 Get the size of the spacer managed by this sizer item.
9023 """
54f9ee45 9024 return _core_.SizerItem_GetSpacer(*args, **kwargs)
e811c8ce
RD
9025
9026 def SetSpacer(*args, **kwargs):
248ed943
RD
9027 """
9028 SetSpacer(self, Size size)
9029
9030 Set the size of the spacer to be managed by this sizer item.
9031 """
54f9ee45 9032 return _core_.SizerItem_SetSpacer(*args, **kwargs)
e811c8ce
RD
9033
9034 def Show(*args, **kwargs):
248ed943
RD
9035 """
9036 Show(self, bool show)
9037
9038 Set the show item attribute, which sizers use to determine if the item
9039 is to be made part of the layout or not. If the item is tracking a
9040 window then it is shown or hidden as needed.
9041 """
54f9ee45 9042 return _core_.SizerItem_Show(*args, **kwargs)
e811c8ce
RD
9043
9044 def IsShown(*args, **kwargs):
248ed943
RD
9045 """
9046 IsShown(self) -> bool
9047
9048 Is the item to be shown in the layout?
9049 """
54f9ee45 9050 return _core_.SizerItem_IsShown(*args, **kwargs)
e811c8ce
RD
9051
9052 def GetPosition(*args, **kwargs):
248ed943
RD
9053 """
9054 GetPosition(self) -> Point
9055
9056 Returns the current position of the item, as set in the last Layout.
9057 """
54f9ee45 9058 return _core_.SizerItem_GetPosition(*args, **kwargs)
e811c8ce
RD
9059
9060 def GetUserData(*args, **kwargs):
248ed943
RD
9061 """
9062 GetUserData(self) -> PyObject
9063
9064 Returns the userData associated with this sizer item, or None if there
9065 isn't any.
9066 """
54f9ee45 9067 return _core_.SizerItem_GetUserData(*args, **kwargs)
e811c8ce 9068
d14a1e28
RD
9069
9070class SizerItemPtr(SizerItem):
9071 def __init__(self, this):
9072 self.this = this
9073 if not hasattr(self,"thisown"): self.thisown = 0
9074 self.__class__ = SizerItem
54f9ee45 9075_core_.SizerItem_swigregister(SizerItemPtr)
d14a1e28 9076
248ed943 9077def SizerItemWindow(*args, **kwargs):
0df68c9f 9078 """
248ed943
RD
9079 SizerItemWindow(Window window, int proportion, int flag, int border,
9080 PyObject userData=None) -> SizerItem
9081
9082 Constructs a `wx.SizerItem` for tracking a window.
0df68c9f 9083 """
248ed943 9084 val = _core_.new_SizerItemWindow(*args, **kwargs)
d14a1e28
RD
9085 val.thisown = 1
9086 return val
9087
248ed943 9088def SizerItemSpacer(*args, **kwargs):
0df68c9f 9089 """
248ed943
RD
9090 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
9091 PyObject userData=None) -> SizerItem
9092
9093 Constructs a `wx.SizerItem` for tracking a spacer.
0df68c9f 9094 """
248ed943 9095 val = _core_.new_SizerItemSpacer(*args, **kwargs)
d14a1e28
RD
9096 val.thisown = 1
9097 return val
9098
9099def SizerItemSizer(*args, **kwargs):
0df68c9f
RD
9100 """
9101 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
248ed943
RD
9102 PyObject userData=None) -> SizerItem
9103
9104 Constructs a `wx.SizerItem` for tracking a subsizer
0df68c9f 9105 """
54f9ee45 9106 val = _core_.new_SizerItemSizer(*args, **kwargs)
d14a1e28
RD
9107 val.thisown = 1
9108 return val
9109
9110class Sizer(Object):
248ed943
RD
9111 """
9112 wx.Sizer is the abstract base class used for laying out subwindows in
9113 a window. You cannot use wx.Sizer directly; instead, you will have to
9114 use one of the sizer classes derived from it such as `wx.BoxSizer`,
9115 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
9116 and `wx.GridBagSizer`.
9117
9118 The concept implemented by sizers in wxWidgets is closely related to
9119 layout tools in other GUI toolkits, such as Java's AWT, the GTK
9120 toolkit or the Qt toolkit. It is based upon the idea of the individual
9121 subwindows reporting their minimal required size and their ability to
9122 get stretched if the size of the parent window has changed. This will
9123 most often mean that the programmer does not set the original size of
9124 a dialog in the beginning, rather the dialog will assigned a sizer and
9125 this sizer will be queried about the recommended size. The sizer in
9126 turn will query its children, which can be normal windows or contorls,
9127 empty space or other sizers, so that a hierarchy of sizers can be
9128 constructed. Note that wxSizer does not derive from wxWindow and thus
9129 do not interfere with tab ordering and requires very little resources
9130 compared to a real window on screen.
9131
9132 What makes sizers so well fitted for use in wxWidgets is the fact that
9133 every control reports its own minimal size and the algorithm can
9134 handle differences in font sizes or different window (dialog item)
9135 sizes on different platforms without problems. If for example the
9136 standard font as well as the overall design of Mac widgets requires
9137 more space than on Windows, then the initial size of a dialog using a
9138 sizer will automatically be bigger on Mac than on Windows.
9139 """
e811c8ce
RD
9140 def __init__(self): raise RuntimeError, "No constructor defined"
9141 def __repr__(self):
9142 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9143 def _setOORInfo(*args, **kwargs):
a95a7133 9144 """_setOORInfo(self, PyObject _self)"""
54f9ee45 9145 return _core_.Sizer__setOORInfo(*args, **kwargs)
e811c8ce
RD
9146
9147 def Add(*args, **kwargs):
0df68c9f 9148 """
248ed943 9149 Add(self, item, int proportion=0, int flag=0, int border=0,
d3b6e4ff 9150 PyObject userData=None) -> wx.SizerItem
248ed943
RD
9151
9152 Appends a child item to the sizer.
0df68c9f 9153 """
54f9ee45 9154 return _core_.Sizer_Add(*args, **kwargs)
e811c8ce
RD
9155
9156 def Insert(*args, **kwargs):
0df68c9f 9157 """
248ed943 9158 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
d3b6e4ff 9159 PyObject userData=None) -> wx.SizerItem
248ed943
RD
9160
9161 Inserts a new item into the list of items managed by this sizer before
9162 the item at index *before*. See `Add` for a description of the parameters.
0df68c9f 9163 """
54f9ee45 9164 return _core_.Sizer_Insert(*args, **kwargs)
e811c8ce
RD
9165
9166 def Prepend(*args, **kwargs):
0df68c9f 9167 """
248ed943 9168 Prepend(self, item, int proportion=0, int flag=0, int border=0,
d3b6e4ff 9169 PyObject userData=None) -> wx.SizerItem
248ed943
RD
9170
9171 Adds a new item to the begining of the list of sizer items managed by
9172 this sizer. See `Add` for a description of the parameters.
0df68c9f 9173 """
54f9ee45 9174 return _core_.Sizer_Prepend(*args, **kwargs)
e811c8ce
RD
9175
9176 def Remove(*args, **kwargs):
248ed943
RD
9177 """
9178 Remove(self, item) -> bool
9179
9180 Removes an item from the sizer and destroys it. This method does not
9181 cause any layout or resizing to take place, call `Layout` to update
9182 the layout on screen after removing a child from the sizer. The
9183 *item* parameter can be either a window, a sizer, or the zero-based
9184 index of an item to remove. Returns True if the child item was found
9185 and removed.
9186 """
54f9ee45 9187 return _core_.Sizer_Remove(*args, **kwargs)
e811c8ce 9188
1c0f361b 9189 def Detach(*args, **kwargs):
248ed943
RD
9190 """
9191 Detach(self, item) -> bool
9192
9193 Detaches an item from the sizer without destroying it. This method
9194 does not cause any layout or resizing to take place, call `Layout` to
9195 do so. The *item* parameter can be either a window, a sizer, or the
9196 zero-based index of the item to be detached. Returns True if the child item
9197 was found and detached.
9198 """
1c0f361b
RD
9199 return _core_.Sizer_Detach(*args, **kwargs)
9200
d3b6e4ff
RD
9201 def GetItem(*args, **kwargs):
9202 """
9203 GetItem(self, item) -> wx.SizerItem
9204
9205 Returns the `wx.SizerItem` which holds the *item* given. The *item*
9206 parameter can be either a window, a sizer, or the zero-based index of
9207 the item to be detached.
9208 """
9209 return _core_.Sizer_GetItem(*args, **kwargs)
9210
e811c8ce 9211 def _SetItemMinSize(*args, **kwargs):
a95a7133 9212 """_SetItemMinSize(self, PyObject item, Size size)"""
54f9ee45 9213 return _core_.Sizer__SetItemMinSize(*args, **kwargs)
e811c8ce 9214
248ed943
RD
9215 def SetItemMinSize(self, item, *args):
9216 """
9217 SetItemMinSize(self, item, Size size)
9218
9219 Sets the minimum size that will be allocated for an item in the sizer.
9220 The *item* parameter can be either a window, a sizer, or the
9221 zero-based index of the item. If a window or sizer is given then it
9222 will be searched for recursivly in subsizers if neccessary.
9223 """
9224 if len(args) == 2:
9225 # for backward compatibility accept separate width,height args too
9226 return self._SetItemMinSize(item, args)
9227 else:
9228 return self._SetItemMinSize(item, args[0])
9229
e811c8ce 9230 def AddItem(*args, **kwargs):
248ed943
RD
9231 """
9232 AddItem(self, SizerItem item)
9233
9234 Adds a `wx.SizerItem` to the sizer.
9235 """
54f9ee45 9236 return _core_.Sizer_AddItem(*args, **kwargs)
e811c8ce
RD
9237
9238 def InsertItem(*args, **kwargs):
248ed943
RD
9239 """
9240 InsertItem(self, int index, SizerItem item)
9241
9242 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
9243 """
54f9ee45 9244 return _core_.Sizer_InsertItem(*args, **kwargs)
e811c8ce
RD
9245
9246 def PrependItem(*args, **kwargs):
248ed943
RD
9247 """
9248 PrependItem(self, SizerItem item)
9249
9250 Prepends a `wx.SizerItem` to the sizer.
9251 """
54f9ee45 9252 return _core_.Sizer_PrependItem(*args, **kwargs)
e811c8ce 9253
248ed943 9254 def AddMany(self, items):
66c033b4
RD
9255 """
9256 AddMany is a convenience method for adding several items
9257 to a sizer at one time. Simply pass it a list of tuples,
9258 where each tuple consists of the parameters that you
9259 would normally pass to the `Add` method.
9260 """
248ed943
RD
9261 for item in items:
9262 if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)):
9263 item = (item, )
9264 self.Add(*item)
d14a1e28 9265
74e96f3d 9266 # for backwards compatibility only, please do not use in new code
66c033b4
RD
9267 AddWindow = wx._deprecated(Add, "AddWindow is deprecated, use `Add` instead.")
9268 AddSizer = wx._deprecated(Add, "AddSizer is deprecated, use `Add` instead.")
9269 AddSpacer = wx._deprecated(Add, "AddSpacer is deprecated, use `Add` instead.")
9270 PrependWindow = wx._deprecated(Prepend, "PrependWindow is deprecated, use `Prepend` instead.")
9271 PrependSizer = wx._deprecated(Prepend, "PrependSizer is deprecated, use `Prepend` instead.")
9272 PrependSpacer = wx._deprecated(Prepend, "PrependSpacer is deprecated, use `Prepend` instead.")
9273 InsertWindow = wx._deprecated(Insert, "InsertWindow is deprecated, use `Insert` instead.")
9274 InsertSizer = wx._deprecated(Insert, "InsertSizer is deprecated, use `Insert` instead.")
9275 InsertSpacer = wx._deprecated(Insert, "InsertSpacer is deprecated, use `Insert` instead.")
9276 RemoveWindow = wx._deprecated(Remove, "RemoveWindow is deprecated, use `Remove` instead.")
9277 RemoveSizer = wx._deprecated(Remove, "RemoveSizer is deprecated, use `Remove` instead.")
9278 RemovePos = wx._deprecated(Remove, "RemovePos is deprecated, use `Remove` instead.")
d14a1e28
RD
9279
9280
e811c8ce 9281 def SetDimension(*args, **kwargs):
248ed943
RD
9282 """
9283 SetDimension(self, int x, int y, int width, int height)
9284
9285 Call this to force the sizer to take the given dimension and thus
9286 force the items owned by the sizer to resize themselves according to
9287 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
9288 methods.
9289 """
54f9ee45 9290 return _core_.Sizer_SetDimension(*args, **kwargs)
e811c8ce
RD
9291
9292 def SetMinSize(*args, **kwargs):
248ed943
RD
9293 """
9294 SetMinSize(self, Size size)
9295
9296 Call this to give the sizer a minimal size. Normally, the sizer will
9297 calculate its minimal size based purely on how much space its children
9298 need. After calling this method `GetMinSize` will return either the
9299 minimal size as requested by its children or the minimal size set
9300 here, depending on which is bigger.
9301 """
54f9ee45 9302 return _core_.Sizer_SetMinSize(*args, **kwargs)
e811c8ce
RD
9303
9304 def GetSize(*args, **kwargs):
248ed943
RD
9305 """
9306 GetSize(self) -> Size
9307
9308 Returns the current size of the space managed by the sizer.
9309 """
54f9ee45 9310 return _core_.Sizer_GetSize(*args, **kwargs)
e811c8ce
RD
9311
9312 def GetPosition(*args, **kwargs):
248ed943
RD
9313 """
9314 GetPosition(self) -> Point
9315
9316 Returns the current position of the sizer's managed space.
9317 """
54f9ee45 9318 return _core_.Sizer_GetPosition(*args, **kwargs)
e811c8ce
RD
9319
9320 def GetMinSize(*args, **kwargs):
248ed943
RD
9321 """
9322 GetMinSize(self) -> Size
9323
9324 Returns the minimal size of the sizer. This is either the combined
9325 minimal size of all the children and their borders or the minimal size
9326 set by SetMinSize, depending on which is bigger.
9327 """
54f9ee45 9328 return _core_.Sizer_GetMinSize(*args, **kwargs)
e811c8ce 9329
d14a1e28 9330 def GetSizeTuple(self):
1c0f361b 9331 return self.GetSize().Get()
d14a1e28 9332 def GetPositionTuple(self):
1c0f361b 9333 return self.GetPosition().Get()
d14a1e28 9334 def GetMinSizeTuple(self):
1c0f361b 9335 return self.GetMinSize().Get()
d14a1e28 9336
e811c8ce 9337 def RecalcSizes(*args, **kwargs):
248ed943
RD
9338 """
9339 RecalcSizes(self)
9340
9341 Using the sizes calculated by `CalcMin` reposition and resize all the
9342 items managed by this sizer. You should not need to call this directly as
9343 it is called by `Layout`.
9344 """
54f9ee45 9345 return _core_.Sizer_RecalcSizes(*args, **kwargs)
e811c8ce
RD
9346
9347 def CalcMin(*args, **kwargs):
248ed943
RD
9348 """
9349 CalcMin(self) -> Size
9350
9351 This method is where the sizer will do the actual calculation of its
9352 children's minimal sizes. You should not need to call this directly as
9353 it is called by `Layout`.
9354 """
54f9ee45 9355 return _core_.Sizer_CalcMin(*args, **kwargs)
e811c8ce
RD
9356
9357 def Layout(*args, **kwargs):
248ed943
RD
9358 """
9359 Layout(self)
9360
9361 This method will force the recalculation and layout of the items
9362 controlled by the sizer using the current space allocated to the
9363 sizer. Normally this is called automatically from the owning window's
9364 EVT_SIZE handler, but it is also useful to call it from user code when
9365 one of the items in a sizer change size, or items are added or
9366 removed.
9367 """
54f9ee45 9368 return _core_.Sizer_Layout(*args, **kwargs)
e811c8ce
RD
9369
9370 def Fit(*args, **kwargs):
248ed943
RD
9371 """
9372 Fit(self, Window window) -> Size
9373
9374 Tell the sizer to resize the *window* to match the sizer's minimal
9375 size. This is commonly done in the constructor of the window itself in
9376 order to set its initial size to match the needs of the children as
9377 determined by the sizer. Returns the new size.
9378
9379 For a top level window this is the total window size, not the client size.
9380 """
54f9ee45 9381 return _core_.Sizer_Fit(*args, **kwargs)
e811c8ce
RD
9382
9383 def FitInside(*args, **kwargs):
248ed943
RD
9384 """
9385 FitInside(self, Window window)
9386
9387 Tell the sizer to resize the *virtual size* of the *window* to match the
9388 sizer's minimal size. This will not alter the on screen size of the
9389 window, but may cause the addition/removal/alteration of scrollbars
9390 required to view the virtual area in windows which manage it.
9391
9392 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
9393
9394 """
54f9ee45 9395 return _core_.Sizer_FitInside(*args, **kwargs)
e811c8ce
RD
9396
9397 def SetSizeHints(*args, **kwargs):
248ed943
RD
9398 """
9399 SetSizeHints(self, Window window)
9400
9401 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
9402 match the sizer's minimal size. This is commonly done in the
9403 constructor of the window itself if the window is resizable (as are
9404 many dialogs under Unix and frames on probably all platforms) in order
9405 to prevent the window from being sized smaller than the minimal size
9406 required by the sizer.
9407 """
54f9ee45 9408 return _core_.Sizer_SetSizeHints(*args, **kwargs)
e811c8ce
RD
9409
9410 def SetVirtualSizeHints(*args, **kwargs):
248ed943
RD
9411 """
9412 SetVirtualSizeHints(self, Window window)
9413
9414 Tell the sizer to set the minimal size of the window virtual area to
9415 match the sizer's minimal size. For windows with managed scrollbars
9416 this will set them appropriately.
9417
9418 :see: `wx.ScrolledWindow.SetScrollbars`
9419
9420 """
54f9ee45 9421 return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs)
e811c8ce
RD
9422
9423 def Clear(*args, **kwargs):
248ed943
RD
9424 """
9425 Clear(self, bool deleteWindows=False)
9426
9427 Clear all items from the sizer, optionally destroying the window items
9428 as well.
9429 """
54f9ee45 9430 return _core_.Sizer_Clear(*args, **kwargs)
e811c8ce
RD
9431
9432 def DeleteWindows(*args, **kwargs):
248ed943
RD
9433 """
9434 DeleteWindows(self)
9435
9436 Destroy all windows managed by the sizer.
9437 """
54f9ee45 9438 return _core_.Sizer_DeleteWindows(*args, **kwargs)
e811c8ce
RD
9439
9440 def GetChildren(*args, **kwargs):
248ed943
RD
9441 """
9442 GetChildren(sefl) -> list
9443
9444 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
9445 """
54f9ee45 9446 return _core_.Sizer_GetChildren(*args, **kwargs)
e811c8ce
RD
9447
9448 def Show(*args, **kwargs):
248ed943 9449 """
ae8162c8 9450 Show(self, item, bool show=True, bool recursive=false) -> bool
e811c8ce 9451
248ed943
RD
9452 Shows or hides an item managed by the sizer. To make a sizer item
9453 disappear or reappear, use Show followed by `Layout`. The *item*
9454 parameter can be either a window, a sizer, or the zero-based index of
7e63a440
RD
9455 the item. Use the recursive parameter to show or hide an item in a
9456 subsizer. Returns True if the item was found.
248ed943
RD
9457 """
9458 return _core_.Sizer_Show(*args, **kwargs)
e811c8ce
RD
9459
9460 def IsShown(*args, **kwargs):
248ed943
RD
9461 """
9462 IsShown(self, item)
9463
9464 Determines if the item is currently shown. sizer. To make a sizer
9465 item disappear or reappear, use Show followed by `Layout`. The *item*
9466 parameter can be either a window, a sizer, or the zero-based index of
9467 the item.
9468 """
54f9ee45 9469 return _core_.Sizer_IsShown(*args, **kwargs)
e811c8ce 9470
7e63a440 9471 def Hide(self, item, recursive=False):
248ed943 9472 """
7e63a440 9473 A convenience method for Show(item, False, recursive).
248ed943 9474 """
06759a38 9475 return self.Show(item, False, recursive)
248ed943 9476
e811c8ce 9477 def ShowItems(*args, **kwargs):
248ed943
RD
9478 """
9479 ShowItems(self, bool show)
9480
84f85550 9481 Recursively call `wx.SizerItem.Show` on all sizer items.
248ed943 9482 """
54f9ee45 9483 return _core_.Sizer_ShowItems(*args, **kwargs)
e811c8ce 9484
d14a1e28
RD
9485
9486class SizerPtr(Sizer):
9487 def __init__(self, this):
9488 self.this = this
9489 if not hasattr(self,"thisown"): self.thisown = 0
9490 self.__class__ = Sizer
54f9ee45 9491_core_.Sizer_swigregister(SizerPtr)
d14a1e28
RD
9492
9493class PySizer(Sizer):
248ed943
RD
9494 """
9495 wx.PySizer is a special version of `wx.Sizer` that has been
9496 instrumented to allow the C++ virtual methods to be overloaded in
9497 Python derived classes. You would derive from this class if you are
9498 wanting to implement a custom sizer in Python code. Simply implement
9499 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
9500 For example::
9501
9502 class MySizer(wx.PySizer):
9503 def __init__(self):
9504 wx.PySizer.__init__(self)
9505
9506 def CalcMin(self):
9507 for item in self.GetChildren():
9508 # calculate the total minimum width and height needed
9509 # by all items in the sizer according to this sizer's
9510 # layout algorithm.
9511 ...
9512 return wx.Size(width, height)
9513
9514 def RecalcSizes(self):
9515 # find the space allotted to this sizer
9516 pos = self.GetPosition()
9517 size = self.GetSize()
9518 for item in self.GetChildren():
9519 # Recalculate (if necessary) the position and size of
9520 # each item and then call item.SetDimension to do the
9521 # actual positioning and sizing of the items within the
9522 # space alloted to this sizer.
9523 ...
9524 item.SetDimension(itemPos, itemSize)
9525
9526
9527 When `Layout` is called it first calls `CalcMin` followed by
9528 `RecalcSizes` so you can optimize a bit by saving the results of
9529 `CalcMin` and resuing them in `RecalcSizes`.
9530
9531 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
9532
9533
9534 """
e811c8ce
RD
9535 def __repr__(self):
9536 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9537 def __init__(self, *args, **kwargs):
248ed943
RD
9538 """
9539 __init__(self) -> PySizer
9540
9541 Creates a wx.PySizer. Must be called from the __init__ in the derived
9542 class.
9543 """
54f9ee45 9544 newobj = _core_.new_PySizer(*args, **kwargs)
d14a1e28
RD
9545 self.this = newobj.this
9546 self.thisown = 1
9547 del newobj.thisown
9548 self._setCallbackInfo(self, PySizer);self._setOORInfo(self)
e811c8ce
RD
9549
9550 def _setCallbackInfo(*args, **kwargs):
a95a7133 9551 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
54f9ee45 9552 return _core_.PySizer__setCallbackInfo(*args, **kwargs)
e811c8ce 9553
d14a1e28
RD
9554
9555class PySizerPtr(PySizer):
9556 def __init__(self, this):
9557 self.this = this
9558 if not hasattr(self,"thisown"): self.thisown = 0
9559 self.__class__ = PySizer
54f9ee45 9560_core_.PySizer_swigregister(PySizerPtr)
d14a1e28
RD
9561
9562#---------------------------------------------------------------------------
9563
9564class BoxSizer(Sizer):
248ed943
RD
9565 """
9566 The basic idea behind a box sizer is that windows will most often be
9567 laid out in rather simple basic geometry, typically in a row or a
9568 column or nested hierarchies of either. A wx.BoxSizer will lay out
9569 its items in a simple row or column, depending on the orientation
9570 parameter passed to the constructor.
9571 """
e811c8ce
RD
9572 def __repr__(self):
9573 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9574 def __init__(self, *args, **kwargs):
248ed943
RD
9575 """
9576 __init__(self, int orient=HORIZONTAL) -> BoxSizer
9577
9578 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
9579 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
9580 sizer.
9581 """
54f9ee45 9582 newobj = _core_.new_BoxSizer(*args, **kwargs)
d14a1e28
RD
9583 self.this = newobj.this
9584 self.thisown = 1
9585 del newobj.thisown
9586 self._setOORInfo(self)
e811c8ce
RD
9587
9588 def GetOrientation(*args, **kwargs):
248ed943
RD
9589 """
9590 GetOrientation(self) -> int
9591
9592 Returns the current orientation of the sizer.
9593 """
54f9ee45 9594 return _core_.BoxSizer_GetOrientation(*args, **kwargs)
e811c8ce
RD
9595
9596 def SetOrientation(*args, **kwargs):
248ed943
RD
9597 """
9598 SetOrientation(self, int orient)
e811c8ce 9599
248ed943
RD
9600 Resets the orientation of the sizer.
9601 """
9602 return _core_.BoxSizer_SetOrientation(*args, **kwargs)
e811c8ce 9603
d14a1e28
RD
9604
9605class BoxSizerPtr(BoxSizer):
9606 def __init__(self, this):
9607 self.this = this
9608 if not hasattr(self,"thisown"): self.thisown = 0
9609 self.__class__ = BoxSizer
54f9ee45 9610_core_.BoxSizer_swigregister(BoxSizerPtr)
d14a1e28
RD
9611
9612#---------------------------------------------------------------------------
9613
9614class StaticBoxSizer(BoxSizer):
248ed943
RD
9615 """
9616 wx.StaticBoxSizer derives from and functions identically to the
9617 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
9618 manages. Note that this static box must be created separately and
9619 passed to the sizer constructor.
9620 """
e811c8ce
RD
9621 def __repr__(self):
9622 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9623 def __init__(self, *args, **kwargs):
248ed943
RD
9624 """
9625 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
9626
9627 Constructor. It takes an associated static box and the orientation
9628 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
9629 ``wx.HORIZONTAL``.
9630 """
54f9ee45 9631 newobj = _core_.new_StaticBoxSizer(*args, **kwargs)
d14a1e28
RD
9632 self.this = newobj.this
9633 self.thisown = 1
9634 del newobj.thisown
9635 self._setOORInfo(self)
e811c8ce
RD
9636
9637 def GetStaticBox(*args, **kwargs):
248ed943
RD
9638 """
9639 GetStaticBox(self) -> StaticBox
e811c8ce 9640
248ed943
RD
9641 Returns the static box associated with this sizer.
9642 """
9643 return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs)
e811c8ce 9644
d14a1e28
RD
9645
9646class StaticBoxSizerPtr(StaticBoxSizer):
9647 def __init__(self, this):
9648 self.this = this
9649 if not hasattr(self,"thisown"): self.thisown = 0
9650 self.__class__ = StaticBoxSizer
54f9ee45 9651_core_.StaticBoxSizer_swigregister(StaticBoxSizerPtr)
d14a1e28
RD
9652
9653#---------------------------------------------------------------------------
9654
9655class GridSizer(Sizer):
248ed943
RD
9656 """
9657 A grid sizer is a sizer which lays out its children in a
9658 two-dimensional table with all cells having the same size. In other
9659 words, the width of each cell within the grid is the width of the
9660 widest item added to the sizer and the height of each grid cell is the
9661 height of the tallest item. An optional vertical and/or horizontal
9662 gap between items can also be specified (in pixels.)
9663
9664 Items are placed in the cells of the grid in the order they are added,
9665 in row-major order. In other words, the first row is filled first,
9666 then the second, and so on until all items have been added. (If
9667 neccessary, additional rows will be added as items are added.) If you
9668 need to have greater control over the cells that items are placed in
9669 then use the `wx.GridBagSizer`.
9670
9671 """
e811c8ce
RD
9672 def __repr__(self):
9673 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9674 def __init__(self, *args, **kwargs):
248ed943
RD
9675 """
9676 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
9677
9678 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
9679 of columns and rows in the sizer - if either of the parameters is
9680 zero, it will be calculated to from the total number of children in
9681 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
9682 define extra space between all children.
9683 """
54f9ee45 9684 newobj = _core_.new_GridSizer(*args, **kwargs)
d14a1e28
RD
9685 self.this = newobj.this
9686 self.thisown = 1
9687 del newobj.thisown
9688 self._setOORInfo(self)
e811c8ce 9689
e811c8ce 9690 def SetCols(*args, **kwargs):
248ed943
RD
9691 """
9692 SetCols(self, int cols)
9693
9694 Sets the number of columns in the sizer.
9695 """
54f9ee45 9696 return _core_.GridSizer_SetCols(*args, **kwargs)
e811c8ce
RD
9697
9698 def SetRows(*args, **kwargs):
248ed943
RD
9699 """
9700 SetRows(self, int rows)
9701
9702 Sets the number of rows in the sizer.
9703 """
54f9ee45 9704 return _core_.GridSizer_SetRows(*args, **kwargs)
e811c8ce
RD
9705
9706 def SetVGap(*args, **kwargs):
248ed943
RD
9707 """
9708 SetVGap(self, int gap)
9709
9710 Sets the vertical gap (in pixels) between the cells in the sizer.
9711 """
54f9ee45 9712 return _core_.GridSizer_SetVGap(*args, **kwargs)
e811c8ce
RD
9713
9714 def SetHGap(*args, **kwargs):
248ed943
RD
9715 """
9716 SetHGap(self, int gap)
9717
9718 Sets the horizontal gap (in pixels) between cells in the sizer
9719 """
54f9ee45 9720 return _core_.GridSizer_SetHGap(*args, **kwargs)
e811c8ce
RD
9721
9722 def GetCols(*args, **kwargs):
248ed943
RD
9723 """
9724 GetCols(self) -> int
9725
9726 Returns the number of columns in the sizer.
9727 """
54f9ee45 9728 return _core_.GridSizer_GetCols(*args, **kwargs)
e811c8ce
RD
9729
9730 def GetRows(*args, **kwargs):
248ed943
RD
9731 """
9732 GetRows(self) -> int
9733
9734 Returns the number of rows in the sizer.
9735 """
54f9ee45 9736 return _core_.GridSizer_GetRows(*args, **kwargs)
e811c8ce
RD
9737
9738 def GetVGap(*args, **kwargs):
248ed943
RD
9739 """
9740 GetVGap(self) -> int
9741
9742 Returns the vertical gap (in pixels) between the cells in the sizer.
9743 """
54f9ee45 9744 return _core_.GridSizer_GetVGap(*args, **kwargs)
e811c8ce
RD
9745
9746 def GetHGap(*args, **kwargs):
248ed943
RD
9747 """
9748 GetHGap(self) -> int
9749
9750 Returns the horizontal gap (in pixels) between cells in the sizer.
9751 """
54f9ee45 9752 return _core_.GridSizer_GetHGap(*args, **kwargs)
e811c8ce 9753
d14a1e28
RD
9754
9755class GridSizerPtr(GridSizer):
9756 def __init__(self, this):
9757 self.this = this
9758 if not hasattr(self,"thisown"): self.thisown = 0
9759 self.__class__ = GridSizer
54f9ee45 9760_core_.GridSizer_swigregister(GridSizerPtr)
d14a1e28
RD
9761
9762#---------------------------------------------------------------------------
9763
54f9ee45
RD
9764FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE
9765FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED
9766FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL
d14a1e28 9767class FlexGridSizer(GridSizer):
248ed943
RD
9768 """
9769 A flex grid sizer is a sizer which lays out its children in a
9770 two-dimensional table with all table cells in one row having the same
9771 height and all cells in one column having the same width, but all
9772 rows or all columns are not necessarily the same height or width as in
9773 the `wx.GridSizer`.
9774
9775 wx.FlexGridSizer can also size items equally in one direction but
9776 unequally ("flexibly") in the other. If the sizer is only flexible
9777 in one direction (this can be changed using `SetFlexibleDirection`), it
9778 needs to be decided how the sizer should grow in the other ("non
9779 flexible") direction in order to fill the available space. The
9780 `SetNonFlexibleGrowMode` method serves this purpose.
9781
9782
9783 """
e811c8ce
RD
9784 def __repr__(self):
9785 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9786 def __init__(self, *args, **kwargs):
248ed943
RD
9787 """
9788 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
9789
9790 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
9791 number of columns and rows in the sizer - if either of the parameters
9792 is zero, it will be calculated to from the total number of children in
9793 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
9794 define extra space between all children.
9795 """
54f9ee45 9796 newobj = _core_.new_FlexGridSizer(*args, **kwargs)
d14a1e28
RD
9797 self.this = newobj.this
9798 self.thisown = 1
9799 del newobj.thisown
9800 self._setOORInfo(self)
e811c8ce 9801
248ed943
RD
9802 def AddGrowableRow(*args, **kwargs):
9803 """
9804 AddGrowableRow(self, size_t idx, int proportion=0)
e811c8ce 9805
248ed943
RD
9806 Specifies that row *idx* (starting from zero) should be grown if there
9807 is extra space available to the sizer.
e811c8ce 9808
248ed943
RD
9809 The *proportion* parameter has the same meaning as the stretch factor
9810 for the box sizers except that if all proportions are 0, then all
9811 columns are resized equally (instead of not being resized at all).
9812 """
54f9ee45 9813 return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs)
e811c8ce
RD
9814
9815 def RemoveGrowableRow(*args, **kwargs):
248ed943
RD
9816 """
9817 RemoveGrowableRow(self, size_t idx)
9818
9819 Specifies that row *idx* is no longer growable.
9820 """
54f9ee45 9821 return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs)
e811c8ce
RD
9822
9823 def AddGrowableCol(*args, **kwargs):
248ed943
RD
9824 """
9825 AddGrowableCol(self, size_t idx, int proportion=0)
9826
9827 Specifies that column *idx* (starting from zero) should be grown if
9828 there is extra space available to the sizer.
9829
9830 The *proportion* parameter has the same meaning as the stretch factor
9831 for the box sizers except that if all proportions are 0, then all
9832 columns are resized equally (instead of not being resized at all).
9833 """
54f9ee45 9834 return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs)
e811c8ce
RD
9835
9836 def RemoveGrowableCol(*args, **kwargs):
248ed943
RD
9837 """
9838 RemoveGrowableCol(self, size_t idx)
9839
9840 Specifies that column *idx* is no longer growable.
9841 """
54f9ee45 9842 return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs)
e811c8ce
RD
9843
9844 def SetFlexibleDirection(*args, **kwargs):
248ed943
RD
9845 """
9846 SetFlexibleDirection(self, int direction)
9847
9848 Specifies whether the sizer should flexibly resize its columns, rows,
9849 or both. Argument *direction* can be one of the following values. Any
9850 other value is ignored.
9851
9852 ============== =======================================
9853 wx.VERTICAL Rows are flexibly sized.
9854 wx.HORIZONTAL Columns are flexibly sized.
9855 wx.BOTH Both rows and columns are flexibly sized
9856 (this is the default value).
9857 ============== =======================================
9858
9859 Note that this method does not trigger relayout.
9860
9861 """
54f9ee45 9862 return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs)
e811c8ce
RD
9863
9864 def GetFlexibleDirection(*args, **kwargs):
248ed943
RD
9865 """
9866 GetFlexibleDirection(self) -> int
9867
9868 Returns a value that specifies whether the sizer
9869 flexibly resizes its columns, rows, or both (default).
9870
9871 :see: `SetFlexibleDirection`
9872 """
54f9ee45 9873 return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs)
e811c8ce
RD
9874
9875 def SetNonFlexibleGrowMode(*args, **kwargs):
248ed943
RD
9876 """
9877 SetNonFlexibleGrowMode(self, int mode)
9878
9879 Specifies how the sizer should grow in the non-flexible direction if
9880 there is one (so `SetFlexibleDirection` must have been called
9881 previously). Argument *mode* can be one of the following values:
9882
9883 ========================== =================================================
9884 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
9885 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
9886 `AddGrowableCol` and `AddGrowableRow`. In this
9887 case equal sizing applies to minimum sizes of
9888 columns or rows (this is the default value).
9889 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
9890 the non flexible direction, whether they are
9891 growable or not in the flexbile direction.
9892 ========================== =================================================
9893
9894 Note that this method does not trigger relayout.
9895
9896
9897 """
54f9ee45 9898 return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs)
e811c8ce
RD
9899
9900 def GetNonFlexibleGrowMode(*args, **kwargs):
248ed943
RD
9901 """
9902 GetNonFlexibleGrowMode(self) -> int
9903
9904 Returns the value that specifies how the sizer grows in the
9905 non-flexible direction if there is one.
9906
9907 :see: `SetNonFlexibleGrowMode`
9908 """
54f9ee45 9909 return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
e811c8ce
RD
9910
9911 def GetRowHeights(*args, **kwargs):
fd2dc343
RD
9912 """
9913 GetRowHeights(self) -> list
9914
9915 Returns a list of integers representing the heights of each of the
9916 rows in the sizer.
9917 """
54f9ee45 9918 return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs)
e811c8ce
RD
9919
9920 def GetColWidths(*args, **kwargs):
fd2dc343
RD
9921 """
9922 GetColWidths(self) -> list
9923
9924 Returns a list of integers representing the widths of each of the
9925 columns in the sizer.
9926 """
54f9ee45 9927 return _core_.FlexGridSizer_GetColWidths(*args, **kwargs)
e811c8ce 9928
d14a1e28
RD
9929
9930class FlexGridSizerPtr(FlexGridSizer):
9931 def __init__(self, this):
9932 self.this = this
9933 if not hasattr(self,"thisown"): self.thisown = 0
9934 self.__class__ = FlexGridSizer
54f9ee45 9935_core_.FlexGridSizer_swigregister(FlexGridSizerPtr)
d14a1e28
RD
9936
9937#---------------------------------------------------------------------------
9938
9939class GBPosition(object):
248ed943
RD
9940 """
9941 This class represents the position of an item in a virtual grid of
9942 rows and columns managed by a `wx.GridBagSizer`. wxPython has
9943 typemaps that will automatically convert from a 2-element sequence of
9944 integers to a wx.GBPosition, so you can use the more pythonic
9945 representation of the position nearly transparently in Python code.
9946 """
e811c8ce
RD
9947 def __repr__(self):
9948 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9949 def __init__(self, *args, **kwargs):
248ed943
RD
9950 """
9951 __init__(self, int row=0, int col=0) -> GBPosition
9952
9953 This class represents the position of an item in a virtual grid of
9954 rows and columns managed by a `wx.GridBagSizer`. wxPython has
9955 typemaps that will automatically convert from a 2-element sequence of
9956 integers to a wx.GBPosition, so you can use the more pythonic
9957 representation of the position nearly transparently in Python code.
9958 """
54f9ee45 9959 newobj = _core_.new_GBPosition(*args, **kwargs)
d14a1e28
RD
9960 self.this = newobj.this
9961 self.thisown = 1
9962 del newobj.thisown
e811c8ce 9963 def GetRow(*args, **kwargs):
a95a7133 9964 """GetRow(self) -> int"""
54f9ee45 9965 return _core_.GBPosition_GetRow(*args, **kwargs)
e811c8ce
RD
9966
9967 def GetCol(*args, **kwargs):
a95a7133 9968 """GetCol(self) -> int"""
54f9ee45 9969 return _core_.GBPosition_GetCol(*args, **kwargs)
e811c8ce
RD
9970
9971 def SetRow(*args, **kwargs):
a95a7133 9972 """SetRow(self, int row)"""
54f9ee45 9973 return _core_.GBPosition_SetRow(*args, **kwargs)
e811c8ce
RD
9974
9975 def SetCol(*args, **kwargs):
a95a7133 9976 """SetCol(self, int col)"""
54f9ee45 9977 return _core_.GBPosition_SetCol(*args, **kwargs)
e811c8ce
RD
9978
9979 def __eq__(*args, **kwargs):
a95a7133 9980 """__eq__(self, GBPosition other) -> bool"""
54f9ee45 9981 return _core_.GBPosition___eq__(*args, **kwargs)
e811c8ce
RD
9982
9983 def __ne__(*args, **kwargs):
a95a7133 9984 """__ne__(self, GBPosition other) -> bool"""
54f9ee45 9985 return _core_.GBPosition___ne__(*args, **kwargs)
e811c8ce
RD
9986
9987 def Set(*args, **kwargs):
a95a7133 9988 """Set(self, int row=0, int col=0)"""
54f9ee45 9989 return _core_.GBPosition_Set(*args, **kwargs)
e811c8ce
RD
9990
9991 def Get(*args, **kwargs):
a95a7133 9992 """Get(self) -> PyObject"""
54f9ee45 9993 return _core_.GBPosition_Get(*args, **kwargs)
e811c8ce 9994
41e2b43e 9995 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
9996 def __str__(self): return str(self.Get())
9997 def __repr__(self): return 'wx.GBPosition'+str(self.Get())
9998 def __len__(self): return len(self.Get())
9999 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
10000 def __setitem__(self, index, val):
10001 if index == 0: self.SetRow(val)
10002 elif index == 1: self.SetCol(val)
10003 else: raise IndexError
e811c8ce 10004 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
10005 __safe_for_unpickling__ = True
10006 def __reduce__(self): return (wx.GBPosition, self.Get())
d14a1e28
RD
10007
10008 row = property(GetRow, SetRow)
10009 col = property(GetCol, SetCol)
10010
10011
10012class GBPositionPtr(GBPosition):
10013 def __init__(self, this):
10014 self.this = this
10015 if not hasattr(self,"thisown"): self.thisown = 0
10016 self.__class__ = GBPosition
54f9ee45 10017_core_.GBPosition_swigregister(GBPositionPtr)
d14a1e28
RD
10018
10019class GBSpan(object):
248ed943
RD
10020 """
10021 This class is used to hold the row and column spanning attributes of
10022 items in a `wx.GridBagSizer`. wxPython has typemaps that will
10023 automatically convert from a 2-element sequence of integers to a
10024 wx.GBSpan, so you can use the more pythonic representation of the span
10025 nearly transparently in Python code.
10026
10027 """
e811c8ce
RD
10028 def __repr__(self):
10029 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10030 def __init__(self, *args, **kwargs):
248ed943
RD
10031 """
10032 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
10033
10034 Construct a new wxGBSpan, optionally setting the rowspan and
10035 colspan. The default is (1,1). (Meaning that the item occupies one
10036 cell in each direction.
10037 """
54f9ee45 10038 newobj = _core_.new_GBSpan(*args, **kwargs)
d14a1e28
RD
10039 self.this = newobj.this
10040 self.thisown = 1
10041 del newobj.thisown
e811c8ce 10042 def GetRowspan(*args, **kwargs):
a95a7133 10043 """GetRowspan(self) -> int"""
54f9ee45 10044 return _core_.GBSpan_GetRowspan(*args, **kwargs)
e811c8ce
RD
10045
10046 def GetColspan(*args, **kwargs):
a95a7133 10047 """GetColspan(self) -> int"""
54f9ee45 10048 return _core_.GBSpan_GetColspan(*args, **kwargs)
e811c8ce
RD
10049
10050 def SetRowspan(*args, **kwargs):
a95a7133 10051 """SetRowspan(self, int rowspan)"""
54f9ee45 10052 return _core_.GBSpan_SetRowspan(*args, **kwargs)
e811c8ce
RD
10053
10054 def SetColspan(*args, **kwargs):
a95a7133 10055 """SetColspan(self, int colspan)"""
54f9ee45 10056 return _core_.GBSpan_SetColspan(*args, **kwargs)
e811c8ce
RD
10057
10058 def __eq__(*args, **kwargs):
a95a7133 10059 """__eq__(self, GBSpan other) -> bool"""
54f9ee45 10060 return _core_.GBSpan___eq__(*args, **kwargs)
e811c8ce
RD
10061
10062 def __ne__(*args, **kwargs):
a95a7133 10063 """__ne__(self, GBSpan other) -> bool"""
54f9ee45 10064 return _core_.GBSpan___ne__(*args, **kwargs)
e811c8ce
RD
10065
10066 def Set(*args, **kwargs):
a95a7133 10067 """Set(self, int rowspan=1, int colspan=1)"""
54f9ee45 10068 return _core_.GBSpan_Set(*args, **kwargs)
e811c8ce
RD
10069
10070 def Get(*args, **kwargs):
a95a7133 10071 """Get(self) -> PyObject"""
54f9ee45 10072 return _core_.GBSpan_Get(*args, **kwargs)
e811c8ce 10073
41e2b43e 10074 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
10075 def __str__(self): return str(self.Get())
10076 def __repr__(self): return 'wx.GBSpan'+str(self.Get())
10077 def __len__(self): return len(self.Get())
10078 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
10079 def __setitem__(self, index, val):
10080 if index == 0: self.SetRowspan(val)
10081 elif index == 1: self.SetColspan(val)
10082 else: raise IndexError
e811c8ce 10083 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
10084 __safe_for_unpickling__ = True
10085 def __reduce__(self): return (wx.GBSpan, self.Get())
d14a1e28
RD
10086
10087 rowspan = property(GetRowspan, SetRowspan)
10088 colspan = property(GetColspan, SetColspan)
10089
10090
10091class GBSpanPtr(GBSpan):
10092 def __init__(self, this):
10093 self.this = this
10094 if not hasattr(self,"thisown"): self.thisown = 0
10095 self.__class__ = GBSpan
54f9ee45 10096_core_.GBSpan_swigregister(GBSpanPtr)
d14a1e28
RD
10097
10098class GBSizerItem(SizerItem):
248ed943
RD
10099 """
10100 The wx.GBSizerItem class is used to track the additional data about
10101 items in a `wx.GridBagSizer` such as the item's position in the grid
10102 and how many rows or columns it spans.
10103
10104 """
e811c8ce
RD
10105 def __repr__(self):
10106 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10107 def __init__(self, *args, **kwargs):
248ed943
RD
10108 """
10109 __init__(self) -> GBSizerItem
10110
10111 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
10112 size will need to be set, as well as a position and span before this
10113 item can be used in a Sizer.
10114
10115 You will probably never need to create a wx.GBSizerItem directly as they
10116 are created automatically when the sizer's Add method is called.
10117 """
54f9ee45 10118 newobj = _core_.new_GBSizerItem(*args, **kwargs)
d14a1e28
RD
10119 self.this = newobj.this
10120 self.thisown = 1
10121 del newobj.thisown
e811c8ce 10122 def GetPos(*args, **kwargs):
248ed943
RD
10123 """
10124 GetPos(self) -> GBPosition
10125
10126 Get the grid position of the item
10127 """
54f9ee45 10128 return _core_.GBSizerItem_GetPos(*args, **kwargs)
e811c8ce
RD
10129
10130 def GetPosTuple(self): return self.GetPos().Get()
10131 def GetSpan(*args, **kwargs):
248ed943
RD
10132 """
10133 GetSpan(self) -> GBSpan
10134
10135 Get the row and column spanning of the item
10136 """
54f9ee45 10137 return _core_.GBSizerItem_GetSpan(*args, **kwargs)
e811c8ce
RD
10138
10139 def GetSpanTuple(self): return self.GetSpan().Get()
10140 def SetPos(*args, **kwargs):
248ed943
RD
10141 """
10142 SetPos(self, GBPosition pos) -> bool
10143
10144 If the item is already a member of a sizer then first ensure that
10145 there is no other item that would intersect with this one at the new
10146 position, then set the new position. Returns True if the change is
10147 successful and after the next Layout() the item will be moved.
10148 """
54f9ee45 10149 return _core_.GBSizerItem_SetPos(*args, **kwargs)
e811c8ce
RD
10150
10151 def SetSpan(*args, **kwargs):
248ed943
RD
10152 """
10153 SetSpan(self, GBSpan span) -> bool
10154
10155 If the item is already a member of a sizer then first ensure that
10156 there is no other item that would intersect with this one with its new
10157 spanning size, then set the new spanning. Returns True if the change
10158 is successful and after the next Layout() the item will be resized.
10159
10160 """
54f9ee45 10161 return _core_.GBSizerItem_SetSpan(*args, **kwargs)
e811c8ce 10162
248ed943 10163 def Intersects(*args, **kwargs):
0df68c9f 10164 """
a95a7133 10165 Intersects(self, GBSizerItem other) -> bool
248ed943
RD
10166
10167 Returns True if this item and the other item instersect.
0df68c9f 10168 """
248ed943
RD
10169 return _core_.GBSizerItem_Intersects(*args, **kwargs)
10170
10171 def IntersectsPos(*args, **kwargs):
10172 """
10173 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
10174
10175 Returns True if the given pos/span would intersect with this item.
10176 """
10177 return _core_.GBSizerItem_IntersectsPos(*args, **kwargs)
e811c8ce
RD
10178
10179 def GetEndPos(*args, **kwargs):
248ed943
RD
10180 """
10181 GetEndPos(self) -> GBPosition
10182
10183 Get the row and column of the endpoint of this item.
10184 """
54f9ee45 10185 return _core_.GBSizerItem_GetEndPos(*args, **kwargs)
e811c8ce
RD
10186
10187 def GetGBSizer(*args, **kwargs):
248ed943
RD
10188 """
10189 GetGBSizer(self) -> GridBagSizer
10190
10191 Get the sizer this item is a member of.
10192 """
54f9ee45 10193 return _core_.GBSizerItem_GetGBSizer(*args, **kwargs)
e811c8ce
RD
10194
10195 def SetGBSizer(*args, **kwargs):
248ed943
RD
10196 """
10197 SetGBSizer(self, GridBagSizer sizer)
10198
10199 Set the sizer this item is a member of.
10200 """
54f9ee45 10201 return _core_.GBSizerItem_SetGBSizer(*args, **kwargs)
e811c8ce 10202
d14a1e28
RD
10203
10204class GBSizerItemPtr(GBSizerItem):
10205 def __init__(self, this):
10206 self.this = this
10207 if not hasattr(self,"thisown"): self.thisown = 0
10208 self.__class__ = GBSizerItem
54f9ee45 10209_core_.GBSizerItem_swigregister(GBSizerItemPtr)
d14a1e28
RD
10210DefaultSpan = cvar.DefaultSpan
10211
10212def GBSizerItemWindow(*args, **kwargs):
0df68c9f
RD
10213 """
10214 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
248ed943
RD
10215 int border, PyObject userData=None) -> GBSizerItem
10216
10217 Construct a `wx.GBSizerItem` for a window.
0df68c9f 10218 """
54f9ee45 10219 val = _core_.new_GBSizerItemWindow(*args, **kwargs)
d14a1e28
RD
10220 val.thisown = 1
10221 return val
10222
10223def GBSizerItemSizer(*args, **kwargs):
0df68c9f
RD
10224 """
10225 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
248ed943
RD
10226 int border, PyObject userData=None) -> GBSizerItem
10227
10228 Construct a `wx.GBSizerItem` for a sizer
0df68c9f 10229 """
54f9ee45 10230 val = _core_.new_GBSizerItemSizer(*args, **kwargs)
d14a1e28
RD
10231 val.thisown = 1
10232 return val
10233
10234def GBSizerItemSpacer(*args, **kwargs):
0df68c9f
RD
10235 """
10236 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
248ed943
RD
10237 int flag, int border, PyObject userData=None) -> GBSizerItem
10238
10239 Construct a `wx.GBSizerItem` for a spacer.
0df68c9f 10240 """
54f9ee45 10241 val = _core_.new_GBSizerItemSpacer(*args, **kwargs)
d14a1e28
RD
10242 val.thisown = 1
10243 return val
10244
10245class GridBagSizer(FlexGridSizer):
248ed943
RD
10246 """
10247 A `wx.Sizer` that can lay out items in a virtual grid like a
10248 `wx.FlexGridSizer` but in this case explicit positioning of the items
10249 is allowed using `wx.GBPosition`, and items can optionally span more
10250 than one row and/or column using `wx.GBSpan`. The total size of the
10251 virtual grid is determined by the largest row and column that items are
10252 positioned at, adjusted for spanning.
10253
10254 """
e811c8ce
RD
10255 def __repr__(self):
10256 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10257 def __init__(self, *args, **kwargs):
248ed943
RD
10258 """
10259 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
10260
10261 Constructor, with optional parameters to specify the gap between the
10262 rows and columns.
10263 """
54f9ee45 10264 newobj = _core_.new_GridBagSizer(*args, **kwargs)
d14a1e28
RD
10265 self.this = newobj.this
10266 self.thisown = 1
10267 del newobj.thisown
e811c8ce 10268 def Add(*args, **kwargs):
0df68c9f 10269 """
248ed943 10270 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
d3b6e4ff 10271 int border=0, userData=None) -> wx.GBSizerItem
248ed943
RD
10272
10273 Adds an item to the sizer at the grid cell *pos*, optionally spanning
10274 more than one row or column as specified with *span*. The remaining
10275 args behave similarly to `wx.Sizer.Add`.
10276
10277 Returns True if the item was successfully placed at the given cell
10278 position, False if something was already there.
10279
0df68c9f 10280 """
54f9ee45 10281 return _core_.GridBagSizer_Add(*args, **kwargs)
e811c8ce
RD
10282
10283 def AddItem(*args, **kwargs):
248ed943 10284 """
d3b6e4ff 10285 Add(self, GBSizerItem item) -> wx.GBSizerItem
248ed943
RD
10286
10287 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
10288 the item was successfully placed at its given cell position, False if
10289 something was already there.
10290 """
54f9ee45 10291 return _core_.GridBagSizer_AddItem(*args, **kwargs)
e811c8ce 10292
84f85550
RD
10293 def GetCellSize(*args, **kwargs):
10294 """
10295 GetCellSize(self, int row, int col) -> Size
10296
10297 Get the size of the specified cell, including hgap and
10298 vgap. Only valid after a Layout.
10299 """
10300 return _core_.GridBagSizer_GetCellSize(*args, **kwargs)
10301
e811c8ce 10302 def GetEmptyCellSize(*args, **kwargs):
248ed943
RD
10303 """
10304 GetEmptyCellSize(self) -> Size
10305
10306 Get the size used for cells in the grid with no item.
10307 """
54f9ee45 10308 return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs)
e811c8ce
RD
10309
10310 def SetEmptyCellSize(*args, **kwargs):
248ed943
RD
10311 """
10312 SetEmptyCellSize(self, Size sz)
10313
10314 Set the size used for cells in the grid with no item.
10315 """
54f9ee45 10316 return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs)
e811c8ce
RD
10317
10318 def GetItemPosition(*args):
0df68c9f 10319 """
248ed943
RD
10320 GetItemPosition(self, item) -> GBPosition
10321
10322 Get the grid position of the specified *item* where *item* is either a
10323 window or subsizer that is a member of this sizer, or a zero-based
10324 index of an item.
0df68c9f 10325 """
54f9ee45 10326 return _core_.GridBagSizer_GetItemPosition(*args)
e811c8ce
RD
10327
10328 def SetItemPosition(*args):
0df68c9f 10329 """
248ed943
RD
10330 SetItemPosition(self, item, GBPosition pos) -> bool
10331
10332 Set the grid position of the specified *item* where *item* is either a
10333 window or subsizer that is a member of this sizer, or a zero-based
10334 index of an item. Returns True on success. If the move is not
10335 allowed (because an item is already there) then False is returned.
10336
0df68c9f 10337 """
54f9ee45 10338 return _core_.GridBagSizer_SetItemPosition(*args)
e811c8ce
RD
10339
10340 def GetItemSpan(*args):
0df68c9f 10341 """
248ed943
RD
10342 GetItemSpan(self, item) -> GBSpan
10343
10344 Get the row/col spanning of the specified *item* where *item* is
10345 either a window or subsizer that is a member of this sizer, or a
10346 zero-based index of an item.
0df68c9f 10347 """
54f9ee45 10348 return _core_.GridBagSizer_GetItemSpan(*args)
e811c8ce
RD
10349
10350 def SetItemSpan(*args):
0df68c9f 10351 """
248ed943
RD
10352 SetItemSpan(self, item, GBSpan span) -> bool
10353
10354 Set the row/col spanning of the specified *item* where *item* is
10355 either a window or subsizer that is a member of this sizer, or a
10356 zero-based index of an item. Returns True on success. If the move is
10357 not allowed (because an item is already there) then False is returned.
0df68c9f 10358 """
54f9ee45 10359 return _core_.GridBagSizer_SetItemSpan(*args)
e811c8ce
RD
10360
10361 def FindItem(*args):
0df68c9f 10362 """
248ed943
RD
10363 FindItem(self, item) -> GBSizerItem
10364
10365 Find the sizer item for the given window or subsizer, returns None if
10366 not found. (non-recursive)
0df68c9f 10367 """
54f9ee45 10368 return _core_.GridBagSizer_FindItem(*args)
e811c8ce
RD
10369
10370 def FindItemAtPosition(*args, **kwargs):
248ed943
RD
10371 """
10372 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
10373
10374 Return the sizer item for the given grid cell, or None if there is no
10375 item at that position. (non-recursive)
10376 """
54f9ee45 10377 return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs)
e811c8ce
RD
10378
10379 def FindItemAtPoint(*args, **kwargs):
248ed943
RD
10380 """
10381 FindItemAtPoint(self, Point pt) -> GBSizerItem
10382
10383 Return the sizer item located at the point given in *pt*, or None if
10384 there is no item at that point. The (x,y) coordinates in pt correspond
10385 to the client coordinates of the window using the sizer for
10386 layout. (non-recursive)
10387 """
54f9ee45 10388 return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs)
e811c8ce 10389
248ed943
RD
10390 def CheckForIntersection(*args, **kwargs):
10391 """
10392 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
e811c8ce 10393
248ed943
RD
10394 Look at all items and see if any intersect (or would overlap) the
10395 given *item*. Returns True if so, False if there would be no overlap.
10396 If an *excludeItem* is given then it will not be checked for
10397 intersection, for example it may be the item we are checking the
10398 position of.
e811c8ce 10399
248ed943
RD
10400 """
10401 return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs)
e811c8ce 10402
248ed943 10403 def CheckForIntersectionPos(*args, **kwargs):
0df68c9f 10404 """
248ed943
RD
10405 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
10406
10407 Look at all items and see if any intersect (or would overlap) the
10408 given position and span. Returns True if so, False if there would be
10409 no overlap. If an *excludeItem* is given then it will not be checked
10410 for intersection, for example it may be the item we are checking the
10411 position of.
0df68c9f 10412 """
248ed943 10413 return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs)
e811c8ce 10414
d14a1e28
RD
10415
10416class GridBagSizerPtr(GridBagSizer):
10417 def __init__(self, this):
10418 self.this = this
10419 if not hasattr(self,"thisown"): self.thisown = 0
10420 self.__class__ = GridBagSizer
54f9ee45 10421_core_.GridBagSizer_swigregister(GridBagSizerPtr)
d14a1e28
RD
10422
10423#---------------------------------------------------------------------------
10424
54f9ee45
RD
10425Left = _core_.Left
10426Top = _core_.Top
10427Right = _core_.Right
10428Bottom = _core_.Bottom
10429Width = _core_.Width
10430Height = _core_.Height
10431Centre = _core_.Centre
10432Center = _core_.Center
10433CentreX = _core_.CentreX
10434CentreY = _core_.CentreY
10435Unconstrained = _core_.Unconstrained
10436AsIs = _core_.AsIs
10437PercentOf = _core_.PercentOf
10438Above = _core_.Above
10439Below = _core_.Below
10440LeftOf = _core_.LeftOf
10441RightOf = _core_.RightOf
10442SameAs = _core_.SameAs
10443Absolute = _core_.Absolute
d14a1e28 10444class IndividualLayoutConstraint(Object):
15afbcd0 10445 """
41e2b43e
RD
10446 Objects of this class are stored in the `wx.LayoutConstraints` class as
10447 one of eight possible constraints that a window can be involved in.
10448 You will never need to create an instance of
10449 wx.IndividualLayoutConstraint, rather you should create a
10450 `wx.LayoutConstraints` instance and use the individual contstraints
15afbcd0 10451 that it contains.
15afbcd0 10452 """
d14a1e28
RD
10453 def __init__(self): raise RuntimeError, "No constructor defined"
10454 def __repr__(self):
10455 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 10456 def Set(*args, **kwargs):
41e2b43e
RD
10457 """
10458 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
10459
10460 Sets the properties of the constraint. Normally called by one of the
10461 convenience functions such as Above, RightOf, SameAs.
10462 """
54f9ee45 10463 return _core_.IndividualLayoutConstraint_Set(*args, **kwargs)
e811c8ce
RD
10464
10465 def LeftOf(*args, **kwargs):
15afbcd0 10466 """
a95a7133 10467 LeftOf(self, Window sibling, int marg=0)
15afbcd0 10468
41e2b43e
RD
10469 Constrains this edge to be to the left of the given window, with an
10470 optional margin. Implicitly, this is relative to the left edge of the
10471 other window.
15afbcd0 10472 """
54f9ee45 10473 return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs)
e811c8ce
RD
10474
10475 def RightOf(*args, **kwargs):
15afbcd0 10476 """
a95a7133 10477 RightOf(self, Window sibling, int marg=0)
15afbcd0 10478
41e2b43e
RD
10479 Constrains this edge to be to the right of the given window, with an
10480 optional margin. Implicitly, this is relative to the right edge of the
10481 other window.
15afbcd0 10482 """
54f9ee45 10483 return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs)
e811c8ce
RD
10484
10485 def Above(*args, **kwargs):
15afbcd0 10486 """
a95a7133 10487 Above(self, Window sibling, int marg=0)
15afbcd0 10488
41e2b43e
RD
10489 Constrains this edge to be above the given window, with an optional
10490 margin. Implicitly, this is relative to the top edge of the other
10491 window.
15afbcd0 10492 """
54f9ee45 10493 return _core_.IndividualLayoutConstraint_Above(*args, **kwargs)
e811c8ce
RD
10494
10495 def Below(*args, **kwargs):
15afbcd0 10496 """
a95a7133 10497 Below(self, Window sibling, int marg=0)
15afbcd0 10498
41e2b43e
RD
10499 Constrains this edge to be below the given window, with an optional
10500 margin. Implicitly, this is relative to the bottom edge of the other
10501 window.
15afbcd0 10502 """
54f9ee45 10503 return _core_.IndividualLayoutConstraint_Below(*args, **kwargs)
e811c8ce
RD
10504
10505 def SameAs(*args, **kwargs):
15afbcd0 10506 """
a95a7133 10507 SameAs(self, Window otherW, int edge, int marg=0)
15afbcd0 10508
41e2b43e
RD
10509 Constrains this edge or dimension to be to the same as the edge of the
10510 given window, with an optional margin.
15afbcd0 10511 """
54f9ee45 10512 return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs)
e811c8ce
RD
10513
10514 def PercentOf(*args, **kwargs):
15afbcd0 10515 """
a95a7133 10516 PercentOf(self, Window otherW, int wh, int per)
15afbcd0 10517
41e2b43e
RD
10518 Constrains this edge or dimension to be to a percentage of the given
10519 window, with an optional margin.
15afbcd0 10520 """
54f9ee45 10521 return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs)
e811c8ce
RD
10522
10523 def Absolute(*args, **kwargs):
15afbcd0 10524 """
a95a7133 10525 Absolute(self, int val)
15afbcd0 10526
41e2b43e 10527 Constrains this edge or dimension to be the given absolute value.
15afbcd0 10528 """
54f9ee45 10529 return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs)
e811c8ce
RD
10530
10531 def Unconstrained(*args, **kwargs):
15afbcd0 10532 """
a95a7133 10533 Unconstrained(self)
15afbcd0 10534
41e2b43e
RD
10535 Sets this edge or dimension to be unconstrained, that is, dependent on
10536 other edges and dimensions from which this value can be deduced.
15afbcd0 10537 """
54f9ee45 10538 return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs)
e811c8ce
RD
10539
10540 def AsIs(*args, **kwargs):
15afbcd0 10541 """
a95a7133 10542 AsIs(self)
15afbcd0 10543
41e2b43e
RD
10544 Sets this edge or constraint to be whatever the window's value is at
10545 the moment. If either of the width and height constraints are *as is*,
10546 the window will not be resized, but moved instead. This is important
10547 when considering panel items which are intended to have a default
10548 size, such as a button, which may take its size from the size of the
10549 button label.
15afbcd0 10550 """
54f9ee45 10551 return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs)
e811c8ce
RD
10552
10553 def GetOtherWindow(*args, **kwargs):
a95a7133 10554 """GetOtherWindow(self) -> Window"""
54f9ee45 10555 return _core_.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs)
e811c8ce
RD
10556
10557 def GetMyEdge(*args, **kwargs):
a95a7133 10558 """GetMyEdge(self) -> int"""
54f9ee45 10559 return _core_.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs)
e811c8ce
RD
10560
10561 def SetEdge(*args, **kwargs):
a95a7133 10562 """SetEdge(self, int which)"""
54f9ee45 10563 return _core_.IndividualLayoutConstraint_SetEdge(*args, **kwargs)
e811c8ce
RD
10564
10565 def SetValue(*args, **kwargs):
a95a7133 10566 """SetValue(self, int v)"""
54f9ee45 10567 return _core_.IndividualLayoutConstraint_SetValue(*args, **kwargs)
e811c8ce
RD
10568
10569 def GetMargin(*args, **kwargs):
a95a7133 10570 """GetMargin(self) -> int"""
54f9ee45 10571 return _core_.IndividualLayoutConstraint_GetMargin(*args, **kwargs)
e811c8ce
RD
10572
10573 def SetMargin(*args, **kwargs):
a95a7133 10574 """SetMargin(self, int m)"""
54f9ee45 10575 return _core_.IndividualLayoutConstraint_SetMargin(*args, **kwargs)
e811c8ce
RD
10576
10577 def GetValue(*args, **kwargs):
a95a7133 10578 """GetValue(self) -> int"""
54f9ee45 10579 return _core_.IndividualLayoutConstraint_GetValue(*args, **kwargs)
e811c8ce
RD
10580
10581 def GetPercent(*args, **kwargs):
a95a7133 10582 """GetPercent(self) -> int"""
54f9ee45 10583 return _core_.IndividualLayoutConstraint_GetPercent(*args, **kwargs)
e811c8ce
RD
10584
10585 def GetOtherEdge(*args, **kwargs):
a95a7133 10586 """GetOtherEdge(self) -> int"""
54f9ee45 10587 return _core_.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs)
e811c8ce
RD
10588
10589 def GetDone(*args, **kwargs):
a95a7133 10590 """GetDone(self) -> bool"""
54f9ee45 10591 return _core_.IndividualLayoutConstraint_GetDone(*args, **kwargs)
e811c8ce
RD
10592
10593 def SetDone(*args, **kwargs):
a95a7133 10594 """SetDone(self, bool d)"""
54f9ee45 10595 return _core_.IndividualLayoutConstraint_SetDone(*args, **kwargs)
e811c8ce
RD
10596
10597 def GetRelationship(*args, **kwargs):
a95a7133 10598 """GetRelationship(self) -> int"""
54f9ee45 10599 return _core_.IndividualLayoutConstraint_GetRelationship(*args, **kwargs)
e811c8ce
RD
10600
10601 def SetRelationship(*args, **kwargs):
a95a7133 10602 """SetRelationship(self, int r)"""
54f9ee45 10603 return _core_.IndividualLayoutConstraint_SetRelationship(*args, **kwargs)
e811c8ce
RD
10604
10605 def ResetIfWin(*args, **kwargs):
15afbcd0 10606 """
a95a7133 10607 ResetIfWin(self, Window otherW) -> bool
15afbcd0
RD
10608
10609 Reset constraint if it mentions otherWin
10610 """
54f9ee45 10611 return _core_.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs)
e811c8ce
RD
10612
10613 def SatisfyConstraint(*args, **kwargs):
15afbcd0 10614 """
a95a7133 10615 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
15afbcd0
RD
10616
10617 Try to satisfy constraint
10618 """
54f9ee45 10619 return _core_.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs)
e811c8ce
RD
10620
10621 def GetEdge(*args, **kwargs):
15afbcd0 10622 """
a95a7133 10623 GetEdge(self, int which, Window thisWin, Window other) -> int
15afbcd0
RD
10624
10625 Get the value of this edge or dimension, or if this
10626 is not determinable, -1.
10627 """
54f9ee45 10628 return _core_.IndividualLayoutConstraint_GetEdge(*args, **kwargs)
e811c8ce 10629
d14a1e28
RD
10630
10631class IndividualLayoutConstraintPtr(IndividualLayoutConstraint):
10632 def __init__(self, this):
10633 self.this = this
10634 if not hasattr(self,"thisown"): self.thisown = 0
10635 self.__class__ = IndividualLayoutConstraint
54f9ee45 10636_core_.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr)
d14a1e28
RD
10637
10638class LayoutConstraints(Object):
15afbcd0 10639 """
41e2b43e
RD
10640 **Note:** constraints are now deprecated and you should use sizers
10641 instead.
15afbcd0 10642
41e2b43e
RD
10643 Objects of this class can be associated with a window to define its
10644 layout constraints, with respect to siblings or its parent.
15afbcd0
RD
10645
10646 The class consists of the following eight constraints of class
10647 wx.IndividualLayoutConstraint, some or all of which should be accessed
10648 directly to set the appropriate constraints.
10649
10650 * left: represents the left hand edge of the window
10651 * right: represents the right hand edge of the window
10652 * top: represents the top edge of the window
10653 * bottom: represents the bottom edge of the window
10654 * width: represents the width of the window
10655 * height: represents the height of the window
10656 * centreX: represents the horizontal centre point of the window
10657 * centreY: represents the vertical centre point of the window
10658
41e2b43e
RD
10659 Most constraints are initially set to have the relationship
10660 wxUnconstrained, which means that their values should be calculated by
10661 looking at known constraints. The exceptions are width and height,
10662 which are set to wxAsIs to ensure that if the user does not specify a
10663 constraint, the existing width and height will be used, to be
10664 compatible with panel items which often have take a default size. If
10665 the constraint is ``wx.AsIs``, the dimension will not be changed.
10666
10667 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
15afbcd0
RD
10668
10669 """
e811c8ce
RD
10670 def __repr__(self):
10671 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
10672 left = property(_core_.LayoutConstraints_left_get)
10673 top = property(_core_.LayoutConstraints_top_get)
10674 right = property(_core_.LayoutConstraints_right_get)
10675 bottom = property(_core_.LayoutConstraints_bottom_get)
10676 width = property(_core_.LayoutConstraints_width_get)
10677 height = property(_core_.LayoutConstraints_height_get)
10678 centreX = property(_core_.LayoutConstraints_centreX_get)
10679 centreY = property(_core_.LayoutConstraints_centreY_get)
d14a1e28 10680 def __init__(self, *args, **kwargs):
a95a7133 10681 """__init__(self) -> LayoutConstraints"""
54f9ee45 10682 newobj = _core_.new_LayoutConstraints(*args, **kwargs)
d14a1e28
RD
10683 self.this = newobj.this
10684 self.thisown = 1
10685 del newobj.thisown
e811c8ce 10686 def SatisfyConstraints(*args, **kwargs):
6c3b4aae 10687 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
54f9ee45 10688 return _core_.LayoutConstraints_SatisfyConstraints(*args, **kwargs)
e811c8ce
RD
10689
10690 def AreSatisfied(*args, **kwargs):
a95a7133 10691 """AreSatisfied(self) -> bool"""
54f9ee45 10692 return _core_.LayoutConstraints_AreSatisfied(*args, **kwargs)
e811c8ce 10693
d14a1e28
RD
10694
10695class LayoutConstraintsPtr(LayoutConstraints):
10696 def __init__(self, this):
10697 self.this = this
10698 if not hasattr(self,"thisown"): self.thisown = 0
10699 self.__class__ = LayoutConstraints
54f9ee45 10700_core_.LayoutConstraints_swigregister(LayoutConstraintsPtr)
d14a1e28
RD
10701
10702#----------------------------------------------------------------------------
10703
322913ce 10704# Use Python's bool constants if available, make some if not
d14a1e28
RD
10705try:
10706 True
10707except NameError:
322913ce
RD
10708 __builtins__.True = 1==1
10709 __builtins__.False = 1==0
4f89f6a3
RD
10710 def bool(value): return not not value
10711 __builtins__.bool = bool
d14a1e28 10712
d14a1e28
RD
10713
10714
10715# workarounds for bad wxRTTI names
10716__wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
10717__wxPyPtrTypeMap['wxSlider95'] = 'wxSlider'
10718__wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar'
10719
10720
10721#----------------------------------------------------------------------------
10722# Load version numbers from __version__... Ensure that major and minor
7bc1e663 10723# versions are the same for both wxPython and wxWidgets.
d14a1e28
RD
10724
10725from __version__ import *
10726__version__ = VERSION_STRING
10727
7bc1e663
RD
10728assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWidgets version mismatch"
10729assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWidgets version mismatch"
54f9ee45 10730if RELEASE_VERSION != _core_.RELEASE_VERSION:
d14a1e28 10731 import warnings
7bc1e663 10732 warnings.warn("wxPython/wxWidgets release number mismatch")
d14a1e28
RD
10733
10734#----------------------------------------------------------------------------
10735
10736class PyDeadObjectError(AttributeError):
10737 pass
10738
d14a1e28
RD
10739class _wxPyDeadObject(object):
10740 """
10741 Instances of wx objects that are OOR capable will have their __class__
10742 changed to this class when the C++ object is deleted. This should help
10743 prevent crashes due to referencing a bogus C++ pointer.
10744 """
10745 reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
10746 attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed."
10747
3a04f143 10748 def __repr__(self):
d14a1e28
RD
10749 if not hasattr(self, "_name"):
10750 self._name = "[unknown]"
10751 return self.reprStr % self._name
10752
3a04f143 10753 def __getattr__(self, *args):
d14a1e28
RD
10754 if not hasattr(self, "_name"):
10755 self._name = "[unknown]"
3a04f143
RD
10756 raise PyDeadObjectError(self.attrStr % self._name)
10757
10758 def __nonzero__(self):
10759 return 0
10760
10761
10762
10763class PyUnbornObjectError(AttributeError):
10764 pass
10765
10766class _wxPyUnbornObject(object):
10767 """
54f9ee45 10768 Some stock objects are created when the wx._core module is
3a04f143
RD
10769 imported, but their C++ instance is not created until the wx.App
10770 object is created and initialized. These object instances will
10771 temporarily have their __class__ changed to this class so an
10772 exception will be raised if they are used before the C++ instance
10773 is ready.
10774 """
10775
10776 reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
10777 attrStr = "The C++ part of this object has not been initialized, attribute access not allowed."
10778
10779 def __repr__(self):
10780 #if not hasattr(self, "_name"):
10781 # self._name = "[unknown]"
10782 return self.reprStr #% self._name
10783
10784 def __getattr__(self, *args):
10785 #if not hasattr(self, "_name"):
10786 # self._name = "[unknown]"
10787 raise PyUnbornObjectError(self.attrStr) # % self._name )
d14a1e28
RD
10788
10789 def __nonzero__(self):
10790 return 0
10791
10792
10793#----------------------------------------------------------------------------
10794_wxPyCallAfterId = None
10795
10796def CallAfter(callable, *args, **kw):
10797 """
10798 Call the specified function after the current and pending event
10799 handlers have been completed. This is also good for making GUI
61863841
RD
10800 method calls from non-GUI threads. Any extra positional or
10801 keyword args are passed on to the callable when it is called.
10802
10803 :see: `wx.FutureCall`
d14a1e28
RD
10804 """
10805 app = wx.GetApp()
dfbb5885 10806 assert app is not None, 'No wx.App created yet'
d14a1e28
RD
10807
10808 global _wxPyCallAfterId
10809 if _wxPyCallAfterId is None:
10810 _wxPyCallAfterId = wx.NewEventType()
10811 app.Connect(-1, -1, _wxPyCallAfterId,
10812 lambda event: event.callable(*event.args, **event.kw) )
10813 evt = wx.PyEvent()
10814 evt.SetEventType(_wxPyCallAfterId)
10815 evt.callable = callable
10816 evt.args = args
10817 evt.kw = kw
10818 wx.PostEvent(app, evt)
10819
10820
10821#----------------------------------------------------------------------------
10822
10823
10824class FutureCall:
10825 """
4276dc52 10826 A convenience class for wx.Timer, that calls the given callable
d14a1e28
RD
10827 object once after the given amount of milliseconds, passing any
10828 positional or keyword args. The return value of the callable is
61863841 10829 availbale after it has been run with the `GetResult` method.
d14a1e28
RD
10830
10831 If you don't need to get the return value or restart the timer
10832 then there is no need to hold a reference to this object. It will
10833 hold a reference to itself while the timer is running (the timer
10834 has a reference to self.Notify) but the cycle will be broken when
10835 the timer completes, automatically cleaning up the wx.FutureCall
10836 object.
61863841
RD
10837
10838 :see: `wx.CallAfter`
d14a1e28
RD
10839 """
10840 def __init__(self, millis, callable, *args, **kwargs):
10841 self.millis = millis
10842 self.callable = callable
10843 self.SetArgs(*args, **kwargs)
10844 self.runCount = 0
4276dc52 10845 self.running = False
d14a1e28
RD
10846 self.hasRun = False
10847 self.result = None
10848 self.timer = None
10849 self.Start()
10850
10851 def __del__(self):
10852 self.Stop()
10853
10854
10855 def Start(self, millis=None, *args, **kwargs):
10856 """
10857 (Re)start the timer
10858 """
10859 self.hasRun = False
10860 if millis is not None:
10861 self.millis = millis
10862 if args or kwargs:
10863 self.SetArgs(*args, **kwargs)
10864 self.Stop()
10865 self.timer = wx.PyTimer(self.Notify)
10866 self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
4276dc52 10867 self.running = True
d14a1e28
RD
10868 Restart = Start
10869
10870
10871 def Stop(self):
10872 """
10873 Stop and destroy the timer.
10874 """
10875 if self.timer is not None:
10876 self.timer.Stop()
10877 self.timer = None
10878
10879
10880 def GetInterval(self):
10881 if self.timer is not None:
10882 return self.timer.GetInterval()
10883 else:
10884 return 0
10885
10886
10887 def IsRunning(self):
10888 return self.timer is not None and self.timer.IsRunning()
10889
10890
10891 def SetArgs(self, *args, **kwargs):
10892 """
10893 (Re)set the args passed to the callable object. This is
10894 useful in conjunction with Restart if you want to schedule a
10895 new call to the same callable object but with different
10896 parameters.
10897 """
10898 self.args = args
10899 self.kwargs = kwargs
10900
10901
10902 def HasRun(self):
10903 return self.hasRun
10904
10905 def GetResult(self):
10906 return self.result
10907
10908 def Notify(self):
10909 """
10910 The timer has expired so call the callable.
10911 """
10912 if self.callable and getattr(self.callable, 'im_self', True):
10913 self.runCount += 1
4276dc52 10914 self.running = False
d14a1e28
RD
10915 self.result = self.callable(*self.args, **self.kwargs)
10916 self.hasRun = True
4276dc52
RD
10917 if not self.running:
10918 # if it wasn't restarted, then cleanup
10919 wx.CallAfter(self.Stop)
d14a1e28
RD
10920
10921
a95a7133
RD
10922
10923#----------------------------------------------------------------------------
10924# Control which items in this module should be documented by epydoc.
10925# We allow only classes and functions, which will help reduce the size
10926# of the docs by filtering out the zillions of constants, EVT objects,
10927# and etc that don't make much sense by themselves, but are instead
10928# documented (or will be) as part of the classes/functions/methods
10929# where they should be used.
10930
66c033b4
RD
10931class __DocFilter:
10932 """
10933 A filter for epydoc that only allows non-Ptr classes and
10934 fucntions, in order to reduce the clutter in the API docs.
10935 """
10936 def __init__(self, globals):
10937 self._globals = globals
10938
10939 def __call__(self, name):
10940 import types
10941 obj = self._globals.get(name, None)
10942 if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]:
10943 return False
10944 if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'):
10945 return False
10946 return True
a95a7133 10947
d14a1e28
RD
10948#----------------------------------------------------------------------------
10949#----------------------------------------------------------------------------
10950
10951# Import other modules in this package that should show up in the
10952# "core" wx namespace
54f9ee45
RD
10953from _gdi import *
10954from _windows import *
10955from _controls import *
10956from _misc import *
d14a1e28 10957
3a04f143
RD
10958
10959# Fixup the stock objects since they can't be used yet. (They will be
10960# restored in wx.PyApp.OnInit.)
54f9ee45 10961_core_._wxPyFixStockObjects()
3a04f143 10962
d14a1e28
RD
10963#----------------------------------------------------------------------------
10964#----------------------------------------------------------------------------
10965
10966