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