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