Fixed bug preventing dir enumeration from working on WinCE
[wxWidgets.git] / wxPython / src / mac / _core.py
1 # This file was created automatically by SWIG.
2 # Don't modify this file, modify the SWIG interface instead.
3
4 import __core
5
6 def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
7 if (name == "this"):
8 if isinstance(value, class_type):
9 self.__dict__[name] = value.this
10 if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
11 del value.thisown
12 return
13 method = class_type.__swig_setmethods__.get(name,None)
14 if method: return method(self,value)
15 if (not static) or hasattr(self,name) or (name == "thisown"):
16 self.__dict__[name] = value
17 else:
18 raise AttributeError("You cannot add attributes to %s" % self)
19
20 def _swig_setattr(self,class_type,name,value):
21 return _swig_setattr_nondynamic(self,class_type,name,value,0)
22
23 def _swig_getattr(self,class_type,name):
24 method = class_type.__swig_getmethods__.get(name,None)
25 if method: return method(self)
26 raise AttributeError,name
27
28 import types
29 try:
30 _object = types.ObjectType
31 _newclass = 1
32 except AttributeError:
33 class _object : pass
34 _newclass = 0
35 del types
36
37
38 def _swig_setattr_nondynamic_method(set):
39 def set_attr(self,name,value):
40 if hasattr(self,name) or (name in ("this", "thisown")):
41 set(self,name,value)
42 else:
43 raise AttributeError("You cannot add attributes to %s" % self)
44 return set_attr
45
46
47 #// Give a reference to the dictionary of this module to the C++ extension
48 #// code.
49 _core_._wxPySetDictionary(vars())
50
51 #// A little trick to make 'wx' be a reference to this module so wx.Names can
52 #// be used here.
53 import sys as _sys
54 wx = _sys.modules[__name__]
55
56
57 #----------------------------------------------------------------------------
58
59 def _deprecated(callable, msg=None):
60 """
61 Create a wrapper function that will raise a DeprecationWarning
62 before calling the callable.
63 """
64 if msg is None:
65 msg = "%s is deprecated" % callable
66 def deprecatedWrapper(*args, **kwargs):
67 import warnings
68 warnings.warn(msg, DeprecationWarning, stacklevel=2)
69 return callable(*args, **kwargs)
70 deprecatedWrapper.__doc__ = msg
71 return deprecatedWrapper
72
73
74 #----------------------------------------------------------------------------
75
76 wxNOT_FOUND = __core.wxNOT_FOUND
77 wxVSCROLL = __core.wxVSCROLL
78 wxHSCROLL = __core.wxHSCROLL
79 wxCAPTION = __core.wxCAPTION
80 wxDOUBLE_BORDER = __core.wxDOUBLE_BORDER
81 wxSUNKEN_BORDER = __core.wxSUNKEN_BORDER
82 wxRAISED_BORDER = __core.wxRAISED_BORDER
83 wxBORDER = __core.wxBORDER
84 wxSIMPLE_BORDER = __core.wxSIMPLE_BORDER
85 wxSTATIC_BORDER = __core.wxSTATIC_BORDER
86 wxTRANSPARENT_WINDOW = __core.wxTRANSPARENT_WINDOW
87 wxNO_BORDER = __core.wxNO_BORDER
88 wxTAB_TRAVERSAL = __core.wxTAB_TRAVERSAL
89 wxWANTS_CHARS = __core.wxWANTS_CHARS
90 wxPOPUP_WINDOW = __core.wxPOPUP_WINDOW
91 wxCENTER_FRAME = __core.wxCENTER_FRAME
92 wxCENTRE_ON_SCREEN = __core.wxCENTRE_ON_SCREEN
93 wxCENTER_ON_SCREEN = __core.wxCENTER_ON_SCREEN
94 wxCLIP_CHILDREN = __core.wxCLIP_CHILDREN
95 wxCLIP_SIBLINGS = __core.wxCLIP_SIBLINGS
96 wxALWAYS_SHOW_SB = __core.wxALWAYS_SHOW_SB
97 wxRETAINED = __core.wxRETAINED
98 wxBACKINGSTORE = __core.wxBACKINGSTORE
99 wxCOLOURED = __core.wxCOLOURED
100 wxFIXED_LENGTH = __core.wxFIXED_LENGTH
101 wxLB_NEEDED_SB = __core.wxLB_NEEDED_SB
102 wxLB_ALWAYS_SB = __core.wxLB_ALWAYS_SB
103 wxLB_SORT = __core.wxLB_SORT
104 wxLB_SINGLE = __core.wxLB_SINGLE
105 wxLB_MULTIPLE = __core.wxLB_MULTIPLE
106 wxLB_EXTENDED = __core.wxLB_EXTENDED
107 wxLB_OWNERDRAW = __core.wxLB_OWNERDRAW
108 wxLB_HSCROLL = __core.wxLB_HSCROLL
109 wxPROCESS_ENTER = __core.wxPROCESS_ENTER
110 wxPASSWORD = __core.wxPASSWORD
111 wxCB_SIMPLE = __core.wxCB_SIMPLE
112 wxCB_DROPDOWN = __core.wxCB_DROPDOWN
113 wxCB_SORT = __core.wxCB_SORT
114 wxCB_READONLY = __core.wxCB_READONLY
115 wxRA_HORIZONTAL = __core.wxRA_HORIZONTAL
116 wxRA_VERTICAL = __core.wxRA_VERTICAL
117 wxRA_SPECIFY_ROWS = __core.wxRA_SPECIFY_ROWS
118 wxRA_SPECIFY_COLS = __core.wxRA_SPECIFY_COLS
119 wxRA_USE_CHECKBOX = __core.wxRA_USE_CHECKBOX
120 wxRB_GROUP = __core.wxRB_GROUP
121 wxRB_SINGLE = __core.wxRB_SINGLE
122 wxSB_HORIZONTAL = __core.wxSB_HORIZONTAL
123 wxSB_VERTICAL = __core.wxSB_VERTICAL
124 wxRB_USE_CHECKBOX = __core.wxRB_USE_CHECKBOX
125 wxST_SIZEGRIP = __core.wxST_SIZEGRIP
126 wxST_NO_AUTORESIZE = __core.wxST_NO_AUTORESIZE
127 wxFLOOD_SURFACE = __core.wxFLOOD_SURFACE
128 wxFLOOD_BORDER = __core.wxFLOOD_BORDER
129 wxODDEVEN_RULE = __core.wxODDEVEN_RULE
130 wxWINDING_RULE = __core.wxWINDING_RULE
131 wxTOOL_TOP = __core.wxTOOL_TOP
132 wxTOOL_BOTTOM = __core.wxTOOL_BOTTOM
133 wxTOOL_LEFT = __core.wxTOOL_LEFT
134 wxTOOL_RIGHT = __core.wxTOOL_RIGHT
135 wxOK = __core.wxOK
136 wxYES_NO = __core.wxYES_NO
137 wxCANCEL = __core.wxCANCEL
138 wxYES = __core.wxYES
139 wxNO = __core.wxNO
140 wxNO_DEFAULT = __core.wxNO_DEFAULT
141 wxYES_DEFAULT = __core.wxYES_DEFAULT
142 wxICON_EXCLAMATION = __core.wxICON_EXCLAMATION
143 wxICON_HAND = __core.wxICON_HAND
144 wxICON_QUESTION = __core.wxICON_QUESTION
145 wxICON_INFORMATION = __core.wxICON_INFORMATION
146 wxICON_STOP = __core.wxICON_STOP
147 wxICON_ASTERISK = __core.wxICON_ASTERISK
148 wxICON_MASK = __core.wxICON_MASK
149 wxICON_WARNING = __core.wxICON_WARNING
150 wxICON_ERROR = __core.wxICON_ERROR
151 wxFORWARD = __core.wxFORWARD
152 wxBACKWARD = __core.wxBACKWARD
153 wxRESET = __core.wxRESET
154 wxHELP = __core.wxHELP
155 wxMORE = __core.wxMORE
156 wxSETUP = __core.wxSETUP
157 wxSIZE_AUTO_WIDTH = __core.wxSIZE_AUTO_WIDTH
158 wxSIZE_AUTO_HEIGHT = __core.wxSIZE_AUTO_HEIGHT
159 wxSIZE_AUTO = __core.wxSIZE_AUTO
160 wxSIZE_USE_EXISTING = __core.wxSIZE_USE_EXISTING
161 wxSIZE_ALLOW_MINUS_ONE = __core.wxSIZE_ALLOW_MINUS_ONE
162 wxPORTRAIT = __core.wxPORTRAIT
163 wxLANDSCAPE = __core.wxLANDSCAPE
164 wxPRINT_QUALITY_HIGH = __core.wxPRINT_QUALITY_HIGH
165 wxPRINT_QUALITY_MEDIUM = __core.wxPRINT_QUALITY_MEDIUM
166 wxPRINT_QUALITY_LOW = __core.wxPRINT_QUALITY_LOW
167 wxPRINT_QUALITY_DRAFT = __core.wxPRINT_QUALITY_DRAFT
168 wxID_ANY = __core.wxID_ANY
169 wxID_SEPARATOR = __core.wxID_SEPARATOR
170 wxID_LOWEST = __core.wxID_LOWEST
171 wxID_OPEN = __core.wxID_OPEN
172 wxID_CLOSE = __core.wxID_CLOSE
173 wxID_NEW = __core.wxID_NEW
174 wxID_SAVE = __core.wxID_SAVE
175 wxID_SAVEAS = __core.wxID_SAVEAS
176 wxID_REVERT = __core.wxID_REVERT
177 wxID_EXIT = __core.wxID_EXIT
178 wxID_UNDO = __core.wxID_UNDO
179 wxID_REDO = __core.wxID_REDO
180 wxID_HELP = __core.wxID_HELP
181 wxID_PRINT = __core.wxID_PRINT
182 wxID_PRINT_SETUP = __core.wxID_PRINT_SETUP
183 wxID_PREVIEW = __core.wxID_PREVIEW
184 wxID_ABOUT = __core.wxID_ABOUT
185 wxID_HELP_CONTENTS = __core.wxID_HELP_CONTENTS
186 wxID_HELP_COMMANDS = __core.wxID_HELP_COMMANDS
187 wxID_HELP_PROCEDURES = __core.wxID_HELP_PROCEDURES
188 wxID_HELP_CONTEXT = __core.wxID_HELP_CONTEXT
189 wxID_CLOSE_ALL = __core.wxID_CLOSE_ALL
190 wxID_PREFERENCES = __core.wxID_PREFERENCES
191 wxID_CUT = __core.wxID_CUT
192 wxID_COPY = __core.wxID_COPY
193 wxID_PASTE = __core.wxID_PASTE
194 wxID_CLEAR = __core.wxID_CLEAR
195 wxID_FIND = __core.wxID_FIND
196 wxID_DUPLICATE = __core.wxID_DUPLICATE
197 wxID_SELECTALL = __core.wxID_SELECTALL
198 wxID_DELETE = __core.wxID_DELETE
199 wxID_REPLACE = __core.wxID_REPLACE
200 wxID_REPLACE_ALL = __core.wxID_REPLACE_ALL
201 wxID_PROPERTIES = __core.wxID_PROPERTIES
202 wxID_VIEW_DETAILS = __core.wxID_VIEW_DETAILS
203 wxID_VIEW_LARGEICONS = __core.wxID_VIEW_LARGEICONS
204 wxID_VIEW_SMALLICONS = __core.wxID_VIEW_SMALLICONS
205 wxID_VIEW_LIST = __core.wxID_VIEW_LIST
206 wxID_VIEW_SORTDATE = __core.wxID_VIEW_SORTDATE
207 wxID_VIEW_SORTNAME = __core.wxID_VIEW_SORTNAME
208 wxID_VIEW_SORTSIZE = __core.wxID_VIEW_SORTSIZE
209 wxID_VIEW_SORTTYPE = __core.wxID_VIEW_SORTTYPE
210 wxID_FILE1 = __core.wxID_FILE1
211 wxID_FILE2 = __core.wxID_FILE2
212 wxID_FILE3 = __core.wxID_FILE3
213 wxID_FILE4 = __core.wxID_FILE4
214 wxID_FILE5 = __core.wxID_FILE5
215 wxID_FILE6 = __core.wxID_FILE6
216 wxID_FILE7 = __core.wxID_FILE7
217 wxID_FILE8 = __core.wxID_FILE8
218 wxID_FILE9 = __core.wxID_FILE9
219 wxID_OK = __core.wxID_OK
220 wxID_CANCEL = __core.wxID_CANCEL
221 wxID_APPLY = __core.wxID_APPLY
222 wxID_YES = __core.wxID_YES
223 wxID_NO = __core.wxID_NO
224 wxID_STATIC = __core.wxID_STATIC
225 wxID_FORWARD = __core.wxID_FORWARD
226 wxID_BACKWARD = __core.wxID_BACKWARD
227 wxID_DEFAULT = __core.wxID_DEFAULT
228 wxID_MORE = __core.wxID_MORE
229 wxID_SETUP = __core.wxID_SETUP
230 wxID_RESET = __core.wxID_RESET
231 wxID_CONTEXT_HELP = __core.wxID_CONTEXT_HELP
232 wxID_YESTOALL = __core.wxID_YESTOALL
233 wxID_NOTOALL = __core.wxID_NOTOALL
234 wxID_ABORT = __core.wxID_ABORT
235 wxID_RETRY = __core.wxID_RETRY
236 wxID_IGNORE = __core.wxID_IGNORE
237 wxID_ADD = __core.wxID_ADD
238 wxID_REMOVE = __core.wxID_REMOVE
239 wxID_UP = __core.wxID_UP
240 wxID_DOWN = __core.wxID_DOWN
241 wxID_HOME = __core.wxID_HOME
242 wxID_REFRESH = __core.wxID_REFRESH
243 wxID_STOP = __core.wxID_STOP
244 wxID_INDEX = __core.wxID_INDEX
245 wxID_BOLD = __core.wxID_BOLD
246 wxID_ITALIC = __core.wxID_ITALIC
247 wxID_JUSTIFY_CENTER = __core.wxID_JUSTIFY_CENTER
248 wxID_JUSTIFY_FILL = __core.wxID_JUSTIFY_FILL
249 wxID_JUSTIFY_RIGHT = __core.wxID_JUSTIFY_RIGHT
250 wxID_JUSTIFY_LEFT = __core.wxID_JUSTIFY_LEFT
251 wxID_UNDERLINE = __core.wxID_UNDERLINE
252 wxID_INDENT = __core.wxID_INDENT
253 wxID_UNINDENT = __core.wxID_UNINDENT
254 wxID_ZOOM_100 = __core.wxID_ZOOM_100
255 wxID_ZOOM_FIT = __core.wxID_ZOOM_FIT
256 wxID_ZOOM_IN = __core.wxID_ZOOM_IN
257 wxID_ZOOM_OUT = __core.wxID_ZOOM_OUT
258 wxID_UNDELETE = __core.wxID_UNDELETE
259 wxID_REVERT_TO_SAVED = __core.wxID_REVERT_TO_SAVED
260 wxID_HIGHEST = __core.wxID_HIGHEST
261 wxOPEN = __core.wxOPEN
262 wxSAVE = __core.wxSAVE
263 wxHIDE_READONLY = __core.wxHIDE_READONLY
264 wxOVERWRITE_PROMPT = __core.wxOVERWRITE_PROMPT
265 wxFILE_MUST_EXIST = __core.wxFILE_MUST_EXIST
266 wxMULTIPLE = __core.wxMULTIPLE
267 wxCHANGE_DIR = __core.wxCHANGE_DIR
268 wxACCEL_ALT = __core.wxACCEL_ALT
269 wxACCEL_CTRL = __core.wxACCEL_CTRL
270 wxACCEL_SHIFT = __core.wxACCEL_SHIFT
271 wxACCEL_NORMAL = __core.wxACCEL_NORMAL
272 wxPD_AUTO_HIDE = __core.wxPD_AUTO_HIDE
273 wxPD_APP_MODAL = __core.wxPD_APP_MODAL
274 wxPD_CAN_ABORT = __core.wxPD_CAN_ABORT
275 wxPD_ELAPSED_TIME = __core.wxPD_ELAPSED_TIME
276 wxPD_ESTIMATED_TIME = __core.wxPD_ESTIMATED_TIME
277 wxPD_REMAINING_TIME = __core.wxPD_REMAINING_TIME
278 wxPD_SMOOTH = __core.wxPD_SMOOTH
279 wxPD_CAN_SKIP = __core.wxPD_CAN_SKIP
280 wxDD_NEW_DIR_BUTTON = __core.wxDD_NEW_DIR_BUTTON
281 wxDD_DEFAULT_STYLE = __core.wxDD_DEFAULT_STYLE
282 wxMENU_TEAROFF = __core.wxMENU_TEAROFF
283 wxMB_DOCKABLE = __core.wxMB_DOCKABLE
284 wxNO_FULL_REPAINT_ON_RESIZE = __core.wxNO_FULL_REPAINT_ON_RESIZE
285 wxFULL_REPAINT_ON_RESIZE = __core.wxFULL_REPAINT_ON_RESIZE
286 wxLI_HORIZONTAL = __core.wxLI_HORIZONTAL
287 wxLI_VERTICAL = __core.wxLI_VERTICAL
288 wxWS_EX_VALIDATE_RECURSIVELY = __core.wxWS_EX_VALIDATE_RECURSIVELY
289 wxWS_EX_BLOCK_EVENTS = __core.wxWS_EX_BLOCK_EVENTS
290 wxWS_EX_TRANSIENT = __core.wxWS_EX_TRANSIENT
291 wxWS_EX_THEMED_BACKGROUND = __core.wxWS_EX_THEMED_BACKGROUND
292 wxWS_EX_PROCESS_IDLE = __core.wxWS_EX_PROCESS_IDLE
293 wxWS_EX_PROCESS_UI_UPDATES = __core.wxWS_EX_PROCESS_UI_UPDATES
294 wxMM_TEXT = __core.wxMM_TEXT
295 wxMM_LOMETRIC = __core.wxMM_LOMETRIC
296 wxMM_HIMETRIC = __core.wxMM_HIMETRIC
297 wxMM_LOENGLISH = __core.wxMM_LOENGLISH
298 wxMM_HIENGLISH = __core.wxMM_HIENGLISH
299 wxMM_TWIPS = __core.wxMM_TWIPS
300 wxMM_ISOTROPIC = __core.wxMM_ISOTROPIC
301 wxMM_ANISOTROPIC = __core.wxMM_ANISOTROPIC
302 wxMM_POINTS = __core.wxMM_POINTS
303 wxMM_METRIC = __core.wxMM_METRIC
304 wxCENTRE = __core.wxCENTRE
305 wxCENTER = __core.wxCENTER
306 wxHORIZONTAL = __core.wxHORIZONTAL
307 wxVERTICAL = __core.wxVERTICAL
308 wxBOTH = __core.wxBOTH
309 wxLEFT = __core.wxLEFT
310 wxRIGHT = __core.wxRIGHT
311 wxUP = __core.wxUP
312 wxDOWN = __core.wxDOWN
313 wxTOP = __core.wxTOP
314 wxBOTTOM = __core.wxBOTTOM
315 wxNORTH = __core.wxNORTH
316 wxSOUTH = __core.wxSOUTH
317 wxWEST = __core.wxWEST
318 wxEAST = __core.wxEAST
319 wxALL = __core.wxALL
320 wxALIGN_NOT = __core.wxALIGN_NOT
321 wxALIGN_CENTER_HORIZONTAL = __core.wxALIGN_CENTER_HORIZONTAL
322 wxALIGN_CENTRE_HORIZONTAL = __core.wxALIGN_CENTRE_HORIZONTAL
323 wxALIGN_LEFT = __core.wxALIGN_LEFT
324 wxALIGN_TOP = __core.wxALIGN_TOP
325 wxALIGN_RIGHT = __core.wxALIGN_RIGHT
326 wxALIGN_BOTTOM = __core.wxALIGN_BOTTOM
327 wxALIGN_CENTER_VERTICAL = __core.wxALIGN_CENTER_VERTICAL
328 wxALIGN_CENTRE_VERTICAL = __core.wxALIGN_CENTRE_VERTICAL
329 wxALIGN_CENTER = __core.wxALIGN_CENTER
330 wxALIGN_CENTRE = __core.wxALIGN_CENTRE
331 wxALIGN_MASK = __core.wxALIGN_MASK
332 wxSTRETCH_NOT = __core.wxSTRETCH_NOT
333 wxSHRINK = __core.wxSHRINK
334 wxGROW = __core.wxGROW
335 wxEXPAND = __core.wxEXPAND
336 wxSHAPED = __core.wxSHAPED
337 wxFIXED_MINSIZE = __core.wxFIXED_MINSIZE
338 wxTILE = __core.wxTILE
339 wxADJUST_MINSIZE = __core.wxADJUST_MINSIZE
340 wxBORDER_DEFAULT = __core.wxBORDER_DEFAULT
341 wxBORDER_NONE = __core.wxBORDER_NONE
342 wxBORDER_STATIC = __core.wxBORDER_STATIC
343 wxBORDER_SIMPLE = __core.wxBORDER_SIMPLE
344 wxBORDER_RAISED = __core.wxBORDER_RAISED
345 wxBORDER_SUNKEN = __core.wxBORDER_SUNKEN
346 wxBORDER_DOUBLE = __core.wxBORDER_DOUBLE
347 wxBORDER_MASK = __core.wxBORDER_MASK
348 wxBG_STYLE_SYSTEM = __core.wxBG_STYLE_SYSTEM
349 wxBG_STYLE_COLOUR = __core.wxBG_STYLE_COLOUR
350 wxBG_STYLE_CUSTOM = __core.wxBG_STYLE_CUSTOM
351 wxDEFAULT = __core.wxDEFAULT
352 wxDECORATIVE = __core.wxDECORATIVE
353 wxROMAN = __core.wxROMAN
354 wxSCRIPT = __core.wxSCRIPT
355 wxSWISS = __core.wxSWISS
356 wxMODERN = __core.wxMODERN
357 wxTELETYPE = __core.wxTELETYPE
358 wxVARIABLE = __core.wxVARIABLE
359 wxFIXED = __core.wxFIXED
360 wxNORMAL = __core.wxNORMAL
361 wxLIGHT = __core.wxLIGHT
362 wxBOLD = __core.wxBOLD
363 wxITALIC = __core.wxITALIC
364 wxSLANT = __core.wxSLANT
365 wxSOLID = __core.wxSOLID
366 wxDOT = __core.wxDOT
367 wxLONG_DASH = __core.wxLONG_DASH
368 wxSHORT_DASH = __core.wxSHORT_DASH
369 wxDOT_DASH = __core.wxDOT_DASH
370 wxUSER_DASH = __core.wxUSER_DASH
371 wxTRANSPARENT = __core.wxTRANSPARENT
372 wxSTIPPLE = __core.wxSTIPPLE
373 wxBDIAGONAL_HATCH = __core.wxBDIAGONAL_HATCH
374 wxCROSSDIAG_HATCH = __core.wxCROSSDIAG_HATCH
375 wxFDIAGONAL_HATCH = __core.wxFDIAGONAL_HATCH
376 wxCROSS_HATCH = __core.wxCROSS_HATCH
377 wxHORIZONTAL_HATCH = __core.wxHORIZONTAL_HATCH
378 wxVERTICAL_HATCH = __core.wxVERTICAL_HATCH
379 wxJOIN_BEVEL = __core.wxJOIN_BEVEL
380 wxJOIN_MITER = __core.wxJOIN_MITER
381 wxJOIN_ROUND = __core.wxJOIN_ROUND
382 wxCAP_ROUND = __core.wxCAP_ROUND
383 wxCAP_PROJECTING = __core.wxCAP_PROJECTING
384 wxCAP_BUTT = __core.wxCAP_BUTT
385 wxCLEAR = __core.wxCLEAR
386 wxXOR = __core.wxXOR
387 wxINVERT = __core.wxINVERT
388 wxOR_REVERSE = __core.wxOR_REVERSE
389 wxAND_REVERSE = __core.wxAND_REVERSE
390 wxCOPY = __core.wxCOPY
391 wxAND = __core.wxAND
392 wxAND_INVERT = __core.wxAND_INVERT
393 wxNO_OP = __core.wxNO_OP
394 wxNOR = __core.wxNOR
395 wxEQUIV = __core.wxEQUIV
396 wxSRC_INVERT = __core.wxSRC_INVERT
397 wxOR_INVERT = __core.wxOR_INVERT
398 wxNAND = __core.wxNAND
399 wxOR = __core.wxOR
400 wxSET = __core.wxSET
401 WXK_BACK = __core.WXK_BACK
402 WXK_TAB = __core.WXK_TAB
403 WXK_RETURN = __core.WXK_RETURN
404 WXK_ESCAPE = __core.WXK_ESCAPE
405 WXK_SPACE = __core.WXK_SPACE
406 WXK_DELETE = __core.WXK_DELETE
407 WXK_START = __core.WXK_START
408 WXK_LBUTTON = __core.WXK_LBUTTON
409 WXK_RBUTTON = __core.WXK_RBUTTON
410 WXK_CANCEL = __core.WXK_CANCEL
411 WXK_MBUTTON = __core.WXK_MBUTTON
412 WXK_CLEAR = __core.WXK_CLEAR
413 WXK_SHIFT = __core.WXK_SHIFT
414 WXK_ALT = __core.WXK_ALT
415 WXK_CONTROL = __core.WXK_CONTROL
416 WXK_MENU = __core.WXK_MENU
417 WXK_PAUSE = __core.WXK_PAUSE
418 WXK_CAPITAL = __core.WXK_CAPITAL
419 WXK_PRIOR = __core.WXK_PRIOR
420 WXK_NEXT = __core.WXK_NEXT
421 WXK_END = __core.WXK_END
422 WXK_HOME = __core.WXK_HOME
423 WXK_LEFT = __core.WXK_LEFT
424 WXK_UP = __core.WXK_UP
425 WXK_RIGHT = __core.WXK_RIGHT
426 WXK_DOWN = __core.WXK_DOWN
427 WXK_SELECT = __core.WXK_SELECT
428 WXK_PRINT = __core.WXK_PRINT
429 WXK_EXECUTE = __core.WXK_EXECUTE
430 WXK_SNAPSHOT = __core.WXK_SNAPSHOT
431 WXK_INSERT = __core.WXK_INSERT
432 WXK_HELP = __core.WXK_HELP
433 WXK_NUMPAD0 = __core.WXK_NUMPAD0
434 WXK_NUMPAD1 = __core.WXK_NUMPAD1
435 WXK_NUMPAD2 = __core.WXK_NUMPAD2
436 WXK_NUMPAD3 = __core.WXK_NUMPAD3
437 WXK_NUMPAD4 = __core.WXK_NUMPAD4
438 WXK_NUMPAD5 = __core.WXK_NUMPAD5
439 WXK_NUMPAD6 = __core.WXK_NUMPAD6
440 WXK_NUMPAD7 = __core.WXK_NUMPAD7
441 WXK_NUMPAD8 = __core.WXK_NUMPAD8
442 WXK_NUMPAD9 = __core.WXK_NUMPAD9
443 WXK_MULTIPLY = __core.WXK_MULTIPLY
444 WXK_ADD = __core.WXK_ADD
445 WXK_SEPARATOR = __core.WXK_SEPARATOR
446 WXK_SUBTRACT = __core.WXK_SUBTRACT
447 WXK_DECIMAL = __core.WXK_DECIMAL
448 WXK_DIVIDE = __core.WXK_DIVIDE
449 WXK_F1 = __core.WXK_F1
450 WXK_F2 = __core.WXK_F2
451 WXK_F3 = __core.WXK_F3
452 WXK_F4 = __core.WXK_F4
453 WXK_F5 = __core.WXK_F5
454 WXK_F6 = __core.WXK_F6
455 WXK_F7 = __core.WXK_F7
456 WXK_F8 = __core.WXK_F8
457 WXK_F9 = __core.WXK_F9
458 WXK_F10 = __core.WXK_F10
459 WXK_F11 = __core.WXK_F11
460 WXK_F12 = __core.WXK_F12
461 WXK_F13 = __core.WXK_F13
462 WXK_F14 = __core.WXK_F14
463 WXK_F15 = __core.WXK_F15
464 WXK_F16 = __core.WXK_F16
465 WXK_F17 = __core.WXK_F17
466 WXK_F18 = __core.WXK_F18
467 WXK_F19 = __core.WXK_F19
468 WXK_F20 = __core.WXK_F20
469 WXK_F21 = __core.WXK_F21
470 WXK_F22 = __core.WXK_F22
471 WXK_F23 = __core.WXK_F23
472 WXK_F24 = __core.WXK_F24
473 WXK_NUMLOCK = __core.WXK_NUMLOCK
474 WXK_SCROLL = __core.WXK_SCROLL
475 WXK_PAGEUP = __core.WXK_PAGEUP
476 WXK_PAGEDOWN = __core.WXK_PAGEDOWN
477 WXK_NUMPAD_SPACE = __core.WXK_NUMPAD_SPACE
478 WXK_NUMPAD_TAB = __core.WXK_NUMPAD_TAB
479 WXK_NUMPAD_ENTER = __core.WXK_NUMPAD_ENTER
480 WXK_NUMPAD_F1 = __core.WXK_NUMPAD_F1
481 WXK_NUMPAD_F2 = __core.WXK_NUMPAD_F2
482 WXK_NUMPAD_F3 = __core.WXK_NUMPAD_F3
483 WXK_NUMPAD_F4 = __core.WXK_NUMPAD_F4
484 WXK_NUMPAD_HOME = __core.WXK_NUMPAD_HOME
485 WXK_NUMPAD_LEFT = __core.WXK_NUMPAD_LEFT
486 WXK_NUMPAD_UP = __core.WXK_NUMPAD_UP
487 WXK_NUMPAD_RIGHT = __core.WXK_NUMPAD_RIGHT
488 WXK_NUMPAD_DOWN = __core.WXK_NUMPAD_DOWN
489 WXK_NUMPAD_PRIOR = __core.WXK_NUMPAD_PRIOR
490 WXK_NUMPAD_PAGEUP = __core.WXK_NUMPAD_PAGEUP
491 WXK_NUMPAD_NEXT = __core.WXK_NUMPAD_NEXT
492 WXK_NUMPAD_PAGEDOWN = __core.WXK_NUMPAD_PAGEDOWN
493 WXK_NUMPAD_END = __core.WXK_NUMPAD_END
494 WXK_NUMPAD_BEGIN = __core.WXK_NUMPAD_BEGIN
495 WXK_NUMPAD_INSERT = __core.WXK_NUMPAD_INSERT
496 WXK_NUMPAD_DELETE = __core.WXK_NUMPAD_DELETE
497 WXK_NUMPAD_EQUAL = __core.WXK_NUMPAD_EQUAL
498 WXK_NUMPAD_MULTIPLY = __core.WXK_NUMPAD_MULTIPLY
499 WXK_NUMPAD_ADD = __core.WXK_NUMPAD_ADD
500 WXK_NUMPAD_SEPARATOR = __core.WXK_NUMPAD_SEPARATOR
501 WXK_NUMPAD_SUBTRACT = __core.WXK_NUMPAD_SUBTRACT
502 WXK_NUMPAD_DECIMAL = __core.WXK_NUMPAD_DECIMAL
503 WXK_NUMPAD_DIVIDE = __core.WXK_NUMPAD_DIVIDE
504 WXK_WINDOWS_LEFT = __core.WXK_WINDOWS_LEFT
505 WXK_WINDOWS_RIGHT = __core.WXK_WINDOWS_RIGHT
506 WXK_WINDOWS_MENU = __core.WXK_WINDOWS_MENU
507 WXK_COMMAND = __core.WXK_COMMAND
508 WXK_SPECIAL1 = __core.WXK_SPECIAL1
509 WXK_SPECIAL2 = __core.WXK_SPECIAL2
510 WXK_SPECIAL3 = __core.WXK_SPECIAL3
511 WXK_SPECIAL4 = __core.WXK_SPECIAL4
512 WXK_SPECIAL5 = __core.WXK_SPECIAL5
513 WXK_SPECIAL6 = __core.WXK_SPECIAL6
514 WXK_SPECIAL7 = __core.WXK_SPECIAL7
515 WXK_SPECIAL8 = __core.WXK_SPECIAL8
516 WXK_SPECIAL9 = __core.WXK_SPECIAL9
517 WXK_SPECIAL10 = __core.WXK_SPECIAL10
518 WXK_SPECIAL11 = __core.WXK_SPECIAL11
519 WXK_SPECIAL12 = __core.WXK_SPECIAL12
520 WXK_SPECIAL13 = __core.WXK_SPECIAL13
521 WXK_SPECIAL14 = __core.WXK_SPECIAL14
522 WXK_SPECIAL15 = __core.WXK_SPECIAL15
523 WXK_SPECIAL16 = __core.WXK_SPECIAL16
524 WXK_SPECIAL17 = __core.WXK_SPECIAL17
525 WXK_SPECIAL18 = __core.WXK_SPECIAL18
526 WXK_SPECIAL19 = __core.WXK_SPECIAL19
527 WXK_SPECIAL20 = __core.WXK_SPECIAL20
528 wxPAPER_NONE = __core.wxPAPER_NONE
529 wxPAPER_LETTER = __core.wxPAPER_LETTER
530 wxPAPER_LEGAL = __core.wxPAPER_LEGAL
531 wxPAPER_A4 = __core.wxPAPER_A4
532 wxPAPER_CSHEET = __core.wxPAPER_CSHEET
533 wxPAPER_DSHEET = __core.wxPAPER_DSHEET
534 wxPAPER_ESHEET = __core.wxPAPER_ESHEET
535 wxPAPER_LETTERSMALL = __core.wxPAPER_LETTERSMALL
536 wxPAPER_TABLOID = __core.wxPAPER_TABLOID
537 wxPAPER_LEDGER = __core.wxPAPER_LEDGER
538 wxPAPER_STATEMENT = __core.wxPAPER_STATEMENT
539 wxPAPER_EXECUTIVE = __core.wxPAPER_EXECUTIVE
540 wxPAPER_A3 = __core.wxPAPER_A3
541 wxPAPER_A4SMALL = __core.wxPAPER_A4SMALL
542 wxPAPER_A5 = __core.wxPAPER_A5
543 wxPAPER_B4 = __core.wxPAPER_B4
544 wxPAPER_B5 = __core.wxPAPER_B5
545 wxPAPER_FOLIO = __core.wxPAPER_FOLIO
546 wxPAPER_QUARTO = __core.wxPAPER_QUARTO
547 wxPAPER_10X14 = __core.wxPAPER_10X14
548 wxPAPER_11X17 = __core.wxPAPER_11X17
549 wxPAPER_NOTE = __core.wxPAPER_NOTE
550 wxPAPER_ENV_9 = __core.wxPAPER_ENV_9
551 wxPAPER_ENV_10 = __core.wxPAPER_ENV_10
552 wxPAPER_ENV_11 = __core.wxPAPER_ENV_11
553 wxPAPER_ENV_12 = __core.wxPAPER_ENV_12
554 wxPAPER_ENV_14 = __core.wxPAPER_ENV_14
555 wxPAPER_ENV_DL = __core.wxPAPER_ENV_DL
556 wxPAPER_ENV_C5 = __core.wxPAPER_ENV_C5
557 wxPAPER_ENV_C3 = __core.wxPAPER_ENV_C3
558 wxPAPER_ENV_C4 = __core.wxPAPER_ENV_C4
559 wxPAPER_ENV_C6 = __core.wxPAPER_ENV_C6
560 wxPAPER_ENV_C65 = __core.wxPAPER_ENV_C65
561 wxPAPER_ENV_B4 = __core.wxPAPER_ENV_B4
562 wxPAPER_ENV_B5 = __core.wxPAPER_ENV_B5
563 wxPAPER_ENV_B6 = __core.wxPAPER_ENV_B6
564 wxPAPER_ENV_ITALY = __core.wxPAPER_ENV_ITALY
565 wxPAPER_ENV_MONARCH = __core.wxPAPER_ENV_MONARCH
566 wxPAPER_ENV_PERSONAL = __core.wxPAPER_ENV_PERSONAL
567 wxPAPER_FANFOLD_US = __core.wxPAPER_FANFOLD_US
568 wxPAPER_FANFOLD_STD_GERMAN = __core.wxPAPER_FANFOLD_STD_GERMAN
569 wxPAPER_FANFOLD_LGL_GERMAN = __core.wxPAPER_FANFOLD_LGL_GERMAN
570 wxPAPER_ISO_B4 = __core.wxPAPER_ISO_B4
571 wxPAPER_JAPANESE_POSTCARD = __core.wxPAPER_JAPANESE_POSTCARD
572 wxPAPER_9X11 = __core.wxPAPER_9X11
573 wxPAPER_10X11 = __core.wxPAPER_10X11
574 wxPAPER_15X11 = __core.wxPAPER_15X11
575 wxPAPER_ENV_INVITE = __core.wxPAPER_ENV_INVITE
576 wxPAPER_LETTER_EXTRA = __core.wxPAPER_LETTER_EXTRA
577 wxPAPER_LEGAL_EXTRA = __core.wxPAPER_LEGAL_EXTRA
578 wxPAPER_TABLOID_EXTRA = __core.wxPAPER_TABLOID_EXTRA
579 wxPAPER_A4_EXTRA = __core.wxPAPER_A4_EXTRA
580 wxPAPER_LETTER_TRANSVERSE = __core.wxPAPER_LETTER_TRANSVERSE
581 wxPAPER_A4_TRANSVERSE = __core.wxPAPER_A4_TRANSVERSE
582 wxPAPER_LETTER_EXTRA_TRANSVERSE = __core.wxPAPER_LETTER_EXTRA_TRANSVERSE
583 wxPAPER_A_PLUS = __core.wxPAPER_A_PLUS
584 wxPAPER_B_PLUS = __core.wxPAPER_B_PLUS
585 wxPAPER_LETTER_PLUS = __core.wxPAPER_LETTER_PLUS
586 wxPAPER_A4_PLUS = __core.wxPAPER_A4_PLUS
587 wxPAPER_A5_TRANSVERSE = __core.wxPAPER_A5_TRANSVERSE
588 wxPAPER_B5_TRANSVERSE = __core.wxPAPER_B5_TRANSVERSE
589 wxPAPER_A3_EXTRA = __core.wxPAPER_A3_EXTRA
590 wxPAPER_A5_EXTRA = __core.wxPAPER_A5_EXTRA
591 wxPAPER_B5_EXTRA = __core.wxPAPER_B5_EXTRA
592 wxPAPER_A2 = __core.wxPAPER_A2
593 wxPAPER_A3_TRANSVERSE = __core.wxPAPER_A3_TRANSVERSE
594 wxPAPER_A3_EXTRA_TRANSVERSE = __core.wxPAPER_A3_EXTRA_TRANSVERSE
595 wxDUPLEX_SIMPLEX = __core.wxDUPLEX_SIMPLEX
596 wxDUPLEX_HORIZONTAL = __core.wxDUPLEX_HORIZONTAL
597 wxDUPLEX_VERTICAL = __core.wxDUPLEX_VERTICAL
598 wxITEM_SEPARATOR = __core.wxITEM_SEPARATOR
599 wxITEM_NORMAL = __core.wxITEM_NORMAL
600 wxITEM_CHECK = __core.wxITEM_CHECK
601 wxITEM_RADIO = __core.wxITEM_RADIO
602 wxITEM_MAX = __core.wxITEM_MAX
603 wxHT_NOWHERE = __core.wxHT_NOWHERE
604 wxHT_SCROLLBAR_FIRST = __core.wxHT_SCROLLBAR_FIRST
605 wxHT_SCROLLBAR_ARROW_LINE_1 = __core.wxHT_SCROLLBAR_ARROW_LINE_1
606 wxHT_SCROLLBAR_ARROW_LINE_2 = __core.wxHT_SCROLLBAR_ARROW_LINE_2
607 wxHT_SCROLLBAR_ARROW_PAGE_1 = __core.wxHT_SCROLLBAR_ARROW_PAGE_1
608 wxHT_SCROLLBAR_ARROW_PAGE_2 = __core.wxHT_SCROLLBAR_ARROW_PAGE_2
609 wxHT_SCROLLBAR_THUMB = __core.wxHT_SCROLLBAR_THUMB
610 wxHT_SCROLLBAR_BAR_1 = __core.wxHT_SCROLLBAR_BAR_1
611 wxHT_SCROLLBAR_BAR_2 = __core.wxHT_SCROLLBAR_BAR_2
612 wxHT_SCROLLBAR_LAST = __core.wxHT_SCROLLBAR_LAST
613 wxHT_WINDOW_OUTSIDE = __core.wxHT_WINDOW_OUTSIDE
614 wxHT_WINDOW_INSIDE = __core.wxHT_WINDOW_INSIDE
615 wxHT_WINDOW_VERT_SCROLLBAR = __core.wxHT_WINDOW_VERT_SCROLLBAR
616 wxHT_WINDOW_HORZ_SCROLLBAR = __core.wxHT_WINDOW_HORZ_SCROLLBAR
617 wxHT_WINDOW_CORNER = __core.wxHT_WINDOW_CORNER
618 wxHT_MAX = __core.wxHT_MAX
619 wxMOD_NONE = __core.wxMOD_NONE
620 wxMOD_ALT = __core.wxMOD_ALT
621 wxMOD_CONTROL = __core.wxMOD_CONTROL
622 wxMOD_SHIFT = __core.wxMOD_SHIFT
623 wxMOD_WIN = __core.wxMOD_WIN
624 wxUPDATE_UI_NONE = __core.wxUPDATE_UI_NONE
625 wxUPDATE_UI_RECURSE = __core.wxUPDATE_UI_RECURSE
626 wxUPDATE_UI_FROMIDLE = __core.wxUPDATE_UI_FROMIDLE
627 #---------------------------------------------------------------------------
628
629 class wxObject(object):
630 """
631 The base class for most wx objects, although in wxPython not
632 much functionality is needed nor exposed.
633 """
634 def __init__(self): raise RuntimeError, "No constructor defined"
635 def __repr__(self):
636 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
637 def GetClassName(*args, **kwargs):
638 """
639 GetClassName(self) -> wxString
640
641 Returns the class name of the C++ class using wxRTTI.
642 """
643 return __core.wxObject_GetClassName(*args, **kwargs)
644
645 def Destroy(*args, **kwargs):
646 """
647 Destroy(self)
648
649 Deletes the C++ object this Python object is a proxy for.
650 """
651 return __core.wxObject_Destroy(*args, **kwargs)
652
653
654 class wxObjectPtr(wxObject):
655 def __init__(self, this):
656 self.this = this
657 if not hasattr(self,"thisown"): self.thisown = 0
658 self.__class__ = wxObject
659 __core.wxObject_swigregister(wxObjectPtr)
660 _wxPySetDictionary = __core._wxPySetDictionary
661
662 _wxPyFixStockObjects = __core._wxPyFixStockObjects
663
664 cvar = __core.cvar
665 EmptyString = cvar.EmptyString
666
667 #---------------------------------------------------------------------------
668
669 wxBITMAP_TYPE_INVALID = __core.wxBITMAP_TYPE_INVALID
670 wxBITMAP_TYPE_BMP = __core.wxBITMAP_TYPE_BMP
671 wxBITMAP_TYPE_ICO = __core.wxBITMAP_TYPE_ICO
672 wxBITMAP_TYPE_CUR = __core.wxBITMAP_TYPE_CUR
673 wxBITMAP_TYPE_XBM = __core.wxBITMAP_TYPE_XBM
674 wxBITMAP_TYPE_XBM_DATA = __core.wxBITMAP_TYPE_XBM_DATA
675 wxBITMAP_TYPE_XPM = __core.wxBITMAP_TYPE_XPM
676 wxBITMAP_TYPE_XPM_DATA = __core.wxBITMAP_TYPE_XPM_DATA
677 wxBITMAP_TYPE_TIF = __core.wxBITMAP_TYPE_TIF
678 wxBITMAP_TYPE_GIF = __core.wxBITMAP_TYPE_GIF
679 wxBITMAP_TYPE_PNG = __core.wxBITMAP_TYPE_PNG
680 wxBITMAP_TYPE_JPEG = __core.wxBITMAP_TYPE_JPEG
681 wxBITMAP_TYPE_PNM = __core.wxBITMAP_TYPE_PNM
682 wxBITMAP_TYPE_PCX = __core.wxBITMAP_TYPE_PCX
683 wxBITMAP_TYPE_PICT = __core.wxBITMAP_TYPE_PICT
684 wxBITMAP_TYPE_ICON = __core.wxBITMAP_TYPE_ICON
685 wxBITMAP_TYPE_ANI = __core.wxBITMAP_TYPE_ANI
686 wxBITMAP_TYPE_IFF = __core.wxBITMAP_TYPE_IFF
687 wxBITMAP_TYPE_MACCURSOR = __core.wxBITMAP_TYPE_MACCURSOR
688 wxBITMAP_TYPE_ANY = __core.wxBITMAP_TYPE_ANY
689 wxCURSOR_NONE = __core.wxCURSOR_NONE
690 wxCURSOR_ARROW = __core.wxCURSOR_ARROW
691 wxCURSOR_RIGHT_ARROW = __core.wxCURSOR_RIGHT_ARROW
692 wxCURSOR_BULLSEYE = __core.wxCURSOR_BULLSEYE
693 wxCURSOR_CHAR = __core.wxCURSOR_CHAR
694 wxCURSOR_CROSS = __core.wxCURSOR_CROSS
695 wxCURSOR_HAND = __core.wxCURSOR_HAND
696 wxCURSOR_IBEAM = __core.wxCURSOR_IBEAM
697 wxCURSOR_LEFT_BUTTON = __core.wxCURSOR_LEFT_BUTTON
698 wxCURSOR_MAGNIFIER = __core.wxCURSOR_MAGNIFIER
699 wxCURSOR_MIDDLE_BUTTON = __core.wxCURSOR_MIDDLE_BUTTON
700 wxCURSOR_NO_ENTRY = __core.wxCURSOR_NO_ENTRY
701 wxCURSOR_PAINT_BRUSH = __core.wxCURSOR_PAINT_BRUSH
702 wxCURSOR_PENCIL = __core.wxCURSOR_PENCIL
703 wxCURSOR_POINT_LEFT = __core.wxCURSOR_POINT_LEFT
704 wxCURSOR_POINT_RIGHT = __core.wxCURSOR_POINT_RIGHT
705 wxCURSOR_QUESTION_ARROW = __core.wxCURSOR_QUESTION_ARROW
706 wxCURSOR_RIGHT_BUTTON = __core.wxCURSOR_RIGHT_BUTTON
707 wxCURSOR_SIZENESW = __core.wxCURSOR_SIZENESW
708 wxCURSOR_SIZENS = __core.wxCURSOR_SIZENS
709 wxCURSOR_SIZENWSE = __core.wxCURSOR_SIZENWSE
710 wxCURSOR_SIZEWE = __core.wxCURSOR_SIZEWE
711 wxCURSOR_SIZING = __core.wxCURSOR_SIZING
712 wxCURSOR_SPRAYCAN = __core.wxCURSOR_SPRAYCAN
713 wxCURSOR_WAIT = __core.wxCURSOR_WAIT
714 wxCURSOR_WATCH = __core.wxCURSOR_WATCH
715 wxCURSOR_BLANK = __core.wxCURSOR_BLANK
716 wxCURSOR_DEFAULT = __core.wxCURSOR_DEFAULT
717 wxCURSOR_COPY_ARROW = __core.wxCURSOR_COPY_ARROW
718 wxCURSOR_ARROWWAIT = __core.wxCURSOR_ARROWWAIT
719 wxCURSOR_MAX = __core.wxCURSOR_MAX
720 #---------------------------------------------------------------------------
721
722 class wxSize(object):
723 """
724 wx.Size is a useful data structure used to represent the size of
725 something. It simply contians integer width and height
726 proprtites. In most places in wxPython where a wx.Size is
727 expected a (width, height) tuple can be used instead.
728 """
729 def __repr__(self):
730 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
731 width = property(__core.wxSize_width_get, __core.wxSize_width_set)
732 height = property(__core.wxSize_height_get, __core.wxSize_height_set)
733 x = width; y = height
734 def __init__(self, *args, **kwargs):
735 """
736 __init__(self, int w=0, int h=0) -> wxSize
737
738 Creates a size object.
739 """
740 newobj = __core.new_wxSize(*args, **kwargs)
741 self.this = newobj.this
742 self.thisown = 1
743 del newobj.thisown
744 def __del__(self, destroy=__core.delete_wxSize):
745 """__del__(self)"""
746 try:
747 if self.thisown: destroy(self)
748 except: pass
749
750 def __eq__(*args, **kwargs):
751 """
752 __eq__(self, wxSize sz) -> bool
753
754 Test for equality of wx.Size objects.
755 """
756 return __core.wxSize___eq__(*args, **kwargs)
757
758 def __ne__(*args, **kwargs):
759 """
760 __ne__(self, wxSize sz) -> bool
761
762 Test for inequality.
763 """
764 return __core.wxSize___ne__(*args, **kwargs)
765
766 def __add__(*args, **kwargs):
767 """
768 __add__(self, wxSize sz) -> wxSize
769
770 Add sz's proprties to this and return the result.
771 """
772 return __core.wxSize___add__(*args, **kwargs)
773
774 def __sub__(*args, **kwargs):
775 """
776 __sub__(self, wxSize sz) -> wxSize
777
778 Subtract sz's properties from this and return the result.
779 """
780 return __core.wxSize___sub__(*args, **kwargs)
781
782 def IncTo(*args, **kwargs):
783 """
784 IncTo(self, wxSize sz)
785
786 Increments this object so that both of its dimensions are not less
787 than the corresponding dimensions of the size.
788 """
789 return __core.wxSize_IncTo(*args, **kwargs)
790
791 def DecTo(*args, **kwargs):
792 """
793 DecTo(self, wxSize sz)
794
795 Decrements this object so that both of its dimensions are not greater
796 than the corresponding dimensions of the size.
797 """
798 return __core.wxSize_DecTo(*args, **kwargs)
799
800 def Set(*args, **kwargs):
801 """
802 Set(self, int w, int h)
803
804 Set both width and height.
805 """
806 return __core.wxSize_Set(*args, **kwargs)
807
808 def SetWidth(*args, **kwargs):
809 """SetWidth(self, int w)"""
810 return __core.wxSize_SetWidth(*args, **kwargs)
811
812 def SetHeight(*args, **kwargs):
813 """SetHeight(self, int h)"""
814 return __core.wxSize_SetHeight(*args, **kwargs)
815
816 def GetWidth(*args, **kwargs):
817 """GetWidth(self) -> int"""
818 return __core.wxSize_GetWidth(*args, **kwargs)
819
820 def GetHeight(*args, **kwargs):
821 """GetHeight(self) -> int"""
822 return __core.wxSize_GetHeight(*args, **kwargs)
823
824 def IsFullySpecified(*args, **kwargs):
825 """
826 IsFullySpecified(self) -> bool
827
828 Returns True if both components of the size are non-default values.
829 """
830 return __core.wxSize_IsFullySpecified(*args, **kwargs)
831
832 def SetDefaults(*args, **kwargs):
833 """
834 SetDefaults(self, wxSize size)
835
836 Combine this size with the other one replacing the default components
837 of this object (i.e. equal to -1) with those of the other.
838 """
839 return __core.wxSize_SetDefaults(*args, **kwargs)
840
841 def Get(*args, **kwargs):
842 """
843 Get() -> (width,height)
844
845 Returns the width and height properties as a tuple.
846 """
847 return __core.wxSize_Get(*args, **kwargs)
848
849 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
850 def __str__(self): return str(self.Get())
851 def __repr__(self): return 'wx.Size'+str(self.Get())
852 def __len__(self): return len(self.Get())
853 def __getitem__(self, index): return self.Get()[index]
854 def __setitem__(self, index, val):
855 if index == 0: self.width = val
856 elif index == 1: self.height = val
857 else: raise IndexError
858 def __nonzero__(self): return self.Get() != (0,0)
859 __safe_for_unpickling__ = True
860 def __reduce__(self): return (wx.Size, self.Get())
861
862
863 class wxSizePtr(wxSize):
864 def __init__(self, this):
865 self.this = this
866 if not hasattr(self,"thisown"): self.thisown = 0
867 self.__class__ = wxSize
868 __core.wxSize_swigregister(wxSizePtr)
869
870 #---------------------------------------------------------------------------
871
872 class wxRealPoint(object):
873 """
874 A data structure for representing a point or position with floating
875 point x and y properties. In wxPython most places that expect a
876 wx.RealPoint can also accept a (x,y) tuple.
877 """
878 def __repr__(self):
879 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
880 x = property(__core.wxRealPoint_x_get, __core.wxRealPoint_x_set)
881 y = property(__core.wxRealPoint_y_get, __core.wxRealPoint_y_set)
882 def __init__(self, *args, **kwargs):
883 """
884 __init__(self, double x=0.0, double y=0.0) -> wxRealPoint
885
886 Create a wx.RealPoint object
887 """
888 newobj = __core.new_wxRealPoint(*args, **kwargs)
889 self.this = newobj.this
890 self.thisown = 1
891 del newobj.thisown
892 def __del__(self, destroy=__core.delete_wxRealPoint):
893 """__del__(self)"""
894 try:
895 if self.thisown: destroy(self)
896 except: pass
897
898 def __eq__(*args, **kwargs):
899 """
900 __eq__(self, wxRealPoint pt) -> bool
901
902 Test for equality of wx.RealPoint objects.
903 """
904 return __core.wxRealPoint___eq__(*args, **kwargs)
905
906 def __ne__(*args, **kwargs):
907 """
908 __ne__(self, wxRealPoint pt) -> bool
909
910 Test for inequality of wx.RealPoint objects.
911 """
912 return __core.wxRealPoint___ne__(*args, **kwargs)
913
914 def __add__(*args, **kwargs):
915 """
916 __add__(self, wxRealPoint pt) -> wxRealPoint
917
918 Add pt's proprties to this and return the result.
919 """
920 return __core.wxRealPoint___add__(*args, **kwargs)
921
922 def __sub__(*args, **kwargs):
923 """
924 __sub__(self, wxRealPoint pt) -> wxRealPoint
925
926 Subtract pt's proprties from this and return the result
927 """
928 return __core.wxRealPoint___sub__(*args, **kwargs)
929
930 def Set(*args, **kwargs):
931 """
932 Set(self, double x, double y)
933
934 Set both the x and y properties
935 """
936 return __core.wxRealPoint_Set(*args, **kwargs)
937
938 def Get(*args, **kwargs):
939 """
940 Get() -> (x,y)
941
942 Return the x and y properties as a tuple.
943 """
944 return __core.wxRealPoint_Get(*args, **kwargs)
945
946 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
947 def __str__(self): return str(self.Get())
948 def __repr__(self): return 'wx.RealPoint'+str(self.Get())
949 def __len__(self): return len(self.Get())
950 def __getitem__(self, index): return self.Get()[index]
951 def __setitem__(self, index, val):
952 if index == 0: self.x = val
953 elif index == 1: self.y = val
954 else: raise IndexError
955 def __nonzero__(self): return self.Get() != (0.0, 0.0)
956 __safe_for_unpickling__ = True
957 def __reduce__(self): return (wx.RealPoint, self.Get())
958
959
960 class wxRealPointPtr(wxRealPoint):
961 def __init__(self, this):
962 self.this = this
963 if not hasattr(self,"thisown"): self.thisown = 0
964 self.__class__ = wxRealPoint
965 __core.wxRealPoint_swigregister(wxRealPointPtr)
966
967 #---------------------------------------------------------------------------
968
969 class wxPoint(object):
970 """
971 A data structure for representing a point or position with integer x
972 and y properties. Most places in wxPython that expect a wx.Point can
973 also accept a (x,y) tuple.
974 """
975 def __repr__(self):
976 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
977 x = property(__core.wxPoint_x_get, __core.wxPoint_x_set)
978 y = property(__core.wxPoint_y_get, __core.wxPoint_y_set)
979 def __init__(self, *args, **kwargs):
980 """
981 __init__(self, int x=0, int y=0) -> wxPoint
982
983 Create a wx.Point object
984 """
985 newobj = __core.new_wxPoint(*args, **kwargs)
986 self.this = newobj.this
987 self.thisown = 1
988 del newobj.thisown
989 def __del__(self, destroy=__core.delete_wxPoint):
990 """__del__(self)"""
991 try:
992 if self.thisown: destroy(self)
993 except: pass
994
995 def __eq__(*args, **kwargs):
996 """
997 __eq__(self, wxPoint pt) -> bool
998
999 Test for equality of wx.Point objects.
1000 """
1001 return __core.wxPoint___eq__(*args, **kwargs)
1002
1003 def __ne__(*args, **kwargs):
1004 """
1005 __ne__(self, wxPoint pt) -> bool
1006
1007 Test for inequality of wx.Point objects.
1008 """
1009 return __core.wxPoint___ne__(*args, **kwargs)
1010
1011 def __add__(*args, **kwargs):
1012 """
1013 __add__(self, wxPoint pt) -> wxPoint
1014
1015 Add pt's proprties to this and return the result.
1016 """
1017 return __core.wxPoint___add__(*args, **kwargs)
1018
1019 def __sub__(*args, **kwargs):
1020 """
1021 __sub__(self, wxPoint pt) -> wxPoint
1022
1023 Subtract pt's proprties from this and return the result
1024 """
1025 return __core.wxPoint___sub__(*args, **kwargs)
1026
1027 def __iadd__(*args, **kwargs):
1028 """
1029 __iadd__(self, wxPoint pt) -> wxPoint
1030
1031 Add pt to this object.
1032 """
1033 return __core.wxPoint___iadd__(*args, **kwargs)
1034
1035 def __isub__(*args, **kwargs):
1036 """
1037 __isub__(self, wxPoint pt) -> wxPoint
1038
1039 Subtract pt from this object.
1040 """
1041 return __core.wxPoint___isub__(*args, **kwargs)
1042
1043 def Set(*args, **kwargs):
1044 """
1045 Set(self, long x, long y)
1046
1047 Set both the x and y properties
1048 """
1049 return __core.wxPoint_Set(*args, **kwargs)
1050
1051 def Get(*args, **kwargs):
1052 """
1053 Get() -> (x,y)
1054
1055 Return the x and y properties as a tuple.
1056 """
1057 return __core.wxPoint_Get(*args, **kwargs)
1058
1059 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1060 def __str__(self): return str(self.Get())
1061 def __repr__(self): return 'wx.Point'+str(self.Get())
1062 def __len__(self): return len(self.Get())
1063 def __getitem__(self, index): return self.Get()[index]
1064 def __setitem__(self, index, val):
1065 if index == 0: self.x = val
1066 elif index == 1: self.y = val
1067 else: raise IndexError
1068 def __nonzero__(self): return self.Get() != (0,0)
1069 __safe_for_unpickling__ = True
1070 def __reduce__(self): return (wx.Point, self.Get())
1071
1072
1073 class wxPointPtr(wxPoint):
1074 def __init__(self, this):
1075 self.this = this
1076 if not hasattr(self,"thisown"): self.thisown = 0
1077 self.__class__ = wxPoint
1078 __core.wxPoint_swigregister(wxPointPtr)
1079
1080 #---------------------------------------------------------------------------
1081
1082 class wxRect(object):
1083 """
1084 A class for representing and manipulating rectangles. It has x, y,
1085 width and height properties. In wxPython most palces that expect a
1086 wx.Rect can also accept a (x,y,width,height) tuple.
1087 """
1088 def __repr__(self):
1089 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1090 def __init__(self, *args, **kwargs):
1091 """
1092 __init__(self, int x=0, int y=0, int width=0, int height=0) -> wxRect
1093
1094 Create a new Rect object.
1095 """
1096 newobj = __core.new_wxRect(*args, **kwargs)
1097 self.this = newobj.this
1098 self.thisown = 1
1099 del newobj.thisown
1100 def __del__(self, destroy=__core.delete_wxRect):
1101 """__del__(self)"""
1102 try:
1103 if self.thisown: destroy(self)
1104 except: pass
1105
1106 def GetX(*args, **kwargs):
1107 """GetX(self) -> int"""
1108 return __core.wxRect_GetX(*args, **kwargs)
1109
1110 def SetX(*args, **kwargs):
1111 """SetX(self, int x)"""
1112 return __core.wxRect_SetX(*args, **kwargs)
1113
1114 def GetY(*args, **kwargs):
1115 """GetY(self) -> int"""
1116 return __core.wxRect_GetY(*args, **kwargs)
1117
1118 def SetY(*args, **kwargs):
1119 """SetY(self, int y)"""
1120 return __core.wxRect_SetY(*args, **kwargs)
1121
1122 def GetWidth(*args, **kwargs):
1123 """GetWidth(self) -> int"""
1124 return __core.wxRect_GetWidth(*args, **kwargs)
1125
1126 def SetWidth(*args, **kwargs):
1127 """SetWidth(self, int w)"""
1128 return __core.wxRect_SetWidth(*args, **kwargs)
1129
1130 def GetHeight(*args, **kwargs):
1131 """GetHeight(self) -> int"""
1132 return __core.wxRect_GetHeight(*args, **kwargs)
1133
1134 def SetHeight(*args, **kwargs):
1135 """SetHeight(self, int h)"""
1136 return __core.wxRect_SetHeight(*args, **kwargs)
1137
1138 def GetPosition(*args, **kwargs):
1139 """GetPosition(self) -> wxPoint"""
1140 return __core.wxRect_GetPosition(*args, **kwargs)
1141
1142 def SetPosition(*args, **kwargs):
1143 """SetPosition(self, wxPoint p)"""
1144 return __core.wxRect_SetPosition(*args, **kwargs)
1145
1146 def GetSize(*args, **kwargs):
1147 """GetSize(self) -> wxSize"""
1148 return __core.wxRect_GetSize(*args, **kwargs)
1149
1150 def SetSize(*args, **kwargs):
1151 """SetSize(self, wxSize s)"""
1152 return __core.wxRect_SetSize(*args, **kwargs)
1153
1154 def IsEmpty(*args, **kwargs):
1155 """IsEmpty(self) -> bool"""
1156 return __core.wxRect_IsEmpty(*args, **kwargs)
1157
1158 def GetTopLeft(*args, **kwargs):
1159 """GetTopLeft(self) -> wxPoint"""
1160 return __core.wxRect_GetTopLeft(*args, **kwargs)
1161
1162 def SetTopLeft(*args, **kwargs):
1163 """SetTopLeft(self, wxPoint p)"""
1164 return __core.wxRect_SetTopLeft(*args, **kwargs)
1165
1166 def GetBottomRight(*args, **kwargs):
1167 """GetBottomRight(self) -> wxPoint"""
1168 return __core.wxRect_GetBottomRight(*args, **kwargs)
1169
1170 def SetBottomRight(*args, **kwargs):
1171 """SetBottomRight(self, wxPoint p)"""
1172 return __core.wxRect_SetBottomRight(*args, **kwargs)
1173
1174 def GetLeft(*args, **kwargs):
1175 """GetLeft(self) -> int"""
1176 return __core.wxRect_GetLeft(*args, **kwargs)
1177
1178 def GetTop(*args, **kwargs):
1179 """GetTop(self) -> int"""
1180 return __core.wxRect_GetTop(*args, **kwargs)
1181
1182 def GetBottom(*args, **kwargs):
1183 """GetBottom(self) -> int"""
1184 return __core.wxRect_GetBottom(*args, **kwargs)
1185
1186 def GetRight(*args, **kwargs):
1187 """GetRight(self) -> int"""
1188 return __core.wxRect_GetRight(*args, **kwargs)
1189
1190 def SetLeft(*args, **kwargs):
1191 """SetLeft(self, int left)"""
1192 return __core.wxRect_SetLeft(*args, **kwargs)
1193
1194 def SetRight(*args, **kwargs):
1195 """SetRight(self, int right)"""
1196 return __core.wxRect_SetRight(*args, **kwargs)
1197
1198 def SetTop(*args, **kwargs):
1199 """SetTop(self, int top)"""
1200 return __core.wxRect_SetTop(*args, **kwargs)
1201
1202 def SetBottom(*args, **kwargs):
1203 """SetBottom(self, int bottom)"""
1204 return __core.wxRect_SetBottom(*args, **kwargs)
1205
1206 position = property(GetPosition, SetPosition)
1207 size = property(GetSize, SetSize)
1208 left = property(GetLeft, SetLeft)
1209 right = property(GetRight, SetRight)
1210 top = property(GetTop, SetTop)
1211 bottom = property(GetBottom, SetBottom)
1212
1213 def Inflate(*args, **kwargs):
1214 """
1215 Inflate(self, int dx, int dy) -> wxRect
1216
1217 Increases the size of the rectangle.
1218
1219 The left border is moved farther left and the right border is moved
1220 farther right by ``dx``. The upper border is moved farther up and the
1221 bottom border is moved farther down by ``dy``. (Note the the width and
1222 height of the rectangle thus change by ``2*dx`` and ``2*dy``,
1223 respectively.) If one or both of ``dx`` and ``dy`` are negative, the
1224 opposite happens: the rectangle size decreases in the respective
1225 direction.
1226
1227 The change is made to the rectangle inplace, if instead you need a
1228 copy that is inflated, preserving the original then make the copy
1229 first::
1230
1231 copy = wx.Rect(*original)
1232 copy.Inflate(10,15)
1233
1234
1235 """
1236 return __core.wxRect_Inflate(*args, **kwargs)
1237
1238 def Deflate(*args, **kwargs):
1239 """
1240 Deflate(self, int dx, int dy) -> wxRect
1241
1242 Decrease the rectangle size. This method is the opposite of `Inflate`
1243 in that Deflate(a,b) is equivalent to Inflate(-a,-b). Please refer to
1244 `Inflate` for a full description.
1245 """
1246 return __core.wxRect_Deflate(*args, **kwargs)
1247
1248 def OffsetXY(*args, **kwargs):
1249 """
1250 OffsetXY(self, int dx, int dy)
1251
1252 Moves the rectangle by the specified offset. If dx is positive, the
1253 rectangle is moved to the right, if dy is positive, it is moved to the
1254 bottom, otherwise it is moved to the left or top respectively.
1255 """
1256 return __core.wxRect_OffsetXY(*args, **kwargs)
1257
1258 def Offset(*args, **kwargs):
1259 """
1260 Offset(self, wxPoint pt)
1261
1262 Same as OffsetXY but uses dx,dy from Point
1263 """
1264 return __core.wxRect_Offset(*args, **kwargs)
1265
1266 def Intersect(*args, **kwargs):
1267 """
1268 Intersect(self, wxRect rect) -> wxRect
1269
1270 Returns the intersectsion of this rectangle and rect.
1271 """
1272 return __core.wxRect_Intersect(*args, **kwargs)
1273
1274 def Union(*args, **kwargs):
1275 """
1276 Union(self, wxRect rect) -> wxRect
1277
1278 Returns the union of this rectangle and rect.
1279 """
1280 return __core.wxRect_Union(*args, **kwargs)
1281
1282 def __add__(*args, **kwargs):
1283 """
1284 __add__(self, wxRect rect) -> wxRect
1285
1286 Add the properties of rect to this rectangle and return the result.
1287 """
1288 return __core.wxRect___add__(*args, **kwargs)
1289
1290 def __iadd__(*args, **kwargs):
1291 """
1292 __iadd__(self, wxRect rect) -> wxRect
1293
1294 Add the properties of rect to this rectangle, updating this rectangle.
1295 """
1296 return __core.wxRect___iadd__(*args, **kwargs)
1297
1298 def __eq__(*args, **kwargs):
1299 """
1300 __eq__(self, wxRect rect) -> bool
1301
1302 Test for equality.
1303 """
1304 return __core.wxRect___eq__(*args, **kwargs)
1305
1306 def __ne__(*args, **kwargs):
1307 """
1308 __ne__(self, wxRect rect) -> bool
1309
1310 Test for inequality.
1311 """
1312 return __core.wxRect___ne__(*args, **kwargs)
1313
1314 def InsideXY(*args, **kwargs):
1315 """
1316 InsideXY(self, int x, int y) -> bool
1317
1318 Return True if the point is (not strcitly) inside the rect.
1319 """
1320 return __core.wxRect_InsideXY(*args, **kwargs)
1321
1322 def Inside(*args, **kwargs):
1323 """
1324 Inside(self, wxPoint pt) -> bool
1325
1326 Return True if the point is (not strcitly) inside the rect.
1327 """
1328 return __core.wxRect_Inside(*args, **kwargs)
1329
1330 def Intersects(*args, **kwargs):
1331 """
1332 Intersects(self, wxRect rect) -> bool
1333
1334 Returns True if the rectangles have a non empty intersection.
1335 """
1336 return __core.wxRect_Intersects(*args, **kwargs)
1337
1338 x = property(__core.wxRect_x_get, __core.wxRect_x_set)
1339 y = property(__core.wxRect_y_get, __core.wxRect_y_set)
1340 width = property(__core.wxRect_width_get, __core.wxRect_width_set)
1341 height = property(__core.wxRect_height_get, __core.wxRect_height_set)
1342 def Set(*args, **kwargs):
1343 """
1344 Set(self, int x=0, int y=0, int width=0, int height=0)
1345
1346 Set all rectangle properties.
1347 """
1348 return __core.wxRect_Set(*args, **kwargs)
1349
1350 def Get(*args, **kwargs):
1351 """
1352 Get() -> (x,y,width,height)
1353
1354 Return the rectangle properties as a tuple.
1355 """
1356 return __core.wxRect_Get(*args, **kwargs)
1357
1358 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1359 def __str__(self): return str(self.Get())
1360 def __repr__(self): return 'wx.Rect'+str(self.Get())
1361 def __len__(self): return len(self.Get())
1362 def __getitem__(self, index): return self.Get()[index]
1363 def __setitem__(self, index, val):
1364 if index == 0: self.x = val
1365 elif index == 1: self.y = val
1366 elif index == 2: self.width = val
1367 elif index == 3: self.height = val
1368 else: raise IndexError
1369 def __nonzero__(self): return self.Get() != (0,0,0,0)
1370 __safe_for_unpickling__ = True
1371 def __reduce__(self): return (wx.Rect, self.Get())
1372
1373
1374 class wxRectPtr(wxRect):
1375 def __init__(self, this):
1376 self.this = this
1377 if not hasattr(self,"thisown"): self.thisown = 0
1378 self.__class__ = wxRect
1379 __core.wxRect_swigregister(wxRectPtr)
1380
1381 def RectPP(*args, **kwargs):
1382 """
1383 RectPP(wxPoint topLeft, wxPoint bottomRight) -> wxRect
1384
1385 Create a new Rect object from Points representing two corners.
1386 """
1387 val = __core.new_RectPP(*args, **kwargs)
1388 val.thisown = 1
1389 return val
1390
1391 def RectPS(*args, **kwargs):
1392 """
1393 RectPS(wxPoint pos, wxSize size) -> wxRect
1394
1395 Create a new Rect from a position and size.
1396 """
1397 val = __core.new_RectPS(*args, **kwargs)
1398 val.thisown = 1
1399 return val
1400
1401 def RectS(*args, **kwargs):
1402 """
1403 RectS(wxSize size) -> wxRect
1404
1405 Create a new Rect from a size only.
1406 """
1407 val = __core.new_RectS(*args, **kwargs)
1408 val.thisown = 1
1409 return val
1410
1411
1412 def wxIntersectRect(*args, **kwargs):
1413 """
1414 IntersectRect(Rect r1, Rect r2) -> Rect
1415
1416 Calculate and return the intersection of r1 and r2.
1417 """
1418 return __core.wxIntersectRect(*args, **kwargs)
1419 #---------------------------------------------------------------------------
1420
1421 class wxPoint2D(object):
1422 """
1423 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1424 with floating point values.
1425 """
1426 def __repr__(self):
1427 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1428 def __init__(self, *args, **kwargs):
1429 """
1430 __init__(self, double x=0.0, double y=0.0) -> wxPoint2D
1431
1432 Create a w.Point2D object.
1433 """
1434 newobj = __core.new_wxPoint2D(*args, **kwargs)
1435 self.this = newobj.this
1436 self.thisown = 1
1437 del newobj.thisown
1438 def GetFloor(*args, **kwargs):
1439 """
1440 GetFloor() -> (x,y)
1441
1442 Convert to integer
1443 """
1444 return __core.wxPoint2D_GetFloor(*args, **kwargs)
1445
1446 def GetRounded(*args, **kwargs):
1447 """
1448 GetRounded() -> (x,y)
1449
1450 Convert to integer
1451 """
1452 return __core.wxPoint2D_GetRounded(*args, **kwargs)
1453
1454 def GetVectorLength(*args, **kwargs):
1455 """GetVectorLength(self) -> double"""
1456 return __core.wxPoint2D_GetVectorLength(*args, **kwargs)
1457
1458 def GetVectorAngle(*args, **kwargs):
1459 """GetVectorAngle(self) -> double"""
1460 return __core.wxPoint2D_GetVectorAngle(*args, **kwargs)
1461
1462 def SetVectorLength(*args, **kwargs):
1463 """SetVectorLength(self, double length)"""
1464 return __core.wxPoint2D_SetVectorLength(*args, **kwargs)
1465
1466 def SetVectorAngle(*args, **kwargs):
1467 """SetVectorAngle(self, double degrees)"""
1468 return __core.wxPoint2D_SetVectorAngle(*args, **kwargs)
1469
1470 def SetPolarCoordinates(self, angle, length):
1471 self.SetVectorLength(length)
1472 self.SetVectorAngle(angle)
1473 def Normalize(self):
1474 self.SetVectorLength(1.0)
1475
1476 def GetDistance(*args, **kwargs):
1477 """GetDistance(self, wxPoint2D pt) -> double"""
1478 return __core.wxPoint2D_GetDistance(*args, **kwargs)
1479
1480 def GetDistanceSquare(*args, **kwargs):
1481 """GetDistanceSquare(self, wxPoint2D pt) -> double"""
1482 return __core.wxPoint2D_GetDistanceSquare(*args, **kwargs)
1483
1484 def GetDotProduct(*args, **kwargs):
1485 """GetDotProduct(self, wxPoint2D vec) -> double"""
1486 return __core.wxPoint2D_GetDotProduct(*args, **kwargs)
1487
1488 def GetCrossProduct(*args, **kwargs):
1489 """GetCrossProduct(self, wxPoint2D vec) -> double"""
1490 return __core.wxPoint2D_GetCrossProduct(*args, **kwargs)
1491
1492 def __neg__(*args, **kwargs):
1493 """
1494 __neg__(self) -> wxPoint2D
1495
1496 the reflection of this point
1497 """
1498 return __core.wxPoint2D___neg__(*args, **kwargs)
1499
1500 def __iadd__(*args, **kwargs):
1501 """__iadd__(self, wxPoint2D pt) -> wxPoint2D"""
1502 return __core.wxPoint2D___iadd__(*args, **kwargs)
1503
1504 def __isub__(*args, **kwargs):
1505 """__isub__(self, wxPoint2D pt) -> wxPoint2D"""
1506 return __core.wxPoint2D___isub__(*args, **kwargs)
1507
1508 def __imul__(*args, **kwargs):
1509 """__imul__(self, wxPoint2D pt) -> wxPoint2D"""
1510 return __core.wxPoint2D___imul__(*args, **kwargs)
1511
1512 def __idiv__(*args, **kwargs):
1513 """__idiv__(self, wxPoint2D pt) -> wxPoint2D"""
1514 return __core.wxPoint2D___idiv__(*args, **kwargs)
1515
1516 def __eq__(*args, **kwargs):
1517 """
1518 __eq__(self, wxPoint2D pt) -> bool
1519
1520 Test for equality
1521 """
1522 return __core.wxPoint2D___eq__(*args, **kwargs)
1523
1524 def __ne__(*args, **kwargs):
1525 """
1526 __ne__(self, wxPoint2D pt) -> bool
1527
1528 Test for inequality
1529 """
1530 return __core.wxPoint2D___ne__(*args, **kwargs)
1531
1532 x = property(__core.wxPoint2D_x_get, __core.wxPoint2D_x_set)
1533 y = property(__core.wxPoint2D_y_get, __core.wxPoint2D_y_set)
1534 def Set(*args, **kwargs):
1535 """Set(self, double x=0, double y=0)"""
1536 return __core.wxPoint2D_Set(*args, **kwargs)
1537
1538 def Get(*args, **kwargs):
1539 """
1540 Get() -> (x,y)
1541
1542 Return x and y properties as a tuple.
1543 """
1544 return __core.wxPoint2D_Get(*args, **kwargs)
1545
1546 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1547 def __str__(self): return str(self.Get())
1548 def __repr__(self): return 'wx.Point2D'+str(self.Get())
1549 def __len__(self): return len(self.Get())
1550 def __getitem__(self, index): return self.Get()[index]
1551 def __setitem__(self, index, val):
1552 if index == 0: self.x = val
1553 elif index == 1: self.y = val
1554 else: raise IndexError
1555 def __nonzero__(self): return self.Get() != (0.0, 0.0)
1556 __safe_for_unpickling__ = True
1557 def __reduce__(self): return (wx.Point2D, self.Get())
1558
1559
1560 class wxPoint2DPtr(wxPoint2D):
1561 def __init__(self, this):
1562 self.this = this
1563 if not hasattr(self,"thisown"): self.thisown = 0
1564 self.__class__ = wxPoint2D
1565 __core.wxPoint2D_swigregister(wxPoint2DPtr)
1566
1567 def Point2DCopy(*args, **kwargs):
1568 """
1569 Point2DCopy(wxPoint2D pt) -> wxPoint2D
1570
1571 Create a w.Point2D object.
1572 """
1573 val = __core.new_Point2DCopy(*args, **kwargs)
1574 val.thisown = 1
1575 return val
1576
1577 def Point2DFromPoint(*args, **kwargs):
1578 """
1579 Point2DFromPoint(wxPoint pt) -> wxPoint2D
1580
1581 Create a w.Point2D object.
1582 """
1583 val = __core.new_Point2DFromPoint(*args, **kwargs)
1584 val.thisown = 1
1585 return val
1586
1587 #---------------------------------------------------------------------------
1588
1589 wxFromStart = __core.wxFromStart
1590 wxFromCurrent = __core.wxFromCurrent
1591 wxFromEnd = __core.wxFromEnd
1592 class InputStream(object):
1593 """Proxy of C++ InputStream class"""
1594 def __repr__(self):
1595 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1596 def __init__(self, *args, **kwargs):
1597 """__init__(self, PyObject p) -> InputStream"""
1598 newobj = __core.new_InputStream(*args, **kwargs)
1599 self.this = newobj.this
1600 self.thisown = 1
1601 del newobj.thisown
1602 def __del__(self, destroy=__core.delete_InputStream):
1603 """__del__(self)"""
1604 try:
1605 if self.thisown: destroy(self)
1606 except: pass
1607
1608 def close(*args, **kwargs):
1609 """close(self)"""
1610 return __core.InputStream_close(*args, **kwargs)
1611
1612 def flush(*args, **kwargs):
1613 """flush(self)"""
1614 return __core.InputStream_flush(*args, **kwargs)
1615
1616 def eof(*args, **kwargs):
1617 """eof(self) -> bool"""
1618 return __core.InputStream_eof(*args, **kwargs)
1619
1620 def read(*args, **kwargs):
1621 """read(self, int size=-1) -> PyObject"""
1622 return __core.InputStream_read(*args, **kwargs)
1623
1624 def readline(*args, **kwargs):
1625 """readline(self, int size=-1) -> PyObject"""
1626 return __core.InputStream_readline(*args, **kwargs)
1627
1628 def readlines(*args, **kwargs):
1629 """readlines(self, int sizehint=-1) -> PyObject"""
1630 return __core.InputStream_readlines(*args, **kwargs)
1631
1632 def seek(*args, **kwargs):
1633 """seek(self, int offset, int whence=0)"""
1634 return __core.InputStream_seek(*args, **kwargs)
1635
1636 def tell(*args, **kwargs):
1637 """tell(self) -> int"""
1638 return __core.InputStream_tell(*args, **kwargs)
1639
1640 def Peek(*args, **kwargs):
1641 """Peek(self) -> char"""
1642 return __core.InputStream_Peek(*args, **kwargs)
1643
1644 def GetC(*args, **kwargs):
1645 """GetC(self) -> char"""
1646 return __core.InputStream_GetC(*args, **kwargs)
1647
1648 def LastRead(*args, **kwargs):
1649 """LastRead(self) -> size_t"""
1650 return __core.InputStream_LastRead(*args, **kwargs)
1651
1652 def CanRead(*args, **kwargs):
1653 """CanRead(self) -> bool"""
1654 return __core.InputStream_CanRead(*args, **kwargs)
1655
1656 def Eof(*args, **kwargs):
1657 """Eof(self) -> bool"""
1658 return __core.InputStream_Eof(*args, **kwargs)
1659
1660 def Ungetch(*args, **kwargs):
1661 """Ungetch(self, char c) -> bool"""
1662 return __core.InputStream_Ungetch(*args, **kwargs)
1663
1664 def SeekI(*args, **kwargs):
1665 """SeekI(self, long pos, int mode=wxFromStart) -> long"""
1666 return __core.InputStream_SeekI(*args, **kwargs)
1667
1668 def TellI(*args, **kwargs):
1669 """TellI(self) -> long"""
1670 return __core.InputStream_TellI(*args, **kwargs)
1671
1672
1673 class InputStreamPtr(InputStream):
1674 def __init__(self, this):
1675 self.this = this
1676 if not hasattr(self,"thisown"): self.thisown = 0
1677 self.__class__ = InputStream
1678 __core.InputStream_swigregister(InputStreamPtr)
1679 wxDefaultPosition = cvar.wxDefaultPosition
1680 wxDefaultSize = cvar.wxDefaultSize
1681
1682 class wxOutputStream(object):
1683 """Proxy of C++ wxOutputStream class"""
1684 def __init__(self): raise RuntimeError, "No constructor defined"
1685 def __repr__(self):
1686 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1687 def write(*args, **kwargs):
1688 """write(self, PyObject obj)"""
1689 return __core.wxOutputStream_write(*args, **kwargs)
1690
1691
1692 class wxOutputStreamPtr(wxOutputStream):
1693 def __init__(self, this):
1694 self.this = this
1695 if not hasattr(self,"thisown"): self.thisown = 0
1696 self.__class__ = wxOutputStream
1697 __core.wxOutputStream_swigregister(wxOutputStreamPtr)
1698
1699 #---------------------------------------------------------------------------
1700
1701 class wxFSFile(wxObject):
1702 """Proxy of C++ wxFSFile class"""
1703 def __repr__(self):
1704 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1705 def __init__(self, *args, **kwargs):
1706 """
1707 __init__(self, wxInputStream stream, wxString loc, wxString mimetype,
1708 wxString anchor, wxDateTime modif) -> wxFSFile
1709 """
1710 newobj = __core.new_wxFSFile(*args, **kwargs)
1711 self.this = newobj.this
1712 self.thisown = 1
1713 del newobj.thisown
1714 self.thisown = 0 # It will normally be deleted by the user of the wx.FileSystem
1715
1716 def __del__(self, destroy=__core.delete_wxFSFile):
1717 """__del__(self)"""
1718 try:
1719 if self.thisown: destroy(self)
1720 except: pass
1721
1722 def GetStream(*args, **kwargs):
1723 """GetStream(self) -> wxInputStream"""
1724 return __core.wxFSFile_GetStream(*args, **kwargs)
1725
1726 def GetMimeType(*args, **kwargs):
1727 """GetMimeType(self) -> wxString"""
1728 return __core.wxFSFile_GetMimeType(*args, **kwargs)
1729
1730 def GetLocation(*args, **kwargs):
1731 """GetLocation(self) -> wxString"""
1732 return __core.wxFSFile_GetLocation(*args, **kwargs)
1733
1734 def GetAnchor(*args, **kwargs):
1735 """GetAnchor(self) -> wxString"""
1736 return __core.wxFSFile_GetAnchor(*args, **kwargs)
1737
1738 def GetModificationTime(*args, **kwargs):
1739 """GetModificationTime(self) -> wxDateTime"""
1740 return __core.wxFSFile_GetModificationTime(*args, **kwargs)
1741
1742
1743 class wxFSFilePtr(wxFSFile):
1744 def __init__(self, this):
1745 self.this = this
1746 if not hasattr(self,"thisown"): self.thisown = 0
1747 self.__class__ = wxFSFile
1748 __core.wxFSFile_swigregister(wxFSFilePtr)
1749
1750 class CPPFileSystemHandler(object):
1751 """Proxy of C++ CPPFileSystemHandler class"""
1752 def __init__(self): raise RuntimeError, "No constructor defined"
1753 def __repr__(self):
1754 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1755
1756 class CPPFileSystemHandlerPtr(CPPFileSystemHandler):
1757 def __init__(self, this):
1758 self.this = this
1759 if not hasattr(self,"thisown"): self.thisown = 0
1760 self.__class__ = CPPFileSystemHandler
1761 __core.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr)
1762
1763 class FileSystemHandler(CPPFileSystemHandler):
1764 """Proxy of C++ FileSystemHandler class"""
1765 def __repr__(self):
1766 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1767 def __init__(self, *args, **kwargs):
1768 """__init__(self) -> FileSystemHandler"""
1769 newobj = __core.new_FileSystemHandler(*args, **kwargs)
1770 self.this = newobj.this
1771 self.thisown = 1
1772 del newobj.thisown
1773 self._setCallbackInfo(self, FileSystemHandler)
1774
1775 def _setCallbackInfo(*args, **kwargs):
1776 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
1777 return __core.FileSystemHandler__setCallbackInfo(*args, **kwargs)
1778
1779 def CanOpen(*args, **kwargs):
1780 """CanOpen(self, wxString location) -> bool"""
1781 return __core.FileSystemHandler_CanOpen(*args, **kwargs)
1782
1783 def OpenFile(*args, **kwargs):
1784 """OpenFile(self, wxFileSystem fs, wxString location) -> wxFSFile"""
1785 return __core.FileSystemHandler_OpenFile(*args, **kwargs)
1786
1787 def FindFirst(*args, **kwargs):
1788 """FindFirst(self, wxString spec, int flags=0) -> wxString"""
1789 return __core.FileSystemHandler_FindFirst(*args, **kwargs)
1790
1791 def FindNext(*args, **kwargs):
1792 """FindNext(self) -> wxString"""
1793 return __core.FileSystemHandler_FindNext(*args, **kwargs)
1794
1795 def GetProtocol(*args, **kwargs):
1796 """GetProtocol(self, wxString location) -> wxString"""
1797 return __core.FileSystemHandler_GetProtocol(*args, **kwargs)
1798
1799 def GetLeftLocation(*args, **kwargs):
1800 """GetLeftLocation(self, wxString location) -> wxString"""
1801 return __core.FileSystemHandler_GetLeftLocation(*args, **kwargs)
1802
1803 def GetAnchor(*args, **kwargs):
1804 """GetAnchor(self, wxString location) -> wxString"""
1805 return __core.FileSystemHandler_GetAnchor(*args, **kwargs)
1806
1807 def GetRightLocation(*args, **kwargs):
1808 """GetRightLocation(self, wxString location) -> wxString"""
1809 return __core.FileSystemHandler_GetRightLocation(*args, **kwargs)
1810
1811 def GetMimeTypeFromExt(*args, **kwargs):
1812 """GetMimeTypeFromExt(self, wxString location) -> wxString"""
1813 return __core.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs)
1814
1815
1816 class FileSystemHandlerPtr(FileSystemHandler):
1817 def __init__(self, this):
1818 self.this = this
1819 if not hasattr(self,"thisown"): self.thisown = 0
1820 self.__class__ = FileSystemHandler
1821 __core.FileSystemHandler_swigregister(FileSystemHandlerPtr)
1822
1823 class wxFileSystem(wxObject):
1824 """Proxy of C++ wxFileSystem class"""
1825 def __repr__(self):
1826 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1827 def __init__(self, *args, **kwargs):
1828 """__init__(self) -> wxFileSystem"""
1829 newobj = __core.new_wxFileSystem(*args, **kwargs)
1830 self.this = newobj.this
1831 self.thisown = 1
1832 del newobj.thisown
1833 def __del__(self, destroy=__core.delete_wxFileSystem):
1834 """__del__(self)"""
1835 try:
1836 if self.thisown: destroy(self)
1837 except: pass
1838
1839 def ChangePathTo(*args, **kwargs):
1840 """ChangePathTo(self, wxString location, bool is_dir=False)"""
1841 return __core.wxFileSystem_ChangePathTo(*args, **kwargs)
1842
1843 def GetPath(*args, **kwargs):
1844 """GetPath(self) -> wxString"""
1845 return __core.wxFileSystem_GetPath(*args, **kwargs)
1846
1847 def OpenFile(*args, **kwargs):
1848 """OpenFile(self, wxString location) -> wxFSFile"""
1849 return __core.wxFileSystem_OpenFile(*args, **kwargs)
1850
1851 def FindFirst(*args, **kwargs):
1852 """FindFirst(self, wxString spec, int flags=0) -> wxString"""
1853 return __core.wxFileSystem_FindFirst(*args, **kwargs)
1854
1855 def FindNext(*args, **kwargs):
1856 """FindNext(self) -> wxString"""
1857 return __core.wxFileSystem_FindNext(*args, **kwargs)
1858
1859 def AddHandler(*args, **kwargs):
1860 """AddHandler(CPPFileSystemHandler handler)"""
1861 return __core.wxFileSystem_AddHandler(*args, **kwargs)
1862
1863 AddHandler = staticmethod(AddHandler)
1864 def CleanUpHandlers(*args, **kwargs):
1865 """CleanUpHandlers()"""
1866 return __core.wxFileSystem_CleanUpHandlers(*args, **kwargs)
1867
1868 CleanUpHandlers = staticmethod(CleanUpHandlers)
1869 def FileNameToURL(*args, **kwargs):
1870 """FileNameToURL(wxString filename) -> wxString"""
1871 return __core.wxFileSystem_FileNameToURL(*args, **kwargs)
1872
1873 FileNameToURL = staticmethod(FileNameToURL)
1874 def URLToFileName(*args, **kwargs):
1875 """URLToFileName(wxString url) -> wxString"""
1876 return __core.wxFileSystem_URLToFileName(*args, **kwargs)
1877
1878 URLToFileName = staticmethod(URLToFileName)
1879
1880 class wxFileSystemPtr(wxFileSystem):
1881 def __init__(self, this):
1882 self.this = this
1883 if not hasattr(self,"thisown"): self.thisown = 0
1884 self.__class__ = wxFileSystem
1885 __core.wxFileSystem_swigregister(wxFileSystemPtr)
1886
1887 def wxFileSystem_AddHandler(*args, **kwargs):
1888 """wxFileSystem_AddHandler(CPPFileSystemHandler handler)"""
1889 return __core.wxFileSystem_AddHandler(*args, **kwargs)
1890
1891 def wxFileSystem_CleanUpHandlers(*args, **kwargs):
1892 """wxFileSystem_CleanUpHandlers()"""
1893 return __core.wxFileSystem_CleanUpHandlers(*args, **kwargs)
1894
1895 def wxFileSystem_FileNameToURL(*args, **kwargs):
1896 """wxFileSystem_FileNameToURL(wxString filename) -> wxString"""
1897 return __core.wxFileSystem_FileNameToURL(*args, **kwargs)
1898
1899 def wxFileSystem_URLToFileName(*args, **kwargs):
1900 """wxFileSystem_URLToFileName(wxString url) -> wxString"""
1901 return __core.wxFileSystem_URLToFileName(*args, **kwargs)
1902
1903 class wxInternetFSHandler(CPPFileSystemHandler):
1904 """Proxy of C++ wxInternetFSHandler class"""
1905 def __repr__(self):
1906 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1907 def __init__(self, *args, **kwargs):
1908 """__init__(self) -> wxInternetFSHandler"""
1909 newobj = __core.new_wxInternetFSHandler(*args, **kwargs)
1910 self.this = newobj.this
1911 self.thisown = 1
1912 del newobj.thisown
1913 def CanOpen(*args, **kwargs):
1914 """CanOpen(self, wxString location) -> bool"""
1915 return __core.wxInternetFSHandler_CanOpen(*args, **kwargs)
1916
1917 def OpenFile(*args, **kwargs):
1918 """OpenFile(self, wxFileSystem fs, wxString location) -> wxFSFile"""
1919 return __core.wxInternetFSHandler_OpenFile(*args, **kwargs)
1920
1921
1922 class wxInternetFSHandlerPtr(wxInternetFSHandler):
1923 def __init__(self, this):
1924 self.this = this
1925 if not hasattr(self,"thisown"): self.thisown = 0
1926 self.__class__ = wxInternetFSHandler
1927 __core.wxInternetFSHandler_swigregister(wxInternetFSHandlerPtr)
1928
1929 class wxZipFSHandler(CPPFileSystemHandler):
1930 """Proxy of C++ wxZipFSHandler class"""
1931 def __repr__(self):
1932 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1933 def __init__(self, *args, **kwargs):
1934 """__init__(self) -> wxZipFSHandler"""
1935 newobj = __core.new_wxZipFSHandler(*args, **kwargs)
1936 self.this = newobj.this
1937 self.thisown = 1
1938 del newobj.thisown
1939 def CanOpen(*args, **kwargs):
1940 """CanOpen(self, wxString location) -> bool"""
1941 return __core.wxZipFSHandler_CanOpen(*args, **kwargs)
1942
1943 def OpenFile(*args, **kwargs):
1944 """OpenFile(self, wxFileSystem fs, wxString location) -> wxFSFile"""
1945 return __core.wxZipFSHandler_OpenFile(*args, **kwargs)
1946
1947 def FindFirst(*args, **kwargs):
1948 """FindFirst(self, wxString spec, int flags=0) -> wxString"""
1949 return __core.wxZipFSHandler_FindFirst(*args, **kwargs)
1950
1951 def FindNext(*args, **kwargs):
1952 """FindNext(self) -> wxString"""
1953 return __core.wxZipFSHandler_FindNext(*args, **kwargs)
1954
1955
1956 class wxZipFSHandlerPtr(wxZipFSHandler):
1957 def __init__(self, this):
1958 self.this = this
1959 if not hasattr(self,"thisown"): self.thisown = 0
1960 self.__class__ = wxZipFSHandler
1961 __core.wxZipFSHandler_swigregister(wxZipFSHandlerPtr)
1962
1963
1964 def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs):
1965 """__wxMemoryFSHandler_AddFile_wxImage(wxString filename, wxImage image, long type)"""
1966 return __core.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs)
1967
1968 def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs):
1969 """__wxMemoryFSHandler_AddFile_wxBitmap(wxString filename, wxBitmap bitmap, long type)"""
1970 return __core.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs)
1971
1972 def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs):
1973 """__wxMemoryFSHandler_AddFile_Data(wxString filename, PyObject data)"""
1974 return __core.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs)
1975 def MemoryFSHandler_AddFile(filename, dataItem, imgType=-1):
1976 """
1977 Add 'file' to the memory filesystem. The dataItem parameter can
1978 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1979 arbitrary data. If a bitmap or image is used then the imgType
1980 parameter should specify what kind of image file it should be
1981 written as, wx.BITMAP_TYPE_PNG, etc.
1982 """
1983 if isinstance(dataItem, wx.Image):
1984 __wxMemoryFSHandler_AddFile_wxImage(filename, dataItem, imgType)
1985 elif isinstance(dataItem, wx.Bitmap):
1986 __wxMemoryFSHandler_AddFile_wxBitmap(filename, dataItem, imgType)
1987 elif type(dataItem) == str:
1988 __wxMemoryFSHandler_AddFile_Data(filename, dataItem)
1989 else:
1990 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
1991
1992 class wxMemoryFSHandler(CPPFileSystemHandler):
1993 """Proxy of C++ wxMemoryFSHandler class"""
1994 def __repr__(self):
1995 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1996 def __init__(self, *args, **kwargs):
1997 """__init__(self) -> wxMemoryFSHandler"""
1998 newobj = __core.new_wxMemoryFSHandler(*args, **kwargs)
1999 self.this = newobj.this
2000 self.thisown = 1
2001 del newobj.thisown
2002 def RemoveFile(*args, **kwargs):
2003 """RemoveFile(wxString filename)"""
2004 return __core.wxMemoryFSHandler_RemoveFile(*args, **kwargs)
2005
2006 RemoveFile = staticmethod(RemoveFile)
2007 AddFile = staticmethod(MemoryFSHandler_AddFile)
2008 def CanOpen(*args, **kwargs):
2009 """CanOpen(self, wxString location) -> bool"""
2010 return __core.wxMemoryFSHandler_CanOpen(*args, **kwargs)
2011
2012 def OpenFile(*args, **kwargs):
2013 """OpenFile(self, wxFileSystem fs, wxString location) -> wxFSFile"""
2014 return __core.wxMemoryFSHandler_OpenFile(*args, **kwargs)
2015
2016 def FindFirst(*args, **kwargs):
2017 """FindFirst(self, wxString spec, int flags=0) -> wxString"""
2018 return __core.wxMemoryFSHandler_FindFirst(*args, **kwargs)
2019
2020 def FindNext(*args, **kwargs):
2021 """FindNext(self) -> wxString"""
2022 return __core.wxMemoryFSHandler_FindNext(*args, **kwargs)
2023
2024
2025 class wxMemoryFSHandlerPtr(wxMemoryFSHandler):
2026 def __init__(self, this):
2027 self.this = this
2028 if not hasattr(self,"thisown"): self.thisown = 0
2029 self.__class__ = wxMemoryFSHandler
2030 __core.wxMemoryFSHandler_swigregister(wxMemoryFSHandlerPtr)
2031
2032 def wxMemoryFSHandler_RemoveFile(*args, **kwargs):
2033 """wxMemoryFSHandler_RemoveFile(wxString filename)"""
2034 return __core.wxMemoryFSHandler_RemoveFile(*args, **kwargs)
2035
2036 #---------------------------------------------------------------------------
2037
2038 class wxImageHandler(wxObject):
2039 """Proxy of C++ wxImageHandler class"""
2040 def __init__(self): raise RuntimeError, "No constructor defined"
2041 def __repr__(self):
2042 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2043 def GetName(*args, **kwargs):
2044 """GetName(self) -> wxString"""
2045 return __core.wxImageHandler_GetName(*args, **kwargs)
2046
2047 def GetExtension(*args, **kwargs):
2048 """GetExtension(self) -> wxString"""
2049 return __core.wxImageHandler_GetExtension(*args, **kwargs)
2050
2051 def GetType(*args, **kwargs):
2052 """GetType(self) -> long"""
2053 return __core.wxImageHandler_GetType(*args, **kwargs)
2054
2055 def GetMimeType(*args, **kwargs):
2056 """GetMimeType(self) -> wxString"""
2057 return __core.wxImageHandler_GetMimeType(*args, **kwargs)
2058
2059 def CanRead(*args, **kwargs):
2060 """CanRead(self, wxString name) -> bool"""
2061 return __core.wxImageHandler_CanRead(*args, **kwargs)
2062
2063 def SetName(*args, **kwargs):
2064 """SetName(self, wxString name)"""
2065 return __core.wxImageHandler_SetName(*args, **kwargs)
2066
2067 def SetExtension(*args, **kwargs):
2068 """SetExtension(self, wxString extension)"""
2069 return __core.wxImageHandler_SetExtension(*args, **kwargs)
2070
2071 def SetType(*args, **kwargs):
2072 """SetType(self, long type)"""
2073 return __core.wxImageHandler_SetType(*args, **kwargs)
2074
2075 def SetMimeType(*args, **kwargs):
2076 """SetMimeType(self, wxString mimetype)"""
2077 return __core.wxImageHandler_SetMimeType(*args, **kwargs)
2078
2079
2080 class wxImageHandlerPtr(wxImageHandler):
2081 def __init__(self, this):
2082 self.this = this
2083 if not hasattr(self,"thisown"): self.thisown = 0
2084 self.__class__ = wxImageHandler
2085 __core.wxImageHandler_swigregister(wxImageHandlerPtr)
2086
2087 class wxImageHistogram(object):
2088 """Proxy of C++ wxImageHistogram class"""
2089 def __repr__(self):
2090 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2091 def __init__(self, *args, **kwargs):
2092 """__init__(self) -> wxImageHistogram"""
2093 newobj = __core.new_wxImageHistogram(*args, **kwargs)
2094 self.this = newobj.this
2095 self.thisown = 1
2096 del newobj.thisown
2097 def MakeKey(*args, **kwargs):
2098 """
2099 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2100
2101 Get the key in the histogram for the given RGB values
2102 """
2103 return __core.wxImageHistogram_MakeKey(*args, **kwargs)
2104
2105 MakeKey = staticmethod(MakeKey)
2106 def FindFirstUnusedColour(*args, **kwargs):
2107 """
2108 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2109
2110 Find first colour that is not used in the image and has higher RGB
2111 values than startR, startG, startB. Returns a tuple consisting of a
2112 success flag and rgb values.
2113 """
2114 return __core.wxImageHistogram_FindFirstUnusedColour(*args, **kwargs)
2115
2116 def GetCount(*args, **kwargs):
2117 """
2118 GetCount(self, unsigned long key) -> unsigned long
2119
2120 Returns the pixel count for the given key. Use `MakeKey` to create a
2121 key value from a RGB tripple.
2122 """
2123 return __core.wxImageHistogram_GetCount(*args, **kwargs)
2124
2125 def GetCountRGB(*args, **kwargs):
2126 """
2127 GetCountRGB(self, unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2128
2129 Returns the pixel count for the given RGB values.
2130 """
2131 return __core.wxImageHistogram_GetCountRGB(*args, **kwargs)
2132
2133 def GetCountColour(*args, **kwargs):
2134 """
2135 GetCountColour(self, wxColour colour) -> unsigned long
2136
2137 Returns the pixel count for the given `wx.Colour` value.
2138 """
2139 return __core.wxImageHistogram_GetCountColour(*args, **kwargs)
2140
2141
2142 class wxImageHistogramPtr(wxImageHistogram):
2143 def __init__(self, this):
2144 self.this = this
2145 if not hasattr(self,"thisown"): self.thisown = 0
2146 self.__class__ = wxImageHistogram
2147 __core.wxImageHistogram_swigregister(wxImageHistogramPtr)
2148
2149 def wxImageHistogram_MakeKey(*args, **kwargs):
2150 """
2151 wxImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2152
2153 Get the key in the histogram for the given RGB values
2154 """
2155 return __core.wxImageHistogram_MakeKey(*args, **kwargs)
2156
2157 class wxImage(wxObject):
2158 """Proxy of C++ wxImage class"""
2159 def __repr__(self):
2160 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2161 def __init__(self, *args, **kwargs):
2162 """__init__(self, wxString name, long type=wxBITMAP_TYPE_ANY, int index=-1) -> wxImage"""
2163 newobj = __core.new_wxImage(*args, **kwargs)
2164 self.this = newobj.this
2165 self.thisown = 1
2166 del newobj.thisown
2167 def __del__(self, destroy=__core.delete_wxImage):
2168 """__del__(self)"""
2169 try:
2170 if self.thisown: destroy(self)
2171 except: pass
2172
2173 def Create(*args, **kwargs):
2174 """Create(self, int width, int height)"""
2175 return __core.wxImage_Create(*args, **kwargs)
2176
2177 def Destroy(*args, **kwargs):
2178 """
2179 Destroy(self)
2180
2181 Deletes the C++ object this Python object is a proxy for.
2182 """
2183 return __core.wxImage_Destroy(*args, **kwargs)
2184
2185 def Scale(*args, **kwargs):
2186 """Scale(self, int width, int height) -> wxImage"""
2187 return __core.wxImage_Scale(*args, **kwargs)
2188
2189 def ShrinkBy(*args, **kwargs):
2190 """ShrinkBy(self, int xFactor, int yFactor) -> wxImage"""
2191 return __core.wxImage_ShrinkBy(*args, **kwargs)
2192
2193 def Rescale(*args, **kwargs):
2194 """Rescale(self, int width, int height) -> wxImage"""
2195 return __core.wxImage_Rescale(*args, **kwargs)
2196
2197 def Resize(*args, **kwargs):
2198 """Resize(self, wxSize size, wxPoint pos, int r=-1, int g=-1, int b=-1) -> wxImage"""
2199 return __core.wxImage_Resize(*args, **kwargs)
2200
2201 def SetRGB(*args, **kwargs):
2202 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
2203 return __core.wxImage_SetRGB(*args, **kwargs)
2204
2205 def SetRGBRect(*args, **kwargs):
2206 """SetRGBRect(self, wxRect rect, unsigned char r, unsigned char g, unsigned char b)"""
2207 return __core.wxImage_SetRGBRect(*args, **kwargs)
2208
2209 def GetRed(*args, **kwargs):
2210 """GetRed(self, int x, int y) -> unsigned char"""
2211 return __core.wxImage_GetRed(*args, **kwargs)
2212
2213 def GetGreen(*args, **kwargs):
2214 """GetGreen(self, int x, int y) -> unsigned char"""
2215 return __core.wxImage_GetGreen(*args, **kwargs)
2216
2217 def GetBlue(*args, **kwargs):
2218 """GetBlue(self, int x, int y) -> unsigned char"""
2219 return __core.wxImage_GetBlue(*args, **kwargs)
2220
2221 def SetAlpha(*args, **kwargs):
2222 """SetAlpha(self, int x, int y, unsigned char alpha)"""
2223 return __core.wxImage_SetAlpha(*args, **kwargs)
2224
2225 def GetAlpha(*args, **kwargs):
2226 """GetAlpha(self, int x, int y) -> unsigned char"""
2227 return __core.wxImage_GetAlpha(*args, **kwargs)
2228
2229 def HasAlpha(*args, **kwargs):
2230 """HasAlpha(self) -> bool"""
2231 return __core.wxImage_HasAlpha(*args, **kwargs)
2232
2233 def InitAlpha(*args, **kwargs):
2234 """
2235 InitAlpha(self)
2236
2237 Initializes the image alpha channel data. It is an error to call it if
2238 the image already has alpha data. If it doesn't, alpha data will be by
2239 default initialized to all pixels being fully opaque. But if the image
2240 has a a mask colour, all mask pixels will be completely transparent.
2241 """
2242 return __core.wxImage_InitAlpha(*args, **kwargs)
2243
2244 def FindFirstUnusedColour(*args, **kwargs):
2245 """
2246 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2247
2248 Find first colour that is not used in the image and has higher RGB
2249 values than startR, startG, startB. Returns a tuple consisting of a
2250 success flag and rgb values.
2251 """
2252 return __core.wxImage_FindFirstUnusedColour(*args, **kwargs)
2253
2254 def ConvertAlphaToMask(*args, **kwargs):
2255 """
2256 ConvertAlphaToMask(self, byte threshold=128) -> bool
2257
2258 If the image has alpha channel, this method converts it to mask. All pixels
2259 with alpha value less than ``threshold`` are replaced with mask colour and the
2260 alpha channel is removed. Mask colour is chosen automatically using
2261 `FindFirstUnusedColour`.
2262
2263 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2264 nothing.
2265 """
2266 return __core.wxImage_ConvertAlphaToMask(*args, **kwargs)
2267
2268 def ConvertColourToAlpha(*args, **kwargs):
2269 """
2270 ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool
2271
2272 This method converts an image where the original alpha information is
2273 only available as a shades of a colour (actually shades of grey)
2274 typically when you draw anti-aliased text into a bitmap. The DC
2275 drawing routines draw grey values on the black background although
2276 they actually mean to draw white with differnt alpha values. This
2277 method reverses it, assuming a black (!) background and white text.
2278 The method will then fill up the whole image with the colour given.
2279 """
2280 return __core.wxImage_ConvertColourToAlpha(*args, **kwargs)
2281
2282 def SetMaskFromImage(*args, **kwargs):
2283 """SetMaskFromImage(self, wxImage mask, byte mr, byte mg, byte mb) -> bool"""
2284 return __core.wxImage_SetMaskFromImage(*args, **kwargs)
2285
2286 def CanRead(*args, **kwargs):
2287 """CanRead(wxString name) -> bool"""
2288 return __core.wxImage_CanRead(*args, **kwargs)
2289
2290 CanRead = staticmethod(CanRead)
2291 def GetImageCount(*args, **kwargs):
2292 """GetImageCount(wxString name, long type=wxBITMAP_TYPE_ANY) -> int"""
2293 return __core.wxImage_GetImageCount(*args, **kwargs)
2294
2295 GetImageCount = staticmethod(GetImageCount)
2296 def LoadFile(*args, **kwargs):
2297 """LoadFile(self, wxString name, long type=wxBITMAP_TYPE_ANY, int index=-1) -> bool"""
2298 return __core.wxImage_LoadFile(*args, **kwargs)
2299
2300 def LoadMimeFile(*args, **kwargs):
2301 """LoadMimeFile(self, wxString name, wxString mimetype, int index=-1) -> bool"""
2302 return __core.wxImage_LoadMimeFile(*args, **kwargs)
2303
2304 def SaveFile(*args, **kwargs):
2305 """SaveFile(self, wxString name, int type) -> bool"""
2306 return __core.wxImage_SaveFile(*args, **kwargs)
2307
2308 def SaveMimeFile(*args, **kwargs):
2309 """SaveMimeFile(self, wxString name, wxString mimetype) -> bool"""
2310 return __core.wxImage_SaveMimeFile(*args, **kwargs)
2311
2312 def CanReadStream(*args, **kwargs):
2313 """CanReadStream(wxInputStream stream) -> bool"""
2314 return __core.wxImage_CanReadStream(*args, **kwargs)
2315
2316 CanReadStream = staticmethod(CanReadStream)
2317 def LoadStream(*args, **kwargs):
2318 """
2319 LoadStream(self, wxInputStream stream, long type=wxBITMAP_TYPE_ANY,
2320 int index=-1) -> bool
2321 """
2322 return __core.wxImage_LoadStream(*args, **kwargs)
2323
2324 def LoadMimeStream(*args, **kwargs):
2325 """LoadMimeStream(self, wxInputStream stream, wxString mimetype, int index=-1) -> bool"""
2326 return __core.wxImage_LoadMimeStream(*args, **kwargs)
2327
2328 def Ok(*args, **kwargs):
2329 """Ok(self) -> bool"""
2330 return __core.wxImage_Ok(*args, **kwargs)
2331
2332 def GetWidth(*args, **kwargs):
2333 """GetWidth(self) -> int"""
2334 return __core.wxImage_GetWidth(*args, **kwargs)
2335
2336 def GetHeight(*args, **kwargs):
2337 """GetHeight(self) -> int"""
2338 return __core.wxImage_GetHeight(*args, **kwargs)
2339
2340 def GetSize(*args, **kwargs):
2341 """GetSize(self) -> wxSize"""
2342 return __core.wxImage_GetSize(*args, **kwargs)
2343
2344 def GetSubImage(*args, **kwargs):
2345 """GetSubImage(self, wxRect rect) -> wxImage"""
2346 return __core.wxImage_GetSubImage(*args, **kwargs)
2347
2348 def Size(*args, **kwargs):
2349 """Size(self, wxSize size, wxPoint pos, int r=-1, int g=-1, int b=-1) -> wxImage"""
2350 return __core.wxImage_Size(*args, **kwargs)
2351
2352 def Copy(*args, **kwargs):
2353 """Copy(self) -> wxImage"""
2354 return __core.wxImage_Copy(*args, **kwargs)
2355
2356 def Paste(*args, **kwargs):
2357 """Paste(self, wxImage image, int x, int y)"""
2358 return __core.wxImage_Paste(*args, **kwargs)
2359
2360 def GetData(*args, **kwargs):
2361 """
2362 GetData(self) -> PyObject
2363
2364 Returns a string containing a copy of the RGB bytes of the image.
2365 """
2366 return __core.wxImage_GetData(*args, **kwargs)
2367
2368 def SetData(*args, **kwargs):
2369 """
2370 SetData(self, buffer data)
2371
2372 Resets the Image's RGB data from a buffer of RGB bytes. Accepts
2373 either a string or a buffer object holding the data and the length of
2374 the data must be width*height*3.
2375 """
2376 return __core.wxImage_SetData(*args, **kwargs)
2377
2378 def GetDataBuffer(*args, **kwargs):
2379 """
2380 GetDataBuffer(self) -> PyObject
2381
2382 Returns a writable Python buffer object that is pointing at the RGB
2383 image data buffer inside the wx.Image.
2384 """
2385 return __core.wxImage_GetDataBuffer(*args, **kwargs)
2386
2387 def SetDataBuffer(*args, **kwargs):
2388 """
2389 SetDataBuffer(self, buffer data)
2390
2391 Sets the internal image data pointer to point at a Python buffer
2392 object. This can save a copy of the data but you must ensure that the
2393 buffer object lives longer than the wx.Image does.
2394 """
2395 return __core.wxImage_SetDataBuffer(*args, **kwargs)
2396
2397 def GetAlphaData(*args, **kwargs):
2398 """
2399 GetAlphaData(self) -> PyObject
2400
2401 Returns a string containing a copy of the alpha bytes of the image.
2402 """
2403 return __core.wxImage_GetAlphaData(*args, **kwargs)
2404
2405 def SetAlphaData(*args, **kwargs):
2406 """
2407 SetAlphaData(self, buffer alpha)
2408
2409 Resets the Image's alpha data from a buffer of bytes. Accepts either
2410 a string or a buffer object holding the data and the length of the
2411 data must be width*height.
2412 """
2413 return __core.wxImage_SetAlphaData(*args, **kwargs)
2414
2415 def GetAlphaBuffer(*args, **kwargs):
2416 """GetAlphaBuffer(self) -> PyObject"""
2417 return __core.wxImage_GetAlphaBuffer(*args, **kwargs)
2418
2419 def SetAlphaBuffer(*args, **kwargs):
2420 """SetAlphaBuffer(self, buffer alpha)"""
2421 return __core.wxImage_SetAlphaBuffer(*args, **kwargs)
2422
2423 def SetMaskColour(*args, **kwargs):
2424 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
2425 return __core.wxImage_SetMaskColour(*args, **kwargs)
2426
2427 def GetOrFindMaskColour(*args, **kwargs):
2428 """
2429 GetOrFindMaskColour() -> (r,g,b)
2430
2431 Get the current mask colour or find a suitable colour.
2432 """
2433 return __core.wxImage_GetOrFindMaskColour(*args, **kwargs)
2434
2435 def GetMaskRed(*args, **kwargs):
2436 """GetMaskRed(self) -> unsigned char"""
2437 return __core.wxImage_GetMaskRed(*args, **kwargs)
2438
2439 def GetMaskGreen(*args, **kwargs):
2440 """GetMaskGreen(self) -> unsigned char"""
2441 return __core.wxImage_GetMaskGreen(*args, **kwargs)
2442
2443 def GetMaskBlue(*args, **kwargs):
2444 """GetMaskBlue(self) -> unsigned char"""
2445 return __core.wxImage_GetMaskBlue(*args, **kwargs)
2446
2447 def SetMask(*args, **kwargs):
2448 """SetMask(self, bool mask=True)"""
2449 return __core.wxImage_SetMask(*args, **kwargs)
2450
2451 def HasMask(*args, **kwargs):
2452 """HasMask(self) -> bool"""
2453 return __core.wxImage_HasMask(*args, **kwargs)
2454
2455 def Rotate(*args, **kwargs):
2456 """
2457 Rotate(self, double angle, wxPoint centre_of_rotation, bool interpolating=True,
2458 wxPoint offset_after_rotation=None) -> wxImage
2459 """
2460 return __core.wxImage_Rotate(*args, **kwargs)
2461
2462 def Rotate90(*args, **kwargs):
2463 """Rotate90(self, bool clockwise=True) -> wxImage"""
2464 return __core.wxImage_Rotate90(*args, **kwargs)
2465
2466 def Mirror(*args, **kwargs):
2467 """Mirror(self, bool horizontally=True) -> wxImage"""
2468 return __core.wxImage_Mirror(*args, **kwargs)
2469
2470 def Replace(*args, **kwargs):
2471 """
2472 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
2473 unsigned char r2, unsigned char g2, unsigned char b2)
2474 """
2475 return __core.wxImage_Replace(*args, **kwargs)
2476
2477 def ConvertToMono(*args, **kwargs):
2478 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> wxImage"""
2479 return __core.wxImage_ConvertToMono(*args, **kwargs)
2480
2481 def SetOption(*args, **kwargs):
2482 """SetOption(self, wxString name, wxString value)"""
2483 return __core.wxImage_SetOption(*args, **kwargs)
2484
2485 def SetOptionInt(*args, **kwargs):
2486 """SetOptionInt(self, wxString name, int value)"""
2487 return __core.wxImage_SetOptionInt(*args, **kwargs)
2488
2489 def GetOption(*args, **kwargs):
2490 """GetOption(self, wxString name) -> wxString"""
2491 return __core.wxImage_GetOption(*args, **kwargs)
2492
2493 def GetOptionInt(*args, **kwargs):
2494 """GetOptionInt(self, wxString name) -> int"""
2495 return __core.wxImage_GetOptionInt(*args, **kwargs)
2496
2497 def HasOption(*args, **kwargs):
2498 """HasOption(self, wxString name) -> bool"""
2499 return __core.wxImage_HasOption(*args, **kwargs)
2500
2501 def CountColours(*args, **kwargs):
2502 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
2503 return __core.wxImage_CountColours(*args, **kwargs)
2504
2505 def ComputeHistogram(*args, **kwargs):
2506 """ComputeHistogram(self, wxImageHistogram h) -> unsigned long"""
2507 return __core.wxImage_ComputeHistogram(*args, **kwargs)
2508
2509 def AddHandler(*args, **kwargs):
2510 """AddHandler(wxImageHandler handler)"""
2511 return __core.wxImage_AddHandler(*args, **kwargs)
2512
2513 AddHandler = staticmethod(AddHandler)
2514 def InsertHandler(*args, **kwargs):
2515 """InsertHandler(wxImageHandler handler)"""
2516 return __core.wxImage_InsertHandler(*args, **kwargs)
2517
2518 InsertHandler = staticmethod(InsertHandler)
2519 def RemoveHandler(*args, **kwargs):
2520 """RemoveHandler(wxString name) -> bool"""
2521 return __core.wxImage_RemoveHandler(*args, **kwargs)
2522
2523 RemoveHandler = staticmethod(RemoveHandler)
2524 def GetImageExtWildcard(*args, **kwargs):
2525 """GetImageExtWildcard() -> wxString"""
2526 return __core.wxImage_GetImageExtWildcard(*args, **kwargs)
2527
2528 GetImageExtWildcard = staticmethod(GetImageExtWildcard)
2529 def ConvertToBitmap(*args, **kwargs):
2530 """ConvertToBitmap(self, int depth=-1) -> wxBitmap"""
2531 return __core.wxImage_ConvertToBitmap(*args, **kwargs)
2532
2533 def ConvertToMonoBitmap(*args, **kwargs):
2534 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> wxBitmap"""
2535 return __core.wxImage_ConvertToMonoBitmap(*args, **kwargs)
2536
2537 def __nonzero__(self): return self.Ok()
2538
2539 class wxImagePtr(wxImage):
2540 def __init__(self, this):
2541 self.this = this
2542 if not hasattr(self,"thisown"): self.thisown = 0
2543 self.__class__ = wxImage
2544 __core.wxImage_swigregister(wxImagePtr)
2545
2546 def ImageFromMime(*args, **kwargs):
2547 """ImageFromMime(wxString name, wxString mimetype, int index=-1) -> wxImage"""
2548 val = __core.new_ImageFromMime(*args, **kwargs)
2549 val.thisown = 1
2550 return val
2551
2552 def ImageFromStream(*args, **kwargs):
2553 """
2554 ImageFromStream(wxInputStream stream, long type=wxBITMAP_TYPE_ANY,
2555 int index=-1) -> wxImage
2556 """
2557 val = __core.new_ImageFromStream(*args, **kwargs)
2558 val.thisown = 1
2559 return val
2560
2561 def ImageFromStreamMime(*args, **kwargs):
2562 """ImageFromStreamMime(wxInputStream stream, wxString mimetype, int index=-1) -> wxImage"""
2563 val = __core.new_ImageFromStreamMime(*args, **kwargs)
2564 val.thisown = 1
2565 return val
2566
2567 def EmptyImage(*args, **kwargs):
2568 """
2569 EmptyImage(int width=0, int height=0, bool clear=True) -> wxImage
2570
2571 Construct an empty image of a given size, optionally setting all
2572 pixels to black.
2573 """
2574 val = __core.new_EmptyImage(*args, **kwargs)
2575 val.thisown = 1
2576 return val
2577
2578 def ImageFromBitmap(*args, **kwargs):
2579 """
2580 ImageFromBitmap(wxBitmap bitmap) -> wxImage
2581
2582 Construct an Image from a `wx.Bitmap`.
2583 """
2584 val = __core.new_ImageFromBitmap(*args, **kwargs)
2585 val.thisown = 1
2586 return val
2587
2588 def ImageFromData(*args, **kwargs):
2589 """
2590 ImageFromData(int width, int height, buffer data) -> wxImage
2591
2592 Construct an Image from a buffer of RGB bytes. Accepts either a
2593 string or a buffer object holding the data and the length of the data
2594 must be width*height*3.
2595 """
2596 val = __core.new_ImageFromData(*args, **kwargs)
2597 val.thisown = 1
2598 return val
2599
2600 def ImageFromDataWithAlpha(*args, **kwargs):
2601 """
2602 ImageFromDataWithAlpha(int width, int height, buffer data, buffer alpha) -> wxImage
2603
2604 Construct an Image from a buffer of RGB bytes with an Alpha channel.
2605 Accepts either a string or a buffer object holding the data and the
2606 length of the data must be width*height*3.
2607 """
2608 val = __core.new_ImageFromDataWithAlpha(*args, **kwargs)
2609 val.thisown = 1
2610 return val
2611
2612 def wxImage_CanRead(*args, **kwargs):
2613 """wxImage_CanRead(wxString name) -> bool"""
2614 return __core.wxImage_CanRead(*args, **kwargs)
2615
2616 def wxImage_GetImageCount(*args, **kwargs):
2617 """wxImage_GetImageCount(wxString name, long type=wxBITMAP_TYPE_ANY) -> int"""
2618 return __core.wxImage_GetImageCount(*args, **kwargs)
2619
2620 def wxImage_CanReadStream(*args, **kwargs):
2621 """wxImage_CanReadStream(wxInputStream stream) -> bool"""
2622 return __core.wxImage_CanReadStream(*args, **kwargs)
2623
2624 def wxImage_AddHandler(*args, **kwargs):
2625 """wxImage_AddHandler(wxImageHandler handler)"""
2626 return __core.wxImage_AddHandler(*args, **kwargs)
2627
2628 def wxImage_InsertHandler(*args, **kwargs):
2629 """wxImage_InsertHandler(wxImageHandler handler)"""
2630 return __core.wxImage_InsertHandler(*args, **kwargs)
2631
2632 def wxImage_RemoveHandler(*args, **kwargs):
2633 """wxImage_RemoveHandler(wxString name) -> bool"""
2634 return __core.wxImage_RemoveHandler(*args, **kwargs)
2635
2636 def wxImage_GetImageExtWildcard(*args, **kwargs):
2637 """wxImage_GetImageExtWildcard() -> wxString"""
2638 return __core.wxImage_GetImageExtWildcard(*args, **kwargs)
2639
2640 def InitAllImageHandlers():
2641 """
2642 The former functionality of InitAllImageHanders is now done internal to
2643 the _core_ extension module and so this function has become a simple NOP.
2644 """
2645 pass
2646
2647 wxIMAGE_RESOLUTION_INCHES = __core.wxIMAGE_RESOLUTION_INCHES
2648 wxIMAGE_RESOLUTION_CM = __core.wxIMAGE_RESOLUTION_CM
2649 wxPNG_TYPE_COLOUR = __core.wxPNG_TYPE_COLOUR
2650 wxPNG_TYPE_GREY = __core.wxPNG_TYPE_GREY
2651 wxPNG_TYPE_GREY_RED = __core.wxPNG_TYPE_GREY_RED
2652 wxBMP_24BPP = __core.wxBMP_24BPP
2653 wxBMP_8BPP = __core.wxBMP_8BPP
2654 wxBMP_8BPP_GREY = __core.wxBMP_8BPP_GREY
2655 wxBMP_8BPP_GRAY = __core.wxBMP_8BPP_GRAY
2656 wxBMP_8BPP_RED = __core.wxBMP_8BPP_RED
2657 wxBMP_8BPP_PALETTE = __core.wxBMP_8BPP_PALETTE
2658 wxBMP_4BPP = __core.wxBMP_4BPP
2659 wxBMP_1BPP = __core.wxBMP_1BPP
2660 wxBMP_1BPP_BW = __core.wxBMP_1BPP_BW
2661 class wxBMPHandler(wxImageHandler):
2662 """Proxy of C++ wxBMPHandler class"""
2663 def __repr__(self):
2664 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2665 def __init__(self, *args, **kwargs):
2666 """__init__(self) -> wxBMPHandler"""
2667 newobj = __core.new_wxBMPHandler(*args, **kwargs)
2668 self.this = newobj.this
2669 self.thisown = 1
2670 del newobj.thisown
2671
2672 class wxBMPHandlerPtr(wxBMPHandler):
2673 def __init__(self, this):
2674 self.this = this
2675 if not hasattr(self,"thisown"): self.thisown = 0
2676 self.__class__ = wxBMPHandler
2677 __core.wxBMPHandler_swigregister(wxBMPHandlerPtr)
2678 wxNullImage = cvar.wxNullImage
2679 IMAGE_OPTION_FILENAME = cvar.IMAGE_OPTION_FILENAME
2680 IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT
2681 IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X
2682 IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y
2683 IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION
2684 IMAGE_OPTION_RESOLUTIONX = cvar.IMAGE_OPTION_RESOLUTIONX
2685 IMAGE_OPTION_RESOLUTIONY = cvar.IMAGE_OPTION_RESOLUTIONY
2686 IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT
2687 IMAGE_OPTION_QUALITY = cvar.IMAGE_OPTION_QUALITY
2688 IMAGE_OPTION_BITSPERSAMPLE = cvar.IMAGE_OPTION_BITSPERSAMPLE
2689 IMAGE_OPTION_SAMPLESPERPIXEL = cvar.IMAGE_OPTION_SAMPLESPERPIXEL
2690 IMAGE_OPTION_COMPRESSION = cvar.IMAGE_OPTION_COMPRESSION
2691 IMAGE_OPTION_IMAGEDESCRIPTOR = cvar.IMAGE_OPTION_IMAGEDESCRIPTOR
2692 IMAGE_OPTION_PNG_FORMAT = cvar.IMAGE_OPTION_PNG_FORMAT
2693 IMAGE_OPTION_PNG_BITDEPTH = cvar.IMAGE_OPTION_PNG_BITDEPTH
2694
2695 class wxICOHandler(wxBMPHandler):
2696 """Proxy of C++ wxICOHandler class"""
2697 def __repr__(self):
2698 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2699 def __init__(self, *args, **kwargs):
2700 """__init__(self) -> wxICOHandler"""
2701 newobj = __core.new_wxICOHandler(*args, **kwargs)
2702 self.this = newobj.this
2703 self.thisown = 1
2704 del newobj.thisown
2705
2706 class wxICOHandlerPtr(wxICOHandler):
2707 def __init__(self, this):
2708 self.this = this
2709 if not hasattr(self,"thisown"): self.thisown = 0
2710 self.__class__ = wxICOHandler
2711 __core.wxICOHandler_swigregister(wxICOHandlerPtr)
2712
2713 class wxCURHandler(wxICOHandler):
2714 """Proxy of C++ wxCURHandler class"""
2715 def __repr__(self):
2716 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2717 def __init__(self, *args, **kwargs):
2718 """__init__(self) -> wxCURHandler"""
2719 newobj = __core.new_wxCURHandler(*args, **kwargs)
2720 self.this = newobj.this
2721 self.thisown = 1
2722 del newobj.thisown
2723
2724 class wxCURHandlerPtr(wxCURHandler):
2725 def __init__(self, this):
2726 self.this = this
2727 if not hasattr(self,"thisown"): self.thisown = 0
2728 self.__class__ = wxCURHandler
2729 __core.wxCURHandler_swigregister(wxCURHandlerPtr)
2730
2731 class wxANIHandler(wxCURHandler):
2732 """Proxy of C++ wxANIHandler class"""
2733 def __repr__(self):
2734 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2735 def __init__(self, *args, **kwargs):
2736 """__init__(self) -> wxANIHandler"""
2737 newobj = __core.new_wxANIHandler(*args, **kwargs)
2738 self.this = newobj.this
2739 self.thisown = 1
2740 del newobj.thisown
2741
2742 class wxANIHandlerPtr(wxANIHandler):
2743 def __init__(self, this):
2744 self.this = this
2745 if not hasattr(self,"thisown"): self.thisown = 0
2746 self.__class__ = wxANIHandler
2747 __core.wxANIHandler_swigregister(wxANIHandlerPtr)
2748
2749 class wxPNGHandler(wxImageHandler):
2750 """Proxy of C++ wxPNGHandler class"""
2751 def __repr__(self):
2752 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2753 def __init__(self, *args, **kwargs):
2754 """__init__(self) -> wxPNGHandler"""
2755 newobj = __core.new_wxPNGHandler(*args, **kwargs)
2756 self.this = newobj.this
2757 self.thisown = 1
2758 del newobj.thisown
2759
2760 class wxPNGHandlerPtr(wxPNGHandler):
2761 def __init__(self, this):
2762 self.this = this
2763 if not hasattr(self,"thisown"): self.thisown = 0
2764 self.__class__ = wxPNGHandler
2765 __core.wxPNGHandler_swigregister(wxPNGHandlerPtr)
2766
2767 class wxGIFHandler(wxImageHandler):
2768 """Proxy of C++ wxGIFHandler class"""
2769 def __repr__(self):
2770 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2771 def __init__(self, *args, **kwargs):
2772 """__init__(self) -> wxGIFHandler"""
2773 newobj = __core.new_wxGIFHandler(*args, **kwargs)
2774 self.this = newobj.this
2775 self.thisown = 1
2776 del newobj.thisown
2777
2778 class wxGIFHandlerPtr(wxGIFHandler):
2779 def __init__(self, this):
2780 self.this = this
2781 if not hasattr(self,"thisown"): self.thisown = 0
2782 self.__class__ = wxGIFHandler
2783 __core.wxGIFHandler_swigregister(wxGIFHandlerPtr)
2784
2785 class wxPCXHandler(wxImageHandler):
2786 """Proxy of C++ wxPCXHandler class"""
2787 def __repr__(self):
2788 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2789 def __init__(self, *args, **kwargs):
2790 """__init__(self) -> wxPCXHandler"""
2791 newobj = __core.new_wxPCXHandler(*args, **kwargs)
2792 self.this = newobj.this
2793 self.thisown = 1
2794 del newobj.thisown
2795
2796 class wxPCXHandlerPtr(wxPCXHandler):
2797 def __init__(self, this):
2798 self.this = this
2799 if not hasattr(self,"thisown"): self.thisown = 0
2800 self.__class__ = wxPCXHandler
2801 __core.wxPCXHandler_swigregister(wxPCXHandlerPtr)
2802
2803 class wxJPEGHandler(wxImageHandler):
2804 """Proxy of C++ wxJPEGHandler class"""
2805 def __repr__(self):
2806 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2807 def __init__(self, *args, **kwargs):
2808 """__init__(self) -> wxJPEGHandler"""
2809 newobj = __core.new_wxJPEGHandler(*args, **kwargs)
2810 self.this = newobj.this
2811 self.thisown = 1
2812 del newobj.thisown
2813
2814 class wxJPEGHandlerPtr(wxJPEGHandler):
2815 def __init__(self, this):
2816 self.this = this
2817 if not hasattr(self,"thisown"): self.thisown = 0
2818 self.__class__ = wxJPEGHandler
2819 __core.wxJPEGHandler_swigregister(wxJPEGHandlerPtr)
2820
2821 class wxPNMHandler(wxImageHandler):
2822 """Proxy of C++ wxPNMHandler class"""
2823 def __repr__(self):
2824 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2825 def __init__(self, *args, **kwargs):
2826 """__init__(self) -> wxPNMHandler"""
2827 newobj = __core.new_wxPNMHandler(*args, **kwargs)
2828 self.this = newobj.this
2829 self.thisown = 1
2830 del newobj.thisown
2831
2832 class wxPNMHandlerPtr(wxPNMHandler):
2833 def __init__(self, this):
2834 self.this = this
2835 if not hasattr(self,"thisown"): self.thisown = 0
2836 self.__class__ = wxPNMHandler
2837 __core.wxPNMHandler_swigregister(wxPNMHandlerPtr)
2838
2839 class wxXPMHandler(wxImageHandler):
2840 """Proxy of C++ wxXPMHandler class"""
2841 def __repr__(self):
2842 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2843 def __init__(self, *args, **kwargs):
2844 """__init__(self) -> wxXPMHandler"""
2845 newobj = __core.new_wxXPMHandler(*args, **kwargs)
2846 self.this = newobj.this
2847 self.thisown = 1
2848 del newobj.thisown
2849
2850 class wxXPMHandlerPtr(wxXPMHandler):
2851 def __init__(self, this):
2852 self.this = this
2853 if not hasattr(self,"thisown"): self.thisown = 0
2854 self.__class__ = wxXPMHandler
2855 __core.wxXPMHandler_swigregister(wxXPMHandlerPtr)
2856
2857 class wxTIFFHandler(wxImageHandler):
2858 """Proxy of C++ wxTIFFHandler class"""
2859 def __repr__(self):
2860 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2861 def __init__(self, *args, **kwargs):
2862 """__init__(self) -> wxTIFFHandler"""
2863 newobj = __core.new_wxTIFFHandler(*args, **kwargs)
2864 self.this = newobj.this
2865 self.thisown = 1
2866 del newobj.thisown
2867
2868 class wxTIFFHandlerPtr(wxTIFFHandler):
2869 def __init__(self, this):
2870 self.this = this
2871 if not hasattr(self,"thisown"): self.thisown = 0
2872 self.__class__ = wxTIFFHandler
2873 __core.wxTIFFHandler_swigregister(wxTIFFHandlerPtr)
2874
2875 wxQUANTIZE_INCLUDE_WINDOWS_COLOURS = __core.wxQUANTIZE_INCLUDE_WINDOWS_COLOURS
2876 wxQUANTIZE_FILL_DESTINATION_IMAGE = __core.wxQUANTIZE_FILL_DESTINATION_IMAGE
2877 class wxQuantize(object):
2878 """Performs quantization, or colour reduction, on a wxImage."""
2879 def __init__(self): raise RuntimeError, "No constructor defined"
2880 def __repr__(self):
2881 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2882 def Quantize(*args, **kwargs):
2883 """
2884 Quantize(wxImage src, wxImage dest, int desiredNoColours=236,
2885 int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2886
2887 Reduce the colours in the source image and put the result into the
2888 destination image, setting the palette in the destination if
2889 needed. Both images may be the same, to overwrite the source image.
2890 """
2891 return __core.wxQuantize_Quantize(*args, **kwargs)
2892
2893 Quantize = staticmethod(Quantize)
2894
2895 class wxQuantizePtr(wxQuantize):
2896 def __init__(self, this):
2897 self.this = this
2898 if not hasattr(self,"thisown"): self.thisown = 0
2899 self.__class__ = wxQuantize
2900 __core.wxQuantize_swigregister(wxQuantizePtr)
2901
2902 def wxQuantize_Quantize(*args, **kwargs):
2903 """
2904 wxQuantize_Quantize(wxImage src, wxImage dest, int desiredNoColours=236,
2905 int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2906
2907 Reduce the colours in the source image and put the result into the
2908 destination image, setting the palette in the destination if
2909 needed. Both images may be the same, to overwrite the source image.
2910 """
2911 return __core.wxQuantize_Quantize(*args, **kwargs)
2912
2913 #---------------------------------------------------------------------------
2914
2915 class wxEvtHandler(wxObject):
2916 """Proxy of C++ wxEvtHandler class"""
2917 def __repr__(self):
2918 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2919 def __init__(self, *args, **kwargs):
2920 """__init__(self) -> wxEvtHandler"""
2921 newobj = __core.new_wxEvtHandler(*args, **kwargs)
2922 self.this = newobj.this
2923 self.thisown = 1
2924 del newobj.thisown
2925 def GetNextHandler(*args, **kwargs):
2926 """GetNextHandler(self) -> wxEvtHandler"""
2927 return __core.wxEvtHandler_GetNextHandler(*args, **kwargs)
2928
2929 def GetPreviousHandler(*args, **kwargs):
2930 """GetPreviousHandler(self) -> wxEvtHandler"""
2931 return __core.wxEvtHandler_GetPreviousHandler(*args, **kwargs)
2932
2933 def SetNextHandler(*args, **kwargs):
2934 """SetNextHandler(self, wxEvtHandler handler)"""
2935 return __core.wxEvtHandler_SetNextHandler(*args, **kwargs)
2936
2937 def SetPreviousHandler(*args, **kwargs):
2938 """SetPreviousHandler(self, wxEvtHandler handler)"""
2939 return __core.wxEvtHandler_SetPreviousHandler(*args, **kwargs)
2940
2941 def GetEvtHandlerEnabled(*args, **kwargs):
2942 """GetEvtHandlerEnabled(self) -> bool"""
2943 return __core.wxEvtHandler_GetEvtHandlerEnabled(*args, **kwargs)
2944
2945 def SetEvtHandlerEnabled(*args, **kwargs):
2946 """SetEvtHandlerEnabled(self, bool enabled)"""
2947 return __core.wxEvtHandler_SetEvtHandlerEnabled(*args, **kwargs)
2948
2949 def ProcessEvent(*args, **kwargs):
2950 """ProcessEvent(self, wxEvent event) -> bool"""
2951 return __core.wxEvtHandler_ProcessEvent(*args, **kwargs)
2952
2953 def AddPendingEvent(*args, **kwargs):
2954 """AddPendingEvent(self, wxEvent event)"""
2955 return __core.wxEvtHandler_AddPendingEvent(*args, **kwargs)
2956
2957 def ProcessPendingEvents(*args, **kwargs):
2958 """ProcessPendingEvents(self)"""
2959 return __core.wxEvtHandler_ProcessPendingEvents(*args, **kwargs)
2960
2961 def Connect(*args, **kwargs):
2962 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
2963 return __core.wxEvtHandler_Connect(*args, **kwargs)
2964
2965 def Disconnect(*args, **kwargs):
2966 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
2967 return __core.wxEvtHandler_Disconnect(*args, **kwargs)
2968
2969 def _setOORInfo(*args, **kwargs):
2970 """_setOORInfo(self, PyObject _self, bool incref=True)"""
2971 return __core.wxEvtHandler__setOORInfo(*args, **kwargs)
2972
2973 def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2974 """
2975 Bind an event to an event handler.
2976
2977 :param event: One of the EVT_* objects that specifies the
2978 type of event to bind,
2979
2980 :param handler: A callable object to be invoked when the
2981 event is delivered to self. Pass None to
2982 disconnect an event handler.
2983
2984 :param source: Sometimes the event originates from a
2985 different window than self, but you still
2986 want to catch it in self. (For example, a
2987 button event delivered to a frame.) By
2988 passing the source of the event, the event
2989 handling system is able to differentiate
2990 between the same event type from different
2991 controls.
2992
2993 :param id: Used to spcify the event source by ID instead
2994 of instance.
2995
2996 :param id2: Used when it is desirable to bind a handler
2997 to a range of IDs, such as with EVT_MENU_RANGE.
2998 """
2999 if source is not None:
3000 id = source.GetId()
3001 event.Bind(self, id, id2, handler)
3002
3003 def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
3004 """
3005 Disconencts the event handler binding for event from self.
3006 Returns True if successful.
3007 """
3008 if source is not None:
3009 id = source.GetId()
3010 return event.Unbind(self, id, id2)
3011
3012
3013 class wxEvtHandlerPtr(wxEvtHandler):
3014 def __init__(self, this):
3015 self.this = this
3016 if not hasattr(self,"thisown"): self.thisown = 0
3017 self.__class__ = wxEvtHandler
3018 __core.wxEvtHandler_swigregister(wxEvtHandlerPtr)
3019
3020 #---------------------------------------------------------------------------
3021
3022 class PyEventBinder(object):
3023 """
3024 Instances of this class are used to bind specific events to event
3025 handlers.
3026 """
3027 def __init__(self, evtType, expectedIDs=0):
3028 if expectedIDs not in [0, 1, 2]:
3029 raise ValueError, "Invalid number of expectedIDs"
3030 self.expectedIDs = expectedIDs
3031
3032 if type(evtType) == list or type(evtType) == tuple:
3033 self.evtType = evtType
3034 else:
3035 self.evtType = [evtType]
3036
3037
3038 def Bind(self, target, id1, id2, function):
3039 """Bind this set of event types to target."""
3040 for et in self.evtType:
3041 target.Connect(id1, id2, et, function)
3042
3043
3044 def Unbind(self, target, id1, id2):
3045 """Remove an event binding."""
3046 success = 0
3047 for et in self.evtType:
3048 success += target.Disconnect(id1, id2, et)
3049 return success != 0
3050
3051
3052 def __call__(self, *args):
3053 """
3054 For backwards compatibility with the old EVT_* functions.
3055 Should be called with either (window, func), (window, ID,
3056 func) or (window, ID1, ID2, func) parameters depending on the
3057 type of the event.
3058 """
3059 assert len(args) == 2 + self.expectedIDs
3060 id1 = wx.ID_ANY
3061 id2 = wx.ID_ANY
3062 target = args[0]
3063 if self.expectedIDs == 0:
3064 func = args[1]
3065 elif self.expectedIDs == 1:
3066 id1 = args[1]
3067 func = args[2]
3068 elif self.expectedIDs == 2:
3069 id1 = args[1]
3070 id2 = args[2]
3071 func = args[3]
3072 else:
3073 raise ValueError, "Unexpected number of IDs"
3074
3075 self.Bind(target, id1, id2, func)
3076
3077
3078 # These two are square pegs that don't fit the PyEventBinder hole...
3079 def EVT_COMMAND(win, id, cmd, func):
3080 win.Connect(id, -1, cmd, func)
3081 def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
3082 win.Connect(id1, id2, cmd, func)
3083
3084
3085 #---------------------------------------------------------------------------
3086
3087 #---------------------------------------------------------------------------
3088
3089 wxEVENT_PROPAGATE_NONE = __core.wxEVENT_PROPAGATE_NONE
3090 wxEVENT_PROPAGATE_MAX = __core.wxEVENT_PROPAGATE_MAX
3091
3092 def wxNewEventType(*args, **kwargs):
3093 """wxNewEventType() -> wxEventType"""
3094 return __core.wxNewEventType(*args, **kwargs)
3095 wxEVT_NULL = __core.wxEVT_NULL
3096 wxEVT_FIRST = __core.wxEVT_FIRST
3097 wxEVT_USER_FIRST = __core.wxEVT_USER_FIRST
3098 wxEVT_COMMAND_BUTTON_CLICKED = __core.wxEVT_COMMAND_BUTTON_CLICKED
3099 wxEVT_COMMAND_CHECKBOX_CLICKED = __core.wxEVT_COMMAND_CHECKBOX_CLICKED
3100 wxEVT_COMMAND_CHOICE_SELECTED = __core.wxEVT_COMMAND_CHOICE_SELECTED
3101 wxEVT_COMMAND_LISTBOX_SELECTED = __core.wxEVT_COMMAND_LISTBOX_SELECTED
3102 wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = __core.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
3103 wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = __core.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
3104 wxEVT_COMMAND_MENU_SELECTED = __core.wxEVT_COMMAND_MENU_SELECTED
3105 wxEVT_COMMAND_TOOL_CLICKED = __core.wxEVT_COMMAND_TOOL_CLICKED
3106 wxEVT_COMMAND_SLIDER_UPDATED = __core.wxEVT_COMMAND_SLIDER_UPDATED
3107 wxEVT_COMMAND_RADIOBOX_SELECTED = __core.wxEVT_COMMAND_RADIOBOX_SELECTED
3108 wxEVT_COMMAND_RADIOBUTTON_SELECTED = __core.wxEVT_COMMAND_RADIOBUTTON_SELECTED
3109 wxEVT_COMMAND_SCROLLBAR_UPDATED = __core.wxEVT_COMMAND_SCROLLBAR_UPDATED
3110 wxEVT_COMMAND_VLBOX_SELECTED = __core.wxEVT_COMMAND_VLBOX_SELECTED
3111 wxEVT_COMMAND_COMBOBOX_SELECTED = __core.wxEVT_COMMAND_COMBOBOX_SELECTED
3112 wxEVT_COMMAND_TOOL_RCLICKED = __core.wxEVT_COMMAND_TOOL_RCLICKED
3113 wxEVT_COMMAND_TOOL_ENTER = __core.wxEVT_COMMAND_TOOL_ENTER
3114 wxEVT_LEFT_DOWN = __core.wxEVT_LEFT_DOWN
3115 wxEVT_LEFT_UP = __core.wxEVT_LEFT_UP
3116 wxEVT_MIDDLE_DOWN = __core.wxEVT_MIDDLE_DOWN
3117 wxEVT_MIDDLE_UP = __core.wxEVT_MIDDLE_UP
3118 wxEVT_RIGHT_DOWN = __core.wxEVT_RIGHT_DOWN
3119 wxEVT_RIGHT_UP = __core.wxEVT_RIGHT_UP
3120 wxEVT_MOTION = __core.wxEVT_MOTION
3121 wxEVT_ENTER_WINDOW = __core.wxEVT_ENTER_WINDOW
3122 wxEVT_LEAVE_WINDOW = __core.wxEVT_LEAVE_WINDOW
3123 wxEVT_LEFT_DCLICK = __core.wxEVT_LEFT_DCLICK
3124 wxEVT_MIDDLE_DCLICK = __core.wxEVT_MIDDLE_DCLICK
3125 wxEVT_RIGHT_DCLICK = __core.wxEVT_RIGHT_DCLICK
3126 wxEVT_SET_FOCUS = __core.wxEVT_SET_FOCUS
3127 wxEVT_KILL_FOCUS = __core.wxEVT_KILL_FOCUS
3128 wxEVT_CHILD_FOCUS = __core.wxEVT_CHILD_FOCUS
3129 wxEVT_MOUSEWHEEL = __core.wxEVT_MOUSEWHEEL
3130 wxEVT_NC_LEFT_DOWN = __core.wxEVT_NC_LEFT_DOWN
3131 wxEVT_NC_LEFT_UP = __core.wxEVT_NC_LEFT_UP
3132 wxEVT_NC_MIDDLE_DOWN = __core.wxEVT_NC_MIDDLE_DOWN
3133 wxEVT_NC_MIDDLE_UP = __core.wxEVT_NC_MIDDLE_UP
3134 wxEVT_NC_RIGHT_DOWN = __core.wxEVT_NC_RIGHT_DOWN
3135 wxEVT_NC_RIGHT_UP = __core.wxEVT_NC_RIGHT_UP
3136 wxEVT_NC_MOTION = __core.wxEVT_NC_MOTION
3137 wxEVT_NC_ENTER_WINDOW = __core.wxEVT_NC_ENTER_WINDOW
3138 wxEVT_NC_LEAVE_WINDOW = __core.wxEVT_NC_LEAVE_WINDOW
3139 wxEVT_NC_LEFT_DCLICK = __core.wxEVT_NC_LEFT_DCLICK
3140 wxEVT_NC_MIDDLE_DCLICK = __core.wxEVT_NC_MIDDLE_DCLICK
3141 wxEVT_NC_RIGHT_DCLICK = __core.wxEVT_NC_RIGHT_DCLICK
3142 wxEVT_CHAR = __core.wxEVT_CHAR
3143 wxEVT_CHAR_HOOK = __core.wxEVT_CHAR_HOOK
3144 wxEVT_NAVIGATION_KEY = __core.wxEVT_NAVIGATION_KEY
3145 wxEVT_KEY_DOWN = __core.wxEVT_KEY_DOWN
3146 wxEVT_KEY_UP = __core.wxEVT_KEY_UP
3147 wxEVT_HOTKEY = __core.wxEVT_HOTKEY
3148 wxEVT_SET_CURSOR = __core.wxEVT_SET_CURSOR
3149 wxEVT_SCROLL_TOP = __core.wxEVT_SCROLL_TOP
3150 wxEVT_SCROLL_BOTTOM = __core.wxEVT_SCROLL_BOTTOM
3151 wxEVT_SCROLL_LINEUP = __core.wxEVT_SCROLL_LINEUP
3152 wxEVT_SCROLL_LINEDOWN = __core.wxEVT_SCROLL_LINEDOWN
3153 wxEVT_SCROLL_PAGEUP = __core.wxEVT_SCROLL_PAGEUP
3154 wxEVT_SCROLL_PAGEDOWN = __core.wxEVT_SCROLL_PAGEDOWN
3155 wxEVT_SCROLL_THUMBTRACK = __core.wxEVT_SCROLL_THUMBTRACK
3156 wxEVT_SCROLL_THUMBRELEASE = __core.wxEVT_SCROLL_THUMBRELEASE
3157 wxEVT_SCROLL_ENDSCROLL = __core.wxEVT_SCROLL_ENDSCROLL
3158 wxEVT_SCROLLWIN_TOP = __core.wxEVT_SCROLLWIN_TOP
3159 wxEVT_SCROLLWIN_BOTTOM = __core.wxEVT_SCROLLWIN_BOTTOM
3160 wxEVT_SCROLLWIN_LINEUP = __core.wxEVT_SCROLLWIN_LINEUP
3161 wxEVT_SCROLLWIN_LINEDOWN = __core.wxEVT_SCROLLWIN_LINEDOWN
3162 wxEVT_SCROLLWIN_PAGEUP = __core.wxEVT_SCROLLWIN_PAGEUP
3163 wxEVT_SCROLLWIN_PAGEDOWN = __core.wxEVT_SCROLLWIN_PAGEDOWN
3164 wxEVT_SCROLLWIN_THUMBTRACK = __core.wxEVT_SCROLLWIN_THUMBTRACK
3165 wxEVT_SCROLLWIN_THUMBRELEASE = __core.wxEVT_SCROLLWIN_THUMBRELEASE
3166 wxEVT_SIZE = __core.wxEVT_SIZE
3167 wxEVT_MOVE = __core.wxEVT_MOVE
3168 wxEVT_CLOSE_WINDOW = __core.wxEVT_CLOSE_WINDOW
3169 wxEVT_END_SESSION = __core.wxEVT_END_SESSION
3170 wxEVT_QUERY_END_SESSION = __core.wxEVT_QUERY_END_SESSION
3171 wxEVT_ACTIVATE_APP = __core.wxEVT_ACTIVATE_APP
3172 wxEVT_POWER = __core.wxEVT_POWER
3173 wxEVT_ACTIVATE = __core.wxEVT_ACTIVATE
3174 wxEVT_CREATE = __core.wxEVT_CREATE
3175 wxEVT_DESTROY = __core.wxEVT_DESTROY
3176 wxEVT_SHOW = __core.wxEVT_SHOW
3177 wxEVT_ICONIZE = __core.wxEVT_ICONIZE
3178 wxEVT_MAXIMIZE = __core.wxEVT_MAXIMIZE
3179 wxEVT_MOUSE_CAPTURE_CHANGED = __core.wxEVT_MOUSE_CAPTURE_CHANGED
3180 wxEVT_PAINT = __core.wxEVT_PAINT
3181 wxEVT_ERASE_BACKGROUND = __core.wxEVT_ERASE_BACKGROUND
3182 wxEVT_NC_PAINT = __core.wxEVT_NC_PAINT
3183 wxEVT_PAINT_ICON = __core.wxEVT_PAINT_ICON
3184 wxEVT_MENU_OPEN = __core.wxEVT_MENU_OPEN
3185 wxEVT_MENU_CLOSE = __core.wxEVT_MENU_CLOSE
3186 wxEVT_MENU_HIGHLIGHT = __core.wxEVT_MENU_HIGHLIGHT
3187 wxEVT_CONTEXT_MENU = __core.wxEVT_CONTEXT_MENU
3188 wxEVT_SYS_COLOUR_CHANGED = __core.wxEVT_SYS_COLOUR_CHANGED
3189 wxEVT_DISPLAY_CHANGED = __core.wxEVT_DISPLAY_CHANGED
3190 wxEVT_SETTING_CHANGED = __core.wxEVT_SETTING_CHANGED
3191 wxEVT_QUERY_NEW_PALETTE = __core.wxEVT_QUERY_NEW_PALETTE
3192 wxEVT_PALETTE_CHANGED = __core.wxEVT_PALETTE_CHANGED
3193 wxEVT_DROP_FILES = __core.wxEVT_DROP_FILES
3194 wxEVT_DRAW_ITEM = __core.wxEVT_DRAW_ITEM
3195 wxEVT_MEASURE_ITEM = __core.wxEVT_MEASURE_ITEM
3196 wxEVT_COMPARE_ITEM = __core.wxEVT_COMPARE_ITEM
3197 wxEVT_INIT_DIALOG = __core.wxEVT_INIT_DIALOG
3198 wxEVT_IDLE = __core.wxEVT_IDLE
3199 wxEVT_UPDATE_UI = __core.wxEVT_UPDATE_UI
3200 wxEVT_SIZING = __core.wxEVT_SIZING
3201 wxEVT_MOVING = __core.wxEVT_MOVING
3202 wxEVT_HIBERNATE = __core.wxEVT_HIBERNATE
3203 wxEVT_COMMAND_LEFT_CLICK = __core.wxEVT_COMMAND_LEFT_CLICK
3204 wxEVT_COMMAND_LEFT_DCLICK = __core.wxEVT_COMMAND_LEFT_DCLICK
3205 wxEVT_COMMAND_RIGHT_CLICK = __core.wxEVT_COMMAND_RIGHT_CLICK
3206 wxEVT_COMMAND_RIGHT_DCLICK = __core.wxEVT_COMMAND_RIGHT_DCLICK
3207 wxEVT_COMMAND_SET_FOCUS = __core.wxEVT_COMMAND_SET_FOCUS
3208 wxEVT_COMMAND_KILL_FOCUS = __core.wxEVT_COMMAND_KILL_FOCUS
3209 wxEVT_COMMAND_ENTER = __core.wxEVT_COMMAND_ENTER
3210 #
3211 # Create some event binders
3212 EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE )
3213 EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING )
3214 EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE )
3215 EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING )
3216 EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW )
3217 EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3218 EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3219 EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT )
3220 EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT )
3221 EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND )
3222 EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR )
3223 EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN )
3224 EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP )
3225 EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1)
3226 EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK )
3227 EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN )
3228 EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE )
3229 EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1)
3230 EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT )
3231 EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS )
3232 EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS )
3233 EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS )
3234 EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE )
3235 EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP )
3236 EVT_HIBERNATE = wx.PyEventBinder( wxEVT_HIBERNATE )
3237 EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3238 EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3239 EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES )
3240 EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG )
3241 EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED )
3242 EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED )
3243 EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW )
3244 EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE )
3245 EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE )
3246 EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY )
3247 EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED )
3248 EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE )
3249 EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE )
3250 EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY )
3251 EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR )
3252 EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED )
3253
3254 EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN )
3255 EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP )
3256 EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN )
3257 EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP )
3258 EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN )
3259 EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP )
3260 EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION )
3261 EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK )
3262 EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK )
3263 EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK )
3264 EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW )
3265 EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW )
3266 EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL )
3267
3268 EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN,
3269 wxEVT_LEFT_UP,
3270 wxEVT_MIDDLE_DOWN,
3271 wxEVT_MIDDLE_UP,
3272 wxEVT_RIGHT_DOWN,
3273 wxEVT_RIGHT_UP,
3274 wxEVT_MOTION,
3275 wxEVT_LEFT_DCLICK,
3276 wxEVT_MIDDLE_DCLICK,
3277 wxEVT_RIGHT_DCLICK,
3278 wxEVT_ENTER_WINDOW,
3279 wxEVT_LEAVE_WINDOW,
3280 wxEVT_MOUSEWHEEL
3281 ])
3282
3283
3284 # Scrolling from wxWindow (sent to wxScrolledWindow)
3285 EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP,
3286 wxEVT_SCROLLWIN_BOTTOM,
3287 wxEVT_SCROLLWIN_LINEUP,
3288 wxEVT_SCROLLWIN_LINEDOWN,
3289 wxEVT_SCROLLWIN_PAGEUP,
3290 wxEVT_SCROLLWIN_PAGEDOWN,
3291 wxEVT_SCROLLWIN_THUMBTRACK,
3292 wxEVT_SCROLLWIN_THUMBRELEASE,
3293 ])
3294
3295 EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP )
3296 EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM )
3297 EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP )
3298 EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN )
3299 EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP )
3300 EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN )
3301 EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK )
3302 EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE )
3303
3304 # Scrolling from wxSlider and wxScrollBar
3305 EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3306 wxEVT_SCROLL_BOTTOM,
3307 wxEVT_SCROLL_LINEUP,
3308 wxEVT_SCROLL_LINEDOWN,
3309 wxEVT_SCROLL_PAGEUP,
3310 wxEVT_SCROLL_PAGEDOWN,
3311 wxEVT_SCROLL_THUMBTRACK,
3312 wxEVT_SCROLL_THUMBRELEASE,
3313 wxEVT_SCROLL_ENDSCROLL,
3314 ])
3315
3316 EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP )
3317 EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM )
3318 EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP )
3319 EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN )
3320 EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP )
3321 EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN )
3322 EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK )
3323 EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE )
3324 EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL )
3325
3326 # Scrolling from wxSlider and wxScrollBar, with an id
3327 EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3328 wxEVT_SCROLL_BOTTOM,
3329 wxEVT_SCROLL_LINEUP,
3330 wxEVT_SCROLL_LINEDOWN,
3331 wxEVT_SCROLL_PAGEUP,
3332 wxEVT_SCROLL_PAGEDOWN,
3333 wxEVT_SCROLL_THUMBTRACK,
3334 wxEVT_SCROLL_THUMBRELEASE,
3335 wxEVT_SCROLL_ENDSCROLL,
3336 ], 1)
3337
3338 EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1)
3339 EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1)
3340 EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
3341 EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
3342 EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1)
3343 EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1)
3344 EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
3345 EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
3346 EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1)
3347
3348 EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
3349 EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
3350 EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
3351 EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1)
3352 EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1)
3353 EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1)
3354 EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2)
3355 EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1)
3356 EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1)
3357 EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1)
3358
3359 EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1)
3360 EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1)
3361 EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1)
3362 EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1)
3363 EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2)
3364 EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1)
3365 EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2)
3366 EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1)
3367 EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1)
3368
3369
3370 EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1)
3371 EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1)
3372 EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1)
3373 EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1)
3374 EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1)
3375 EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1)
3376 EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1)
3377
3378 EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE )
3379
3380 EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1)
3381 EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2)
3382
3383 EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU )
3384
3385
3386
3387 #---------------------------------------------------------------------------
3388
3389 class wxEvent(wxObject):
3390 """Proxy of C++ wxEvent class"""
3391 def __init__(self): raise RuntimeError, "No constructor defined"
3392 def __repr__(self):
3393 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3394 def __del__(self, destroy=__core.delete_wxEvent):
3395 """__del__(self)"""
3396 try:
3397 if self.thisown: destroy(self)
3398 except: pass
3399
3400 def SetEventType(*args, **kwargs):
3401 """SetEventType(self, wxEventType typ)"""
3402 return __core.wxEvent_SetEventType(*args, **kwargs)
3403
3404 def GetEventType(*args, **kwargs):
3405 """GetEventType(self) -> wxEventType"""
3406 return __core.wxEvent_GetEventType(*args, **kwargs)
3407
3408 def GetEventObject(*args, **kwargs):
3409 """GetEventObject(self) -> wxObject"""
3410 return __core.wxEvent_GetEventObject(*args, **kwargs)
3411
3412 def SetEventObject(*args, **kwargs):
3413 """SetEventObject(self, wxObject obj)"""
3414 return __core.wxEvent_SetEventObject(*args, **kwargs)
3415
3416 def GetTimestamp(*args, **kwargs):
3417 """GetTimestamp(self) -> long"""
3418 return __core.wxEvent_GetTimestamp(*args, **kwargs)
3419
3420 def SetTimestamp(*args, **kwargs):
3421 """SetTimestamp(self, long ts=0)"""
3422 return __core.wxEvent_SetTimestamp(*args, **kwargs)
3423
3424 def GetId(*args, **kwargs):
3425 """GetId(self) -> int"""
3426 return __core.wxEvent_GetId(*args, **kwargs)
3427
3428 def SetId(*args, **kwargs):
3429 """SetId(self, int Id)"""
3430 return __core.wxEvent_SetId(*args, **kwargs)
3431
3432 def IsCommandEvent(*args, **kwargs):
3433 """IsCommandEvent(self) -> bool"""
3434 return __core.wxEvent_IsCommandEvent(*args, **kwargs)
3435
3436 def Skip(*args, **kwargs):
3437 """
3438 Skip(self, bool skip=True)
3439
3440 Called by an event handler, it controls whether additional event
3441 handlers bound to this event will be called after the current event
3442 handler returns. Skip(false) (the default setting) will prevent
3443 additional event handlers from being called and control will be
3444 returned to the sender of the event immediately after the current
3445 handler has finished. Skip(True) will cause the event processing
3446 system to continue searching for a handler function for this event.
3447
3448 """
3449 return __core.wxEvent_Skip(*args, **kwargs)
3450
3451 def GetSkipped(*args, **kwargs):
3452 """GetSkipped(self) -> bool"""
3453 return __core.wxEvent_GetSkipped(*args, **kwargs)
3454
3455 def ShouldPropagate(*args, **kwargs):
3456 """ShouldPropagate(self) -> bool"""
3457 return __core.wxEvent_ShouldPropagate(*args, **kwargs)
3458
3459 def StopPropagation(*args, **kwargs):
3460 """StopPropagation(self) -> int"""
3461 return __core.wxEvent_StopPropagation(*args, **kwargs)
3462
3463 def ResumePropagation(*args, **kwargs):
3464 """ResumePropagation(self, int propagationLevel)"""
3465 return __core.wxEvent_ResumePropagation(*args, **kwargs)
3466
3467 def Clone(*args, **kwargs):
3468 """Clone(self) -> wxEvent"""
3469 return __core.wxEvent_Clone(*args, **kwargs)
3470
3471
3472 class wxEventPtr(wxEvent):
3473 def __init__(self, this):
3474 self.this = this
3475 if not hasattr(self,"thisown"): self.thisown = 0
3476 self.__class__ = wxEvent
3477 __core.wxEvent_swigregister(wxEventPtr)
3478
3479 #---------------------------------------------------------------------------
3480
3481 class wxPropagationDisabler(object):
3482 """Proxy of C++ wxPropagationDisabler class"""
3483 def __repr__(self):
3484 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3485 def __init__(self, *args, **kwargs):
3486 """__init__(self, wxEvent event) -> wxPropagationDisabler"""
3487 newobj = __core.new_wxPropagationDisabler(*args, **kwargs)
3488 self.this = newobj.this
3489 self.thisown = 1
3490 del newobj.thisown
3491 def __del__(self, destroy=__core.delete_wxPropagationDisabler):
3492 """__del__(self)"""
3493 try:
3494 if self.thisown: destroy(self)
3495 except: pass
3496
3497
3498 class wxPropagationDisablerPtr(wxPropagationDisabler):
3499 def __init__(self, this):
3500 self.this = this
3501 if not hasattr(self,"thisown"): self.thisown = 0
3502 self.__class__ = wxPropagationDisabler
3503 __core.wxPropagationDisabler_swigregister(wxPropagationDisablerPtr)
3504
3505 class wxPropagateOnce(object):
3506 """Proxy of C++ wxPropagateOnce class"""
3507 def __repr__(self):
3508 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3509 def __init__(self, *args, **kwargs):
3510 """__init__(self, wxEvent event) -> wxPropagateOnce"""
3511 newobj = __core.new_wxPropagateOnce(*args, **kwargs)
3512 self.this = newobj.this
3513 self.thisown = 1
3514 del newobj.thisown
3515 def __del__(self, destroy=__core.delete_wxPropagateOnce):
3516 """__del__(self)"""
3517 try:
3518 if self.thisown: destroy(self)
3519 except: pass
3520
3521
3522 class wxPropagateOncePtr(wxPropagateOnce):
3523 def __init__(self, this):
3524 self.this = this
3525 if not hasattr(self,"thisown"): self.thisown = 0
3526 self.__class__ = wxPropagateOnce
3527 __core.wxPropagateOnce_swigregister(wxPropagateOncePtr)
3528
3529 #---------------------------------------------------------------------------
3530
3531 class wxCommandEvent(wxEvent):
3532 """Proxy of C++ wxCommandEvent class"""
3533 def __repr__(self):
3534 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3535 def __init__(self, *args, **kwargs):
3536 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> wxCommandEvent"""
3537 newobj = __core.new_wxCommandEvent(*args, **kwargs)
3538 self.this = newobj.this
3539 self.thisown = 1
3540 del newobj.thisown
3541 def GetSelection(*args, **kwargs):
3542 """GetSelection(self) -> int"""
3543 return __core.wxCommandEvent_GetSelection(*args, **kwargs)
3544
3545 def SetString(*args, **kwargs):
3546 """SetString(self, wxString s)"""
3547 return __core.wxCommandEvent_SetString(*args, **kwargs)
3548
3549 def GetString(*args, **kwargs):
3550 """GetString(self) -> wxString"""
3551 return __core.wxCommandEvent_GetString(*args, **kwargs)
3552
3553 def IsChecked(*args, **kwargs):
3554 """IsChecked(self) -> bool"""
3555 return __core.wxCommandEvent_IsChecked(*args, **kwargs)
3556
3557 Checked = IsChecked
3558 def IsSelection(*args, **kwargs):
3559 """IsSelection(self) -> bool"""
3560 return __core.wxCommandEvent_IsSelection(*args, **kwargs)
3561
3562 def SetExtraLong(*args, **kwargs):
3563 """SetExtraLong(self, long extraLong)"""
3564 return __core.wxCommandEvent_SetExtraLong(*args, **kwargs)
3565
3566 def GetExtraLong(*args, **kwargs):
3567 """GetExtraLong(self) -> long"""
3568 return __core.wxCommandEvent_GetExtraLong(*args, **kwargs)
3569
3570 def SetInt(*args, **kwargs):
3571 """SetInt(self, int i)"""
3572 return __core.wxCommandEvent_SetInt(*args, **kwargs)
3573
3574 def GetInt(*args, **kwargs):
3575 """GetInt(self) -> long"""
3576 return __core.wxCommandEvent_GetInt(*args, **kwargs)
3577
3578 def Clone(*args, **kwargs):
3579 """Clone(self) -> wxEvent"""
3580 return __core.wxCommandEvent_Clone(*args, **kwargs)
3581
3582
3583 class wxCommandEventPtr(wxCommandEvent):
3584 def __init__(self, this):
3585 self.this = this
3586 if not hasattr(self,"thisown"): self.thisown = 0
3587 self.__class__ = wxCommandEvent
3588 __core.wxCommandEvent_swigregister(wxCommandEventPtr)
3589
3590 #---------------------------------------------------------------------------
3591
3592 class wxNotifyEvent(wxCommandEvent):
3593 """Proxy of C++ wxNotifyEvent class"""
3594 def __repr__(self):
3595 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3596 def __init__(self, *args, **kwargs):
3597 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> wxNotifyEvent"""
3598 newobj = __core.new_wxNotifyEvent(*args, **kwargs)
3599 self.this = newobj.this
3600 self.thisown = 1
3601 del newobj.thisown
3602 def Veto(*args, **kwargs):
3603 """Veto(self)"""
3604 return __core.wxNotifyEvent_Veto(*args, **kwargs)
3605
3606 def Allow(*args, **kwargs):
3607 """Allow(self)"""
3608 return __core.wxNotifyEvent_Allow(*args, **kwargs)
3609
3610 def IsAllowed(*args, **kwargs):
3611 """IsAllowed(self) -> bool"""
3612 return __core.wxNotifyEvent_IsAllowed(*args, **kwargs)
3613
3614
3615 class wxNotifyEventPtr(wxNotifyEvent):
3616 def __init__(self, this):
3617 self.this = this
3618 if not hasattr(self,"thisown"): self.thisown = 0
3619 self.__class__ = wxNotifyEvent
3620 __core.wxNotifyEvent_swigregister(wxNotifyEventPtr)
3621
3622 #---------------------------------------------------------------------------
3623
3624 class wxScrollEvent(wxCommandEvent):
3625 """Proxy of C++ wxScrollEvent class"""
3626 def __repr__(self):
3627 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3628 def __init__(self, *args, **kwargs):
3629 """
3630 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
3631 int orient=0) -> wxScrollEvent
3632 """
3633 newobj = __core.new_wxScrollEvent(*args, **kwargs)
3634 self.this = newobj.this
3635 self.thisown = 1
3636 del newobj.thisown
3637 def GetOrientation(*args, **kwargs):
3638 """GetOrientation(self) -> int"""
3639 return __core.wxScrollEvent_GetOrientation(*args, **kwargs)
3640
3641 def GetPosition(*args, **kwargs):
3642 """GetPosition(self) -> int"""
3643 return __core.wxScrollEvent_GetPosition(*args, **kwargs)
3644
3645 def SetOrientation(*args, **kwargs):
3646 """SetOrientation(self, int orient)"""
3647 return __core.wxScrollEvent_SetOrientation(*args, **kwargs)
3648
3649 def SetPosition(*args, **kwargs):
3650 """SetPosition(self, int pos)"""
3651 return __core.wxScrollEvent_SetPosition(*args, **kwargs)
3652
3653
3654 class wxScrollEventPtr(wxScrollEvent):
3655 def __init__(self, this):
3656 self.this = this
3657 if not hasattr(self,"thisown"): self.thisown = 0
3658 self.__class__ = wxScrollEvent
3659 __core.wxScrollEvent_swigregister(wxScrollEventPtr)
3660
3661 #---------------------------------------------------------------------------
3662
3663 class wxScrollWinEvent(wxEvent):
3664 """Proxy of C++ wxScrollWinEvent class"""
3665 def __repr__(self):
3666 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3667 def __init__(self, *args, **kwargs):
3668 """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> wxScrollWinEvent"""
3669 newobj = __core.new_wxScrollWinEvent(*args, **kwargs)
3670 self.this = newobj.this
3671 self.thisown = 1
3672 del newobj.thisown
3673 def GetOrientation(*args, **kwargs):
3674 """GetOrientation(self) -> int"""
3675 return __core.wxScrollWinEvent_GetOrientation(*args, **kwargs)
3676
3677 def GetPosition(*args, **kwargs):
3678 """GetPosition(self) -> int"""
3679 return __core.wxScrollWinEvent_GetPosition(*args, **kwargs)
3680
3681 def SetOrientation(*args, **kwargs):
3682 """SetOrientation(self, int orient)"""
3683 return __core.wxScrollWinEvent_SetOrientation(*args, **kwargs)
3684
3685 def SetPosition(*args, **kwargs):
3686 """SetPosition(self, int pos)"""
3687 return __core.wxScrollWinEvent_SetPosition(*args, **kwargs)
3688
3689
3690 class wxScrollWinEventPtr(wxScrollWinEvent):
3691 def __init__(self, this):
3692 self.this = this
3693 if not hasattr(self,"thisown"): self.thisown = 0
3694 self.__class__ = wxScrollWinEvent
3695 __core.wxScrollWinEvent_swigregister(wxScrollWinEventPtr)
3696
3697 #---------------------------------------------------------------------------
3698
3699 wxMOUSE_BTN_ANY = __core.wxMOUSE_BTN_ANY
3700 wxMOUSE_BTN_NONE = __core.wxMOUSE_BTN_NONE
3701 wxMOUSE_BTN_LEFT = __core.wxMOUSE_BTN_LEFT
3702 wxMOUSE_BTN_MIDDLE = __core.wxMOUSE_BTN_MIDDLE
3703 wxMOUSE_BTN_RIGHT = __core.wxMOUSE_BTN_RIGHT
3704 class wxMouseEvent(wxEvent):
3705 """Proxy of C++ wxMouseEvent class"""
3706 def __repr__(self):
3707 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3708 def __init__(self, *args, **kwargs):
3709 """__init__(self, wxEventType mouseType=wxEVT_NULL) -> wxMouseEvent"""
3710 newobj = __core.new_wxMouseEvent(*args, **kwargs)
3711 self.this = newobj.this
3712 self.thisown = 1
3713 del newobj.thisown
3714 def IsButton(*args, **kwargs):
3715 """IsButton(self) -> bool"""
3716 return __core.wxMouseEvent_IsButton(*args, **kwargs)
3717
3718 def ButtonDown(*args, **kwargs):
3719 """ButtonDown(self, int but=wxMOUSE_BTN_ANY) -> bool"""
3720 return __core.wxMouseEvent_ButtonDown(*args, **kwargs)
3721
3722 def ButtonDClick(*args, **kwargs):
3723 """ButtonDClick(self, int but=wxMOUSE_BTN_ANY) -> bool"""
3724 return __core.wxMouseEvent_ButtonDClick(*args, **kwargs)
3725
3726 def ButtonUp(*args, **kwargs):
3727 """ButtonUp(self, int but=wxMOUSE_BTN_ANY) -> bool"""
3728 return __core.wxMouseEvent_ButtonUp(*args, **kwargs)
3729
3730 def Button(*args, **kwargs):
3731 """Button(self, int but) -> bool"""
3732 return __core.wxMouseEvent_Button(*args, **kwargs)
3733
3734 def ButtonIsDown(*args, **kwargs):
3735 """ButtonIsDown(self, int but) -> bool"""
3736 return __core.wxMouseEvent_ButtonIsDown(*args, **kwargs)
3737
3738 def GetButton(*args, **kwargs):
3739 """GetButton(self) -> int"""
3740 return __core.wxMouseEvent_GetButton(*args, **kwargs)
3741
3742 def ControlDown(*args, **kwargs):
3743 """ControlDown(self) -> bool"""
3744 return __core.wxMouseEvent_ControlDown(*args, **kwargs)
3745
3746 def MetaDown(*args, **kwargs):
3747 """MetaDown(self) -> bool"""
3748 return __core.wxMouseEvent_MetaDown(*args, **kwargs)
3749
3750 def AltDown(*args, **kwargs):
3751 """AltDown(self) -> bool"""
3752 return __core.wxMouseEvent_AltDown(*args, **kwargs)
3753
3754 def ShiftDown(*args, **kwargs):
3755 """ShiftDown(self) -> bool"""
3756 return __core.wxMouseEvent_ShiftDown(*args, **kwargs)
3757
3758 def CmdDown(*args, **kwargs):
3759 """
3760 CmdDown(self) -> bool
3761
3762 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3763 platforms but the special "Apple" (a.k.a as "Command") key on
3764 Macs: it makes often sense to use it instead of, say, `ControlDown`
3765 because Cmd key is used for the same thing under Mac as Ctrl
3766 elsewhere. The Ctrl still exists, it's just not used for this
3767 purpose. So for non-Mac platforms this is the same as `ControlDown`
3768 and Macs this is the same as `MetaDown`.
3769 """
3770 return __core.wxMouseEvent_CmdDown(*args, **kwargs)
3771
3772 def LeftDown(*args, **kwargs):
3773 """LeftDown(self) -> bool"""
3774 return __core.wxMouseEvent_LeftDown(*args, **kwargs)
3775
3776 def MiddleDown(*args, **kwargs):
3777 """MiddleDown(self) -> bool"""
3778 return __core.wxMouseEvent_MiddleDown(*args, **kwargs)
3779
3780 def RightDown(*args, **kwargs):
3781 """RightDown(self) -> bool"""
3782 return __core.wxMouseEvent_RightDown(*args, **kwargs)
3783
3784 def LeftUp(*args, **kwargs):
3785 """LeftUp(self) -> bool"""
3786 return __core.wxMouseEvent_LeftUp(*args, **kwargs)
3787
3788 def MiddleUp(*args, **kwargs):
3789 """MiddleUp(self) -> bool"""
3790 return __core.wxMouseEvent_MiddleUp(*args, **kwargs)
3791
3792 def RightUp(*args, **kwargs):
3793 """RightUp(self) -> bool"""
3794 return __core.wxMouseEvent_RightUp(*args, **kwargs)
3795
3796 def LeftDClick(*args, **kwargs):
3797 """LeftDClick(self) -> bool"""
3798 return __core.wxMouseEvent_LeftDClick(*args, **kwargs)
3799
3800 def MiddleDClick(*args, **kwargs):
3801 """MiddleDClick(self) -> bool"""
3802 return __core.wxMouseEvent_MiddleDClick(*args, **kwargs)
3803
3804 def RightDClick(*args, **kwargs):
3805 """RightDClick(self) -> bool"""
3806 return __core.wxMouseEvent_RightDClick(*args, **kwargs)
3807
3808 def LeftIsDown(*args, **kwargs):
3809 """LeftIsDown(self) -> bool"""
3810 return __core.wxMouseEvent_LeftIsDown(*args, **kwargs)
3811
3812 def MiddleIsDown(*args, **kwargs):
3813 """MiddleIsDown(self) -> bool"""
3814 return __core.wxMouseEvent_MiddleIsDown(*args, **kwargs)
3815
3816 def RightIsDown(*args, **kwargs):
3817 """RightIsDown(self) -> bool"""
3818 return __core.wxMouseEvent_RightIsDown(*args, **kwargs)
3819
3820 def Dragging(*args, **kwargs):
3821 """Dragging(self) -> bool"""
3822 return __core.wxMouseEvent_Dragging(*args, **kwargs)
3823
3824 def Moving(*args, **kwargs):
3825 """Moving(self) -> bool"""
3826 return __core.wxMouseEvent_Moving(*args, **kwargs)
3827
3828 def Entering(*args, **kwargs):
3829 """Entering(self) -> bool"""
3830 return __core.wxMouseEvent_Entering(*args, **kwargs)
3831
3832 def Leaving(*args, **kwargs):
3833 """Leaving(self) -> bool"""
3834 return __core.wxMouseEvent_Leaving(*args, **kwargs)
3835
3836 def GetPosition(*args, **kwargs):
3837 """
3838 GetPosition(self) -> wxPoint
3839
3840 Returns the position of the mouse in window coordinates when the event
3841 happened.
3842 """
3843 return __core.wxMouseEvent_GetPosition(*args, **kwargs)
3844
3845 def GetPositionTuple(*args, **kwargs):
3846 """
3847 GetPositionTuple() -> (x,y)
3848
3849 Returns the position of the mouse in window coordinates when the event
3850 happened.
3851 """
3852 return __core.wxMouseEvent_GetPositionTuple(*args, **kwargs)
3853
3854 def GetLogicalPosition(*args, **kwargs):
3855 """GetLogicalPosition(self, wxDC dc) -> wxPoint"""
3856 return __core.wxMouseEvent_GetLogicalPosition(*args, **kwargs)
3857
3858 def GetX(*args, **kwargs):
3859 """GetX(self) -> int"""
3860 return __core.wxMouseEvent_GetX(*args, **kwargs)
3861
3862 def GetY(*args, **kwargs):
3863 """GetY(self) -> int"""
3864 return __core.wxMouseEvent_GetY(*args, **kwargs)
3865
3866 def GetWheelRotation(*args, **kwargs):
3867 """GetWheelRotation(self) -> int"""
3868 return __core.wxMouseEvent_GetWheelRotation(*args, **kwargs)
3869
3870 def GetWheelDelta(*args, **kwargs):
3871 """GetWheelDelta(self) -> int"""
3872 return __core.wxMouseEvent_GetWheelDelta(*args, **kwargs)
3873
3874 def GetLinesPerAction(*args, **kwargs):
3875 """GetLinesPerAction(self) -> int"""
3876 return __core.wxMouseEvent_GetLinesPerAction(*args, **kwargs)
3877
3878 def IsPageScroll(*args, **kwargs):
3879 """IsPageScroll(self) -> bool"""
3880 return __core.wxMouseEvent_IsPageScroll(*args, **kwargs)
3881
3882 m_x = property(__core.wxMouseEvent_m_x_get, __core.wxMouseEvent_m_x_set)
3883 m_y = property(__core.wxMouseEvent_m_y_get, __core.wxMouseEvent_m_y_set)
3884 m_leftDown = property(__core.wxMouseEvent_m_leftDown_get, __core.wxMouseEvent_m_leftDown_set)
3885 m_middleDown = property(__core.wxMouseEvent_m_middleDown_get, __core.wxMouseEvent_m_middleDown_set)
3886 m_rightDown = property(__core.wxMouseEvent_m_rightDown_get, __core.wxMouseEvent_m_rightDown_set)
3887 m_controlDown = property(__core.wxMouseEvent_m_controlDown_get, __core.wxMouseEvent_m_controlDown_set)
3888 m_shiftDown = property(__core.wxMouseEvent_m_shiftDown_get, __core.wxMouseEvent_m_shiftDown_set)
3889 m_altDown = property(__core.wxMouseEvent_m_altDown_get, __core.wxMouseEvent_m_altDown_set)
3890 m_metaDown = property(__core.wxMouseEvent_m_metaDown_get, __core.wxMouseEvent_m_metaDown_set)
3891 m_wheelRotation = property(__core.wxMouseEvent_m_wheelRotation_get, __core.wxMouseEvent_m_wheelRotation_set)
3892 m_wheelDelta = property(__core.wxMouseEvent_m_wheelDelta_get, __core.wxMouseEvent_m_wheelDelta_set)
3893 m_linesPerAction = property(__core.wxMouseEvent_m_linesPerAction_get, __core.wxMouseEvent_m_linesPerAction_set)
3894
3895 class wxMouseEventPtr(wxMouseEvent):
3896 def __init__(self, this):
3897 self.this = this
3898 if not hasattr(self,"thisown"): self.thisown = 0
3899 self.__class__ = wxMouseEvent
3900 __core.wxMouseEvent_swigregister(wxMouseEventPtr)
3901
3902 #---------------------------------------------------------------------------
3903
3904 class wxSetCursorEvent(wxEvent):
3905 """Proxy of C++ wxSetCursorEvent class"""
3906 def __repr__(self):
3907 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3908 def __init__(self, *args, **kwargs):
3909 """__init__(self, int x=0, int y=0) -> wxSetCursorEvent"""
3910 newobj = __core.new_wxSetCursorEvent(*args, **kwargs)
3911 self.this = newobj.this
3912 self.thisown = 1
3913 del newobj.thisown
3914 def GetX(*args, **kwargs):
3915 """GetX(self) -> int"""
3916 return __core.wxSetCursorEvent_GetX(*args, **kwargs)
3917
3918 def GetY(*args, **kwargs):
3919 """GetY(self) -> int"""
3920 return __core.wxSetCursorEvent_GetY(*args, **kwargs)
3921
3922 def SetCursor(*args, **kwargs):
3923 """SetCursor(self, wxCursor cursor)"""
3924 return __core.wxSetCursorEvent_SetCursor(*args, **kwargs)
3925
3926 def GetCursor(*args, **kwargs):
3927 """GetCursor(self) -> wxCursor"""
3928 return __core.wxSetCursorEvent_GetCursor(*args, **kwargs)
3929
3930 def HasCursor(*args, **kwargs):
3931 """HasCursor(self) -> bool"""
3932 return __core.wxSetCursorEvent_HasCursor(*args, **kwargs)
3933
3934
3935 class wxSetCursorEventPtr(wxSetCursorEvent):
3936 def __init__(self, this):
3937 self.this = this
3938 if not hasattr(self,"thisown"): self.thisown = 0
3939 self.__class__ = wxSetCursorEvent
3940 __core.wxSetCursorEvent_swigregister(wxSetCursorEventPtr)
3941
3942 #---------------------------------------------------------------------------
3943
3944 class wxKeyEvent(wxEvent):
3945 """Proxy of C++ wxKeyEvent class"""
3946 def __repr__(self):
3947 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3948 def __init__(self, *args, **kwargs):
3949 """__init__(self, wxEventType keyType=wxEVT_NULL) -> wxKeyEvent"""
3950 newobj = __core.new_wxKeyEvent(*args, **kwargs)
3951 self.this = newobj.this
3952 self.thisown = 1
3953 del newobj.thisown
3954 def ControlDown(*args, **kwargs):
3955 """ControlDown(self) -> bool"""
3956 return __core.wxKeyEvent_ControlDown(*args, **kwargs)
3957
3958 def MetaDown(*args, **kwargs):
3959 """MetaDown(self) -> bool"""
3960 return __core.wxKeyEvent_MetaDown(*args, **kwargs)
3961
3962 def AltDown(*args, **kwargs):
3963 """AltDown(self) -> bool"""
3964 return __core.wxKeyEvent_AltDown(*args, **kwargs)
3965
3966 def ShiftDown(*args, **kwargs):
3967 """ShiftDown(self) -> bool"""
3968 return __core.wxKeyEvent_ShiftDown(*args, **kwargs)
3969
3970 def CmdDown(*args, **kwargs):
3971 """
3972 CmdDown(self) -> bool
3973
3974 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3975 platforms but the special "Apple" (a.k.a as "Command") key on
3976 Macs: it makes often sense to use it instead of, say, `ControlDown`
3977 because Cmd key is used for the same thing under Mac as Ctrl
3978 elsewhere. The Ctrl still exists, it's just not used for this
3979 purpose. So for non-Mac platforms this is the same as `ControlDown`
3980 and Macs this is the same as `MetaDown`.
3981 """
3982 return __core.wxKeyEvent_CmdDown(*args, **kwargs)
3983
3984 def HasModifiers(*args, **kwargs):
3985 """HasModifiers(self) -> bool"""
3986 return __core.wxKeyEvent_HasModifiers(*args, **kwargs)
3987
3988 def GetKeyCode(*args, **kwargs):
3989 """GetKeyCode(self) -> int"""
3990 return __core.wxKeyEvent_GetKeyCode(*args, **kwargs)
3991
3992 KeyCode = GetKeyCode
3993 def GetUnicodeKey(*args, **kwargs):
3994 """GetUnicodeKey(self) -> int"""
3995 return __core.wxKeyEvent_GetUnicodeKey(*args, **kwargs)
3996
3997 GetUniChar = GetUnicodeKey
3998 def GetRawKeyCode(*args, **kwargs):
3999 """GetRawKeyCode(self) -> unsigned int"""
4000 return __core.wxKeyEvent_GetRawKeyCode(*args, **kwargs)
4001
4002 def GetRawKeyFlags(*args, **kwargs):
4003 """GetRawKeyFlags(self) -> unsigned int"""
4004 return __core.wxKeyEvent_GetRawKeyFlags(*args, **kwargs)
4005
4006 def GetPosition(*args, **kwargs):
4007 """
4008 GetPosition(self) -> wxPoint
4009
4010 Find the position of the event.
4011 """
4012 return __core.wxKeyEvent_GetPosition(*args, **kwargs)
4013
4014 def GetPositionTuple(*args, **kwargs):
4015 """
4016 GetPositionTuple() -> (x,y)
4017
4018 Find the position of the event.
4019 """
4020 return __core.wxKeyEvent_GetPositionTuple(*args, **kwargs)
4021
4022 def GetX(*args, **kwargs):
4023 """GetX(self) -> int"""
4024 return __core.wxKeyEvent_GetX(*args, **kwargs)
4025
4026 def GetY(*args, **kwargs):
4027 """GetY(self) -> int"""
4028 return __core.wxKeyEvent_GetY(*args, **kwargs)
4029
4030 m_x = property(__core.wxKeyEvent_m_x_get, __core.wxKeyEvent_m_x_set)
4031 m_y = property(__core.wxKeyEvent_m_y_get, __core.wxKeyEvent_m_y_set)
4032 m_keyCode = property(__core.wxKeyEvent_m_keyCode_get, __core.wxKeyEvent_m_keyCode_set)
4033 m_controlDown = property(__core.wxKeyEvent_m_controlDown_get, __core.wxKeyEvent_m_controlDown_set)
4034 m_shiftDown = property(__core.wxKeyEvent_m_shiftDown_get, __core.wxKeyEvent_m_shiftDown_set)
4035 m_altDown = property(__core.wxKeyEvent_m_altDown_get, __core.wxKeyEvent_m_altDown_set)
4036 m_metaDown = property(__core.wxKeyEvent_m_metaDown_get, __core.wxKeyEvent_m_metaDown_set)
4037 m_scanCode = property(__core.wxKeyEvent_m_scanCode_get, __core.wxKeyEvent_m_scanCode_set)
4038 m_rawCode = property(__core.wxKeyEvent_m_rawCode_get, __core.wxKeyEvent_m_rawCode_set)
4039 m_rawFlags = property(__core.wxKeyEvent_m_rawFlags_get, __core.wxKeyEvent_m_rawFlags_set)
4040
4041 class wxKeyEventPtr(wxKeyEvent):
4042 def __init__(self, this):
4043 self.this = this
4044 if not hasattr(self,"thisown"): self.thisown = 0
4045 self.__class__ = wxKeyEvent
4046 __core.wxKeyEvent_swigregister(wxKeyEventPtr)
4047
4048 #---------------------------------------------------------------------------
4049
4050 class wxSizeEvent(wxEvent):
4051 """Proxy of C++ wxSizeEvent class"""
4052 def __repr__(self):
4053 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4054 def __init__(self, *args, **kwargs):
4055 """__init__(self, wxSize sz=wxDefaultSize, int winid=0) -> wxSizeEvent"""
4056 newobj = __core.new_wxSizeEvent(*args, **kwargs)
4057 self.this = newobj.this
4058 self.thisown = 1
4059 del newobj.thisown
4060 def GetSize(*args, **kwargs):
4061 """GetSize(self) -> wxSize"""
4062 return __core.wxSizeEvent_GetSize(*args, **kwargs)
4063
4064 def GetRect(*args, **kwargs):
4065 """GetRect(self) -> wxRect"""
4066 return __core.wxSizeEvent_GetRect(*args, **kwargs)
4067
4068 def SetRect(*args, **kwargs):
4069 """SetRect(self, wxRect rect)"""
4070 return __core.wxSizeEvent_SetRect(*args, **kwargs)
4071
4072 def SetSize(*args, **kwargs):
4073 """SetSize(self, wxSize size)"""
4074 return __core.wxSizeEvent_SetSize(*args, **kwargs)
4075
4076 m_size = property(__core.wxSizeEvent_m_size_get, __core.wxSizeEvent_m_size_set)
4077 m_rect = property(__core.wxSizeEvent_m_rect_get, __core.wxSizeEvent_m_rect_set)
4078
4079 class wxSizeEventPtr(wxSizeEvent):
4080 def __init__(self, this):
4081 self.this = this
4082 if not hasattr(self,"thisown"): self.thisown = 0
4083 self.__class__ = wxSizeEvent
4084 __core.wxSizeEvent_swigregister(wxSizeEventPtr)
4085
4086 #---------------------------------------------------------------------------
4087
4088 class wxMoveEvent(wxEvent):
4089 """Proxy of C++ wxMoveEvent class"""
4090 def __repr__(self):
4091 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4092 def __init__(self, *args, **kwargs):
4093 """__init__(self, wxPoint pos=wxDefaultPosition, int winid=0) -> wxMoveEvent"""
4094 newobj = __core.new_wxMoveEvent(*args, **kwargs)
4095 self.this = newobj.this
4096 self.thisown = 1
4097 del newobj.thisown
4098 def GetPosition(*args, **kwargs):
4099 """GetPosition(self) -> wxPoint"""
4100 return __core.wxMoveEvent_GetPosition(*args, **kwargs)
4101
4102 def GetRect(*args, **kwargs):
4103 """GetRect(self) -> wxRect"""
4104 return __core.wxMoveEvent_GetRect(*args, **kwargs)
4105
4106 def SetRect(*args, **kwargs):
4107 """SetRect(self, wxRect rect)"""
4108 return __core.wxMoveEvent_SetRect(*args, **kwargs)
4109
4110 def SetPosition(*args, **kwargs):
4111 """SetPosition(self, wxPoint pos)"""
4112 return __core.wxMoveEvent_SetPosition(*args, **kwargs)
4113
4114 m_pos = property(GetPosition, SetPosition)
4115 m_rect = property(GetRect, SetRect)
4116
4117
4118 class wxMoveEventPtr(wxMoveEvent):
4119 def __init__(self, this):
4120 self.this = this
4121 if not hasattr(self,"thisown"): self.thisown = 0
4122 self.__class__ = wxMoveEvent
4123 __core.wxMoveEvent_swigregister(wxMoveEventPtr)
4124
4125 #---------------------------------------------------------------------------
4126
4127 class wxPaintEvent(wxEvent):
4128 """Proxy of C++ wxPaintEvent class"""
4129 def __repr__(self):
4130 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4131 def __init__(self, *args, **kwargs):
4132 """__init__(self, int Id=0) -> wxPaintEvent"""
4133 newobj = __core.new_wxPaintEvent(*args, **kwargs)
4134 self.this = newobj.this
4135 self.thisown = 1
4136 del newobj.thisown
4137
4138 class wxPaintEventPtr(wxPaintEvent):
4139 def __init__(self, this):
4140 self.this = this
4141 if not hasattr(self,"thisown"): self.thisown = 0
4142 self.__class__ = wxPaintEvent
4143 __core.wxPaintEvent_swigregister(wxPaintEventPtr)
4144
4145 class wxNcPaintEvent(wxEvent):
4146 """Proxy of C++ wxNcPaintEvent class"""
4147 def __repr__(self):
4148 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4149 def __init__(self, *args, **kwargs):
4150 """__init__(self, int winid=0) -> wxNcPaintEvent"""
4151 newobj = __core.new_wxNcPaintEvent(*args, **kwargs)
4152 self.this = newobj.this
4153 self.thisown = 1
4154 del newobj.thisown
4155
4156 class wxNcPaintEventPtr(wxNcPaintEvent):
4157 def __init__(self, this):
4158 self.this = this
4159 if not hasattr(self,"thisown"): self.thisown = 0
4160 self.__class__ = wxNcPaintEvent
4161 __core.wxNcPaintEvent_swigregister(wxNcPaintEventPtr)
4162
4163 #---------------------------------------------------------------------------
4164
4165 class wxEraseEvent(wxEvent):
4166 """Proxy of C++ wxEraseEvent class"""
4167 def __repr__(self):
4168 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4169 def __init__(self, *args, **kwargs):
4170 """__init__(self, int Id=0, wxDC dc=(wxDC *) NULL) -> wxEraseEvent"""
4171 newobj = __core.new_wxEraseEvent(*args, **kwargs)
4172 self.this = newobj.this
4173 self.thisown = 1
4174 del newobj.thisown
4175 def GetDC(*args, **kwargs):
4176 """GetDC(self) -> wxDC"""
4177 return __core.wxEraseEvent_GetDC(*args, **kwargs)
4178
4179
4180 class wxEraseEventPtr(wxEraseEvent):
4181 def __init__(self, this):
4182 self.this = this
4183 if not hasattr(self,"thisown"): self.thisown = 0
4184 self.__class__ = wxEraseEvent
4185 __core.wxEraseEvent_swigregister(wxEraseEventPtr)
4186
4187 #---------------------------------------------------------------------------
4188
4189 class wxFocusEvent(wxEvent):
4190 """Proxy of C++ wxFocusEvent class"""
4191 def __repr__(self):
4192 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4193 def __init__(self, *args, **kwargs):
4194 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> wxFocusEvent"""
4195 newobj = __core.new_wxFocusEvent(*args, **kwargs)
4196 self.this = newobj.this
4197 self.thisown = 1
4198 del newobj.thisown
4199 def GetWindow(*args, **kwargs):
4200 """GetWindow(self) -> wxWindow"""
4201 return __core.wxFocusEvent_GetWindow(*args, **kwargs)
4202
4203 def SetWindow(*args, **kwargs):
4204 """SetWindow(self, wxWindow win)"""
4205 return __core.wxFocusEvent_SetWindow(*args, **kwargs)
4206
4207
4208 class wxFocusEventPtr(wxFocusEvent):
4209 def __init__(self, this):
4210 self.this = this
4211 if not hasattr(self,"thisown"): self.thisown = 0
4212 self.__class__ = wxFocusEvent
4213 __core.wxFocusEvent_swigregister(wxFocusEventPtr)
4214
4215 #---------------------------------------------------------------------------
4216
4217 class wxChildFocusEvent(wxCommandEvent):
4218 """Proxy of C++ wxChildFocusEvent class"""
4219 def __repr__(self):
4220 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4221 def __init__(self, *args, **kwargs):
4222 """__init__(self, wxWindow win=None) -> wxChildFocusEvent"""
4223 newobj = __core.new_wxChildFocusEvent(*args, **kwargs)
4224 self.this = newobj.this
4225 self.thisown = 1
4226 del newobj.thisown
4227 def GetWindow(*args, **kwargs):
4228 """GetWindow(self) -> wxWindow"""
4229 return __core.wxChildFocusEvent_GetWindow(*args, **kwargs)
4230
4231
4232 class wxChildFocusEventPtr(wxChildFocusEvent):
4233 def __init__(self, this):
4234 self.this = this
4235 if not hasattr(self,"thisown"): self.thisown = 0
4236 self.__class__ = wxChildFocusEvent
4237 __core.wxChildFocusEvent_swigregister(wxChildFocusEventPtr)
4238
4239 #---------------------------------------------------------------------------
4240
4241 class wxActivateEvent(wxEvent):
4242 """Proxy of C++ wxActivateEvent class"""
4243 def __repr__(self):
4244 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4245 def __init__(self, *args, **kwargs):
4246 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> wxActivateEvent"""
4247 newobj = __core.new_wxActivateEvent(*args, **kwargs)
4248 self.this = newobj.this
4249 self.thisown = 1
4250 del newobj.thisown
4251 def GetActive(*args, **kwargs):
4252 """GetActive(self) -> bool"""
4253 return __core.wxActivateEvent_GetActive(*args, **kwargs)
4254
4255
4256 class wxActivateEventPtr(wxActivateEvent):
4257 def __init__(self, this):
4258 self.this = this
4259 if not hasattr(self,"thisown"): self.thisown = 0
4260 self.__class__ = wxActivateEvent
4261 __core.wxActivateEvent_swigregister(wxActivateEventPtr)
4262
4263 #---------------------------------------------------------------------------
4264
4265 class wxInitDialogEvent(wxEvent):
4266 """Proxy of C++ wxInitDialogEvent class"""
4267 def __repr__(self):
4268 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4269 def __init__(self, *args, **kwargs):
4270 """__init__(self, int Id=0) -> wxInitDialogEvent"""
4271 newobj = __core.new_wxInitDialogEvent(*args, **kwargs)
4272 self.this = newobj.this
4273 self.thisown = 1
4274 del newobj.thisown
4275
4276 class wxInitDialogEventPtr(wxInitDialogEvent):
4277 def __init__(self, this):
4278 self.this = this
4279 if not hasattr(self,"thisown"): self.thisown = 0
4280 self.__class__ = wxInitDialogEvent
4281 __core.wxInitDialogEvent_swigregister(wxInitDialogEventPtr)
4282
4283 #---------------------------------------------------------------------------
4284
4285 class wxMenuEvent(wxEvent):
4286 """Proxy of C++ wxMenuEvent class"""
4287 def __repr__(self):
4288 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4289 def __init__(self, *args, **kwargs):
4290 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, wxMenu menu=None) -> wxMenuEvent"""
4291 newobj = __core.new_wxMenuEvent(*args, **kwargs)
4292 self.this = newobj.this
4293 self.thisown = 1
4294 del newobj.thisown
4295 def GetMenuId(*args, **kwargs):
4296 """GetMenuId(self) -> int"""
4297 return __core.wxMenuEvent_GetMenuId(*args, **kwargs)
4298
4299 def IsPopup(*args, **kwargs):
4300 """IsPopup(self) -> bool"""
4301 return __core.wxMenuEvent_IsPopup(*args, **kwargs)
4302
4303 def GetMenu(*args, **kwargs):
4304 """GetMenu(self) -> wxMenu"""
4305 return __core.wxMenuEvent_GetMenu(*args, **kwargs)
4306
4307
4308 class wxMenuEventPtr(wxMenuEvent):
4309 def __init__(self, this):
4310 self.this = this
4311 if not hasattr(self,"thisown"): self.thisown = 0
4312 self.__class__ = wxMenuEvent
4313 __core.wxMenuEvent_swigregister(wxMenuEventPtr)
4314
4315 #---------------------------------------------------------------------------
4316
4317 class wxCloseEvent(wxEvent):
4318 """Proxy of C++ wxCloseEvent class"""
4319 def __repr__(self):
4320 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4321 def __init__(self, *args, **kwargs):
4322 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> wxCloseEvent"""
4323 newobj = __core.new_wxCloseEvent(*args, **kwargs)
4324 self.this = newobj.this
4325 self.thisown = 1
4326 del newobj.thisown
4327 def SetLoggingOff(*args, **kwargs):
4328 """SetLoggingOff(self, bool logOff)"""
4329 return __core.wxCloseEvent_SetLoggingOff(*args, **kwargs)
4330
4331 def GetLoggingOff(*args, **kwargs):
4332 """GetLoggingOff(self) -> bool"""
4333 return __core.wxCloseEvent_GetLoggingOff(*args, **kwargs)
4334
4335 def Veto(*args, **kwargs):
4336 """Veto(self, bool veto=True)"""
4337 return __core.wxCloseEvent_Veto(*args, **kwargs)
4338
4339 def SetCanVeto(*args, **kwargs):
4340 """SetCanVeto(self, bool canVeto)"""
4341 return __core.wxCloseEvent_SetCanVeto(*args, **kwargs)
4342
4343 def CanVeto(*args, **kwargs):
4344 """CanVeto(self) -> bool"""
4345 return __core.wxCloseEvent_CanVeto(*args, **kwargs)
4346
4347 def GetVeto(*args, **kwargs):
4348 """GetVeto(self) -> bool"""
4349 return __core.wxCloseEvent_GetVeto(*args, **kwargs)
4350
4351
4352 class wxCloseEventPtr(wxCloseEvent):
4353 def __init__(self, this):
4354 self.this = this
4355 if not hasattr(self,"thisown"): self.thisown = 0
4356 self.__class__ = wxCloseEvent
4357 __core.wxCloseEvent_swigregister(wxCloseEventPtr)
4358
4359 #---------------------------------------------------------------------------
4360
4361 class wxShowEvent(wxEvent):
4362 """Proxy of C++ wxShowEvent class"""
4363 def __repr__(self):
4364 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4365 def __init__(self, *args, **kwargs):
4366 """__init__(self, int winid=0, bool show=False) -> wxShowEvent"""
4367 newobj = __core.new_wxShowEvent(*args, **kwargs)
4368 self.this = newobj.this
4369 self.thisown = 1
4370 del newobj.thisown
4371 def SetShow(*args, **kwargs):
4372 """SetShow(self, bool show)"""
4373 return __core.wxShowEvent_SetShow(*args, **kwargs)
4374
4375 def GetShow(*args, **kwargs):
4376 """GetShow(self) -> bool"""
4377 return __core.wxShowEvent_GetShow(*args, **kwargs)
4378
4379
4380 class wxShowEventPtr(wxShowEvent):
4381 def __init__(self, this):
4382 self.this = this
4383 if not hasattr(self,"thisown"): self.thisown = 0
4384 self.__class__ = wxShowEvent
4385 __core.wxShowEvent_swigregister(wxShowEventPtr)
4386
4387 #---------------------------------------------------------------------------
4388
4389 class wxIconizeEvent(wxEvent):
4390 """Proxy of C++ wxIconizeEvent class"""
4391 def __repr__(self):
4392 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4393 def __init__(self, *args, **kwargs):
4394 """__init__(self, int id=0, bool iconized=True) -> wxIconizeEvent"""
4395 newobj = __core.new_wxIconizeEvent(*args, **kwargs)
4396 self.this = newobj.this
4397 self.thisown = 1
4398 del newobj.thisown
4399 def Iconized(*args, **kwargs):
4400 """Iconized(self) -> bool"""
4401 return __core.wxIconizeEvent_Iconized(*args, **kwargs)
4402
4403
4404 class wxIconizeEventPtr(wxIconizeEvent):
4405 def __init__(self, this):
4406 self.this = this
4407 if not hasattr(self,"thisown"): self.thisown = 0
4408 self.__class__ = wxIconizeEvent
4409 __core.wxIconizeEvent_swigregister(wxIconizeEventPtr)
4410
4411 #---------------------------------------------------------------------------
4412
4413 class wxMaximizeEvent(wxEvent):
4414 """Proxy of C++ wxMaximizeEvent class"""
4415 def __repr__(self):
4416 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4417 def __init__(self, *args, **kwargs):
4418 """__init__(self, int id=0) -> wxMaximizeEvent"""
4419 newobj = __core.new_wxMaximizeEvent(*args, **kwargs)
4420 self.this = newobj.this
4421 self.thisown = 1
4422 del newobj.thisown
4423
4424 class wxMaximizeEventPtr(wxMaximizeEvent):
4425 def __init__(self, this):
4426 self.this = this
4427 if not hasattr(self,"thisown"): self.thisown = 0
4428 self.__class__ = wxMaximizeEvent
4429 __core.wxMaximizeEvent_swigregister(wxMaximizeEventPtr)
4430
4431 #---------------------------------------------------------------------------
4432
4433 class wxDropFilesEvent(wxEvent):
4434 """Proxy of C++ wxDropFilesEvent class"""
4435 def __init__(self): raise RuntimeError, "No constructor defined"
4436 def __repr__(self):
4437 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4438 def GetPosition(*args, **kwargs):
4439 """GetPosition(self) -> wxPoint"""
4440 return __core.wxDropFilesEvent_GetPosition(*args, **kwargs)
4441
4442 def GetNumberOfFiles(*args, **kwargs):
4443 """GetNumberOfFiles(self) -> int"""
4444 return __core.wxDropFilesEvent_GetNumberOfFiles(*args, **kwargs)
4445
4446 def GetFiles(*args, **kwargs):
4447 """GetFiles(self) -> PyObject"""
4448 return __core.wxDropFilesEvent_GetFiles(*args, **kwargs)
4449
4450
4451 class wxDropFilesEventPtr(wxDropFilesEvent):
4452 def __init__(self, this):
4453 self.this = this
4454 if not hasattr(self,"thisown"): self.thisown = 0
4455 self.__class__ = wxDropFilesEvent
4456 __core.wxDropFilesEvent_swigregister(wxDropFilesEventPtr)
4457
4458 #---------------------------------------------------------------------------
4459
4460 wxUPDATE_UI_PROCESS_ALL = __core.wxUPDATE_UI_PROCESS_ALL
4461 wxUPDATE_UI_PROCESS_SPECIFIED = __core.wxUPDATE_UI_PROCESS_SPECIFIED
4462 class wxUpdateUIEvent(wxCommandEvent):
4463 """Proxy of C++ wxUpdateUIEvent class"""
4464 def __repr__(self):
4465 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4466 def __init__(self, *args, **kwargs):
4467 """__init__(self, int commandId=0) -> wxUpdateUIEvent"""
4468 newobj = __core.new_wxUpdateUIEvent(*args, **kwargs)
4469 self.this = newobj.this
4470 self.thisown = 1
4471 del newobj.thisown
4472 def GetChecked(*args, **kwargs):
4473 """GetChecked(self) -> bool"""
4474 return __core.wxUpdateUIEvent_GetChecked(*args, **kwargs)
4475
4476 def GetEnabled(*args, **kwargs):
4477 """GetEnabled(self) -> bool"""
4478 return __core.wxUpdateUIEvent_GetEnabled(*args, **kwargs)
4479
4480 def GetText(*args, **kwargs):
4481 """GetText(self) -> wxString"""
4482 return __core.wxUpdateUIEvent_GetText(*args, **kwargs)
4483
4484 def GetSetText(*args, **kwargs):
4485 """GetSetText(self) -> bool"""
4486 return __core.wxUpdateUIEvent_GetSetText(*args, **kwargs)
4487
4488 def GetSetChecked(*args, **kwargs):
4489 """GetSetChecked(self) -> bool"""
4490 return __core.wxUpdateUIEvent_GetSetChecked(*args, **kwargs)
4491
4492 def GetSetEnabled(*args, **kwargs):
4493 """GetSetEnabled(self) -> bool"""
4494 return __core.wxUpdateUIEvent_GetSetEnabled(*args, **kwargs)
4495
4496 def Check(*args, **kwargs):
4497 """Check(self, bool check)"""
4498 return __core.wxUpdateUIEvent_Check(*args, **kwargs)
4499
4500 def Enable(*args, **kwargs):
4501 """Enable(self, bool enable)"""
4502 return __core.wxUpdateUIEvent_Enable(*args, **kwargs)
4503
4504 def SetText(*args, **kwargs):
4505 """SetText(self, wxString text)"""
4506 return __core.wxUpdateUIEvent_SetText(*args, **kwargs)
4507
4508 def SetUpdateInterval(*args, **kwargs):
4509 """SetUpdateInterval(long updateInterval)"""
4510 return __core.wxUpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4511
4512 SetUpdateInterval = staticmethod(SetUpdateInterval)
4513 def GetUpdateInterval(*args, **kwargs):
4514 """GetUpdateInterval() -> long"""
4515 return __core.wxUpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4516
4517 GetUpdateInterval = staticmethod(GetUpdateInterval)
4518 def CanUpdate(*args, **kwargs):
4519 """CanUpdate(wxWindow win) -> bool"""
4520 return __core.wxUpdateUIEvent_CanUpdate(*args, **kwargs)
4521
4522 CanUpdate = staticmethod(CanUpdate)
4523 def ResetUpdateTime(*args, **kwargs):
4524 """ResetUpdateTime()"""
4525 return __core.wxUpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4526
4527 ResetUpdateTime = staticmethod(ResetUpdateTime)
4528 def SetMode(*args, **kwargs):
4529 """SetMode(int mode)"""
4530 return __core.wxUpdateUIEvent_SetMode(*args, **kwargs)
4531
4532 SetMode = staticmethod(SetMode)
4533 def GetMode(*args, **kwargs):
4534 """GetMode() -> int"""
4535 return __core.wxUpdateUIEvent_GetMode(*args, **kwargs)
4536
4537 GetMode = staticmethod(GetMode)
4538
4539 class wxUpdateUIEventPtr(wxUpdateUIEvent):
4540 def __init__(self, this):
4541 self.this = this
4542 if not hasattr(self,"thisown"): self.thisown = 0
4543 self.__class__ = wxUpdateUIEvent
4544 __core.wxUpdateUIEvent_swigregister(wxUpdateUIEventPtr)
4545
4546 def wxUpdateUIEvent_SetUpdateInterval(*args, **kwargs):
4547 """wxUpdateUIEvent_SetUpdateInterval(long updateInterval)"""
4548 return __core.wxUpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4549
4550 def wxUpdateUIEvent_GetUpdateInterval(*args, **kwargs):
4551 """wxUpdateUIEvent_GetUpdateInterval() -> long"""
4552 return __core.wxUpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4553
4554 def wxUpdateUIEvent_CanUpdate(*args, **kwargs):
4555 """wxUpdateUIEvent_CanUpdate(wxWindow win) -> bool"""
4556 return __core.wxUpdateUIEvent_CanUpdate(*args, **kwargs)
4557
4558 def wxUpdateUIEvent_ResetUpdateTime(*args, **kwargs):
4559 """wxUpdateUIEvent_ResetUpdateTime()"""
4560 return __core.wxUpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4561
4562 def wxUpdateUIEvent_SetMode(*args, **kwargs):
4563 """wxUpdateUIEvent_SetMode(int mode)"""
4564 return __core.wxUpdateUIEvent_SetMode(*args, **kwargs)
4565
4566 def wxUpdateUIEvent_GetMode(*args, **kwargs):
4567 """wxUpdateUIEvent_GetMode() -> int"""
4568 return __core.wxUpdateUIEvent_GetMode(*args, **kwargs)
4569
4570 #---------------------------------------------------------------------------
4571
4572 class wxSysColourChangedEvent(wxEvent):
4573 """Proxy of C++ wxSysColourChangedEvent class"""
4574 def __repr__(self):
4575 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4576 def __init__(self, *args, **kwargs):
4577 """__init__(self) -> wxSysColourChangedEvent"""
4578 newobj = __core.new_wxSysColourChangedEvent(*args, **kwargs)
4579 self.this = newobj.this
4580 self.thisown = 1
4581 del newobj.thisown
4582
4583 class wxSysColourChangedEventPtr(wxSysColourChangedEvent):
4584 def __init__(self, this):
4585 self.this = this
4586 if not hasattr(self,"thisown"): self.thisown = 0
4587 self.__class__ = wxSysColourChangedEvent
4588 __core.wxSysColourChangedEvent_swigregister(wxSysColourChangedEventPtr)
4589
4590 #---------------------------------------------------------------------------
4591
4592 class wxMouseCaptureChangedEvent(wxEvent):
4593 """Proxy of C++ wxMouseCaptureChangedEvent class"""
4594 def __repr__(self):
4595 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4596 def __init__(self, *args, **kwargs):
4597 """__init__(self, int winid=0, wxWindow gainedCapture=None) -> wxMouseCaptureChangedEvent"""
4598 newobj = __core.new_wxMouseCaptureChangedEvent(*args, **kwargs)
4599 self.this = newobj.this
4600 self.thisown = 1
4601 del newobj.thisown
4602 def GetCapturedWindow(*args, **kwargs):
4603 """GetCapturedWindow(self) -> wxWindow"""
4604 return __core.wxMouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs)
4605
4606
4607 class wxMouseCaptureChangedEventPtr(wxMouseCaptureChangedEvent):
4608 def __init__(self, this):
4609 self.this = this
4610 if not hasattr(self,"thisown"): self.thisown = 0
4611 self.__class__ = wxMouseCaptureChangedEvent
4612 __core.wxMouseCaptureChangedEvent_swigregister(wxMouseCaptureChangedEventPtr)
4613
4614 #---------------------------------------------------------------------------
4615
4616 class wxDisplayChangedEvent(wxEvent):
4617 """Proxy of C++ wxDisplayChangedEvent class"""
4618 def __repr__(self):
4619 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4620 def __init__(self, *args, **kwargs):
4621 """__init__(self) -> wxDisplayChangedEvent"""
4622 newobj = __core.new_wxDisplayChangedEvent(*args, **kwargs)
4623 self.this = newobj.this
4624 self.thisown = 1
4625 del newobj.thisown
4626
4627 class wxDisplayChangedEventPtr(wxDisplayChangedEvent):
4628 def __init__(self, this):
4629 self.this = this
4630 if not hasattr(self,"thisown"): self.thisown = 0
4631 self.__class__ = wxDisplayChangedEvent
4632 __core.wxDisplayChangedEvent_swigregister(wxDisplayChangedEventPtr)
4633
4634 #---------------------------------------------------------------------------
4635
4636 class wxPaletteChangedEvent(wxEvent):
4637 """Proxy of C++ wxPaletteChangedEvent class"""
4638 def __repr__(self):
4639 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4640 def __init__(self, *args, **kwargs):
4641 """__init__(self, int id=0) -> wxPaletteChangedEvent"""
4642 newobj = __core.new_wxPaletteChangedEvent(*args, **kwargs)
4643 self.this = newobj.this
4644 self.thisown = 1
4645 del newobj.thisown
4646 def SetChangedWindow(*args, **kwargs):
4647 """SetChangedWindow(self, wxWindow win)"""
4648 return __core.wxPaletteChangedEvent_SetChangedWindow(*args, **kwargs)
4649
4650 def GetChangedWindow(*args, **kwargs):
4651 """GetChangedWindow(self) -> wxWindow"""
4652 return __core.wxPaletteChangedEvent_GetChangedWindow(*args, **kwargs)
4653
4654
4655 class wxPaletteChangedEventPtr(wxPaletteChangedEvent):
4656 def __init__(self, this):
4657 self.this = this
4658 if not hasattr(self,"thisown"): self.thisown = 0
4659 self.__class__ = wxPaletteChangedEvent
4660 __core.wxPaletteChangedEvent_swigregister(wxPaletteChangedEventPtr)
4661
4662 #---------------------------------------------------------------------------
4663
4664 class wxQueryNewPaletteEvent(wxEvent):
4665 """Proxy of C++ wxQueryNewPaletteEvent class"""
4666 def __repr__(self):
4667 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4668 def __init__(self, *args, **kwargs):
4669 """__init__(self, int winid=0) -> wxQueryNewPaletteEvent"""
4670 newobj = __core.new_wxQueryNewPaletteEvent(*args, **kwargs)
4671 self.this = newobj.this
4672 self.thisown = 1
4673 del newobj.thisown
4674 def SetPaletteRealized(*args, **kwargs):
4675 """SetPaletteRealized(self, bool realized)"""
4676 return __core.wxQueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs)
4677
4678 def GetPaletteRealized(*args, **kwargs):
4679 """GetPaletteRealized(self) -> bool"""
4680 return __core.wxQueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs)
4681
4682
4683 class wxQueryNewPaletteEventPtr(wxQueryNewPaletteEvent):
4684 def __init__(self, this):
4685 self.this = this
4686 if not hasattr(self,"thisown"): self.thisown = 0
4687 self.__class__ = wxQueryNewPaletteEvent
4688 __core.wxQueryNewPaletteEvent_swigregister(wxQueryNewPaletteEventPtr)
4689
4690 #---------------------------------------------------------------------------
4691
4692 class wxNavigationKeyEvent(wxEvent):
4693 """Proxy of C++ wxNavigationKeyEvent class"""
4694 def __repr__(self):
4695 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4696 def __init__(self, *args, **kwargs):
4697 """__init__(self) -> wxNavigationKeyEvent"""
4698 newobj = __core.new_wxNavigationKeyEvent(*args, **kwargs)
4699 self.this = newobj.this
4700 self.thisown = 1
4701 del newobj.thisown
4702 def GetDirection(*args, **kwargs):
4703 """GetDirection(self) -> bool"""
4704 return __core.wxNavigationKeyEvent_GetDirection(*args, **kwargs)
4705
4706 def SetDirection(*args, **kwargs):
4707 """SetDirection(self, bool forward)"""
4708 return __core.wxNavigationKeyEvent_SetDirection(*args, **kwargs)
4709
4710 def IsWindowChange(*args, **kwargs):
4711 """IsWindowChange(self) -> bool"""
4712 return __core.wxNavigationKeyEvent_IsWindowChange(*args, **kwargs)
4713
4714 def SetWindowChange(*args, **kwargs):
4715 """SetWindowChange(self, bool ischange)"""
4716 return __core.wxNavigationKeyEvent_SetWindowChange(*args, **kwargs)
4717
4718 def IsFromTab(*args, **kwargs):
4719 """IsFromTab(self) -> bool"""
4720 return __core.wxNavigationKeyEvent_IsFromTab(*args, **kwargs)
4721
4722 def SetFromTab(*args, **kwargs):
4723 """SetFromTab(self, bool bIs)"""
4724 return __core.wxNavigationKeyEvent_SetFromTab(*args, **kwargs)
4725
4726 def SetFlags(*args, **kwargs):
4727 """SetFlags(self, long flags)"""
4728 return __core.wxNavigationKeyEvent_SetFlags(*args, **kwargs)
4729
4730 def GetCurrentFocus(*args, **kwargs):
4731 """GetCurrentFocus(self) -> wxWindow"""
4732 return __core.wxNavigationKeyEvent_GetCurrentFocus(*args, **kwargs)
4733
4734 def SetCurrentFocus(*args, **kwargs):
4735 """SetCurrentFocus(self, wxWindow win)"""
4736 return __core.wxNavigationKeyEvent_SetCurrentFocus(*args, **kwargs)
4737
4738 IsBackward = __core.wxNavigationKeyEvent_IsBackward
4739 IsForward = __core.wxNavigationKeyEvent_IsForward
4740 WinChange = __core.wxNavigationKeyEvent_WinChange
4741 FromTab = __core.wxNavigationKeyEvent_FromTab
4742
4743 class wxNavigationKeyEventPtr(wxNavigationKeyEvent):
4744 def __init__(self, this):
4745 self.this = this
4746 if not hasattr(self,"thisown"): self.thisown = 0
4747 self.__class__ = wxNavigationKeyEvent
4748 __core.wxNavigationKeyEvent_swigregister(wxNavigationKeyEventPtr)
4749
4750 #---------------------------------------------------------------------------
4751
4752 class wxWindowCreateEvent(wxCommandEvent):
4753 """Proxy of C++ wxWindowCreateEvent class"""
4754 def __repr__(self):
4755 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4756 def __init__(self, *args, **kwargs):
4757 """__init__(self, wxWindow win=None) -> wxWindowCreateEvent"""
4758 newobj = __core.new_wxWindowCreateEvent(*args, **kwargs)
4759 self.this = newobj.this
4760 self.thisown = 1
4761 del newobj.thisown
4762 def GetWindow(*args, **kwargs):
4763 """GetWindow(self) -> wxWindow"""
4764 return __core.wxWindowCreateEvent_GetWindow(*args, **kwargs)
4765
4766
4767 class wxWindowCreateEventPtr(wxWindowCreateEvent):
4768 def __init__(self, this):
4769 self.this = this
4770 if not hasattr(self,"thisown"): self.thisown = 0
4771 self.__class__ = wxWindowCreateEvent
4772 __core.wxWindowCreateEvent_swigregister(wxWindowCreateEventPtr)
4773
4774 class wxWindowDestroyEvent(wxCommandEvent):
4775 """Proxy of C++ wxWindowDestroyEvent class"""
4776 def __repr__(self):
4777 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4778 def __init__(self, *args, **kwargs):
4779 """__init__(self, wxWindow win=None) -> wxWindowDestroyEvent"""
4780 newobj = __core.new_wxWindowDestroyEvent(*args, **kwargs)
4781 self.this = newobj.this
4782 self.thisown = 1
4783 del newobj.thisown
4784 def GetWindow(*args, **kwargs):
4785 """GetWindow(self) -> wxWindow"""
4786 return __core.wxWindowDestroyEvent_GetWindow(*args, **kwargs)
4787
4788
4789 class wxWindowDestroyEventPtr(wxWindowDestroyEvent):
4790 def __init__(self, this):
4791 self.this = this
4792 if not hasattr(self,"thisown"): self.thisown = 0
4793 self.__class__ = wxWindowDestroyEvent
4794 __core.wxWindowDestroyEvent_swigregister(wxWindowDestroyEventPtr)
4795
4796 #---------------------------------------------------------------------------
4797
4798 class wxContextMenuEvent(wxCommandEvent):
4799 """Proxy of C++ wxContextMenuEvent class"""
4800 def __repr__(self):
4801 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4802 def __init__(self, *args, **kwargs):
4803 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, wxPoint pt=wxDefaultPosition) -> wxContextMenuEvent"""
4804 newobj = __core.new_wxContextMenuEvent(*args, **kwargs)
4805 self.this = newobj.this
4806 self.thisown = 1
4807 del newobj.thisown
4808 def GetPosition(*args, **kwargs):
4809 """GetPosition(self) -> wxPoint"""
4810 return __core.wxContextMenuEvent_GetPosition(*args, **kwargs)
4811
4812 def SetPosition(*args, **kwargs):
4813 """SetPosition(self, wxPoint pos)"""
4814 return __core.wxContextMenuEvent_SetPosition(*args, **kwargs)
4815
4816
4817 class wxContextMenuEventPtr(wxContextMenuEvent):
4818 def __init__(self, this):
4819 self.this = this
4820 if not hasattr(self,"thisown"): self.thisown = 0
4821 self.__class__ = wxContextMenuEvent
4822 __core.wxContextMenuEvent_swigregister(wxContextMenuEventPtr)
4823
4824 #---------------------------------------------------------------------------
4825
4826 wxIDLE_PROCESS_ALL = __core.wxIDLE_PROCESS_ALL
4827 wxIDLE_PROCESS_SPECIFIED = __core.wxIDLE_PROCESS_SPECIFIED
4828 class wxIdleEvent(wxEvent):
4829 """Proxy of C++ wxIdleEvent class"""
4830 def __repr__(self):
4831 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4832 def __init__(self, *args, **kwargs):
4833 """__init__(self) -> wxIdleEvent"""
4834 newobj = __core.new_wxIdleEvent(*args, **kwargs)
4835 self.this = newobj.this
4836 self.thisown = 1
4837 del newobj.thisown
4838 def RequestMore(*args, **kwargs):
4839 """RequestMore(self, bool needMore=True)"""
4840 return __core.wxIdleEvent_RequestMore(*args, **kwargs)
4841
4842 def MoreRequested(*args, **kwargs):
4843 """MoreRequested(self) -> bool"""
4844 return __core.wxIdleEvent_MoreRequested(*args, **kwargs)
4845
4846 def SetMode(*args, **kwargs):
4847 """SetMode(int mode)"""
4848 return __core.wxIdleEvent_SetMode(*args, **kwargs)
4849
4850 SetMode = staticmethod(SetMode)
4851 def GetMode(*args, **kwargs):
4852 """GetMode() -> int"""
4853 return __core.wxIdleEvent_GetMode(*args, **kwargs)
4854
4855 GetMode = staticmethod(GetMode)
4856 def CanSend(*args, **kwargs):
4857 """CanSend(wxWindow win) -> bool"""
4858 return __core.wxIdleEvent_CanSend(*args, **kwargs)
4859
4860 CanSend = staticmethod(CanSend)
4861
4862 class wxIdleEventPtr(wxIdleEvent):
4863 def __init__(self, this):
4864 self.this = this
4865 if not hasattr(self,"thisown"): self.thisown = 0
4866 self.__class__ = wxIdleEvent
4867 __core.wxIdleEvent_swigregister(wxIdleEventPtr)
4868
4869 def wxIdleEvent_SetMode(*args, **kwargs):
4870 """wxIdleEvent_SetMode(int mode)"""
4871 return __core.wxIdleEvent_SetMode(*args, **kwargs)
4872
4873 def wxIdleEvent_GetMode(*args, **kwargs):
4874 """wxIdleEvent_GetMode() -> int"""
4875 return __core.wxIdleEvent_GetMode(*args, **kwargs)
4876
4877 def wxIdleEvent_CanSend(*args, **kwargs):
4878 """wxIdleEvent_CanSend(wxWindow win) -> bool"""
4879 return __core.wxIdleEvent_CanSend(*args, **kwargs)
4880
4881 #---------------------------------------------------------------------------
4882
4883 class wxPyEvent(wxEvent):
4884 """Proxy of C++ wxPyEvent class"""
4885 def __repr__(self):
4886 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4887 def __init__(self, *args, **kwargs):
4888 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> wxPyEvent"""
4889 newobj = __core.new_wxPyEvent(*args, **kwargs)
4890 self.this = newobj.this
4891 self.thisown = 1
4892 del newobj.thisown
4893 self.SetSelf(self)
4894
4895 def __del__(self, destroy=__core.delete_wxPyEvent):
4896 """__del__(self)"""
4897 try:
4898 if self.thisown: destroy(self)
4899 except: pass
4900
4901 def SetSelf(*args, **kwargs):
4902 """SetSelf(self, PyObject self)"""
4903 return __core.wxPyEvent_SetSelf(*args, **kwargs)
4904
4905 def GetSelf(*args, **kwargs):
4906 """GetSelf(self) -> PyObject"""
4907 return __core.wxPyEvent_GetSelf(*args, **kwargs)
4908
4909
4910 class wxPyEventPtr(wxPyEvent):
4911 def __init__(self, this):
4912 self.this = this
4913 if not hasattr(self,"thisown"): self.thisown = 0
4914 self.__class__ = wxPyEvent
4915 __core.wxPyEvent_swigregister(wxPyEventPtr)
4916
4917 class wxPyCommandEvent(wxCommandEvent):
4918 """Proxy of C++ wxPyCommandEvent class"""
4919 def __repr__(self):
4920 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4921 def __init__(self, *args, **kwargs):
4922 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> wxPyCommandEvent"""
4923 newobj = __core.new_wxPyCommandEvent(*args, **kwargs)
4924 self.this = newobj.this
4925 self.thisown = 1
4926 del newobj.thisown
4927 self.SetSelf(self)
4928
4929 def __del__(self, destroy=__core.delete_wxPyCommandEvent):
4930 """__del__(self)"""
4931 try:
4932 if self.thisown: destroy(self)
4933 except: pass
4934
4935 def SetSelf(*args, **kwargs):
4936 """SetSelf(self, PyObject self)"""
4937 return __core.wxPyCommandEvent_SetSelf(*args, **kwargs)
4938
4939 def GetSelf(*args, **kwargs):
4940 """GetSelf(self) -> PyObject"""
4941 return __core.wxPyCommandEvent_GetSelf(*args, **kwargs)
4942
4943
4944 class wxPyCommandEventPtr(wxPyCommandEvent):
4945 def __init__(self, this):
4946 self.this = this
4947 if not hasattr(self,"thisown"): self.thisown = 0
4948 self.__class__ = wxPyCommandEvent
4949 __core.wxPyCommandEvent_swigregister(wxPyCommandEventPtr)
4950
4951 class wxDateEvent(wxCommandEvent):
4952 """Proxy of C++ wxDateEvent class"""
4953 def __repr__(self):
4954 return "<%s.%s; proxy of C++ wxDateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4955 def __init__(self, *args, **kwargs):
4956 """__init__(self, wxWindow win, wxDateTime dt, wxEventType type) -> wxDateEvent"""
4957 newobj = __core.new_wxDateEvent(*args, **kwargs)
4958 self.this = newobj.this
4959 self.thisown = 1
4960 del newobj.thisown
4961 def GetDate(*args, **kwargs):
4962 """GetDate(self) -> wxDateTime"""
4963 return __core.wxDateEvent_GetDate(*args, **kwargs)
4964
4965 def SetDate(*args, **kwargs):
4966 """SetDate(self, wxDateTime date)"""
4967 return __core.wxDateEvent_SetDate(*args, **kwargs)
4968
4969
4970 class wxDateEventPtr(wxDateEvent):
4971 def __init__(self, this):
4972 self.this = this
4973 if not hasattr(self,"thisown"): self.thisown = 0
4974 self.__class__ = wxDateEvent
4975 __core.wxDateEvent_swigregister(wxDateEventPtr)
4976
4977 wxEVT_DATE_CHANGED = __core.wxEVT_DATE_CHANGED
4978 EVT_DATE_CHANGED = wx.PyEventBinder( wxEVT_DATE_CHANGED, 1 )
4979
4980 #---------------------------------------------------------------------------
4981
4982 wxPYAPP_ASSERT_SUPPRESS = __core.wxPYAPP_ASSERT_SUPPRESS
4983 wxPYAPP_ASSERT_EXCEPTION = __core.wxPYAPP_ASSERT_EXCEPTION
4984 wxPYAPP_ASSERT_DIALOG = __core.wxPYAPP_ASSERT_DIALOG
4985 wxPYAPP_ASSERT_LOG = __core.wxPYAPP_ASSERT_LOG
4986 wxPRINT_WINDOWS = __core.wxPRINT_WINDOWS
4987 wxPRINT_POSTSCRIPT = __core.wxPRINT_POSTSCRIPT
4988 class wxPyApp(wxEvtHandler):
4989 """
4990 The ``wx.PyApp`` class is an *implementation detail*, please use the
4991 `wx.App` class (or some other derived class) instead.
4992 """
4993 def __repr__(self):
4994 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4995 def __init__(self, *args, **kwargs):
4996 """
4997 __init__(self) -> wxPyApp
4998
4999 Create a new application object, starting the bootstrap process.
5000 """
5001 newobj = __core.new_wxPyApp(*args, **kwargs)
5002 self.this = newobj.this
5003 self.thisown = 1
5004 del newobj.thisown
5005 self._setCallbackInfo(self, PyApp)
5006 self._setOORInfo(self)
5007
5008 def __del__(self, destroy=__core.delete_wxPyApp):
5009 """__del__(self)"""
5010 try:
5011 if self.thisown: destroy(self)
5012 except: pass
5013
5014 def _setCallbackInfo(*args, **kwargs):
5015 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
5016 return __core.wxPyApp__setCallbackInfo(*args, **kwargs)
5017
5018 def GetAppName(*args, **kwargs):
5019 """
5020 GetAppName(self) -> wxString
5021
5022 Get the application name.
5023 """
5024 return __core.wxPyApp_GetAppName(*args, **kwargs)
5025
5026 def SetAppName(*args, **kwargs):
5027 """
5028 SetAppName(self, wxString name)
5029
5030 Set the application name. This value may be used automatically by
5031 `wx.Config` and such.
5032 """
5033 return __core.wxPyApp_SetAppName(*args, **kwargs)
5034
5035 def GetClassName(*args, **kwargs):
5036 """
5037 GetClassName(self) -> wxString
5038
5039 Get the application's class name.
5040 """
5041 return __core.wxPyApp_GetClassName(*args, **kwargs)
5042
5043 def SetClassName(*args, **kwargs):
5044 """
5045 SetClassName(self, wxString name)
5046
5047 Set the application's class name. This value may be used for
5048 X-resources if applicable for the platform
5049 """
5050 return __core.wxPyApp_SetClassName(*args, **kwargs)
5051
5052 def GetVendorName(*args, **kwargs):
5053 """
5054 GetVendorName(self) -> wxString
5055
5056 Get the application's vendor name.
5057 """
5058 return __core.wxPyApp_GetVendorName(*args, **kwargs)
5059
5060 def SetVendorName(*args, **kwargs):
5061 """
5062 SetVendorName(self, wxString name)
5063
5064 Set the application's vendor name. This value may be used
5065 automatically by `wx.Config` and such.
5066 """
5067 return __core.wxPyApp_SetVendorName(*args, **kwargs)
5068
5069 def GetTraits(*args, **kwargs):
5070 """
5071 GetTraits(self) -> wxAppTraits
5072
5073 Return (and create if necessary) the app traits object to which we
5074 delegate for everything which either should be configurable by the
5075 user (then he can change the default behaviour simply by overriding
5076 CreateTraits() and returning his own traits object) or which is
5077 GUI/console dependent as then wx.AppTraits allows us to abstract the
5078 differences behind the common facade.
5079
5080 :todo: Add support for overriding CreateAppTraits in wxPython.
5081 """
5082 return __core.wxPyApp_GetTraits(*args, **kwargs)
5083
5084 def ProcessPendingEvents(*args, **kwargs):
5085 """
5086 ProcessPendingEvents(self)
5087
5088 Process all events in the Pending Events list -- it is necessary to
5089 call this function to process posted events. This normally happens
5090 during each event loop iteration.
5091 """
5092 return __core.wxPyApp_ProcessPendingEvents(*args, **kwargs)
5093
5094 def Yield(*args, **kwargs):
5095 """
5096 Yield(self, bool onlyIfNeeded=False) -> bool
5097
5098 Process all currently pending events right now, instead of waiting
5099 until return to the event loop. It is an error to call ``Yield``
5100 recursively unless the value of ``onlyIfNeeded`` is True.
5101
5102 :warning: This function is dangerous as it can lead to unexpected
5103 reentrancies (i.e. when called from an event handler it may
5104 result in calling the same event handler again), use with
5105 extreme care or, better, don't use at all!
5106
5107 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
5108
5109 """
5110 return __core.wxPyApp_Yield(*args, **kwargs)
5111
5112 def WakeUpIdle(*args, **kwargs):
5113 """
5114 WakeUpIdle(self)
5115
5116 Make sure that idle events are sent again.
5117 :see: `wx.WakeUpIdle`
5118 """
5119 return __core.wxPyApp_WakeUpIdle(*args, **kwargs)
5120
5121 def IsMainLoopRunning(*args, **kwargs):
5122 """
5123 IsMainLoopRunning() -> bool
5124
5125 Returns True if we're running the main loop, i.e. if the events can
5126 currently be dispatched.
5127 """
5128 return __core.wxPyApp_IsMainLoopRunning(*args, **kwargs)
5129
5130 IsMainLoopRunning = staticmethod(IsMainLoopRunning)
5131 def MainLoop(*args, **kwargs):
5132 """
5133 MainLoop(self) -> int
5134
5135 Execute the main GUI loop, the function doesn't normally return until
5136 all top level windows have been closed and destroyed.
5137 """
5138 return __core.wxPyApp_MainLoop(*args, **kwargs)
5139
5140 def Exit(*args, **kwargs):
5141 """
5142 Exit(self)
5143
5144 Exit the main loop thus terminating the application.
5145 :see: `wx.Exit`
5146 """
5147 return __core.wxPyApp_Exit(*args, **kwargs)
5148
5149 def ExitMainLoop(*args, **kwargs):
5150 """
5151 ExitMainLoop(self)
5152
5153 Exit the main GUI loop during the next iteration of the main
5154 loop, (i.e. it does not stop the program immediately!)
5155 """
5156 return __core.wxPyApp_ExitMainLoop(*args, **kwargs)
5157
5158 def Pending(*args, **kwargs):
5159 """
5160 Pending(self) -> bool
5161
5162 Returns True if there are unprocessed events in the event queue.
5163 """
5164 return __core.wxPyApp_Pending(*args, **kwargs)
5165
5166 def Dispatch(*args, **kwargs):
5167 """
5168 Dispatch(self) -> bool
5169
5170 Process the first event in the event queue (blocks until an event
5171 appears if there are none currently)
5172 """
5173 return __core.wxPyApp_Dispatch(*args, **kwargs)
5174
5175 def ProcessIdle(*args, **kwargs):
5176 """
5177 ProcessIdle(self) -> bool
5178
5179 Called from the MainLoop when the application becomes idle (there are
5180 no pending events) and sends a `wx.IdleEvent` to all interested
5181 parties. Returns True if more idle events are needed, False if not.
5182 """
5183 return __core.wxPyApp_ProcessIdle(*args, **kwargs)
5184
5185 def SendIdleEvents(*args, **kwargs):
5186 """
5187 SendIdleEvents(self, wxWindow win, wxIdleEvent event) -> bool
5188
5189 Send idle event to window and all subwindows. Returns True if more
5190 idle time is requested.
5191 """
5192 return __core.wxPyApp_SendIdleEvents(*args, **kwargs)
5193
5194 def IsActive(*args, **kwargs):
5195 """
5196 IsActive(self) -> bool
5197
5198 Return True if our app has focus.
5199 """
5200 return __core.wxPyApp_IsActive(*args, **kwargs)
5201
5202 def SetTopWindow(*args, **kwargs):
5203 """
5204 SetTopWindow(self, wxWindow win)
5205
5206 Set the *main* top level window
5207 """
5208 return __core.wxPyApp_SetTopWindow(*args, **kwargs)
5209
5210 def GetTopWindow(*args, **kwargs):
5211 """
5212 GetTopWindow(self) -> wxWindow
5213
5214 Return the *main* top level window (if it hadn't been set previously
5215 with SetTopWindow(), will return just some top level window and, if
5216 there not any, will return None)
5217 """
5218 return __core.wxPyApp_GetTopWindow(*args, **kwargs)
5219
5220 def SetExitOnFrameDelete(*args, **kwargs):
5221 """
5222 SetExitOnFrameDelete(self, bool flag)
5223
5224 Control the exit behaviour: by default, the program will exit the main
5225 loop (and so, usually, terminate) when the last top-level program
5226 window is deleted. Beware that if you disable this behaviour (with
5227 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
5228 explicitly from somewhere.
5229 """
5230 return __core.wxPyApp_SetExitOnFrameDelete(*args, **kwargs)
5231
5232 def GetExitOnFrameDelete(*args, **kwargs):
5233 """
5234 GetExitOnFrameDelete(self) -> bool
5235
5236 Get the current exit behaviour setting.
5237 """
5238 return __core.wxPyApp_GetExitOnFrameDelete(*args, **kwargs)
5239
5240 def SetUseBestVisual(*args, **kwargs):
5241 """
5242 SetUseBestVisual(self, bool flag)
5243
5244 Set whether the app should try to use the best available visual on
5245 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
5246 """
5247 return __core.wxPyApp_SetUseBestVisual(*args, **kwargs)
5248
5249 def GetUseBestVisual(*args, **kwargs):
5250 """
5251 GetUseBestVisual(self) -> bool
5252
5253 Get current UseBestVisual setting.
5254 """
5255 return __core.wxPyApp_GetUseBestVisual(*args, **kwargs)
5256
5257 def SetPrintMode(*args, **kwargs):
5258 """SetPrintMode(self, int mode)"""
5259 return __core.wxPyApp_SetPrintMode(*args, **kwargs)
5260
5261 def GetPrintMode(*args, **kwargs):
5262 """GetPrintMode(self) -> int"""
5263 return __core.wxPyApp_GetPrintMode(*args, **kwargs)
5264
5265 def SetAssertMode(*args, **kwargs):
5266 """
5267 SetAssertMode(self, int mode)
5268
5269 Set the OnAssert behaviour for debug and hybrid builds.
5270 """
5271 return __core.wxPyApp_SetAssertMode(*args, **kwargs)
5272
5273 def GetAssertMode(*args, **kwargs):
5274 """
5275 GetAssertMode(self) -> int
5276
5277 Get the current OnAssert behaviour setting.
5278 """
5279 return __core.wxPyApp_GetAssertMode(*args, **kwargs)
5280
5281 def GetMacSupportPCMenuShortcuts(*args, **kwargs):
5282 """GetMacSupportPCMenuShortcuts() -> bool"""
5283 return __core.wxPyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
5284
5285 GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts)
5286 def GetMacAboutMenuItemId(*args, **kwargs):
5287 """GetMacAboutMenuItemId() -> long"""
5288 return __core.wxPyApp_GetMacAboutMenuItemId(*args, **kwargs)
5289
5290 GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId)
5291 def GetMacPreferencesMenuItemId(*args, **kwargs):
5292 """GetMacPreferencesMenuItemId() -> long"""
5293 return __core.wxPyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
5294
5295 GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId)
5296 def GetMacExitMenuItemId(*args, **kwargs):
5297 """GetMacExitMenuItemId() -> long"""
5298 return __core.wxPyApp_GetMacExitMenuItemId(*args, **kwargs)
5299
5300 GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId)
5301 def GetMacHelpMenuTitleName(*args, **kwargs):
5302 """GetMacHelpMenuTitleName() -> wxString"""
5303 return __core.wxPyApp_GetMacHelpMenuTitleName(*args, **kwargs)
5304
5305 GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName)
5306 def SetMacSupportPCMenuShortcuts(*args, **kwargs):
5307 """SetMacSupportPCMenuShortcuts(bool val)"""
5308 return __core.wxPyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
5309
5310 SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts)
5311 def SetMacAboutMenuItemId(*args, **kwargs):
5312 """SetMacAboutMenuItemId(long val)"""
5313 return __core.wxPyApp_SetMacAboutMenuItemId(*args, **kwargs)
5314
5315 SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId)
5316 def SetMacPreferencesMenuItemId(*args, **kwargs):
5317 """SetMacPreferencesMenuItemId(long val)"""
5318 return __core.wxPyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
5319
5320 SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId)
5321 def SetMacExitMenuItemId(*args, **kwargs):
5322 """SetMacExitMenuItemId(long val)"""
5323 return __core.wxPyApp_SetMacExitMenuItemId(*args, **kwargs)
5324
5325 SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId)
5326 def SetMacHelpMenuTitleName(*args, **kwargs):
5327 """SetMacHelpMenuTitleName(wxString val)"""
5328 return __core.wxPyApp_SetMacHelpMenuTitleName(*args, **kwargs)
5329
5330 SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName)
5331 def _BootstrapApp(*args, **kwargs):
5332 """
5333 _BootstrapApp(self)
5334
5335 For internal use only
5336 """
5337 return __core.wxPyApp__BootstrapApp(*args, **kwargs)
5338
5339 def GetComCtl32Version(*args, **kwargs):
5340 """
5341 GetComCtl32Version() -> int
5342
5343 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5344 it wasn't found at all. Raises an exception on non-Windows platforms.
5345 """
5346 return __core.wxPyApp_GetComCtl32Version(*args, **kwargs)
5347
5348 GetComCtl32Version = staticmethod(GetComCtl32Version)
5349
5350 class wxPyAppPtr(wxPyApp):
5351 def __init__(self, this):
5352 self.this = this
5353 if not hasattr(self,"thisown"): self.thisown = 0
5354 self.__class__ = wxPyApp
5355 __core.wxPyApp_swigregister(wxPyAppPtr)
5356
5357 def wxPyApp_IsMainLoopRunning(*args, **kwargs):
5358 """
5359 wxPyApp_IsMainLoopRunning() -> bool
5360
5361 Returns True if we're running the main loop, i.e. if the events can
5362 currently be dispatched.
5363 """
5364 return __core.wxPyApp_IsMainLoopRunning(*args, **kwargs)
5365
5366 def wxPyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs):
5367 """wxPyApp_GetMacSupportPCMenuShortcuts() -> bool"""
5368 return __core.wxPyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
5369
5370 def wxPyApp_GetMacAboutMenuItemId(*args, **kwargs):
5371 """wxPyApp_GetMacAboutMenuItemId() -> long"""
5372 return __core.wxPyApp_GetMacAboutMenuItemId(*args, **kwargs)
5373
5374 def wxPyApp_GetMacPreferencesMenuItemId(*args, **kwargs):
5375 """wxPyApp_GetMacPreferencesMenuItemId() -> long"""
5376 return __core.wxPyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
5377
5378 def wxPyApp_GetMacExitMenuItemId(*args, **kwargs):
5379 """wxPyApp_GetMacExitMenuItemId() -> long"""
5380 return __core.wxPyApp_GetMacExitMenuItemId(*args, **kwargs)
5381
5382 def wxPyApp_GetMacHelpMenuTitleName(*args, **kwargs):
5383 """wxPyApp_GetMacHelpMenuTitleName() -> wxString"""
5384 return __core.wxPyApp_GetMacHelpMenuTitleName(*args, **kwargs)
5385
5386 def wxPyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs):
5387 """wxPyApp_SetMacSupportPCMenuShortcuts(bool val)"""
5388 return __core.wxPyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
5389
5390 def wxPyApp_SetMacAboutMenuItemId(*args, **kwargs):
5391 """wxPyApp_SetMacAboutMenuItemId(long val)"""
5392 return __core.wxPyApp_SetMacAboutMenuItemId(*args, **kwargs)
5393
5394 def wxPyApp_SetMacPreferencesMenuItemId(*args, **kwargs):
5395 """wxPyApp_SetMacPreferencesMenuItemId(long val)"""
5396 return __core.wxPyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
5397
5398 def wxPyApp_SetMacExitMenuItemId(*args, **kwargs):
5399 """wxPyApp_SetMacExitMenuItemId(long val)"""
5400 return __core.wxPyApp_SetMacExitMenuItemId(*args, **kwargs)
5401
5402 def wxPyApp_SetMacHelpMenuTitleName(*args, **kwargs):
5403 """wxPyApp_SetMacHelpMenuTitleName(wxString val)"""
5404 return __core.wxPyApp_SetMacHelpMenuTitleName(*args, **kwargs)
5405
5406 def wxPyApp_GetComCtl32Version(*args, **kwargs):
5407 """
5408 wxPyApp_GetComCtl32Version() -> int
5409
5410 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5411 it wasn't found at all. Raises an exception on non-Windows platforms.
5412 """
5413 return __core.wxPyApp_GetComCtl32Version(*args, **kwargs)
5414
5415 #---------------------------------------------------------------------------
5416
5417
5418 def wxExit(*args, **kwargs):
5419 """
5420 wxExit()
5421
5422 Force an exit of the application. Convenience for wx.GetApp().Exit()
5423 """
5424 return __core.wxExit(*args, **kwargs)
5425
5426 def wxYield(*args, **kwargs):
5427 """
5428 wxYield() -> bool
5429
5430 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5431 """
5432 return __core.wxYield(*args, **kwargs)
5433
5434 def wxYieldIfNeeded(*args, **kwargs):
5435 """
5436 wxYieldIfNeeded() -> bool
5437
5438 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5439 """
5440 return __core.wxYieldIfNeeded(*args, **kwargs)
5441
5442 def wxSafeYield(*args, **kwargs):
5443 """
5444 wxSafeYield(wxWindow win=None, bool onlyIfNeeded=False) -> bool
5445
5446 This function is similar to `wx.Yield`, except that it disables the
5447 user input to all program windows before calling `wx.Yield` and
5448 re-enables it again afterwards. If ``win`` is not None, this window
5449 will remain enabled, allowing the implementation of some limited user
5450 interaction.
5451
5452 :Returns: the result of the call to `wx.Yield`.
5453 """
5454 return __core.wxSafeYield(*args, **kwargs)
5455
5456 def wxWakeUpIdle(*args, **kwargs):
5457 """
5458 wxWakeUpIdle()
5459
5460 Cause the message queue to become empty again, so idle events will be
5461 sent.
5462 """
5463 return __core.wxWakeUpIdle(*args, **kwargs)
5464
5465 def wxPostEvent(*args, **kwargs):
5466 """
5467 wxPostEvent(wxEvtHandler dest, wxEvent event)
5468
5469 Send an event to a window or other wx.EvtHandler to be processed
5470 later.
5471 """
5472 return __core.wxPostEvent(*args, **kwargs)
5473
5474 def wxApp_CleanUp(*args, **kwargs):
5475 """
5476 wxApp_CleanUp()
5477
5478 For internal use only, it is used to cleanup after wxWidgets when
5479 Python shuts down.
5480 """
5481 return __core.wxApp_CleanUp(*args, **kwargs)
5482
5483 def GetApp(*args, **kwargs):
5484 """
5485 GetApp() -> wxPyApp
5486
5487 Return a reference to the current wx.App object.
5488 """
5489 return __core.GetApp(*args, **kwargs)
5490
5491 def wxSetDefaultPyEncoding(*args, **kwargs):
5492 """
5493 SetDefaultPyEncoding(string encoding)
5494
5495 Sets the encoding that wxPython will use when it needs to convert a
5496 Python string or unicode object to or from a wxString.
5497
5498 The default encoding is the value of ``locale.getdefaultlocale()[1]``
5499 but please be aware that the default encoding within the same locale
5500 may be slightly different on different platforms. For example, please
5501 see http://www.alanwood.net/demos/charsetdiffs.html for differences
5502 between the common latin/roman encodings.
5503 """
5504 return __core.wxSetDefaultPyEncoding(*args, **kwargs)
5505
5506 def wxGetDefaultPyEncoding(*args, **kwargs):
5507 """
5508 GetDefaultPyEncoding() -> string
5509
5510 Gets the current encoding that wxPython will use when it needs to
5511 convert a Python string or unicode object to or from a wxString.
5512 """
5513 return __core.wxGetDefaultPyEncoding(*args, **kwargs)
5514 #----------------------------------------------------------------------
5515
5516 class PyOnDemandOutputWindow:
5517 """
5518 A class that can be used for redirecting Python's stdout and
5519 stderr streams. It will do nothing until something is wrriten to
5520 the stream at which point it will create a Frame with a text area
5521 and write the text there.
5522 """
5523 def __init__(self, title = "wxPython: stdout/stderr"):
5524 self.frame = None
5525 self.title = title
5526 self.pos = wx.DefaultPosition
5527 self.size = (450, 300)
5528 self.parent = None
5529
5530 def SetParent(self, parent):
5531 """Set the window to be used as the popup Frame's parent."""
5532 self.parent = parent
5533
5534
5535 def CreateOutputWindow(self, st):
5536 self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size,
5537 style=wx.DEFAULT_FRAME_STYLE)
5538 self.text = wx.TextCtrl(self.frame, -1, "",
5539 style=wx.TE_MULTILINE|wx.TE_READONLY)
5540 self.text.AppendText(st)
5541 self.frame.Show(True)
5542 EVT_CLOSE(self.frame, self.OnCloseWindow)
5543
5544
5545 def OnCloseWindow(self, event):
5546 if self.frame is not None:
5547 self.frame.Destroy()
5548 self.frame = None
5549 self.text = None
5550
5551
5552 # These methods provide the file-like output behaviour.
5553 def write(self, text):
5554 """
5555 Create the output window if needed and write the string to it.
5556 If not called in the context of the gui thread then uses
5557 CallAfter to do the work there.
5558 """
5559 if self.frame is None:
5560 if not wx.Thread_IsMain():
5561 wx.CallAfter(self.CreateOutputWindow, text)
5562 else:
5563 self.CreateOutputWindow(text)
5564 else:
5565 if not wx.Thread_IsMain():
5566 wx.CallAfter(self.text.AppendText, text)
5567 else:
5568 self.text.AppendText(text)
5569
5570
5571 def close(self):
5572 if self.frame is not None:
5573 wx.CallAfter(self.frame.Close)
5574
5575
5576 def flush(self):
5577 pass
5578
5579
5580
5581 #----------------------------------------------------------------------
5582
5583 _defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
5584
5585 class App(wx.PyApp):
5586 """
5587 The ``wx.App`` class represents the application and is used to:
5588
5589 * bootstrap the wxPython system and initialize the underlying
5590 gui toolkit
5591 * set and get application-wide properties
5592 * implement the windowing system main message or event loop,
5593 and to dispatch events to window instances
5594 * etc.
5595
5596 Every application must have a ``wx.App`` instance, and all
5597 creation of UI objects should be delayed until after the
5598 ``wx.App`` object has been created in order to ensure that the gui
5599 platform and wxWidgets have been fully initialized.
5600
5601 Normally you would derive from this class and implement an
5602 ``OnInit`` method that creates a frame and then calls
5603 ``self.SetTopWindow(frame)``.
5604
5605 :see: `wx.PySimpleApp` for a simpler app class that can be used
5606 directly.
5607 """
5608
5609 outputWindowClass = PyOnDemandOutputWindow
5610
5611 def __init__(self, redirect=_defRedirect, filename=None,
5612 useBestVisual=False, clearSigInt=True):
5613 """
5614 Construct a ``wx.App`` object.
5615
5616 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
5617 redirected? Defaults to True on Windows and Mac, False
5618 otherwise. If `filename` is None then output will be
5619 redirected to a window that pops up as needed. (You can
5620 control what kind of window is created for the output by
5621 resetting the class variable ``outputWindowClass`` to a
5622 class of your choosing.)
5623
5624 :param filename: The name of a file to redirect output to, if
5625 redirect is True.
5626
5627 :param useBestVisual: Should the app try to use the best
5628 available visual provided by the system (only relevant on
5629 systems that have more than one visual.) This parameter
5630 must be used instead of calling `SetUseBestVisual` later
5631 on because it must be set before the underlying GUI
5632 toolkit is initialized.
5633
5634 :param clearSigInt: Should SIGINT be cleared? This allows the
5635 app to terminate upon a Ctrl-C in the console like other
5636 GUI apps will.
5637
5638 :note: You should override OnInit to do applicaition
5639 initialization to ensure that the system, toolkit and
5640 wxWidgets are fully initialized.
5641 """
5642 wx.PyApp.__init__(self)
5643
5644 if wx.Platform == "__WXMAC__":
5645 try:
5646 import MacOS
5647 if not MacOS.WMAvailable():
5648 print """\
5649 This program needs access to the screen. Please run with 'pythonw',
5650 not 'python', and only when you are logged in on the main display of
5651 your Mac."""
5652 _sys.exit(1)
5653 except SystemExit:
5654 raise
5655 except:
5656 pass
5657
5658 # This has to be done before OnInit
5659 self.SetUseBestVisual(useBestVisual)
5660
5661 # Set the default handler for SIGINT. This fixes a problem
5662 # where if Ctrl-C is pressed in the console that started this
5663 # app then it will not appear to do anything, (not even send
5664 # KeyboardInterrupt???) but will later segfault on exit. By
5665 # setting the default handler then the app will exit, as
5666 # expected (depending on platform.)
5667 if clearSigInt:
5668 try:
5669 import signal
5670 signal.signal(signal.SIGINT, signal.SIG_DFL)
5671 except:
5672 pass
5673
5674 # Save and redirect the stdio to a window?
5675 self.stdioWin = None
5676 self.saveStdio = (_sys.stdout, _sys.stderr)
5677 if redirect:
5678 self.RedirectStdio(filename)
5679
5680 # Use Python's install prefix as the default
5681 wx.StandardPaths.Get().SetInstallPrefix(_sys.prefix)
5682
5683 # This finishes the initialization of wxWindows and then calls
5684 # the OnInit that should be present in the derived class
5685 self._BootstrapApp()
5686
5687
5688 def __del__(self):
5689 try:
5690 self.RestoreStdio() # Just in case the MainLoop was overridden
5691 except:
5692 pass
5693
5694
5695 def SetTopWindow(self, frame):
5696 """Set the \"main\" top level window"""
5697 if self.stdioWin:
5698 self.stdioWin.SetParent(frame)
5699 wx.PyApp.SetTopWindow(self, frame)
5700
5701
5702 def MainLoop(self):
5703 """Execute the main GUI event loop"""
5704 wx.PyApp.MainLoop(self)
5705 self.RestoreStdio()
5706
5707
5708 def RedirectStdio(self, filename=None):
5709 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
5710 if filename:
5711 _sys.stdout = _sys.stderr = open(filename, 'a')
5712 else:
5713 self.stdioWin = self.outputWindowClass()
5714 _sys.stdout = _sys.stderr = self.stdioWin
5715
5716
5717 def RestoreStdio(self):
5718 _sys.stdout, _sys.stderr = self.saveStdio
5719
5720
5721 def SetOutputWindowAttributes(self, title=None, pos=None, size=None):
5722 """
5723 Set the title, position and/or size of the output window if
5724 the stdio has been redirected. This should be called before
5725 any output would cause the output window to be created.
5726 """
5727 if self.stdioWin:
5728 if title is not None:
5729 self.stdioWin.title = title
5730 if pos is not None:
5731 self.stdioWin.pos = pos
5732 if size is not None:
5733 self.stdioWin.size = size
5734
5735
5736
5737
5738 # change from wx.PyApp_XX to wx.App_XX
5739 App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts
5740 App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId
5741 App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId
5742 App_GetMacExitMenuItemId = _core_.PyApp_GetMacExitMenuItemId
5743 App_GetMacHelpMenuTitleName = _core_.PyApp_GetMacHelpMenuTitleName
5744 App_SetMacSupportPCMenuShortcuts = _core_.PyApp_SetMacSupportPCMenuShortcuts
5745 App_SetMacAboutMenuItemId = _core_.PyApp_SetMacAboutMenuItemId
5746 App_SetMacPreferencesMenuItemId = _core_.PyApp_SetMacPreferencesMenuItemId
5747 App_SetMacExitMenuItemId = _core_.PyApp_SetMacExitMenuItemId
5748 App_SetMacHelpMenuTitleName = _core_.PyApp_SetMacHelpMenuTitleName
5749 App_GetComCtl32Version = _core_.PyApp_GetComCtl32Version
5750
5751 #----------------------------------------------------------------------------
5752
5753 class PySimpleApp(wx.App):
5754 """
5755 A simple application class. You can just create one of these and
5756 then then make your top level windows later, and not have to worry
5757 about OnInit. For example::
5758
5759 app = wx.PySimpleApp()
5760 frame = wx.Frame(None, title='Hello World')
5761 frame.Show()
5762 app.MainLoop()
5763
5764 :see: `wx.App`
5765 """
5766
5767 def __init__(self, redirect=False, filename=None,
5768 useBestVisual=False, clearSigInt=True):
5769 """
5770 :see: `wx.App.__init__`
5771 """
5772 wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt)
5773
5774 def OnInit(self):
5775 return True
5776
5777
5778
5779 # Is anybody using this one?
5780 class PyWidgetTester(wx.App):
5781 def __init__(self, size = (250, 100)):
5782 self.size = size
5783 wx.App.__init__(self, 0)
5784
5785 def OnInit(self):
5786 self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
5787 self.SetTopWindow(self.frame)
5788 return True
5789
5790 def SetWidget(self, widgetClass, *args, **kwargs):
5791 w = widgetClass(self.frame, *args, **kwargs)
5792 self.frame.Show(True)
5793
5794 #----------------------------------------------------------------------------
5795 # DO NOT hold any other references to this object. This is how we
5796 # know when to cleanup system resources that wxWidgets is holding. When
5797 # the sys module is unloaded, the refcount on sys.__wxPythonCleanup
5798 # goes to zero and it calls the wx.App_CleanUp function.
5799
5800 class __wxPyCleanup:
5801 def __init__(self):
5802 self.cleanup = _core_.App_CleanUp
5803 def __del__(self):
5804 self.cleanup()
5805
5806 _sys.__wxPythonCleanup = __wxPyCleanup()
5807
5808 ## # another possible solution, but it gets called too early...
5809 ## import atexit
5810 ## atexit.register(_core_.wxApp_CleanUp)
5811
5812
5813 #----------------------------------------------------------------------------
5814
5815 #---------------------------------------------------------------------------
5816
5817 class wxEventLoop(object):
5818 """Proxy of C++ wxEventLoop class"""
5819 def __repr__(self):
5820 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5821 def __init__(self, *args, **kwargs):
5822 """__init__(self) -> wxEventLoop"""
5823 newobj = __core.new_wxEventLoop(*args, **kwargs)
5824 self.this = newobj.this
5825 self.thisown = 1
5826 del newobj.thisown
5827 def __del__(self, destroy=__core.delete_wxEventLoop):
5828 """__del__(self)"""
5829 try:
5830 if self.thisown: destroy(self)
5831 except: pass
5832
5833 def Run(*args, **kwargs):
5834 """Run(self) -> int"""
5835 return __core.wxEventLoop_Run(*args, **kwargs)
5836
5837 def Exit(*args, **kwargs):
5838 """Exit(self, int rc=0)"""
5839 return __core.wxEventLoop_Exit(*args, **kwargs)
5840
5841 def Pending(*args, **kwargs):
5842 """Pending(self) -> bool"""
5843 return __core.wxEventLoop_Pending(*args, **kwargs)
5844
5845 def Dispatch(*args, **kwargs):
5846 """Dispatch(self) -> bool"""
5847 return __core.wxEventLoop_Dispatch(*args, **kwargs)
5848
5849 def IsRunning(*args, **kwargs):
5850 """IsRunning(self) -> bool"""
5851 return __core.wxEventLoop_IsRunning(*args, **kwargs)
5852
5853 def GetActive(*args, **kwargs):
5854 """GetActive() -> wxEventLoop"""
5855 return __core.wxEventLoop_GetActive(*args, **kwargs)
5856
5857 GetActive = staticmethod(GetActive)
5858 def SetActive(*args, **kwargs):
5859 """SetActive(wxEventLoop loop)"""
5860 return __core.wxEventLoop_SetActive(*args, **kwargs)
5861
5862 SetActive = staticmethod(SetActive)
5863
5864 class wxEventLoopPtr(wxEventLoop):
5865 def __init__(self, this):
5866 self.this = this
5867 if not hasattr(self,"thisown"): self.thisown = 0
5868 self.__class__ = wxEventLoop
5869 __core.wxEventLoop_swigregister(wxEventLoopPtr)
5870
5871 def wxEventLoop_GetActive(*args, **kwargs):
5872 """wxEventLoop_GetActive() -> wxEventLoop"""
5873 return __core.wxEventLoop_GetActive(*args, **kwargs)
5874
5875 def wxEventLoop_SetActive(*args, **kwargs):
5876 """wxEventLoop_SetActive(wxEventLoop loop)"""
5877 return __core.wxEventLoop_SetActive(*args, **kwargs)
5878
5879 #---------------------------------------------------------------------------
5880
5881 class wxAcceleratorEntry(object):
5882 """
5883 A class used to define items in an `wx.AcceleratorTable`. wxPython
5884 programs can choose to use wx.AcceleratorEntry objects, but using a
5885 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
5886 as well. See `__init__` for of the tuple values.
5887
5888 :see: `wx.AcceleratorTable`
5889 """
5890 def __repr__(self):
5891 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5892 def __init__(self, *args, **kwargs):
5893 """
5894 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> wxAcceleratorEntry
5895
5896 Construct a wx.AcceleratorEntry.
5897 """
5898 newobj = __core.new_wxAcceleratorEntry(*args, **kwargs)
5899 self.this = newobj.this
5900 self.thisown = 1
5901 del newobj.thisown
5902 def __del__(self, destroy=__core.delete_wxAcceleratorEntry):
5903 """__del__(self)"""
5904 try:
5905 if self.thisown: destroy(self)
5906 except: pass
5907
5908 def Set(*args, **kwargs):
5909 """
5910 Set(self, int flags, int keyCode, int cmd)
5911
5912 (Re)set the attributes of a wx.AcceleratorEntry.
5913 :see `__init__`
5914 """
5915 return __core.wxAcceleratorEntry_Set(*args, **kwargs)
5916
5917 def GetFlags(*args, **kwargs):
5918 """
5919 GetFlags(self) -> int
5920
5921 Get the AcceleratorEntry's flags.
5922 """
5923 return __core.wxAcceleratorEntry_GetFlags(*args, **kwargs)
5924
5925 def GetKeyCode(*args, **kwargs):
5926 """
5927 GetKeyCode(self) -> int
5928
5929 Get the AcceleratorEntry's keycode.
5930 """
5931 return __core.wxAcceleratorEntry_GetKeyCode(*args, **kwargs)
5932
5933 def GetCommand(*args, **kwargs):
5934 """
5935 GetCommand(self) -> int
5936
5937 Get the AcceleratorEntry's command ID.
5938 """
5939 return __core.wxAcceleratorEntry_GetCommand(*args, **kwargs)
5940
5941
5942 class wxAcceleratorEntryPtr(wxAcceleratorEntry):
5943 def __init__(self, this):
5944 self.this = this
5945 if not hasattr(self,"thisown"): self.thisown = 0
5946 self.__class__ = wxAcceleratorEntry
5947 __core.wxAcceleratorEntry_swigregister(wxAcceleratorEntryPtr)
5948
5949 class wxAcceleratorTable(wxObject):
5950 """
5951 An accelerator table allows the application to specify a table of
5952 keyboard shortcuts for menus or other commands. On Windows, menu or
5953 button commands are supported; on GTK, only menu commands are
5954 supported.
5955 """
5956 def __repr__(self):
5957 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5958 def __init__(self, *args, **kwargs):
5959 """
5960 __init__(entries) -> AcceleratorTable
5961
5962 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
5963 items or or of 3-tuples (flags, keyCode, cmdID)
5964
5965 :see: `wx.AcceleratorEntry`
5966 """
5967 newobj = __core.new_wxAcceleratorTable(*args, **kwargs)
5968 self.this = newobj.this
5969 self.thisown = 1
5970 del newobj.thisown
5971 def __del__(self, destroy=__core.delete_wxAcceleratorTable):
5972 """__del__(self)"""
5973 try:
5974 if self.thisown: destroy(self)
5975 except: pass
5976
5977 def Ok(*args, **kwargs):
5978 """Ok(self) -> bool"""
5979 return __core.wxAcceleratorTable_Ok(*args, **kwargs)
5980
5981
5982 class wxAcceleratorTablePtr(wxAcceleratorTable):
5983 def __init__(self, this):
5984 self.this = this
5985 if not hasattr(self,"thisown"): self.thisown = 0
5986 self.__class__ = wxAcceleratorTable
5987 __core.wxAcceleratorTable_swigregister(wxAcceleratorTablePtr)
5988
5989
5990 def wxGetAccelFromString(*args, **kwargs):
5991 """wxGetAccelFromString(wxString label) -> wxAcceleratorEntry"""
5992 return __core.wxGetAccelFromString(*args, **kwargs)
5993 #---------------------------------------------------------------------------
5994
5995 class wxVisualAttributes(object):
5996 """struct containing all the visual attributes of a control"""
5997 def __repr__(self):
5998 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5999 def __init__(self, *args, **kwargs):
6000 """
6001 __init__(self) -> wxVisualAttributes
6002
6003 struct containing all the visual attributes of a control
6004 """
6005 newobj = __core.new_wxVisualAttributes(*args, **kwargs)
6006 self.this = newobj.this
6007 self.thisown = 1
6008 del newobj.thisown
6009 def __del__(self, destroy=__core.delete_wxVisualAttributes):
6010 """__del__(self)"""
6011 try:
6012 if self.thisown: destroy(self)
6013 except: pass
6014
6015 font = property(__core.wxVisualAttributes_font_get, __core.wxVisualAttributes_font_set)
6016 colFg = property(__core.wxVisualAttributes_colFg_get, __core.wxVisualAttributes_colFg_set)
6017 colBg = property(__core.wxVisualAttributes_colBg_get, __core.wxVisualAttributes_colBg_set)
6018
6019 class wxVisualAttributesPtr(wxVisualAttributes):
6020 def __init__(self, this):
6021 self.this = this
6022 if not hasattr(self,"thisown"): self.thisown = 0
6023 self.__class__ = wxVisualAttributes
6024 __core.wxVisualAttributes_swigregister(wxVisualAttributesPtr)
6025 wxNullAcceleratorTable = cvar.wxNullAcceleratorTable
6026 PanelNameStr = cvar.PanelNameStr
6027
6028 wxWINDOW_VARIANT_NORMAL = __core.wxWINDOW_VARIANT_NORMAL
6029 wxWINDOW_VARIANT_SMALL = __core.wxWINDOW_VARIANT_SMALL
6030 wxWINDOW_VARIANT_MINI = __core.wxWINDOW_VARIANT_MINI
6031 wxWINDOW_VARIANT_LARGE = __core.wxWINDOW_VARIANT_LARGE
6032 wxWINDOW_VARIANT_MAX = __core.wxWINDOW_VARIANT_MAX
6033 class wxWindow(wxEvtHandler):
6034 """
6035 wx.Window is the base class for all windows and represents any visible
6036 object on the screen. All controls, top level windows and so on are
6037 wx.Windows. Sizers and device contexts are not however, as they don't
6038 appear on screen themselves.
6039
6040 """
6041 def __repr__(self):
6042 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
6043 def __init__(self, *args, **kwargs):
6044 """
6045 __init__(self, wxWindow parent, int id=-1, wxPoint pos=wxDefaultPosition,
6046 wxSize size=wxDefaultSize, long style=0,
6047 wxString name=PanelNameStr) -> wxWindow
6048
6049 Construct and show a generic Window.
6050 """
6051 newobj = __core.new_wxWindow(*args, **kwargs)
6052 self.this = newobj.this
6053 self.thisown = 1
6054 del newobj.thisown
6055 self._setOORInfo(self)
6056
6057 def Create(*args, **kwargs):
6058 """
6059 Create(self, wxWindow parent, int id=-1, wxPoint pos=wxDefaultPosition,
6060 wxSize size=wxDefaultSize, long style=0,
6061 wxString name=PanelNameStr) -> bool
6062
6063 Create the GUI part of the Window for 2-phase creation mode.
6064 """
6065 return __core.wxWindow_Create(*args, **kwargs)
6066
6067 def Close(*args, **kwargs):
6068 """
6069 Close(self, bool force=False) -> bool
6070
6071 This function simply generates a EVT_CLOSE event whose handler usually
6072 tries to close the window. It doesn't close the window itself,
6073 however. If force is False (the default) then the window's close
6074 handler will be allowed to veto the destruction of the window.
6075 """
6076 return __core.wxWindow_Close(*args, **kwargs)
6077
6078 def Destroy(*args, **kwargs):
6079 """
6080 Destroy(self) -> bool
6081
6082 Destroys the window safely. Frames and dialogs are not destroyed
6083 immediately when this function is called -- they are added to a list
6084 of windows to be deleted on idle time, when all the window's events
6085 have been processed. This prevents problems with events being sent to
6086 non-existent windows.
6087
6088 Returns True if the window has either been successfully deleted, or it
6089 has been added to the list of windows pending real deletion.
6090 """
6091 return __core.wxWindow_Destroy(*args, **kwargs)
6092
6093 def DestroyChildren(*args, **kwargs):
6094 """
6095 DestroyChildren(self) -> bool
6096
6097 Destroys all children of a window. Called automatically by the
6098 destructor.
6099 """
6100 return __core.wxWindow_DestroyChildren(*args, **kwargs)
6101
6102 def IsBeingDeleted(*args, **kwargs):
6103 """
6104 IsBeingDeleted(self) -> bool
6105
6106 Is the window in the process of being deleted?
6107 """
6108 return __core.wxWindow_IsBeingDeleted(*args, **kwargs)
6109
6110 def SetTitle(*args, **kwargs):
6111 """
6112 SetTitle(self, wxString title)
6113
6114 Sets the window's title. Applicable only to frames and dialogs.
6115 """
6116 return __core.wxWindow_SetTitle(*args, **kwargs)
6117
6118 def GetTitle(*args, **kwargs):
6119 """
6120 GetTitle(self) -> wxString
6121
6122 Gets the window's title. Applicable only to frames and dialogs.
6123 """
6124 return __core.wxWindow_GetTitle(*args, **kwargs)
6125
6126 def SetLabel(*args, **kwargs):
6127 """
6128 SetLabel(self, wxString label)
6129
6130 Set the text which the window shows in its label if applicable.
6131 """
6132 return __core.wxWindow_SetLabel(*args, **kwargs)
6133
6134 def GetLabel(*args, **kwargs):
6135 """
6136 GetLabel(self) -> wxString
6137
6138 Generic way of getting a label from any window, for identification
6139 purposes. The interpretation of this function differs from class to
6140 class. For frames and dialogs, the value returned is the title. For
6141 buttons or static text controls, it is the button text. This function
6142 can be useful for meta-programs such as testing tools or special-needs
6143 access programs)which need to identify windows by name.
6144 """
6145 return __core.wxWindow_GetLabel(*args, **kwargs)
6146
6147 def SetName(*args, **kwargs):
6148 """
6149 SetName(self, wxString name)
6150
6151 Sets the window's name. The window name is used for ressource setting
6152 in X, it is not the same as the window title/label
6153 """
6154 return __core.wxWindow_SetName(*args, **kwargs)
6155
6156 def GetName(*args, **kwargs):
6157 """
6158 GetName(self) -> wxString
6159
6160 Returns the windows name. This name is not guaranteed to be unique;
6161 it is up to the programmer to supply an appropriate name in the window
6162 constructor or via wx.Window.SetName.
6163 """
6164 return __core.wxWindow_GetName(*args, **kwargs)
6165
6166 def SetWindowVariant(*args, **kwargs):
6167 """
6168 SetWindowVariant(self, int variant)
6169
6170 Sets the variant of the window/font size to use for this window, if
6171 the platform supports variants, for example, wxMac.
6172 """
6173 return __core.wxWindow_SetWindowVariant(*args, **kwargs)
6174
6175 def GetWindowVariant(*args, **kwargs):
6176 """GetWindowVariant(self) -> int"""
6177 return __core.wxWindow_GetWindowVariant(*args, **kwargs)
6178
6179 def SetId(*args, **kwargs):
6180 """
6181 SetId(self, int winid)
6182
6183 Sets the identifier of the window. Each window has an integer
6184 identifier. If the application has not provided one, an identifier
6185 will be generated. Normally, the identifier should be provided on
6186 creation and should not be modified subsequently.
6187 """
6188 return __core.wxWindow_SetId(*args, **kwargs)
6189
6190 def GetId(*args, **kwargs):
6191 """
6192 GetId(self) -> int
6193
6194 Returns the identifier of the window. Each window has an integer
6195 identifier. If the application has not provided one (or the default Id
6196 -1 is used) then an unique identifier with a negative value will be
6197 generated.
6198 """
6199 return __core.wxWindow_GetId(*args, **kwargs)
6200
6201 def NewControlId(*args, **kwargs):
6202 """
6203 NewControlId() -> int
6204
6205 Generate a control id for the controls which were not given one.
6206 """
6207 return __core.wxWindow_NewControlId(*args, **kwargs)
6208
6209 NewControlId = staticmethod(NewControlId)
6210 def NextControlId(*args, **kwargs):
6211 """
6212 NextControlId(int winid) -> int
6213
6214 Get the id of the control following the one with the given
6215 autogenerated) id
6216 """
6217 return __core.wxWindow_NextControlId(*args, **kwargs)
6218
6219 NextControlId = staticmethod(NextControlId)
6220 def PrevControlId(*args, **kwargs):
6221 """
6222 PrevControlId(int winid) -> int
6223
6224 Get the id of the control preceding the one with the given
6225 autogenerated) id
6226 """
6227 return __core.wxWindow_PrevControlId(*args, **kwargs)
6228
6229 PrevControlId = staticmethod(PrevControlId)
6230 def SetSize(*args, **kwargs):
6231 """
6232 SetSize(self, wxSize size)
6233
6234 Sets the size of the window in pixels.
6235 """
6236 return __core.wxWindow_SetSize(*args, **kwargs)
6237
6238 def SetDimensions(*args, **kwargs):
6239 """
6240 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=wxSIZE_AUTO)
6241
6242 Sets the position and size of the window in pixels. The sizeFlags
6243 parameter indicates the interpretation of the other params if they are
6244 equal to -1.
6245
6246 ======================== ======================================
6247 wx.SIZE_AUTO A -1 indicates that a class-specific
6248 default should be used.
6249 wx.SIZE_USE_EXISTING Axisting dimensions should be used if
6250 -1 values are supplied.
6251 wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
6252 interpreted as real dimensions, not
6253 default values.
6254 ======================== ======================================
6255
6256 """
6257 return __core.wxWindow_SetDimensions(*args, **kwargs)
6258
6259 def SetRect(*args, **kwargs):
6260 """
6261 SetRect(self, wxRect rect, int sizeFlags=wxSIZE_AUTO)
6262
6263 Sets the position and size of the window in pixels using a wx.Rect.
6264 """
6265 return __core.wxWindow_SetRect(*args, **kwargs)
6266
6267 def SetSizeWH(*args, **kwargs):
6268 """
6269 SetSizeWH(self, int width, int height)
6270
6271 Sets the size of the window in pixels.
6272 """
6273 return __core.wxWindow_SetSizeWH(*args, **kwargs)
6274
6275 def Move(*args, **kwargs):
6276 """
6277 Move(self, wxPoint pt, int flags=wxSIZE_USE_EXISTING)
6278
6279 Moves the window to the given position.
6280 """
6281 return __core.wxWindow_Move(*args, **kwargs)
6282
6283 SetPosition = Move
6284 def MoveXY(*args, **kwargs):
6285 """
6286 MoveXY(self, int x, int y, int flags=wxSIZE_USE_EXISTING)
6287
6288 Moves the window to the given position.
6289 """
6290 return __core.wxWindow_MoveXY(*args, **kwargs)
6291
6292 def SetBestFittingSize(*args, **kwargs):
6293 """
6294 SetBestFittingSize(self, wxSize size=wxDefaultSize)
6295
6296 A 'Smart' SetSize that will fill in default size components with the
6297 window's *best size* values. Also set's the minsize for use with sizers.
6298 """
6299 return __core.wxWindow_SetBestFittingSize(*args, **kwargs)
6300
6301 def Raise(*args, **kwargs):
6302 """
6303 Raise(self)
6304
6305 Raises the window to the top of the window hierarchy if it is a
6306 managed window (dialog or frame).
6307 """
6308 return __core.wxWindow_Raise(*args, **kwargs)
6309
6310 def Lower(*args, **kwargs):
6311 """
6312 Lower(self)
6313
6314 Lowers the window to the bottom of the window hierarchy if it is a
6315 managed window (dialog or frame).
6316 """
6317 return __core.wxWindow_Lower(*args, **kwargs)
6318
6319 def SetClientSize(*args, **kwargs):
6320 """
6321 SetClientSize(self, wxSize size)
6322
6323 This sets the size of the window client area in pixels. Using this
6324 function to size a window tends to be more device-independent than
6325 wx.Window.SetSize, since the application need not worry about what
6326 dimensions the border or title bar have when trying to fit the window
6327 around panel items, for example.
6328 """
6329 return __core.wxWindow_SetClientSize(*args, **kwargs)
6330
6331 def SetClientSizeWH(*args, **kwargs):
6332 """
6333 SetClientSizeWH(self, int width, int height)
6334
6335 This sets the size of the window client area in pixels. Using this
6336 function to size a window tends to be more device-independent than
6337 wx.Window.SetSize, since the application need not worry about what
6338 dimensions the border or title bar have when trying to fit the window
6339 around panel items, for example.
6340 """
6341 return __core.wxWindow_SetClientSizeWH(*args, **kwargs)
6342
6343 def SetClientRect(*args, **kwargs):
6344 """
6345 SetClientRect(self, wxRect rect)
6346
6347 This sets the size of the window client area in pixels. Using this
6348 function to size a window tends to be more device-independent than
6349 wx.Window.SetSize, since the application need not worry about what
6350 dimensions the border or title bar have when trying to fit the window
6351 around panel items, for example.
6352 """
6353 return __core.wxWindow_SetClientRect(*args, **kwargs)
6354
6355 def GetPosition(*args, **kwargs):
6356 """
6357 GetPosition(self) -> wxPoint
6358
6359 Get the window's position.
6360 """
6361 return __core.wxWindow_GetPosition(*args, **kwargs)
6362
6363 def GetPositionTuple(*args, **kwargs):
6364 """
6365 GetPositionTuple() -> (x,y)
6366
6367 Get the window's position.
6368 """
6369 return __core.wxWindow_GetPositionTuple(*args, **kwargs)
6370
6371 def GetSize(*args, **kwargs):
6372 """
6373 GetSize(self) -> wxSize
6374
6375 Get the window size.
6376 """
6377 return __core.wxWindow_GetSize(*args, **kwargs)
6378
6379 def GetSizeTuple(*args, **kwargs):
6380 """
6381 GetSizeTuple() -> (width, height)
6382
6383 Get the window size.
6384 """
6385 return __core.wxWindow_GetSizeTuple(*args, **kwargs)
6386
6387 def GetRect(*args, **kwargs):
6388 """
6389 GetRect(self) -> wxRect
6390
6391 Returns the size and position of the window as a wx.Rect object.
6392 """
6393 return __core.wxWindow_GetRect(*args, **kwargs)
6394
6395 def GetClientSize(*args, **kwargs):
6396 """
6397 GetClientSize(self) -> wxSize
6398
6399 This gets the size of the window's 'client area' in pixels. The client
6400 area is the area which may be drawn on by the programmer, excluding
6401 title bar, border, scrollbars, etc.
6402 """
6403 return __core.wxWindow_GetClientSize(*args, **kwargs)
6404
6405 def GetClientSizeTuple(*args, **kwargs):
6406 """
6407 GetClientSizeTuple() -> (width, height)
6408
6409 This gets the size of the window's 'client area' in pixels. The client
6410 area is the area which may be drawn on by the programmer, excluding
6411 title bar, border, scrollbars, etc.
6412 """
6413 return __core.wxWindow_GetClientSizeTuple(*args, **kwargs)
6414
6415 def GetClientAreaOrigin(*args, **kwargs):
6416 """
6417 GetClientAreaOrigin(self) -> wxPoint
6418
6419 Get the origin of the client area of the window relative to the
6420 window's top left corner (the client area may be shifted because of
6421 the borders, scrollbars, other decorations...)
6422 """
6423 return __core.wxWindow_GetClientAreaOrigin(*args, **kwargs)
6424
6425 def GetClientRect(*args, **kwargs):
6426 """
6427 GetClientRect(self) -> wxRect
6428
6429 Get the client area position and size as a `wx.Rect` object.
6430 """
6431 return __core.wxWindow_GetClientRect(*args, **kwargs)
6432
6433 def GetBestSize(*args, **kwargs):
6434 """
6435 GetBestSize(self) -> wxSize
6436
6437 This function returns the best acceptable minimal size for the
6438 window, if applicable. For example, for a static text control, it will
6439 be the minimal size such that the control label is not truncated. For
6440 windows containing subwindows (suzh aswx.Panel), the size returned by
6441 this function will be the same as the size the window would have had
6442 after calling Fit.
6443 """
6444 return __core.wxWindow_GetBestSize(*args, **kwargs)
6445
6446 def GetBestSizeTuple(*args, **kwargs):
6447 """
6448 GetBestSizeTuple() -> (width, height)
6449
6450 This function returns the best acceptable minimal size for the
6451 window, if applicable. For example, for a static text control, it will
6452 be the minimal size such that the control label is not truncated. For
6453 windows containing subwindows (suzh aswx.Panel), the size returned by
6454 this function will be the same as the size the window would have had
6455 after calling Fit.
6456 """
6457 return __core.wxWindow_GetBestSizeTuple(*args, **kwargs)
6458
6459 def InvalidateBestSize(*args, **kwargs):
6460 """
6461 InvalidateBestSize(self)
6462
6463 Reset the cached best size value so it will be recalculated the next
6464 time it is needed.
6465 """
6466 return __core.wxWindow_InvalidateBestSize(*args, **kwargs)
6467
6468 def GetBestFittingSize(*args, **kwargs):
6469 """
6470 GetBestFittingSize(self) -> wxSize
6471
6472 This function will merge the window's best size into the window's
6473 minimum size, giving priority to the min size components, and returns
6474 the results.
6475
6476 """
6477 return __core.wxWindow_GetBestFittingSize(*args, **kwargs)
6478
6479 def GetAdjustedBestSize(*args, **kwargs):
6480 """
6481 GetAdjustedBestSize(self) -> wxSize
6482
6483 This method is similar to GetBestSize, except in one
6484 thing. GetBestSize should return the minimum untruncated size of the
6485 window, while this method will return the largest of BestSize and any
6486 user specified minimum size. ie. it is the minimum size the window
6487 should currently be drawn at, not the minimal size it can possibly
6488 tolerate.
6489 """
6490 return __core.wxWindow_GetAdjustedBestSize(*args, **kwargs)
6491
6492 def Center(*args, **kwargs):
6493 """
6494 Center(self, int direction=wxBOTH)
6495
6496 Centers the window. The parameter specifies the direction for
6497 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6498 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6499 on the entire screen and not on its parent window. If it is a
6500 top-level window and has no parent then it will always be centered
6501 relative to the screen.
6502 """
6503 return __core.wxWindow_Center(*args, **kwargs)
6504
6505 Centre = Center
6506 def CenterOnScreen(*args, **kwargs):
6507 """
6508 CenterOnScreen(self, int dir=wxBOTH)
6509
6510 Center on screen (only works for top level windows)
6511 """
6512 return __core.wxWindow_CenterOnScreen(*args, **kwargs)
6513
6514 CentreOnScreen = CenterOnScreen
6515 def CenterOnParent(*args, **kwargs):
6516 """
6517 CenterOnParent(self, int dir=wxBOTH)
6518
6519 Center with respect to the the parent window
6520 """
6521 return __core.wxWindow_CenterOnParent(*args, **kwargs)
6522
6523 CentreOnParent = CenterOnParent
6524 def Fit(*args, **kwargs):
6525 """
6526 Fit(self)
6527
6528 Sizes the window so that it fits around its subwindows. This function
6529 won't do anything if there are no subwindows and will only really work
6530 correctly if sizers are used for the subwindows layout. Also, if the
6531 window has exactly one subwindow it is better (faster and the result
6532 is more precise as Fit adds some margin to account for fuzziness of
6533 its calculations) to call window.SetClientSize(child.GetSize())
6534 instead of calling Fit.
6535 """
6536 return __core.wxWindow_Fit(*args, **kwargs)
6537
6538 def FitInside(*args, **kwargs):
6539 """
6540 FitInside(self)
6541
6542 Similar to Fit, but sizes the interior (virtual) size of a
6543 window. Mainly useful with scrolled windows to reset scrollbars after
6544 sizing changes that do not trigger a size event, and/or scrolled
6545 windows without an interior sizer. This function similarly won't do
6546 anything if there are no subwindows.
6547 """
6548 return __core.wxWindow_FitInside(*args, **kwargs)
6549
6550 def SetSizeHints(*args, **kwargs):
6551 """
6552 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
6553 int incH=-1)
6554
6555 Allows specification of minimum and maximum window sizes, and window
6556 size increments. If a pair of values is not set (or set to -1), the
6557 default values will be used. If this function is called, the user
6558 will not be able to size the window outside the given bounds (if it is
6559 a top-level window.) Sizers will also inspect the minimum window size
6560 and will use that value if set when calculating layout.
6561
6562 The resizing increments are only significant under Motif or Xt.
6563 """
6564 return __core.wxWindow_SetSizeHints(*args, **kwargs)
6565
6566 def SetSizeHintsSz(*args, **kwargs):
6567 """
6568 SetSizeHintsSz(self, wxSize minSize, wxSize maxSize=wxDefaultSize, wxSize incSize=wxDefaultSize)
6569
6570 Allows specification of minimum and maximum window sizes, and window
6571 size increments. If a pair of values is not set (or set to -1), the
6572 default values will be used. If this function is called, the user
6573 will not be able to size the window outside the given bounds (if it is
6574 a top-level window.) Sizers will also inspect the minimum window size
6575 and will use that value if set when calculating layout.
6576
6577 The resizing increments are only significant under Motif or Xt.
6578 """
6579 return __core.wxWindow_SetSizeHintsSz(*args, **kwargs)
6580
6581 def SetVirtualSizeHints(*args, **kwargs):
6582 """
6583 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
6584
6585 Allows specification of minimum and maximum virtual window sizes. If a
6586 pair of values is not set (or set to -1), the default values will be
6587 used. If this function is called, the user will not be able to size
6588 the virtual area of the window outside the given bounds.
6589 """
6590 return __core.wxWindow_SetVirtualSizeHints(*args, **kwargs)
6591
6592 def SetVirtualSizeHintsSz(*args, **kwargs):
6593 """
6594 SetVirtualSizeHintsSz(self, wxSize minSize, wxSize maxSize=wxDefaultSize)
6595
6596 Allows specification of minimum and maximum virtual window sizes. If a
6597 pair of values is not set (or set to -1), the default values will be
6598 used. If this function is called, the user will not be able to size
6599 the virtual area of the window outside the given bounds.
6600 """
6601 return __core.wxWindow_SetVirtualSizeHintsSz(*args, **kwargs)
6602
6603 def GetMaxSize(*args, **kwargs):
6604 """GetMaxSize(self) -> wxSize"""
6605 return __core.wxWindow_GetMaxSize(*args, **kwargs)
6606
6607 def GetMinSize(*args, **kwargs):
6608 """GetMinSize(self) -> wxSize"""
6609 return __core.wxWindow_GetMinSize(*args, **kwargs)
6610
6611 def SetMinSize(*args, **kwargs):
6612 """
6613 SetMinSize(self, wxSize minSize)
6614
6615 A more convenient method than `SetSizeHints` for setting just the
6616 min size.
6617 """
6618 return __core.wxWindow_SetMinSize(*args, **kwargs)
6619
6620 def SetMaxSize(*args, **kwargs):
6621 """
6622 SetMaxSize(self, wxSize maxSize)
6623
6624 A more convenient method than `SetSizeHints` for setting just the
6625 max size.
6626 """
6627 return __core.wxWindow_SetMaxSize(*args, **kwargs)
6628
6629 def GetMinWidth(*args, **kwargs):
6630 """GetMinWidth(self) -> int"""
6631 return __core.wxWindow_GetMinWidth(*args, **kwargs)
6632
6633 def GetMinHeight(*args, **kwargs):
6634 """GetMinHeight(self) -> int"""
6635 return __core.wxWindow_GetMinHeight(*args, **kwargs)
6636
6637 def GetMaxWidth(*args, **kwargs):
6638 """GetMaxWidth(self) -> int"""
6639 return __core.wxWindow_GetMaxWidth(*args, **kwargs)
6640
6641 def GetMaxHeight(*args, **kwargs):
6642 """GetMaxHeight(self) -> int"""
6643 return __core.wxWindow_GetMaxHeight(*args, **kwargs)
6644
6645 def SetVirtualSize(*args, **kwargs):
6646 """
6647 SetVirtualSize(self, wxSize size)
6648
6649 Set the the virtual size of a window in pixels. For most windows this
6650 is just the client area of the window, but for some like scrolled
6651 windows it is more or less independent of the screen window size.
6652 """
6653 return __core.wxWindow_SetVirtualSize(*args, **kwargs)
6654
6655 def SetVirtualSizeWH(*args, **kwargs):
6656 """
6657 SetVirtualSizeWH(self, int w, int h)
6658
6659 Set the the virtual size of a window in pixels. For most windows this
6660 is just the client area of the window, but for some like scrolled
6661 windows it is more or less independent of the screen window size.
6662 """
6663 return __core.wxWindow_SetVirtualSizeWH(*args, **kwargs)
6664
6665 def GetVirtualSize(*args, **kwargs):
6666 """
6667 GetVirtualSize(self) -> wxSize
6668
6669 Get the the virtual size of the window in pixels. For most windows
6670 this is just the client area of the window, but for some like scrolled
6671 windows it is more or less independent of the screen window size.
6672 """
6673 return __core.wxWindow_GetVirtualSize(*args, **kwargs)
6674
6675 def GetVirtualSizeTuple(*args, **kwargs):
6676 """
6677 GetVirtualSizeTuple() -> (width, height)
6678
6679 Get the the virtual size of the window in pixels. For most windows
6680 this is just the client area of the window, but for some like scrolled
6681 windows it is more or less independent of the screen window size.
6682 """
6683 return __core.wxWindow_GetVirtualSizeTuple(*args, **kwargs)
6684
6685 def GetBestVirtualSize(*args, **kwargs):
6686 """
6687 GetBestVirtualSize(self) -> wxSize
6688
6689 Return the largest of ClientSize and BestSize (as determined by a
6690 sizer, interior children, or other means)
6691 """
6692 return __core.wxWindow_GetBestVirtualSize(*args, **kwargs)
6693
6694 def Show(*args, **kwargs):
6695 """
6696 Show(self, bool show=True) -> bool
6697
6698 Shows or hides the window. You may need to call Raise for a top level
6699 window if you want to bring it to top, although this is not needed if
6700 Show is called immediately after the frame creation. Returns True if
6701 the window has been shown or hidden or False if nothing was done
6702 because it already was in the requested state.
6703 """
6704 return __core.wxWindow_Show(*args, **kwargs)
6705
6706 def Hide(*args, **kwargs):
6707 """
6708 Hide(self) -> bool
6709
6710 Equivalent to calling Show(False).
6711 """
6712 return __core.wxWindow_Hide(*args, **kwargs)
6713
6714 def Enable(*args, **kwargs):
6715 """
6716 Enable(self, bool enable=True) -> bool
6717
6718 Enable or disable the window for user input. Note that when a parent
6719 window is disabled, all of its children are disabled as well and they
6720 are reenabled again when the parent is. Returns true if the window
6721 has been enabled or disabled, false if nothing was done, i.e. if the
6722 window had already been in the specified state.
6723 """
6724 return __core.wxWindow_Enable(*args, **kwargs)
6725
6726 def Disable(*args, **kwargs):
6727 """
6728 Disable(self) -> bool
6729
6730 Disables the window, same as Enable(false).
6731 """
6732 return __core.wxWindow_Disable(*args, **kwargs)
6733
6734 def IsShown(*args, **kwargs):
6735 """
6736 IsShown(self) -> bool
6737
6738 Returns true if the window is shown, false if it has been hidden.
6739 """
6740 return __core.wxWindow_IsShown(*args, **kwargs)
6741
6742 def IsEnabled(*args, **kwargs):
6743 """
6744 IsEnabled(self) -> bool
6745
6746 Returns true if the window is enabled for input, false otherwise.
6747 """
6748 return __core.wxWindow_IsEnabled(*args, **kwargs)
6749
6750 def SetWindowStyleFlag(*args, **kwargs):
6751 """
6752 SetWindowStyleFlag(self, long style)
6753
6754 Sets the style of the window. Please note that some styles cannot be
6755 changed after the window creation and that Refresh() might need to be
6756 called after changing the others for the change to take place
6757 immediately.
6758 """
6759 return __core.wxWindow_SetWindowStyleFlag(*args, **kwargs)
6760
6761 def GetWindowStyleFlag(*args, **kwargs):
6762 """
6763 GetWindowStyleFlag(self) -> long
6764
6765 Gets the window style that was passed to the constructor or Create
6766 method.
6767 """
6768 return __core.wxWindow_GetWindowStyleFlag(*args, **kwargs)
6769
6770 SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag
6771 def HasFlag(*args, **kwargs):
6772 """
6773 HasFlag(self, int flag) -> bool
6774
6775 Test if the given style is set for this window.
6776 """
6777 return __core.wxWindow_HasFlag(*args, **kwargs)
6778
6779 def IsRetained(*args, **kwargs):
6780 """
6781 IsRetained(self) -> bool
6782
6783 Returns true if the window is retained, false otherwise. Retained
6784 windows are only available on X platforms.
6785 """
6786 return __core.wxWindow_IsRetained(*args, **kwargs)
6787
6788 def SetExtraStyle(*args, **kwargs):
6789 """
6790 SetExtraStyle(self, long exStyle)
6791
6792 Sets the extra style bits for the window. Extra styles are the less
6793 often used style bits which can't be set with the constructor or with
6794 SetWindowStyleFlag()
6795 """
6796 return __core.wxWindow_SetExtraStyle(*args, **kwargs)
6797
6798 def GetExtraStyle(*args, **kwargs):
6799 """
6800 GetExtraStyle(self) -> long
6801
6802 Returns the extra style bits for the window.
6803 """
6804 return __core.wxWindow_GetExtraStyle(*args, **kwargs)
6805
6806 def MakeModal(*args, **kwargs):
6807 """
6808 MakeModal(self, bool modal=True)
6809
6810 Disables all other windows in the application so that the user can
6811 only interact with this window. Passing False will reverse this
6812 effect.
6813 """
6814 return __core.wxWindow_MakeModal(*args, **kwargs)
6815
6816 def SetThemeEnabled(*args, **kwargs):
6817 """
6818 SetThemeEnabled(self, bool enableTheme)
6819
6820 This function tells a window if it should use the system's "theme"
6821 code to draw the windows' background instead if its own background
6822 drawing code. This will only have an effect on platforms that support
6823 the notion of themes in user defined windows. One such platform is
6824 GTK+ where windows can have (very colourful) backgrounds defined by a
6825 user's selected theme.
6826
6827 Dialogs, notebook pages and the status bar have this flag set to true
6828 by default so that the default look and feel is simulated best.
6829 """
6830 return __core.wxWindow_SetThemeEnabled(*args, **kwargs)
6831
6832 def GetThemeEnabled(*args, **kwargs):
6833 """
6834 GetThemeEnabled(self) -> bool
6835
6836 Return the themeEnabled flag.
6837 """
6838 return __core.wxWindow_GetThemeEnabled(*args, **kwargs)
6839
6840 def SetFocus(*args, **kwargs):
6841 """
6842 SetFocus(self)
6843
6844 Set's the focus to this window, allowing it to receive keyboard input.
6845 """
6846 return __core.wxWindow_SetFocus(*args, **kwargs)
6847
6848 def SetFocusFromKbd(*args, **kwargs):
6849 """
6850 SetFocusFromKbd(self)
6851
6852 Set focus to this window as the result of a keyboard action. Normally
6853 only called internally.
6854 """
6855 return __core.wxWindow_SetFocusFromKbd(*args, **kwargs)
6856
6857 def FindFocus(*args, **kwargs):
6858 """
6859 FindFocus() -> wxWindow
6860
6861 Returns the window or control that currently has the keyboard focus,
6862 or None.
6863 """
6864 return __core.wxWindow_FindFocus(*args, **kwargs)
6865
6866 FindFocus = staticmethod(FindFocus)
6867 def AcceptsFocus(*args, **kwargs):
6868 """
6869 AcceptsFocus(self) -> bool
6870
6871 Can this window have focus?
6872 """
6873 return __core.wxWindow_AcceptsFocus(*args, **kwargs)
6874
6875 def AcceptsFocusFromKeyboard(*args, **kwargs):
6876 """
6877 AcceptsFocusFromKeyboard(self) -> bool
6878
6879 Can this window be given focus by keyboard navigation? if not, the
6880 only way to give it focus (provided it accepts it at all) is to click
6881 it.
6882 """
6883 return __core.wxWindow_AcceptsFocusFromKeyboard(*args, **kwargs)
6884
6885 def GetDefaultItem(*args, **kwargs):
6886 """
6887 GetDefaultItem(self) -> wxWindow
6888
6889 Get the default child of this parent, i.e. the one which is activated
6890 by pressing <Enter> such as the OK button on a wx.Dialog.
6891 """
6892 return __core.wxWindow_GetDefaultItem(*args, **kwargs)
6893
6894 def SetDefaultItem(*args, **kwargs):
6895 """
6896 SetDefaultItem(self, wxWindow child) -> wxWindow
6897
6898 Set this child as default, return the old default.
6899 """
6900 return __core.wxWindow_SetDefaultItem(*args, **kwargs)
6901
6902 def SetTmpDefaultItem(*args, **kwargs):
6903 """
6904 SetTmpDefaultItem(self, wxWindow win)
6905
6906 Set this child as temporary default
6907 """
6908 return __core.wxWindow_SetTmpDefaultItem(*args, **kwargs)
6909
6910 def Navigate(*args, **kwargs):
6911 """
6912 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
6913
6914 Does keyboard navigation from this window to another, by sending a
6915 `wx.NavigationKeyEvent`.
6916 """
6917 return __core.wxWindow_Navigate(*args, **kwargs)
6918
6919 def MoveAfterInTabOrder(*args, **kwargs):
6920 """
6921 MoveAfterInTabOrder(self, wxWindow win)
6922
6923 Moves this window in the tab navigation order after the specified
6924 sibling window. This means that when the user presses the TAB key on
6925 that other window, the focus switches to this window.
6926
6927 The default tab order is the same as creation order. This function
6928 and `MoveBeforeInTabOrder` allow to change it after creating all the
6929 windows.
6930
6931 """
6932 return __core.wxWindow_MoveAfterInTabOrder(*args, **kwargs)
6933
6934 def MoveBeforeInTabOrder(*args, **kwargs):
6935 """
6936 MoveBeforeInTabOrder(self, wxWindow win)
6937
6938 Same as `MoveAfterInTabOrder` except that it inserts this window just
6939 before win instead of putting it right after it.
6940 """
6941 return __core.wxWindow_MoveBeforeInTabOrder(*args, **kwargs)
6942
6943 def GetChildren(*args, **kwargs):
6944 """
6945 GetChildren(self) -> PyObject
6946
6947 Returns a list of the window's children. NOTE: Currently this is a
6948 copy of the child window list maintained by the window, so the return
6949 value of this function is only valid as long as the window's children
6950 do not change.
6951 """
6952 return __core.wxWindow_GetChildren(*args, **kwargs)
6953
6954 def GetParent(*args, **kwargs):
6955 """
6956 GetParent(self) -> wxWindow
6957
6958 Returns the parent window of this window, or None if there isn't one.
6959 """
6960 return __core.wxWindow_GetParent(*args, **kwargs)
6961
6962 def GetGrandParent(*args, **kwargs):
6963 """
6964 GetGrandParent(self) -> wxWindow
6965
6966 Returns the parent of the parent of this window, or None if there
6967 isn't one.
6968 """
6969 return __core.wxWindow_GetGrandParent(*args, **kwargs)
6970
6971 def IsTopLevel(*args, **kwargs):
6972 """
6973 IsTopLevel(self) -> bool
6974
6975 Returns true if the given window is a top-level one. Currently all
6976 frames and dialogs are always considered to be top-level windows (even
6977 if they have a parent window).
6978 """
6979 return __core.wxWindow_IsTopLevel(*args, **kwargs)
6980
6981 def Reparent(*args, **kwargs):
6982 """
6983 Reparent(self, wxWindow newParent) -> bool
6984
6985 Reparents the window, i.e the window will be removed from its current
6986 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6987 re-inserted into another. Available on Windows and GTK. Returns True
6988 if the parent was changed, False otherwise (error or newParent ==
6989 oldParent)
6990 """
6991 return __core.wxWindow_Reparent(*args, **kwargs)
6992
6993 def AddChild(*args, **kwargs):
6994 """
6995 AddChild(self, wxWindow child)
6996
6997 Adds a child window. This is called automatically by window creation
6998 functions so should not be required by the application programmer.
6999 """
7000 return __core.wxWindow_AddChild(*args, **kwargs)
7001
7002 def RemoveChild(*args, **kwargs):
7003 """
7004 RemoveChild(self, wxWindow child)
7005
7006 Removes a child window. This is called automatically by window
7007 deletion functions so should not be required by the application
7008 programmer.
7009 """
7010 return __core.wxWindow_RemoveChild(*args, **kwargs)
7011
7012 def FindWindowById(*args, **kwargs):
7013 """
7014 FindWindowById(self, long winid) -> wxWindow
7015
7016 Find a chld of this window by window ID
7017 """
7018 return __core.wxWindow_FindWindowById(*args, **kwargs)
7019
7020 def FindWindowByName(*args, **kwargs):
7021 """
7022 FindWindowByName(self, wxString name) -> wxWindow
7023
7024 Find a child of this window by name
7025 """
7026 return __core.wxWindow_FindWindowByName(*args, **kwargs)
7027
7028 def GetEventHandler(*args, **kwargs):
7029 """
7030 GetEventHandler(self) -> wxEvtHandler
7031
7032 Returns the event handler for this window. By default, the window is
7033 its own event handler.
7034 """
7035 return __core.wxWindow_GetEventHandler(*args, **kwargs)
7036
7037 def SetEventHandler(*args, **kwargs):
7038 """
7039 SetEventHandler(self, wxEvtHandler handler)
7040
7041 Sets the event handler for this window. An event handler is an object
7042 that is capable of processing the events sent to a window. By default,
7043 the window is its own event handler, but an application may wish to
7044 substitute another, for example to allow central implementation of
7045 event-handling for a variety of different window classes.
7046
7047 It is usually better to use `wx.Window.PushEventHandler` since this sets
7048 up a chain of event handlers, where an event not handled by one event
7049 handler is handed to the next one in the chain.
7050 """
7051 return __core.wxWindow_SetEventHandler(*args, **kwargs)
7052
7053 def PushEventHandler(*args, **kwargs):
7054 """
7055 PushEventHandler(self, wxEvtHandler handler)
7056
7057 Pushes this event handler onto the event handler stack for the window.
7058 An event handler is an object that is capable of processing the events
7059 sent to a window. By default, the window is its own event handler, but
7060 an application may wish to substitute another, for example to allow
7061 central implementation of event-handling for a variety of different
7062 window classes.
7063
7064 wx.Window.PushEventHandler allows an application to set up a chain of
7065 event handlers, where an event not handled by one event handler is
7066 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
7067 remove the event handler.
7068 """
7069 return __core.wxWindow_PushEventHandler(*args, **kwargs)
7070
7071 def PopEventHandler(*args, **kwargs):
7072 """
7073 PopEventHandler(self, bool deleteHandler=False) -> wxEvtHandler
7074
7075 Removes and returns the top-most event handler on the event handler
7076 stack. If deleteHandler is True then the wx.EvtHandler object will be
7077 destroyed after it is popped.
7078 """
7079 return __core.wxWindow_PopEventHandler(*args, **kwargs)
7080
7081 def RemoveEventHandler(*args, **kwargs):
7082 """
7083 RemoveEventHandler(self, wxEvtHandler handler) -> bool
7084
7085 Find the given handler in the event handler chain and remove (but not
7086 delete) it from the event handler chain, return True if it was found
7087 and False otherwise (this also results in an assert failure so this
7088 function should only be called when the handler is supposed to be
7089 there.)
7090 """
7091 return __core.wxWindow_RemoveEventHandler(*args, **kwargs)
7092
7093 def SetValidator(*args, **kwargs):
7094 """
7095 SetValidator(self, wxValidator validator)
7096
7097 Deletes the current validator (if any) and sets the window validator,
7098 having called wx.Validator.Clone to create a new validator of this
7099 type.
7100 """
7101 return __core.wxWindow_SetValidator(*args, **kwargs)
7102
7103 def GetValidator(*args, **kwargs):
7104 """
7105 GetValidator(self) -> wxValidator
7106
7107 Returns a pointer to the current validator for the window, or None if
7108 there is none.
7109 """
7110 return __core.wxWindow_GetValidator(*args, **kwargs)
7111
7112 def Validate(*args, **kwargs):
7113 """
7114 Validate(self) -> bool
7115
7116 Validates the current values of the child controls using their
7117 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
7118 style flag set, the method will also call Validate() of all child
7119 windows. Returns false if any of the validations failed.
7120 """
7121 return __core.wxWindow_Validate(*args, **kwargs)
7122
7123 def TransferDataToWindow(*args, **kwargs):
7124 """
7125 TransferDataToWindow(self) -> bool
7126
7127 Transfers values to child controls from data areas specified by their
7128 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
7129 style flag set, the method will also call TransferDataToWindow() of
7130 all child windows.
7131 """
7132 return __core.wxWindow_TransferDataToWindow(*args, **kwargs)
7133
7134 def TransferDataFromWindow(*args, **kwargs):
7135 """
7136 TransferDataFromWindow(self) -> bool
7137
7138 Transfers values from child controls to data areas specified by their
7139 validators. Returns false if a transfer failed. If the window has
7140 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
7141 also call TransferDataFromWindow() of all child windows.
7142 """
7143 return __core.wxWindow_TransferDataFromWindow(*args, **kwargs)
7144
7145 def InitDialog(*args, **kwargs):
7146 """
7147 InitDialog(self)
7148
7149 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
7150 to the dialog via validators.
7151 """
7152 return __core.wxWindow_InitDialog(*args, **kwargs)
7153
7154 def SetAcceleratorTable(*args, **kwargs):
7155 """
7156 SetAcceleratorTable(self, wxAcceleratorTable accel)
7157
7158 Sets the accelerator table for this window.
7159 """
7160 return __core.wxWindow_SetAcceleratorTable(*args, **kwargs)
7161
7162 def GetAcceleratorTable(*args, **kwargs):
7163 """
7164 GetAcceleratorTable(self) -> wxAcceleratorTable
7165
7166 Gets the accelerator table for this window.
7167 """
7168 return __core.wxWindow_GetAcceleratorTable(*args, **kwargs)
7169
7170 def RegisterHotKey(*args, **kwargs):
7171 """
7172 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
7173
7174 Registers a system wide hotkey. Every time the user presses the hotkey
7175 registered here, this window will receive a hotkey event. It will
7176 receive the event even if the application is in the background and
7177 does not have the input focus because the user is working with some
7178 other application. To bind an event handler function to this hotkey
7179 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
7180 hotkey was registered successfully.
7181 """
7182 return __core.wxWindow_RegisterHotKey(*args, **kwargs)
7183
7184 def UnregisterHotKey(*args, **kwargs):
7185 """
7186 UnregisterHotKey(self, int hotkeyId) -> bool
7187
7188 Unregisters a system wide hotkey.
7189 """
7190 return __core.wxWindow_UnregisterHotKey(*args, **kwargs)
7191
7192 def ConvertDialogPointToPixels(*args, **kwargs):
7193 """
7194 ConvertDialogPointToPixels(self, wxPoint pt) -> wxPoint
7195
7196 Converts a point or size from dialog units to pixels. Dialog units
7197 are used for maintaining a dialog's proportions even if the font
7198 changes. For the x dimension, the dialog units are multiplied by the
7199 average character width and then divided by 4. For the y dimension,
7200 the dialog units are multiplied by the average character height and
7201 then divided by 8.
7202 """
7203 return __core.wxWindow_ConvertDialogPointToPixels(*args, **kwargs)
7204
7205 def ConvertDialogSizeToPixels(*args, **kwargs):
7206 """
7207 ConvertDialogSizeToPixels(self, wxSize sz) -> wxSize
7208
7209 Converts a point or size from dialog units to pixels. Dialog units
7210 are used for maintaining a dialog's proportions even if the font
7211 changes. For the x dimension, the dialog units are multiplied by the
7212 average character width and then divided by 4. For the y dimension,
7213 the dialog units are multiplied by the average character height and
7214 then divided by 8.
7215 """
7216 return __core.wxWindow_ConvertDialogSizeToPixels(*args, **kwargs)
7217
7218 def DLG_PNT(*args, **kwargs):
7219 """
7220 DLG_PNT(self, wxPoint pt) -> wxPoint
7221
7222 Converts a point or size from dialog units to pixels. Dialog units
7223 are used for maintaining a dialog's proportions even if the font
7224 changes. For the x dimension, the dialog units are multiplied by the
7225 average character width and then divided by 4. For the y dimension,
7226 the dialog units are multiplied by the average character height and
7227 then divided by 8.
7228 """
7229 return __core.wxWindow_DLG_PNT(*args, **kwargs)
7230
7231 def DLG_SZE(*args, **kwargs):
7232 """
7233 DLG_SZE(self, wxSize sz) -> wxSize
7234
7235 Converts a point or size from dialog units to pixels. Dialog units
7236 are used for maintaining a dialog's proportions even if the font
7237 changes. For the x dimension, the dialog units are multiplied by the
7238 average character width and then divided by 4. For the y dimension,
7239 the dialog units are multiplied by the average character height and
7240 then divided by 8.
7241 """
7242 return __core.wxWindow_DLG_SZE(*args, **kwargs)
7243
7244 def ConvertPixelPointToDialog(*args, **kwargs):
7245 """ConvertPixelPointToDialog(self, wxPoint pt) -> wxPoint"""
7246 return __core.wxWindow_ConvertPixelPointToDialog(*args, **kwargs)
7247
7248 def ConvertPixelSizeToDialog(*args, **kwargs):
7249 """ConvertPixelSizeToDialog(self, wxSize sz) -> wxSize"""
7250 return __core.wxWindow_ConvertPixelSizeToDialog(*args, **kwargs)
7251
7252 def WarpPointer(*args, **kwargs):
7253 """
7254 WarpPointer(self, int x, int y)
7255
7256 Moves the pointer to the given position on the window.
7257
7258 NOTE: This function is not supported under Mac because Apple Human
7259 Interface Guidelines forbid moving the mouse cursor programmatically.
7260 """
7261 return __core.wxWindow_WarpPointer(*args, **kwargs)
7262
7263 def CaptureMouse(*args, **kwargs):
7264 """
7265 CaptureMouse(self)
7266
7267 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
7268 release the capture.
7269
7270 Note that wxWindows maintains the stack of windows having captured the
7271 mouse and when the mouse is released the capture returns to the window
7272 which had had captured it previously and it is only really released if
7273 there were no previous window. In particular, this means that you must
7274 release the mouse as many times as you capture it.
7275 """
7276 return __core.wxWindow_CaptureMouse(*args, **kwargs)
7277
7278 def ReleaseMouse(*args, **kwargs):
7279 """
7280 ReleaseMouse(self)
7281
7282 Releases mouse input captured with wx.Window.CaptureMouse.
7283 """
7284 return __core.wxWindow_ReleaseMouse(*args, **kwargs)
7285
7286 def GetCapture(*args, **kwargs):
7287 """
7288 GetCapture() -> wxWindow
7289
7290 Returns the window which currently captures the mouse or None
7291 """
7292 return __core.wxWindow_GetCapture(*args, **kwargs)
7293
7294 GetCapture = staticmethod(GetCapture)
7295 def HasCapture(*args, **kwargs):
7296 """
7297 HasCapture(self) -> bool
7298
7299 Returns true if this window has the current mouse capture.
7300 """
7301 return __core.wxWindow_HasCapture(*args, **kwargs)
7302
7303 def Refresh(*args, **kwargs):
7304 """
7305 Refresh(self, bool eraseBackground=True, wxRect rect=None)
7306
7307 Mark the specified rectangle (or the whole window) as "dirty" so it
7308 will be repainted. Causes an EVT_PAINT event to be generated and sent
7309 to the window.
7310 """
7311 return __core.wxWindow_Refresh(*args, **kwargs)
7312
7313 def RefreshRect(*args, **kwargs):
7314 """
7315 RefreshRect(self, wxRect rect, bool eraseBackground=True)
7316
7317 Redraws the contents of the given rectangle: the area inside it will
7318 be repainted. This is the same as Refresh but has a nicer syntax.
7319 """
7320 return __core.wxWindow_RefreshRect(*args, **kwargs)
7321
7322 def Update(*args, **kwargs):
7323 """
7324 Update(self)
7325
7326 Calling this method immediately repaints the invalidated area of the
7327 window instead of waiting for the EVT_PAINT event to happen, (normally
7328 this would usually only happen when the flow of control returns to the
7329 event loop.) Notice that this function doesn't refresh the window and
7330 does nothing if the window has been already repainted. Use Refresh
7331 first if you want to immediately redraw the window (or some portion of
7332 it) unconditionally.
7333 """
7334 return __core.wxWindow_Update(*args, **kwargs)
7335
7336 def ClearBackground(*args, **kwargs):
7337 """
7338 ClearBackground(self)
7339
7340 Clears the window by filling it with the current background
7341 colour. Does not cause an erase background event to be generated.
7342 """
7343 return __core.wxWindow_ClearBackground(*args, **kwargs)
7344
7345 def Freeze(*args, **kwargs):
7346 """
7347 Freeze(self)
7348
7349 Freezes the window or, in other words, prevents any updates from
7350 taking place on screen, the window is not redrawn at all. Thaw must be
7351 called to reenable window redrawing. Calls to Freeze/Thaw may be
7352 nested, with the actual Thaw being delayed until all the nesting has
7353 been undone.
7354
7355 This method is useful for visual appearance optimization (for example,
7356 it is a good idea to use it before inserting large amount of text into
7357 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
7358 for all controls so it is mostly just a hint to wxWindows and not a
7359 mandatory directive.
7360 """
7361 return __core.wxWindow_Freeze(*args, **kwargs)
7362
7363 def Thaw(*args, **kwargs):
7364 """
7365 Thaw(self)
7366
7367 Reenables window updating after a previous call to Freeze. Calls to
7368 Freeze/Thaw may be nested, so Thaw must be called the same number of
7369 times that Freeze was before the window will be updated.
7370 """
7371 return __core.wxWindow_Thaw(*args, **kwargs)
7372
7373 def PrepareDC(*args, **kwargs):
7374 """
7375 PrepareDC(self, wxDC dc)
7376
7377 Call this function to prepare the device context for drawing a
7378 scrolled image. It sets the device origin according to the current
7379 scroll position.
7380 """
7381 return __core.wxWindow_PrepareDC(*args, **kwargs)
7382
7383 def GetUpdateRegion(*args, **kwargs):
7384 """
7385 GetUpdateRegion(self) -> wxRegion
7386
7387 Returns the region specifying which parts of the window have been
7388 damaged. Should only be called within an EVT_PAINT handler.
7389 """
7390 return __core.wxWindow_GetUpdateRegion(*args, **kwargs)
7391
7392 def GetUpdateClientRect(*args, **kwargs):
7393 """
7394 GetUpdateClientRect(self) -> wxRect
7395
7396 Get the update rectangle region bounding box in client coords.
7397 """
7398 return __core.wxWindow_GetUpdateClientRect(*args, **kwargs)
7399
7400 def IsExposed(*args, **kwargs):
7401 """
7402 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
7403
7404 Returns true if the given point or rectangle area has been exposed
7405 since the last repaint. Call this in an paint event handler to
7406 optimize redrawing by only redrawing those areas, which have been
7407 exposed.
7408 """
7409 return __core.wxWindow_IsExposed(*args, **kwargs)
7410
7411 def IsExposedPoint(*args, **kwargs):
7412 """
7413 IsExposedPoint(self, wxPoint pt) -> bool
7414
7415 Returns true if the given point or rectangle area has been exposed
7416 since the last repaint. Call this in an paint event handler to
7417 optimize redrawing by only redrawing those areas, which have been
7418 exposed.
7419 """
7420 return __core.wxWindow_IsExposedPoint(*args, **kwargs)
7421
7422 def IsExposedRect(*args, **kwargs):
7423 """
7424 IsExposedRect(self, wxRect rect) -> bool
7425
7426 Returns true if the given point or rectangle area has been exposed
7427 since the last repaint. Call this in an paint event handler to
7428 optimize redrawing by only redrawing those areas, which have been
7429 exposed.
7430 """
7431 return __core.wxWindow_IsExposedRect(*args, **kwargs)
7432
7433 def GetDefaultAttributes(*args, **kwargs):
7434 """
7435 GetDefaultAttributes(self) -> wxVisualAttributes
7436
7437 Get the default attributes for an instance of this class. This is
7438 useful if you want to use the same font or colour in your own control
7439 as in a standard control -- which is a much better idea than hard
7440 coding specific colours or fonts which might look completely out of
7441 place on the user's system, especially if it uses themes.
7442 """
7443 return __core.wxWindow_GetDefaultAttributes(*args, **kwargs)
7444
7445 def GetClassDefaultAttributes(*args, **kwargs):
7446 """
7447 GetClassDefaultAttributes(int variant=wxWINDOW_VARIANT_NORMAL) -> wxVisualAttributes
7448
7449 Get the default attributes for this class. This is useful if you want
7450 to use the same font or colour in your own control as in a standard
7451 control -- which is a much better idea than hard coding specific
7452 colours or fonts which might look completely out of place on the
7453 user's system, especially if it uses themes.
7454
7455 The variant parameter is only relevant under Mac currently and is
7456 ignore under other platforms. Under Mac, it will change the size of
7457 the returned font. See `wx.Window.SetWindowVariant` for more about
7458 this.
7459 """
7460 return __core.wxWindow_GetClassDefaultAttributes(*args, **kwargs)
7461
7462 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
7463 def SetBackgroundColour(*args, **kwargs):
7464 """
7465 SetBackgroundColour(self, wxColour colour) -> bool
7466
7467 Sets the background colour of the window. Returns True if the colour
7468 was changed. The background colour is usually painted by the default
7469 EVT_ERASE_BACKGROUND event handler function under Windows and
7470 automatically under GTK. Using `wx.NullColour` will reset the window
7471 to the default background colour.
7472
7473 Note that setting the background colour may not cause an immediate
7474 refresh, so you may wish to call `ClearBackground` or `Refresh` after
7475 calling this function.
7476
7477 Using this function will disable attempts to use themes for this
7478 window, if the system supports them. Use with care since usually the
7479 themes represent the appearance chosen by the user to be used for all
7480 applications on the system.
7481 """
7482 return __core.wxWindow_SetBackgroundColour(*args, **kwargs)
7483
7484 def SetOwnBackgroundColour(*args, **kwargs):
7485 """SetOwnBackgroundColour(self, wxColour colour)"""
7486 return __core.wxWindow_SetOwnBackgroundColour(*args, **kwargs)
7487
7488 def SetForegroundColour(*args, **kwargs):
7489 """
7490 SetForegroundColour(self, wxColour colour) -> bool
7491
7492 Sets the foreground colour of the window. Returns True is the colour
7493 was changed. The interpretation of foreground colour is dependent on
7494 the window class; it may be the text colour or other colour, or it may
7495 not be used at all.
7496 """
7497 return __core.wxWindow_SetForegroundColour(*args, **kwargs)
7498
7499 def SetOwnForegroundColour(*args, **kwargs):
7500 """SetOwnForegroundColour(self, wxColour colour)"""
7501 return __core.wxWindow_SetOwnForegroundColour(*args, **kwargs)
7502
7503 def GetBackgroundColour(*args, **kwargs):
7504 """
7505 GetBackgroundColour(self) -> wxColour
7506
7507 Returns the background colour of the window.
7508 """
7509 return __core.wxWindow_GetBackgroundColour(*args, **kwargs)
7510
7511 def GetForegroundColour(*args, **kwargs):
7512 """
7513 GetForegroundColour(self) -> wxColour
7514
7515 Returns the foreground colour of the window. The interpretation of
7516 foreground colour is dependent on the window class; it may be the text
7517 colour or other colour, or it may not be used at all.
7518 """
7519 return __core.wxWindow_GetForegroundColour(*args, **kwargs)
7520
7521 def InheritsBackgroundColour(*args, **kwargs):
7522 """InheritsBackgroundColour(self) -> bool"""
7523 return __core.wxWindow_InheritsBackgroundColour(*args, **kwargs)
7524
7525 def UseBgCol(*args, **kwargs):
7526 """UseBgCol(self) -> bool"""
7527 return __core.wxWindow_UseBgCol(*args, **kwargs)
7528
7529 def SetBackgroundStyle(*args, **kwargs):
7530 """
7531 SetBackgroundStyle(self, int style) -> bool
7532
7533 Returns the background style of the window. The background style
7534 indicates how the background of the window is drawn.
7535
7536 ====================== ========================================
7537 wx.BG_STYLE_SYSTEM The background colour or pattern should
7538 be determined by the system
7539 wx.BG_STYLE_COLOUR The background should be a solid colour
7540 wx.BG_STYLE_CUSTOM The background will be implemented by the
7541 application.
7542 ====================== ========================================
7543
7544 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
7545 a custom background, such as a tiled bitmap. Currently the style has
7546 no effect on other platforms.
7547
7548 :see: `GetBackgroundStyle`, `SetBackgroundColour`
7549 """
7550 return __core.wxWindow_SetBackgroundStyle(*args, **kwargs)
7551
7552 def GetBackgroundStyle(*args, **kwargs):
7553 """
7554 GetBackgroundStyle(self) -> int
7555
7556 Returns the background style of the window.
7557
7558 :see: `SetBackgroundStyle`
7559 """
7560 return __core.wxWindow_GetBackgroundStyle(*args, **kwargs)
7561
7562 def HasTransparentBackground(*args, **kwargs):
7563 """
7564 HasTransparentBackground(self) -> bool
7565
7566 Returns True if this window's background is transparent (as, for
7567 example, for `wx.StaticText`) and should show the parent window's
7568 background.
7569
7570 This method is mostly used internally by the library itself and you
7571 normally shouldn't have to call it. You may, however, have to override
7572 it in your custom control classes to ensure that background is painted
7573 correctly.
7574 """
7575 return __core.wxWindow_HasTransparentBackground(*args, **kwargs)
7576
7577 def SetCursor(*args, **kwargs):
7578 """
7579 SetCursor(self, wxCursor cursor) -> bool
7580
7581 Sets the window's cursor. Notice that the window cursor also sets it
7582 for the children of the window implicitly.
7583
7584 The cursor may be wx.NullCursor in which case the window cursor will
7585 be reset back to default.
7586 """
7587 return __core.wxWindow_SetCursor(*args, **kwargs)
7588
7589 def GetCursor(*args, **kwargs):
7590 """
7591 GetCursor(self) -> wxCursor
7592
7593 Return the cursor associated with this window.
7594 """
7595 return __core.wxWindow_GetCursor(*args, **kwargs)
7596
7597 def SetFont(*args, **kwargs):
7598 """
7599 SetFont(self, wxFont font) -> bool
7600
7601 Sets the font for this window.
7602 """
7603 return __core.wxWindow_SetFont(*args, **kwargs)
7604
7605 def SetOwnFont(*args, **kwargs):
7606 """SetOwnFont(self, wxFont font)"""
7607 return __core.wxWindow_SetOwnFont(*args, **kwargs)
7608
7609 def GetFont(*args, **kwargs):
7610 """
7611 GetFont(self) -> wxFont
7612
7613 Returns the default font used for this window.
7614 """
7615 return __core.wxWindow_GetFont(*args, **kwargs)
7616
7617 def SetCaret(*args, **kwargs):
7618 """
7619 SetCaret(self, wxCaret caret)
7620
7621 Sets the caret associated with the window.
7622 """
7623 return __core.wxWindow_SetCaret(*args, **kwargs)
7624
7625 def GetCaret(*args, **kwargs):
7626 """
7627 GetCaret(self) -> wxCaret
7628
7629 Returns the caret associated with the window.
7630 """
7631 return __core.wxWindow_GetCaret(*args, **kwargs)
7632
7633 def GetCharHeight(*args, **kwargs):
7634 """
7635 GetCharHeight(self) -> int
7636
7637 Get the (average) character size for the current font.
7638 """
7639 return __core.wxWindow_GetCharHeight(*args, **kwargs)
7640
7641 def GetCharWidth(*args, **kwargs):
7642 """
7643 GetCharWidth(self) -> int
7644
7645 Get the (average) character size for the current font.
7646 """
7647 return __core.wxWindow_GetCharWidth(*args, **kwargs)
7648
7649 def GetTextExtent(*args, **kwargs):
7650 """
7651 GetTextExtent(String string) -> (width, height)
7652
7653 Get the width and height of the text using the current font.
7654 """
7655 return __core.wxWindow_GetTextExtent(*args, **kwargs)
7656
7657 def GetFullTextExtent(*args, **kwargs):
7658 """
7659 GetFullTextExtent(String string, Font font=None) ->
7660 (width, height, descent, externalLeading)
7661
7662 Get the width, height, decent and leading of the text using the
7663 current or specified font.
7664 """
7665 return __core.wxWindow_GetFullTextExtent(*args, **kwargs)
7666
7667 def ClientToScreenXY(*args, **kwargs):
7668 """
7669 ClientToScreenXY(int x, int y) -> (x,y)
7670
7671 Converts to screen coordinates from coordinates relative to this window.
7672 """
7673 return __core.wxWindow_ClientToScreenXY(*args, **kwargs)
7674
7675 def ScreenToClientXY(*args, **kwargs):
7676 """
7677 ScreenToClientXY(int x, int y) -> (x,y)
7678
7679 Converts from screen to client window coordinates.
7680 """
7681 return __core.wxWindow_ScreenToClientXY(*args, **kwargs)
7682
7683 def ClientToScreen(*args, **kwargs):
7684 """
7685 ClientToScreen(self, wxPoint pt) -> wxPoint
7686
7687 Converts to screen coordinates from coordinates relative to this window.
7688 """
7689 return __core.wxWindow_ClientToScreen(*args, **kwargs)
7690
7691 def ScreenToClient(*args, **kwargs):
7692 """
7693 ScreenToClient(self, wxPoint pt) -> wxPoint
7694
7695 Converts from screen to client window coordinates.
7696 """
7697 return __core.wxWindow_ScreenToClient(*args, **kwargs)
7698
7699 def HitTestXY(*args, **kwargs):
7700 """
7701 HitTestXY(self, int x, int y) -> int
7702
7703 Test where the given (in client coords) point lies
7704 """
7705 return __core.wxWindow_HitTestXY(*args, **kwargs)
7706
7707 def HitTest(*args, **kwargs):
7708 """
7709 HitTest(self, wxPoint pt) -> int
7710
7711 Test where the given (in client coords) point lies
7712 """
7713 return __core.wxWindow_HitTest(*args, **kwargs)
7714
7715 def GetBorder(*args):
7716 """
7717 GetBorder(self, long flags) -> int
7718 GetBorder(self) -> int
7719
7720 Get border for the flags of this window
7721 """
7722 return __core.wxWindow_GetBorder(*args)
7723
7724 def UpdateWindowUI(*args, **kwargs):
7725 """
7726 UpdateWindowUI(self, long flags=wxUPDATE_UI_NONE)
7727
7728 This function sends EVT_UPDATE_UI events to the window. The particular
7729 implementation depends on the window; for example a wx.ToolBar will
7730 send an update UI event for each toolbar button, and a wx.Frame will
7731 send an update UI event for each menubar menu item. You can call this
7732 function from your application to ensure that your UI is up-to-date at
7733 a particular point in time (as far as your EVT_UPDATE_UI handlers are
7734 concerned). This may be necessary if you have called
7735 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
7736 limit the overhead that wxWindows incurs by sending update UI events
7737 in idle time.
7738 """
7739 return __core.wxWindow_UpdateWindowUI(*args, **kwargs)
7740
7741 def PopupMenuXY(*args, **kwargs):
7742 """
7743 PopupMenuXY(self, wxMenu menu, int x=-1, int y=-1) -> bool
7744
7745 Pops up the given menu at the specified coordinates, relative to this window,
7746 and returns control when the user has dismissed the menu. If a menu item is
7747 selected, the corresponding menu event is generated and will be processed as
7748 usual. If the default position is given then the current position of the
7749 mouse cursor will be used.
7750 """
7751 return __core.wxWindow_PopupMenuXY(*args, **kwargs)
7752
7753 def PopupMenu(*args, **kwargs):
7754 """
7755 PopupMenu(self, wxMenu menu, wxPoint pos=wxDefaultPosition) -> bool
7756
7757 Pops up the given menu at the specified coordinates, relative to this window,
7758 and returns control when the user has dismissed the menu. If a menu item is
7759 selected, the corresponding menu event is generated and will be processed as
7760 usual. If the default position is given then the current position of the
7761 mouse cursor will be used.
7762 """
7763 return __core.wxWindow_PopupMenu(*args, **kwargs)
7764
7765 def GetHandle(*args, **kwargs):
7766 """
7767 GetHandle(self) -> long
7768
7769 Returns the platform-specific handle (as a long integer) of the
7770 physical window. Currently on wxMac it returns the handle of the
7771 toplevel parent of the window.
7772 """
7773 return __core.wxWindow_GetHandle(*args, **kwargs)
7774
7775 def AssociateHandle(*args, **kwargs):
7776 """
7777 AssociateHandle(self, long handle)
7778
7779 Associate the window with a new native handle
7780 """
7781 return __core.wxWindow_AssociateHandle(*args, **kwargs)
7782
7783 def DissociateHandle(*args, **kwargs):
7784 """
7785 DissociateHandle(self)
7786
7787 Dissociate the current native handle from the window
7788 """
7789 return __core.wxWindow_DissociateHandle(*args, **kwargs)
7790
7791 def HasScrollbar(*args, **kwargs):
7792 """
7793 HasScrollbar(self, int orient) -> bool
7794
7795 Does the window have the scrollbar for this orientation?
7796 """
7797 return __core.wxWindow_HasScrollbar(*args, **kwargs)
7798
7799 def SetScrollbar(*args, **kwargs):
7800 """
7801 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
7802 bool refresh=True)
7803
7804 Sets the scrollbar properties of a built-in scrollbar.
7805 """
7806 return __core.wxWindow_SetScrollbar(*args, **kwargs)
7807
7808 def SetScrollPos(*args, **kwargs):
7809 """
7810 SetScrollPos(self, int orientation, int pos, bool refresh=True)
7811
7812 Sets the position of one of the built-in scrollbars.
7813 """
7814 return __core.wxWindow_SetScrollPos(*args, **kwargs)
7815
7816 def GetScrollPos(*args, **kwargs):
7817 """
7818 GetScrollPos(self, int orientation) -> int
7819
7820 Returns the built-in scrollbar position.
7821 """
7822 return __core.wxWindow_GetScrollPos(*args, **kwargs)
7823
7824 def GetScrollThumb(*args, **kwargs):
7825 """
7826 GetScrollThumb(self, int orientation) -> int
7827
7828 Returns the built-in scrollbar thumb size.
7829 """
7830 return __core.wxWindow_GetScrollThumb(*args, **kwargs)
7831
7832 def GetScrollRange(*args, **kwargs):
7833 """
7834 GetScrollRange(self, int orientation) -> int
7835
7836 Returns the built-in scrollbar range.
7837 """
7838 return __core.wxWindow_GetScrollRange(*args, **kwargs)
7839
7840 def ScrollWindow(*args, **kwargs):
7841 """
7842 ScrollWindow(self, int dx, int dy, wxRect rect=None)
7843
7844 Physically scrolls the pixels in the window and move child windows
7845 accordingly. Use this function to optimise your scrolling
7846 implementations, to minimise the area that must be redrawn. Note that
7847 it is rarely required to call this function from a user program.
7848 """
7849 return __core.wxWindow_ScrollWindow(*args, **kwargs)
7850
7851 def ScrollLines(*args, **kwargs):
7852 """
7853 ScrollLines(self, int lines) -> bool
7854
7855 If the platform and window class supports it, scrolls the window by
7856 the given number of lines down, if lines is positive, or up if lines
7857 is negative. Returns True if the window was scrolled, False if it was
7858 already on top/bottom and nothing was done.
7859 """
7860 return __core.wxWindow_ScrollLines(*args, **kwargs)
7861
7862 def ScrollPages(*args, **kwargs):
7863 """
7864 ScrollPages(self, int pages) -> bool
7865
7866 If the platform and window class supports it, scrolls the window by
7867 the given number of pages down, if pages is positive, or up if pages
7868 is negative. Returns True if the window was scrolled, False if it was
7869 already on top/bottom and nothing was done.
7870 """
7871 return __core.wxWindow_ScrollPages(*args, **kwargs)
7872
7873 def LineUp(*args, **kwargs):
7874 """
7875 LineUp(self) -> bool
7876
7877 This is just a wrapper for ScrollLines(-1).
7878 """
7879 return __core.wxWindow_LineUp(*args, **kwargs)
7880
7881 def LineDown(*args, **kwargs):
7882 """
7883 LineDown(self) -> bool
7884
7885 This is just a wrapper for ScrollLines(1).
7886 """
7887 return __core.wxWindow_LineDown(*args, **kwargs)
7888
7889 def PageUp(*args, **kwargs):
7890 """
7891 PageUp(self) -> bool
7892
7893 This is just a wrapper for ScrollPages(-1).
7894 """
7895 return __core.wxWindow_PageUp(*args, **kwargs)
7896
7897 def PageDown(*args, **kwargs):
7898 """
7899 PageDown(self) -> bool
7900
7901 This is just a wrapper for ScrollPages(1).
7902 """
7903 return __core.wxWindow_PageDown(*args, **kwargs)
7904
7905 def SetHelpText(*args, **kwargs):
7906 """
7907 SetHelpText(self, wxString text)
7908
7909 Sets the help text to be used as context-sensitive help for this
7910 window. Note that the text is actually stored by the current
7911 wxHelpProvider implementation, and not in the window object itself.
7912 """
7913 return __core.wxWindow_SetHelpText(*args, **kwargs)
7914
7915 def SetHelpTextForId(*args, **kwargs):
7916 """
7917 SetHelpTextForId(self, wxString text)
7918
7919 Associate this help text with all windows with the same id as this
7920 one.
7921 """
7922 return __core.wxWindow_SetHelpTextForId(*args, **kwargs)
7923
7924 def GetHelpText(*args, **kwargs):
7925 """
7926 GetHelpText(self) -> wxString
7927
7928 Gets the help text to be used as context-sensitive help for this
7929 window. Note that the text is actually stored by the current
7930 wxHelpProvider implementation, and not in the window object itself.
7931 """
7932 return __core.wxWindow_GetHelpText(*args, **kwargs)
7933
7934 def SetToolTipString(*args, **kwargs):
7935 """
7936 SetToolTipString(self, wxString tip)
7937
7938 Attach a tooltip to the window.
7939 """
7940 return __core.wxWindow_SetToolTipString(*args, **kwargs)
7941
7942 def SetToolTip(*args, **kwargs):
7943 """
7944 SetToolTip(self, wxToolTip tip)
7945
7946 Attach a tooltip to the window.
7947 """
7948 return __core.wxWindow_SetToolTip(*args, **kwargs)
7949
7950 def GetToolTip(*args, **kwargs):
7951 """
7952 GetToolTip(self) -> wxToolTip
7953
7954 get the associated tooltip or None if none
7955 """
7956 return __core.wxWindow_GetToolTip(*args, **kwargs)
7957
7958 def SetDropTarget(*args, **kwargs):
7959 """
7960 SetDropTarget(self, wxPyDropTarget dropTarget)
7961
7962 Associates a drop target with this window. If the window already has
7963 a drop target, it is deleted.
7964 """
7965 return __core.wxWindow_SetDropTarget(*args, **kwargs)
7966
7967 def GetDropTarget(*args, **kwargs):
7968 """
7969 GetDropTarget(self) -> wxPyDropTarget
7970
7971 Returns the associated drop target, which may be None.
7972 """
7973 return __core.wxWindow_GetDropTarget(*args, **kwargs)
7974
7975 def SetConstraints(*args, **kwargs):
7976 """
7977 SetConstraints(self, wxLayoutConstraints constraints)
7978
7979 Sets the window to have the given layout constraints. If an existing
7980 layout constraints object is already owned by the window, it will be
7981 deleted. Pass None to disassociate and delete the window's current
7982 constraints.
7983
7984 You must call SetAutoLayout to tell a window to use the constraints
7985 automatically in its default EVT_SIZE handler; otherwise, you must
7986 handle EVT_SIZE yourself and call Layout() explicitly. When setting
7987 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
7988 effect.
7989 """
7990 return __core.wxWindow_SetConstraints(*args, **kwargs)
7991
7992 def GetConstraints(*args, **kwargs):
7993 """
7994 GetConstraints(self) -> wxLayoutConstraints
7995
7996 Returns a pointer to the window's layout constraints, or None if there
7997 are none.
7998 """
7999 return __core.wxWindow_GetConstraints(*args, **kwargs)
8000
8001 def SetAutoLayout(*args, **kwargs):
8002 """
8003 SetAutoLayout(self, bool autoLayout)
8004
8005 Determines whether the Layout function will be called automatically
8006 when the window is resized. It is called implicitly by SetSizer but
8007 if you use SetConstraints you should call it manually or otherwise the
8008 window layout won't be correctly updated when its size changes.
8009 """
8010 return __core.wxWindow_SetAutoLayout(*args, **kwargs)
8011
8012 def GetAutoLayout(*args, **kwargs):
8013 """
8014 GetAutoLayout(self) -> bool
8015
8016 Returns the current autoLayout setting
8017 """
8018 return __core.wxWindow_GetAutoLayout(*args, **kwargs)
8019
8020 def Layout(*args, **kwargs):
8021 """
8022 Layout(self) -> bool
8023
8024 Invokes the constraint-based layout algorithm or the sizer-based
8025 algorithm for this window. See SetAutoLayout: when auto layout is on,
8026 this function gets called automatically by the default EVT_SIZE
8027 handler when the window is resized.
8028 """
8029 return __core.wxWindow_Layout(*args, **kwargs)
8030
8031 def SetSizer(*args, **kwargs):
8032 """
8033 SetSizer(self, wxSizer sizer, bool deleteOld=True)
8034
8035 Sets the window to have the given layout sizer. The window will then
8036 own the object, and will take care of its deletion. If an existing
8037 layout sizer object is already owned by the window, it will be deleted
8038 if the deleteOld parameter is true. Note that this function will also
8039 call SetAutoLayout implicitly with a True parameter if the sizer is
8040 non-None, and False otherwise.
8041 """
8042 return __core.wxWindow_SetSizer(*args, **kwargs)
8043
8044 def SetSizerAndFit(*args, **kwargs):
8045 """
8046 SetSizerAndFit(self, wxSizer sizer, bool deleteOld=True)
8047
8048 The same as SetSizer, except it also sets the size hints for the
8049 window based on the sizer's minimum size.
8050 """
8051 return __core.wxWindow_SetSizerAndFit(*args, **kwargs)
8052
8053 def GetSizer(*args, **kwargs):
8054 """
8055 GetSizer(self) -> wxSizer
8056
8057 Return the sizer associated with the window by a previous call to
8058 SetSizer or None if there isn't one.
8059 """
8060 return __core.wxWindow_GetSizer(*args, **kwargs)
8061
8062 def SetContainingSizer(*args, **kwargs):
8063 """
8064 SetContainingSizer(self, wxSizer sizer)
8065
8066 This normally does not need to be called by application code. It is
8067 called internally when a window is added to a sizer, and is used so
8068 the window can remove itself from the sizer when it is destroyed.
8069 """
8070 return __core.wxWindow_SetContainingSizer(*args, **kwargs)
8071
8072 def GetContainingSizer(*args, **kwargs):
8073 """
8074 GetContainingSizer(self) -> wxSizer
8075
8076 Return the sizer that this window is a member of, if any, otherwise None.
8077 """
8078 return __core.wxWindow_GetContainingSizer(*args, **kwargs)
8079
8080 def InheritAttributes(*args, **kwargs):
8081 """
8082 InheritAttributes(self)
8083
8084 This function is (or should be, in case of custom controls) called
8085 during window creation to intelligently set up the window visual
8086 attributes, that is the font and the foreground and background
8087 colours.
8088
8089 By 'intelligently' the following is meant: by default, all windows use
8090 their own default attributes. However if some of the parent's
8091 attributes are explicitly changed (that is, using SetFont and not
8092 SetOwnFont) and if the corresponding attribute hadn't been
8093 explicitly set for this window itself, then this window takes the same
8094 value as used by the parent. In addition, if the window overrides
8095 ShouldInheritColours to return false, the colours will not be changed
8096 no matter what and only the font might.
8097
8098 This rather complicated logic is necessary in order to accommodate the
8099 different usage scenarios. The most common one is when all default
8100 attributes are used and in this case, nothing should be inherited as
8101 in modern GUIs different controls use different fonts (and colours)
8102 than their siblings so they can't inherit the same value from the
8103 parent. However it was also deemed desirable to allow to simply change
8104 the attributes of all children at once by just changing the font or
8105 colour of their common parent, hence in this case we do inherit the
8106 parents attributes.
8107
8108 """
8109 return __core.wxWindow_InheritAttributes(*args, **kwargs)
8110
8111 def ShouldInheritColours(*args, **kwargs):
8112 """
8113 ShouldInheritColours(self) -> bool
8114
8115 Return true from here to allow the colours of this window to be
8116 changed by InheritAttributes, returning false forbids inheriting them
8117 from the parent window.
8118
8119 The base class version returns false, but this method is overridden in
8120 wxControl where it returns true.
8121 """
8122 return __core.wxWindow_ShouldInheritColours(*args, **kwargs)
8123
8124 def PostCreate(self, pre):
8125 """
8126 Phase 3 of the 2-phase create <wink!>
8127 Call this method after precreating the window with the 2-phase create method.
8128 """
8129 self.this = pre.this
8130 self.thisown = pre.thisown
8131 pre.thisown = 0
8132 if hasattr(self, '_setOORInfo'):
8133 self._setOORInfo(self)
8134 if hasattr(self, '_setCallbackInfo'):
8135 self._setCallbackInfo(self, self.__class__)
8136
8137
8138 class wxWindowPtr(wxWindow):
8139 def __init__(self, this):
8140 self.this = this
8141 if not hasattr(self,"thisown"): self.thisown = 0
8142 self.__class__ = wxWindow
8143 __core.wxWindow_swigregister(wxWindowPtr)
8144
8145 def PreWindow(*args, **kwargs):
8146 """
8147 PreWindow() -> wxWindow
8148
8149 Precreate a Window for 2-phase creation.
8150 """
8151 val = __core.new_PreWindow(*args, **kwargs)
8152 val.thisown = 1
8153 return val
8154
8155 def wxWindow_NewControlId(*args, **kwargs):
8156 """
8157 wxWindow_NewControlId() -> int
8158
8159 Generate a control id for the controls which were not given one.
8160 """
8161 return __core.wxWindow_NewControlId(*args, **kwargs)
8162
8163 def wxWindow_NextControlId(*args, **kwargs):
8164 """
8165 wxWindow_NextControlId(int winid) -> int
8166
8167 Get the id of the control following the one with the given
8168 autogenerated) id
8169 """
8170 return __core.wxWindow_NextControlId(*args, **kwargs)
8171
8172 def wxWindow_PrevControlId(*args, **kwargs):
8173 """
8174 wxWindow_PrevControlId(int winid) -> int
8175
8176 Get the id of the control preceding the one with the given
8177 autogenerated) id
8178 """
8179 return __core.wxWindow_PrevControlId(*args, **kwargs)
8180
8181 def wxWindow_FindFocus(*args, **kwargs):
8182 """
8183 wxWindow_FindFocus() -> wxWindow
8184
8185 Returns the window or control that currently has the keyboard focus,
8186 or None.
8187 """
8188 return __core.wxWindow_FindFocus(*args, **kwargs)
8189
8190 def wxWindow_GetCapture(*args, **kwargs):
8191 """
8192 wxWindow_GetCapture() -> wxWindow
8193
8194 Returns the window which currently captures the mouse or None
8195 """
8196 return __core.wxWindow_GetCapture(*args, **kwargs)
8197
8198 def wxWindow_GetClassDefaultAttributes(*args, **kwargs):
8199 """
8200 wxWindow_GetClassDefaultAttributes(int variant=wxWINDOW_VARIANT_NORMAL) -> wxVisualAttributes
8201
8202 Get the default attributes for this class. This is useful if you want
8203 to use the same font or colour in your own control as in a standard
8204 control -- which is a much better idea than hard coding specific
8205 colours or fonts which might look completely out of place on the
8206 user's system, especially if it uses themes.
8207
8208 The variant parameter is only relevant under Mac currently and is
8209 ignore under other platforms. Under Mac, it will change the size of
8210 the returned font. See `wx.Window.SetWindowVariant` for more about
8211 this.
8212 """
8213 return __core.wxWindow_GetClassDefaultAttributes(*args, **kwargs)
8214
8215 def DLG_PNT(win, point_or_x, y=None):
8216 """
8217 Convenience function for converting a Point or (x,y) in
8218 dialog units to pixel units.
8219 """
8220 if y is None:
8221 return win.ConvertDialogPointToPixels(point_or_x)
8222 else:
8223 return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
8224
8225 def DLG_SZE(win, size_width, height=None):
8226 """
8227 Convenience function for converting a Size or (w,h) in
8228 dialog units to pixel units.
8229 """
8230 if height is None:
8231 return win.ConvertDialogSizeToPixels(size_width)
8232 else:
8233 return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
8234
8235
8236 def wxFindWindowById(*args, **kwargs):
8237 """
8238 wxFindWindowById(long id, wxWindow parent=None) -> wxWindow
8239
8240 Find the first window in the application with the given id. If parent
8241 is None, the search will start from all top-level frames and dialog
8242 boxes; if non-None, the search will be limited to the given window
8243 hierarchy. The search is recursive in both cases.
8244 """
8245 return __core.wxFindWindowById(*args, **kwargs)
8246
8247 def wxFindWindowByName(*args, **kwargs):
8248 """
8249 wxFindWindowByName(wxString name, wxWindow parent=None) -> wxWindow
8250
8251 Find a window by its name (as given in a window constructor or Create
8252 function call). If parent is None, the search will start from all
8253 top-level frames and dialog boxes; if non-None, the search will be
8254 limited to the given window hierarchy. The search is recursive in both
8255 cases.
8256
8257 If no window with such name is found, wx.FindWindowByLabel is called.
8258 """
8259 return __core.wxFindWindowByName(*args, **kwargs)
8260
8261 def wxFindWindowByLabel(*args, **kwargs):
8262 """
8263 wxFindWindowByLabel(wxString label, wxWindow parent=None) -> wxWindow
8264
8265 Find a window by its label. Depending on the type of window, the label
8266 may be a window title or panel item label. If parent is None, the
8267 search will start from all top-level frames and dialog boxes; if
8268 non-None, the search will be limited to the given window
8269 hierarchy. The search is recursive in both cases.
8270 """
8271 return __core.wxFindWindowByLabel(*args, **kwargs)
8272
8273 def wxWindow_FromHWND(*args, **kwargs):
8274 """wxWindow_FromHWND(wxWindow parent, unsigned long _hWnd) -> wxWindow"""
8275 return __core.wxWindow_FromHWND(*args, **kwargs)
8276 #---------------------------------------------------------------------------
8277
8278 class wxValidator(wxEvtHandler):
8279 """Proxy of C++ wxValidator class"""
8280 def __repr__(self):
8281 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8282 def __init__(self, *args, **kwargs):
8283 """__init__(self) -> wxValidator"""
8284 newobj = __core.new_wxValidator(*args, **kwargs)
8285 self.this = newobj.this
8286 self.thisown = 1
8287 del newobj.thisown
8288 self._setOORInfo(self)
8289
8290 def Clone(*args, **kwargs):
8291 """Clone(self) -> wxValidator"""
8292 return __core.wxValidator_Clone(*args, **kwargs)
8293
8294 def Validate(*args, **kwargs):
8295 """Validate(self, wxWindow parent) -> bool"""
8296 return __core.wxValidator_Validate(*args, **kwargs)
8297
8298 def TransferToWindow(*args, **kwargs):
8299 """TransferToWindow(self) -> bool"""
8300 return __core.wxValidator_TransferToWindow(*args, **kwargs)
8301
8302 def TransferFromWindow(*args, **kwargs):
8303 """TransferFromWindow(self) -> bool"""
8304 return __core.wxValidator_TransferFromWindow(*args, **kwargs)
8305
8306 def GetWindow(*args, **kwargs):
8307 """GetWindow(self) -> wxWindow"""
8308 return __core.wxValidator_GetWindow(*args, **kwargs)
8309
8310 def SetWindow(*args, **kwargs):
8311 """SetWindow(self, wxWindow window)"""
8312 return __core.wxValidator_SetWindow(*args, **kwargs)
8313
8314 def IsSilent(*args, **kwargs):
8315 """IsSilent() -> bool"""
8316 return __core.wxValidator_IsSilent(*args, **kwargs)
8317
8318 IsSilent = staticmethod(IsSilent)
8319 def SetBellOnError(*args, **kwargs):
8320 """SetBellOnError(int doIt=True)"""
8321 return __core.wxValidator_SetBellOnError(*args, **kwargs)
8322
8323 SetBellOnError = staticmethod(SetBellOnError)
8324
8325 class wxValidatorPtr(wxValidator):
8326 def __init__(self, this):
8327 self.this = this
8328 if not hasattr(self,"thisown"): self.thisown = 0
8329 self.__class__ = wxValidator
8330 __core.wxValidator_swigregister(wxValidatorPtr)
8331
8332 def wxValidator_IsSilent(*args, **kwargs):
8333 """wxValidator_IsSilent() -> bool"""
8334 return __core.wxValidator_IsSilent(*args, **kwargs)
8335
8336 def wxValidator_SetBellOnError(*args, **kwargs):
8337 """wxValidator_SetBellOnError(int doIt=True)"""
8338 return __core.wxValidator_SetBellOnError(*args, **kwargs)
8339
8340 class wxPyValidator(wxValidator):
8341 """Proxy of C++ wxPyValidator class"""
8342 def __repr__(self):
8343 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8344 def __init__(self, *args, **kwargs):
8345 """__init__(self) -> wxPyValidator"""
8346 newobj = __core.new_wxPyValidator(*args, **kwargs)
8347 self.this = newobj.this
8348 self.thisown = 1
8349 del newobj.thisown
8350
8351 self._setCallbackInfo(self, PyValidator, 1)
8352 self._setOORInfo(self)
8353
8354 def _setCallbackInfo(*args, **kwargs):
8355 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
8356 return __core.wxPyValidator__setCallbackInfo(*args, **kwargs)
8357
8358
8359 class wxPyValidatorPtr(wxPyValidator):
8360 def __init__(self, this):
8361 self.this = this
8362 if not hasattr(self,"thisown"): self.thisown = 0
8363 self.__class__ = wxPyValidator
8364 __core.wxPyValidator_swigregister(wxPyValidatorPtr)
8365
8366 #---------------------------------------------------------------------------
8367
8368 class wxMenu(wxEvtHandler):
8369 """Proxy of C++ wxMenu class"""
8370 def __repr__(self):
8371 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8372 def __init__(self, *args, **kwargs):
8373 """__init__(self, wxString title=EmptyString, long style=0) -> wxMenu"""
8374 newobj = __core.new_wxMenu(*args, **kwargs)
8375 self.this = newobj.this
8376 self.thisown = 1
8377 del newobj.thisown
8378 self._setOORInfo(self)
8379
8380 def Append(*args, **kwargs):
8381 """Append(self, int id, wxString text, wxString help=EmptyString, int kind=wxITEM_NORMAL) -> wxMenuItem"""
8382 return __core.wxMenu_Append(*args, **kwargs)
8383
8384 def AppendSeparator(*args, **kwargs):
8385 """AppendSeparator(self) -> wxMenuItem"""
8386 return __core.wxMenu_AppendSeparator(*args, **kwargs)
8387
8388 def AppendCheckItem(*args, **kwargs):
8389 """AppendCheckItem(self, int id, wxString text, wxString help=EmptyString) -> wxMenuItem"""
8390 return __core.wxMenu_AppendCheckItem(*args, **kwargs)
8391
8392 def AppendRadioItem(*args, **kwargs):
8393 """AppendRadioItem(self, int id, wxString text, wxString help=EmptyString) -> wxMenuItem"""
8394 return __core.wxMenu_AppendRadioItem(*args, **kwargs)
8395
8396 def AppendMenu(*args, **kwargs):
8397 """AppendMenu(self, int id, wxString text, wxMenu submenu, wxString help=EmptyString) -> wxMenuItem"""
8398 return __core.wxMenu_AppendMenu(*args, **kwargs)
8399
8400 def AppendItem(*args, **kwargs):
8401 """AppendItem(self, wxMenuItem item) -> wxMenuItem"""
8402 return __core.wxMenu_AppendItem(*args, **kwargs)
8403
8404 def Break(*args, **kwargs):
8405 """Break(self)"""
8406 return __core.wxMenu_Break(*args, **kwargs)
8407
8408 def InsertItem(*args, **kwargs):
8409 """InsertItem(self, size_t pos, wxMenuItem item) -> wxMenuItem"""
8410 return __core.wxMenu_InsertItem(*args, **kwargs)
8411
8412 def Insert(*args, **kwargs):
8413 """
8414 Insert(self, size_t pos, int id, wxString text, wxString help=EmptyString,
8415 int kind=wxITEM_NORMAL) -> wxMenuItem
8416 """
8417 return __core.wxMenu_Insert(*args, **kwargs)
8418
8419 def InsertSeparator(*args, **kwargs):
8420 """InsertSeparator(self, size_t pos) -> wxMenuItem"""
8421 return __core.wxMenu_InsertSeparator(*args, **kwargs)
8422
8423 def InsertCheckItem(*args, **kwargs):
8424 """InsertCheckItem(self, size_t pos, int id, wxString text, wxString help=EmptyString) -> wxMenuItem"""
8425 return __core.wxMenu_InsertCheckItem(*args, **kwargs)
8426
8427 def InsertRadioItem(*args, **kwargs):
8428 """InsertRadioItem(self, size_t pos, int id, wxString text, wxString help=EmptyString) -> wxMenuItem"""
8429 return __core.wxMenu_InsertRadioItem(*args, **kwargs)
8430
8431 def InsertMenu(*args, **kwargs):
8432 """
8433 InsertMenu(self, size_t pos, int id, wxString text, wxMenu submenu,
8434 wxString help=EmptyString) -> wxMenuItem
8435 """
8436 return __core.wxMenu_InsertMenu(*args, **kwargs)
8437
8438 def PrependItem(*args, **kwargs):
8439 """PrependItem(self, wxMenuItem item) -> wxMenuItem"""
8440 return __core.wxMenu_PrependItem(*args, **kwargs)
8441
8442 def Prepend(*args, **kwargs):
8443 """Prepend(self, int id, wxString text, wxString help=EmptyString, int kind=wxITEM_NORMAL) -> wxMenuItem"""
8444 return __core.wxMenu_Prepend(*args, **kwargs)
8445
8446 def PrependSeparator(*args, **kwargs):
8447 """PrependSeparator(self) -> wxMenuItem"""
8448 return __core.wxMenu_PrependSeparator(*args, **kwargs)
8449
8450 def PrependCheckItem(*args, **kwargs):
8451 """PrependCheckItem(self, int id, wxString text, wxString help=EmptyString) -> wxMenuItem"""
8452 return __core.wxMenu_PrependCheckItem(*args, **kwargs)
8453
8454 def PrependRadioItem(*args, **kwargs):
8455 """PrependRadioItem(self, int id, wxString text, wxString help=EmptyString) -> wxMenuItem"""
8456 return __core.wxMenu_PrependRadioItem(*args, **kwargs)
8457
8458 def PrependMenu(*args, **kwargs):
8459 """PrependMenu(self, int id, wxString text, wxMenu submenu, wxString help=EmptyString) -> wxMenuItem"""
8460 return __core.wxMenu_PrependMenu(*args, **kwargs)
8461
8462 def Remove(*args, **kwargs):
8463 """Remove(self, int id) -> wxMenuItem"""
8464 return __core.wxMenu_Remove(*args, **kwargs)
8465
8466 def RemoveItem(*args, **kwargs):
8467 """RemoveItem(self, wxMenuItem item) -> wxMenuItem"""
8468 return __core.wxMenu_RemoveItem(*args, **kwargs)
8469
8470 def Delete(*args, **kwargs):
8471 """Delete(self, int id) -> bool"""
8472 return __core.wxMenu_Delete(*args, **kwargs)
8473
8474 def DeleteItem(*args, **kwargs):
8475 """DeleteItem(self, wxMenuItem item) -> bool"""
8476 return __core.wxMenu_DeleteItem(*args, **kwargs)
8477
8478 def Destroy(*args, **kwargs):
8479 """
8480 Destroy(self)
8481
8482 Deletes the C++ object this Python object is a proxy for.
8483 """
8484 return __core.wxMenu_Destroy(*args, **kwargs)
8485
8486 def DestroyId(*args, **kwargs):
8487 """
8488 DestroyId(self, int id) -> bool
8489
8490 Deletes the C++ object this Python object is a proxy for.
8491 """
8492 return __core.wxMenu_DestroyId(*args, **kwargs)
8493
8494 def DestroyItem(*args, **kwargs):
8495 """
8496 DestroyItem(self, wxMenuItem item) -> bool
8497
8498 Deletes the C++ object this Python object is a proxy for.
8499 """
8500 return __core.wxMenu_DestroyItem(*args, **kwargs)
8501
8502 def GetMenuItemCount(*args, **kwargs):
8503 """GetMenuItemCount(self) -> size_t"""
8504 return __core.wxMenu_GetMenuItemCount(*args, **kwargs)
8505
8506 def GetMenuItems(*args, **kwargs):
8507 """GetMenuItems(self) -> PyObject"""
8508 return __core.wxMenu_GetMenuItems(*args, **kwargs)
8509
8510 def FindItem(*args, **kwargs):
8511 """FindItem(self, wxString item) -> int"""
8512 return __core.wxMenu_FindItem(*args, **kwargs)
8513
8514 def FindItemById(*args, **kwargs):
8515 """FindItemById(self, int id) -> wxMenuItem"""
8516 return __core.wxMenu_FindItemById(*args, **kwargs)
8517
8518 def FindItemByPosition(*args, **kwargs):
8519 """FindItemByPosition(self, size_t position) -> wxMenuItem"""
8520 return __core.wxMenu_FindItemByPosition(*args, **kwargs)
8521
8522 def Enable(*args, **kwargs):
8523 """Enable(self, int id, bool enable)"""
8524 return __core.wxMenu_Enable(*args, **kwargs)
8525
8526 def IsEnabled(*args, **kwargs):
8527 """IsEnabled(self, int id) -> bool"""
8528 return __core.wxMenu_IsEnabled(*args, **kwargs)
8529
8530 def Check(*args, **kwargs):
8531 """Check(self, int id, bool check)"""
8532 return __core.wxMenu_Check(*args, **kwargs)
8533
8534 def IsChecked(*args, **kwargs):
8535 """IsChecked(self, int id) -> bool"""
8536 return __core.wxMenu_IsChecked(*args, **kwargs)
8537
8538 def SetLabel(*args, **kwargs):
8539 """SetLabel(self, int id, wxString label)"""
8540 return __core.wxMenu_SetLabel(*args, **kwargs)
8541
8542 def GetLabel(*args, **kwargs):
8543 """GetLabel(self, int id) -> wxString"""
8544 return __core.wxMenu_GetLabel(*args, **kwargs)
8545
8546 def SetHelpString(*args, **kwargs):
8547 """SetHelpString(self, int id, wxString helpString)"""
8548 return __core.wxMenu_SetHelpString(*args, **kwargs)
8549
8550 def GetHelpString(*args, **kwargs):
8551 """GetHelpString(self, int id) -> wxString"""
8552 return __core.wxMenu_GetHelpString(*args, **kwargs)
8553
8554 def SetTitle(*args, **kwargs):
8555 """SetTitle(self, wxString title)"""
8556 return __core.wxMenu_SetTitle(*args, **kwargs)
8557
8558 def GetTitle(*args, **kwargs):
8559 """GetTitle(self) -> wxString"""
8560 return __core.wxMenu_GetTitle(*args, **kwargs)
8561
8562 def SetEventHandler(*args, **kwargs):
8563 """SetEventHandler(self, wxEvtHandler handler)"""
8564 return __core.wxMenu_SetEventHandler(*args, **kwargs)
8565
8566 def GetEventHandler(*args, **kwargs):
8567 """GetEventHandler(self) -> wxEvtHandler"""
8568 return __core.wxMenu_GetEventHandler(*args, **kwargs)
8569
8570 def SetInvokingWindow(*args, **kwargs):
8571 """SetInvokingWindow(self, wxWindow win)"""
8572 return __core.wxMenu_SetInvokingWindow(*args, **kwargs)
8573
8574 def GetInvokingWindow(*args, **kwargs):
8575 """GetInvokingWindow(self) -> wxWindow"""
8576 return __core.wxMenu_GetInvokingWindow(*args, **kwargs)
8577
8578 def GetStyle(*args, **kwargs):
8579 """GetStyle(self) -> long"""
8580 return __core.wxMenu_GetStyle(*args, **kwargs)
8581
8582 def UpdateUI(*args, **kwargs):
8583 """UpdateUI(self, wxEvtHandler source=None)"""
8584 return __core.wxMenu_UpdateUI(*args, **kwargs)
8585
8586 def GetMenuBar(*args, **kwargs):
8587 """GetMenuBar(self) -> wxMenuBar"""
8588 return __core.wxMenu_GetMenuBar(*args, **kwargs)
8589
8590 def Attach(*args, **kwargs):
8591 """Attach(self, wxMenuBarBase menubar)"""
8592 return __core.wxMenu_Attach(*args, **kwargs)
8593
8594 def Detach(*args, **kwargs):
8595 """Detach(self)"""
8596 return __core.wxMenu_Detach(*args, **kwargs)
8597
8598 def IsAttached(*args, **kwargs):
8599 """IsAttached(self) -> bool"""
8600 return __core.wxMenu_IsAttached(*args, **kwargs)
8601
8602 def SetParent(*args, **kwargs):
8603 """SetParent(self, wxMenu parent)"""
8604 return __core.wxMenu_SetParent(*args, **kwargs)
8605
8606 def GetParent(*args, **kwargs):
8607 """GetParent(self) -> wxMenu"""
8608 return __core.wxMenu_GetParent(*args, **kwargs)
8609
8610
8611 class wxMenuPtr(wxMenu):
8612 def __init__(self, this):
8613 self.this = this
8614 if not hasattr(self,"thisown"): self.thisown = 0
8615 self.__class__ = wxMenu
8616 __core.wxMenu_swigregister(wxMenuPtr)
8617 wxDefaultValidator = cvar.wxDefaultValidator
8618
8619 #---------------------------------------------------------------------------
8620
8621 class wxMenuBar(wxWindow):
8622 """Proxy of C++ wxMenuBar class"""
8623 def __repr__(self):
8624 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8625 def __init__(self, *args, **kwargs):
8626 """__init__(self, long style=0) -> wxMenuBar"""
8627 newobj = __core.new_wxMenuBar(*args, **kwargs)
8628 self.this = newobj.this
8629 self.thisown = 1
8630 del newobj.thisown
8631 self._setOORInfo(self)
8632
8633 def Append(*args, **kwargs):
8634 """Append(self, wxMenu menu, wxString title) -> bool"""
8635 return __core.wxMenuBar_Append(*args, **kwargs)
8636
8637 def Insert(*args, **kwargs):
8638 """Insert(self, size_t pos, wxMenu menu, wxString title) -> bool"""
8639 return __core.wxMenuBar_Insert(*args, **kwargs)
8640
8641 def GetMenuCount(*args, **kwargs):
8642 """GetMenuCount(self) -> size_t"""
8643 return __core.wxMenuBar_GetMenuCount(*args, **kwargs)
8644
8645 def GetMenu(*args, **kwargs):
8646 """GetMenu(self, size_t pos) -> wxMenu"""
8647 return __core.wxMenuBar_GetMenu(*args, **kwargs)
8648
8649 def Replace(*args, **kwargs):
8650 """Replace(self, size_t pos, wxMenu menu, wxString title) -> wxMenu"""
8651 return __core.wxMenuBar_Replace(*args, **kwargs)
8652
8653 def Remove(*args, **kwargs):
8654 """Remove(self, size_t pos) -> wxMenu"""
8655 return __core.wxMenuBar_Remove(*args, **kwargs)
8656
8657 def EnableTop(*args, **kwargs):
8658 """EnableTop(self, size_t pos, bool enable)"""
8659 return __core.wxMenuBar_EnableTop(*args, **kwargs)
8660
8661 def IsEnabledTop(*args, **kwargs):
8662 """IsEnabledTop(self, size_t pos) -> bool"""
8663 return __core.wxMenuBar_IsEnabledTop(*args, **kwargs)
8664
8665 def SetLabelTop(*args, **kwargs):
8666 """SetLabelTop(self, size_t pos, wxString label)"""
8667 return __core.wxMenuBar_SetLabelTop(*args, **kwargs)
8668
8669 def GetLabelTop(*args, **kwargs):
8670 """GetLabelTop(self, size_t pos) -> wxString"""
8671 return __core.wxMenuBar_GetLabelTop(*args, **kwargs)
8672
8673 def FindMenuItem(*args, **kwargs):
8674 """FindMenuItem(self, wxString menu, wxString item) -> int"""
8675 return __core.wxMenuBar_FindMenuItem(*args, **kwargs)
8676
8677 def FindItemById(*args, **kwargs):
8678 """FindItemById(self, int id) -> wxMenuItem"""
8679 return __core.wxMenuBar_FindItemById(*args, **kwargs)
8680
8681 def FindMenu(*args, **kwargs):
8682 """FindMenu(self, wxString title) -> int"""
8683 return __core.wxMenuBar_FindMenu(*args, **kwargs)
8684
8685 def Enable(*args, **kwargs):
8686 """Enable(self, int id, bool enable)"""
8687 return __core.wxMenuBar_Enable(*args, **kwargs)
8688
8689 def Check(*args, **kwargs):
8690 """Check(self, int id, bool check)"""
8691 return __core.wxMenuBar_Check(*args, **kwargs)
8692
8693 def IsChecked(*args, **kwargs):
8694 """IsChecked(self, int id) -> bool"""
8695 return __core.wxMenuBar_IsChecked(*args, **kwargs)
8696
8697 def IsEnabled(*args, **kwargs):
8698 """IsEnabled(self, int id) -> bool"""
8699 return __core.wxMenuBar_IsEnabled(*args, **kwargs)
8700
8701 def SetLabel(*args, **kwargs):
8702 """SetLabel(self, int id, wxString label)"""
8703 return __core.wxMenuBar_SetLabel(*args, **kwargs)
8704
8705 def GetLabel(*args, **kwargs):
8706 """GetLabel(self, int id) -> wxString"""
8707 return __core.wxMenuBar_GetLabel(*args, **kwargs)
8708
8709 def SetHelpString(*args, **kwargs):
8710 """SetHelpString(self, int id, wxString helpString)"""
8711 return __core.wxMenuBar_SetHelpString(*args, **kwargs)
8712
8713 def GetHelpString(*args, **kwargs):
8714 """GetHelpString(self, int id) -> wxString"""
8715 return __core.wxMenuBar_GetHelpString(*args, **kwargs)
8716
8717 def GetFrame(*args, **kwargs):
8718 """GetFrame(self) -> wxFrame"""
8719 return __core.wxMenuBar_GetFrame(*args, **kwargs)
8720
8721 def IsAttached(*args, **kwargs):
8722 """IsAttached(self) -> bool"""
8723 return __core.wxMenuBar_IsAttached(*args, **kwargs)
8724
8725 def Attach(*args, **kwargs):
8726 """Attach(self, wxFrame frame)"""
8727 return __core.wxMenuBar_Attach(*args, **kwargs)
8728
8729 def Detach(*args, **kwargs):
8730 """Detach(self)"""
8731 return __core.wxMenuBar_Detach(*args, **kwargs)
8732
8733
8734 class wxMenuBarPtr(wxMenuBar):
8735 def __init__(self, this):
8736 self.this = this
8737 if not hasattr(self,"thisown"): self.thisown = 0
8738 self.__class__ = wxMenuBar
8739 __core.wxMenuBar_swigregister(wxMenuBarPtr)
8740
8741 #---------------------------------------------------------------------------
8742
8743 class wxMenuItem(wxObject):
8744 """Proxy of C++ wxMenuItem class"""
8745 def __repr__(self):
8746 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8747 def __init__(self, *args, **kwargs):
8748 """
8749 __init__(self, wxMenu parentMenu=None, int id=wxID_ANY, wxString text=EmptyString,
8750 wxString help=EmptyString, int kind=wxITEM_NORMAL,
8751 wxMenu subMenu=None) -> wxMenuItem
8752 """
8753 newobj = __core.new_wxMenuItem(*args, **kwargs)
8754 self.this = newobj.this
8755 self.thisown = 1
8756 del newobj.thisown
8757 def GetMenu(*args, **kwargs):
8758 """GetMenu(self) -> wxMenu"""
8759 return __core.wxMenuItem_GetMenu(*args, **kwargs)
8760
8761 def SetMenu(*args, **kwargs):
8762 """SetMenu(self, wxMenu menu)"""
8763 return __core.wxMenuItem_SetMenu(*args, **kwargs)
8764
8765 def SetId(*args, **kwargs):
8766 """SetId(self, int id)"""
8767 return __core.wxMenuItem_SetId(*args, **kwargs)
8768
8769 def GetId(*args, **kwargs):
8770 """GetId(self) -> int"""
8771 return __core.wxMenuItem_GetId(*args, **kwargs)
8772
8773 def IsSeparator(*args, **kwargs):
8774 """IsSeparator(self) -> bool"""
8775 return __core.wxMenuItem_IsSeparator(*args, **kwargs)
8776
8777 def SetText(*args, **kwargs):
8778 """SetText(self, wxString str)"""
8779 return __core.wxMenuItem_SetText(*args, **kwargs)
8780
8781 def GetLabel(*args, **kwargs):
8782 """GetLabel(self) -> wxString"""
8783 return __core.wxMenuItem_GetLabel(*args, **kwargs)
8784
8785 def GetText(*args, **kwargs):
8786 """GetText(self) -> wxString"""
8787 return __core.wxMenuItem_GetText(*args, **kwargs)
8788
8789 def GetLabelFromText(*args, **kwargs):
8790 """GetLabelFromText(wxString text) -> wxString"""
8791 return __core.wxMenuItem_GetLabelFromText(*args, **kwargs)
8792
8793 GetLabelFromText = staticmethod(GetLabelFromText)
8794 def GetKind(*args, **kwargs):
8795 """GetKind(self) -> int"""
8796 return __core.wxMenuItem_GetKind(*args, **kwargs)
8797
8798 def SetKind(*args, **kwargs):
8799 """SetKind(self, int kind)"""
8800 return __core.wxMenuItem_SetKind(*args, **kwargs)
8801
8802 def SetCheckable(*args, **kwargs):
8803 """SetCheckable(self, bool checkable)"""
8804 return __core.wxMenuItem_SetCheckable(*args, **kwargs)
8805
8806 def IsCheckable(*args, **kwargs):
8807 """IsCheckable(self) -> bool"""
8808 return __core.wxMenuItem_IsCheckable(*args, **kwargs)
8809
8810 def IsSubMenu(*args, **kwargs):
8811 """IsSubMenu(self) -> bool"""
8812 return __core.wxMenuItem_IsSubMenu(*args, **kwargs)
8813
8814 def SetSubMenu(*args, **kwargs):
8815 """SetSubMenu(self, wxMenu menu)"""
8816 return __core.wxMenuItem_SetSubMenu(*args, **kwargs)
8817
8818 def GetSubMenu(*args, **kwargs):
8819 """GetSubMenu(self) -> wxMenu"""
8820 return __core.wxMenuItem_GetSubMenu(*args, **kwargs)
8821
8822 def Enable(*args, **kwargs):
8823 """Enable(self, bool enable=True)"""
8824 return __core.wxMenuItem_Enable(*args, **kwargs)
8825
8826 def IsEnabled(*args, **kwargs):
8827 """IsEnabled(self) -> bool"""
8828 return __core.wxMenuItem_IsEnabled(*args, **kwargs)
8829
8830 def Check(*args, **kwargs):
8831 """Check(self, bool check=True)"""
8832 return __core.wxMenuItem_Check(*args, **kwargs)
8833
8834 def IsChecked(*args, **kwargs):
8835 """IsChecked(self) -> bool"""
8836 return __core.wxMenuItem_IsChecked(*args, **kwargs)
8837
8838 def Toggle(*args, **kwargs):
8839 """Toggle(self)"""
8840 return __core.wxMenuItem_Toggle(*args, **kwargs)
8841
8842 def SetHelp(*args, **kwargs):
8843 """SetHelp(self, wxString str)"""
8844 return __core.wxMenuItem_SetHelp(*args, **kwargs)
8845
8846 def GetHelp(*args, **kwargs):
8847 """GetHelp(self) -> wxString"""
8848 return __core.wxMenuItem_GetHelp(*args, **kwargs)
8849
8850 def GetAccel(*args, **kwargs):
8851 """GetAccel(self) -> wxAcceleratorEntry"""
8852 return __core.wxMenuItem_GetAccel(*args, **kwargs)
8853
8854 def SetAccel(*args, **kwargs):
8855 """SetAccel(self, wxAcceleratorEntry accel)"""
8856 return __core.wxMenuItem_SetAccel(*args, **kwargs)
8857
8858 def SetFont(*args, **kwargs):
8859 """SetFont(self, wxFont font)"""
8860 return __core.wxMenuItem_SetFont(*args, **kwargs)
8861
8862 def GetFont(*args, **kwargs):
8863 """GetFont(self) -> wxFont"""
8864 return __core.wxMenuItem_GetFont(*args, **kwargs)
8865
8866 def SetTextColour(*args, **kwargs):
8867 """SetTextColour(self, wxColour colText)"""
8868 return __core.wxMenuItem_SetTextColour(*args, **kwargs)
8869
8870 def GetTextColour(*args, **kwargs):
8871 """GetTextColour(self) -> wxColour"""
8872 return __core.wxMenuItem_GetTextColour(*args, **kwargs)
8873
8874 def SetBackgroundColour(*args, **kwargs):
8875 """SetBackgroundColour(self, wxColour colBack)"""
8876 return __core.wxMenuItem_SetBackgroundColour(*args, **kwargs)
8877
8878 def GetBackgroundColour(*args, **kwargs):
8879 """GetBackgroundColour(self) -> wxColour"""
8880 return __core.wxMenuItem_GetBackgroundColour(*args, **kwargs)
8881
8882 def SetBitmaps(*args, **kwargs):
8883 """SetBitmaps(self, wxBitmap bmpChecked, wxBitmap bmpUnchecked=wxNullBitmap)"""
8884 return __core.wxMenuItem_SetBitmaps(*args, **kwargs)
8885
8886 def SetDisabledBitmap(*args, **kwargs):
8887 """SetDisabledBitmap(self, wxBitmap bmpDisabled)"""
8888 return __core.wxMenuItem_SetDisabledBitmap(*args, **kwargs)
8889
8890 def GetDisabledBitmap(*args, **kwargs):
8891 """GetDisabledBitmap(self) -> wxBitmap"""
8892 return __core.wxMenuItem_GetDisabledBitmap(*args, **kwargs)
8893
8894 def SetMarginWidth(*args, **kwargs):
8895 """SetMarginWidth(self, int nWidth)"""
8896 return __core.wxMenuItem_SetMarginWidth(*args, **kwargs)
8897
8898 def GetMarginWidth(*args, **kwargs):
8899 """GetMarginWidth(self) -> int"""
8900 return __core.wxMenuItem_GetMarginWidth(*args, **kwargs)
8901
8902 def GetDefaultMarginWidth(*args, **kwargs):
8903 """GetDefaultMarginWidth() -> int"""
8904 return __core.wxMenuItem_GetDefaultMarginWidth(*args, **kwargs)
8905
8906 GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth)
8907 def IsOwnerDrawn(*args, **kwargs):
8908 """IsOwnerDrawn(self) -> bool"""
8909 return __core.wxMenuItem_IsOwnerDrawn(*args, **kwargs)
8910
8911 def SetOwnerDrawn(*args, **kwargs):
8912 """SetOwnerDrawn(self, bool ownerDrawn=True)"""
8913 return __core.wxMenuItem_SetOwnerDrawn(*args, **kwargs)
8914
8915 def ResetOwnerDrawn(*args, **kwargs):
8916 """ResetOwnerDrawn(self)"""
8917 return __core.wxMenuItem_ResetOwnerDrawn(*args, **kwargs)
8918
8919 def SetBitmap(*args, **kwargs):
8920 """SetBitmap(self, wxBitmap bitmap)"""
8921 return __core.wxMenuItem_SetBitmap(*args, **kwargs)
8922
8923 def GetBitmap(*args, **kwargs):
8924 """GetBitmap(self) -> wxBitmap"""
8925 return __core.wxMenuItem_GetBitmap(*args, **kwargs)
8926
8927
8928 class wxMenuItemPtr(wxMenuItem):
8929 def __init__(self, this):
8930 self.this = this
8931 if not hasattr(self,"thisown"): self.thisown = 0
8932 self.__class__ = wxMenuItem
8933 __core.wxMenuItem_swigregister(wxMenuItemPtr)
8934
8935 def wxMenuItem_GetLabelFromText(*args, **kwargs):
8936 """wxMenuItem_GetLabelFromText(wxString text) -> wxString"""
8937 return __core.wxMenuItem_GetLabelFromText(*args, **kwargs)
8938
8939 def wxMenuItem_GetDefaultMarginWidth(*args, **kwargs):
8940 """wxMenuItem_GetDefaultMarginWidth() -> int"""
8941 return __core.wxMenuItem_GetDefaultMarginWidth(*args, **kwargs)
8942
8943 #---------------------------------------------------------------------------
8944
8945 class wxControl(wxWindow):
8946 """
8947 This is the base class for a control or 'widget'.
8948
8949 A control is generally a small window which processes user input
8950 and/or displays one or more item of data.
8951 """
8952 def __repr__(self):
8953 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8954 def __init__(self, *args, **kwargs):
8955 """
8956 __init__(self, wxWindow parent, int id=-1, wxPoint pos=wxDefaultPosition,
8957 wxSize size=wxDefaultSize, long style=0,
8958 wxValidator validator=wxDefaultValidator,
8959 wxString name=ControlNameStr) -> wxControl
8960
8961 Create a Control. Normally you should only call this from a subclass'
8962 __init__ as a plain old wx.Control is not very useful.
8963 """
8964 newobj = __core.new_wxControl(*args, **kwargs)
8965 self.this = newobj.this
8966 self.thisown = 1
8967 del newobj.thisown
8968 self._setOORInfo(self)
8969
8970 def Create(*args, **kwargs):
8971 """
8972 Create(self, wxWindow parent, int id=-1, wxPoint pos=wxDefaultPosition,
8973 wxSize size=wxDefaultSize, long style=0,
8974 wxValidator validator=wxDefaultValidator,
8975 wxString name=ControlNameStr) -> bool
8976
8977 Do the 2nd phase and create the GUI control.
8978 """
8979 return __core.wxControl_Create(*args, **kwargs)
8980
8981 def Command(*args, **kwargs):
8982 """
8983 Command(self, wxCommandEvent event)
8984
8985 Simulates the effect of the user issuing a command to the item.
8986
8987 :see: `wx.CommandEvent`
8988
8989 """
8990 return __core.wxControl_Command(*args, **kwargs)
8991
8992 def GetLabel(*args, **kwargs):
8993 """
8994 GetLabel(self) -> wxString
8995
8996 Return a control's text.
8997 """
8998 return __core.wxControl_GetLabel(*args, **kwargs)
8999
9000 def SetLabel(*args, **kwargs):
9001 """
9002 SetLabel(self, wxString label)
9003
9004 Sets the item's text.
9005 """
9006 return __core.wxControl_SetLabel(*args, **kwargs)
9007
9008 def GetClassDefaultAttributes(*args, **kwargs):
9009 """
9010 GetClassDefaultAttributes(int variant=wxWINDOW_VARIANT_NORMAL) -> wxVisualAttributes
9011
9012 Get the default attributes for this class. This is useful if you want
9013 to use the same font or colour in your own control as in a standard
9014 control -- which is a much better idea than hard coding specific
9015 colours or fonts which might look completely out of place on the
9016 user's system, especially if it uses themes.
9017
9018 The variant parameter is only relevant under Mac currently and is
9019 ignore under other platforms. Under Mac, it will change the size of
9020 the returned font. See `wx.Window.SetWindowVariant` for more about
9021 this.
9022 """
9023 return __core.wxControl_GetClassDefaultAttributes(*args, **kwargs)
9024
9025 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
9026
9027 class wxControlPtr(wxControl):
9028 def __init__(self, this):
9029 self.this = this
9030 if not hasattr(self,"thisown"): self.thisown = 0
9031 self.__class__ = wxControl
9032 __core.wxControl_swigregister(wxControlPtr)
9033 ControlNameStr = cvar.ControlNameStr
9034
9035 def PreControl(*args, **kwargs):
9036 """
9037 PreControl() -> wxControl
9038
9039 Precreate a Control control for 2-phase creation
9040 """
9041 val = __core.new_PreControl(*args, **kwargs)
9042 val.thisown = 1
9043 return val
9044
9045 def wxControl_GetClassDefaultAttributes(*args, **kwargs):
9046 """
9047 wxControl_GetClassDefaultAttributes(int variant=wxWINDOW_VARIANT_NORMAL) -> wxVisualAttributes
9048
9049 Get the default attributes for this class. This is useful if you want
9050 to use the same font or colour in your own control as in a standard
9051 control -- which is a much better idea than hard coding specific
9052 colours or fonts which might look completely out of place on the
9053 user's system, especially if it uses themes.
9054
9055 The variant parameter is only relevant under Mac currently and is
9056 ignore under other platforms. Under Mac, it will change the size of
9057 the returned font. See `wx.Window.SetWindowVariant` for more about
9058 this.
9059 """
9060 return __core.wxControl_GetClassDefaultAttributes(*args, **kwargs)
9061
9062 #---------------------------------------------------------------------------
9063
9064 class wxItemContainer(object):
9065 """
9066 The wx.ItemContainer class defines an interface which is implemented
9067 by all controls which have string subitems, each of which may be
9068 selected, such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well
9069 as `wx.ComboBox` which implements an extended interface deriving from
9070 this one.
9071
9072 It defines the methods for accessing the control's items and although
9073 each of the derived classes implements them differently, they still
9074 all conform to the same interface.
9075
9076 The items in a wx.ItemContainer have (non empty) string labels and,
9077 optionally, client data associated with them.
9078
9079 """
9080 def __init__(self): raise RuntimeError, "No constructor defined"
9081 def __repr__(self):
9082 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9083 def Append(*args, **kwargs):
9084 """
9085 Append(self, wxString item, PyObject clientData=None) -> int
9086
9087 Adds the item to the control, associating the given data with the item
9088 if not None. The return value is the index of the newly added item
9089 which may be different from the last one if the control is sorted (e.g.
9090 has wx.LB_SORT or wx.CB_SORT style).
9091 """
9092 return __core.wxItemContainer_Append(*args, **kwargs)
9093
9094 def AppendItems(*args, **kwargs):
9095 """
9096 AppendItems(self, List strings)
9097
9098 Apend several items at once to the control. Notice that calling this
9099 method may be much faster than appending the items one by one if you
9100 need to add a lot of items.
9101 """
9102 return __core.wxItemContainer_AppendItems(*args, **kwargs)
9103
9104 def Insert(*args, **kwargs):
9105 """
9106 Insert(self, wxString item, int pos, PyObject clientData=None) -> int
9107
9108 Insert an item into the control before the item at the ``pos`` index,
9109 optionally associating some data object with the item.
9110 """
9111 return __core.wxItemContainer_Insert(*args, **kwargs)
9112
9113 def Clear(*args, **kwargs):
9114 """
9115 Clear(self)
9116
9117 Removes all items from the control.
9118 """
9119 return __core.wxItemContainer_Clear(*args, **kwargs)
9120
9121 def Delete(*args, **kwargs):
9122 """
9123 Delete(self, int n)
9124
9125 Deletes the item at the zero-based index 'n' from the control. Note
9126 that it is an error (signalled by a `wx.PyAssertionError` exception if
9127 enabled) to remove an item with the index negative or greater or equal
9128 than the number of items in the control.
9129 """
9130 return __core.wxItemContainer_Delete(*args, **kwargs)
9131
9132 def GetClientData(*args, **kwargs):
9133 """
9134 GetClientData(self, int n) -> PyObject
9135
9136 Returns the client data associated with the given item, (if any.)
9137 """
9138 return __core.wxItemContainer_GetClientData(*args, **kwargs)
9139
9140 def SetClientData(*args, **kwargs):
9141 """
9142 SetClientData(self, int n, PyObject clientData)
9143
9144 Associate the given client data with the item at position n.
9145 """
9146 return __core.wxItemContainer_SetClientData(*args, **kwargs)
9147
9148 def GetCount(*args, **kwargs):
9149 """
9150 GetCount(self) -> int
9151
9152 Returns the number of items in the control.
9153 """
9154 return __core.wxItemContainer_GetCount(*args, **kwargs)
9155
9156 def IsEmpty(*args, **kwargs):
9157 """
9158 IsEmpty(self) -> bool
9159
9160 Returns True if the control is empty or False if it has some items.
9161 """
9162 return __core.wxItemContainer_IsEmpty(*args, **kwargs)
9163
9164 def GetString(*args, **kwargs):
9165 """
9166 GetString(self, int n) -> wxString
9167
9168 Returns the label of the item with the given index.
9169 """
9170 return __core.wxItemContainer_GetString(*args, **kwargs)
9171
9172 def GetStrings(*args, **kwargs):
9173 """GetStrings(self) -> wxArrayString"""
9174 return __core.wxItemContainer_GetStrings(*args, **kwargs)
9175
9176 def SetString(*args, **kwargs):
9177 """
9178 SetString(self, int n, wxString s)
9179
9180 Sets the label for the given item.
9181 """
9182 return __core.wxItemContainer_SetString(*args, **kwargs)
9183
9184 def FindString(*args, **kwargs):
9185 """
9186 FindString(self, wxString s) -> int
9187
9188 Finds an item whose label matches the given string. Returns the
9189 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
9190 found.
9191 """
9192 return __core.wxItemContainer_FindString(*args, **kwargs)
9193
9194 def SetSelection(*args, **kwargs):
9195 """
9196 SetSelection(self, int n)
9197
9198 Sets the item at index 'n' to be the selected item.
9199 """
9200 return __core.wxItemContainer_SetSelection(*args, **kwargs)
9201
9202 def GetSelection(*args, **kwargs):
9203 """
9204 GetSelection(self) -> int
9205
9206 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
9207 is selected.
9208 """
9209 return __core.wxItemContainer_GetSelection(*args, **kwargs)
9210
9211 def SetStringSelection(*args, **kwargs):
9212 """SetStringSelection(self, wxString s) -> bool"""
9213 return __core.wxItemContainer_SetStringSelection(*args, **kwargs)
9214
9215 def GetStringSelection(*args, **kwargs):
9216 """
9217 GetStringSelection(self) -> wxString
9218
9219 Returns the label of the selected item or an empty string if no item
9220 is selected.
9221 """
9222 return __core.wxItemContainer_GetStringSelection(*args, **kwargs)
9223
9224 def Select(*args, **kwargs):
9225 """
9226 Select(self, int n)
9227
9228 This is the same as `SetSelection` and exists only because it is
9229 slightly more natural for controls which support multiple selection.
9230 """
9231 return __core.wxItemContainer_Select(*args, **kwargs)
9232
9233
9234 class wxItemContainerPtr(wxItemContainer):
9235 def __init__(self, this):
9236 self.this = this
9237 if not hasattr(self,"thisown"): self.thisown = 0
9238 self.__class__ = wxItemContainer
9239 __core.wxItemContainer_swigregister(wxItemContainerPtr)
9240
9241 #---------------------------------------------------------------------------
9242
9243 class wxControlWithItems(wxControl,wxItemContainer):
9244 """
9245 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
9246 wx.Control class, and is used for the base class of various controls
9247 that have items.
9248 """
9249 def __init__(self): raise RuntimeError, "No constructor defined"
9250 def __repr__(self):
9251 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9252
9253 class wxControlWithItemsPtr(wxControlWithItems):
9254 def __init__(self, this):
9255 self.this = this
9256 if not hasattr(self,"thisown"): self.thisown = 0
9257 self.__class__ = wxControlWithItems
9258 __core.wxControlWithItems_swigregister(wxControlWithItemsPtr)
9259
9260 #---------------------------------------------------------------------------
9261
9262 class wxSizerItem(wxObject):
9263 """
9264 The wx.SizerItem class is used to track the position, size and other
9265 attributes of each item managed by a `wx.Sizer`. In normal usage user
9266 code should never need to deal directly with a wx.SizerItem, but
9267 custom classes derived from `wx.PySizer` will probably need to use the
9268 collection of wx.SizerItems held by wx.Sizer when calculating layout.
9269
9270 :see: `wx.Sizer`, `wx.GBSizerItem`
9271 """
9272 def __repr__(self):
9273 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9274 def __init__(self, *args, **kwargs):
9275 """
9276 __init__(self) -> wxSizerItem
9277
9278 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
9279 size will need to be set before this item can be used in a Sizer.
9280
9281 You will probably never need to create a wx.SizerItem directly as they
9282 are created automatically when the sizer's Add, Insert or Prepend
9283 methods are called.
9284
9285 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
9286 """
9287 newobj = __core.new_wxSizerItem(*args, **kwargs)
9288 self.this = newobj.this
9289 self.thisown = 1
9290 del newobj.thisown
9291 def DeleteWindows(*args, **kwargs):
9292 """
9293 DeleteWindows(self)
9294
9295 Destroy the window or the windows in a subsizer, depending on the type
9296 of item.
9297 """
9298 return __core.wxSizerItem_DeleteWindows(*args, **kwargs)
9299
9300 def DetachSizer(*args, **kwargs):
9301 """
9302 DetachSizer(self)
9303
9304 Enable deleting the SizerItem without destroying the contained sizer.
9305 """
9306 return __core.wxSizerItem_DetachSizer(*args, **kwargs)
9307
9308 def GetSize(*args, **kwargs):
9309 """
9310 GetSize(self) -> wxSize
9311
9312 Get the current size of the item, as set in the last Layout.
9313 """
9314 return __core.wxSizerItem_GetSize(*args, **kwargs)
9315
9316 def CalcMin(*args, **kwargs):
9317 """
9318 CalcMin(self) -> wxSize
9319
9320 Calculates the minimum desired size for the item, including any space
9321 needed by borders.
9322 """
9323 return __core.wxSizerItem_CalcMin(*args, **kwargs)
9324
9325 def SetDimension(*args, **kwargs):
9326 """
9327 SetDimension(self, wxPoint pos, wxSize size)
9328
9329 Set the position and size of the space allocated for this item by the
9330 sizer, and adjust the position and size of the item (window or
9331 subsizer) to be within that space taking alignment and borders into
9332 account.
9333 """
9334 return __core.wxSizerItem_SetDimension(*args, **kwargs)
9335
9336 def GetMinSize(*args, **kwargs):
9337 """
9338 GetMinSize(self) -> wxSize
9339
9340 Get the minimum size needed for the item.
9341 """
9342 return __core.wxSizerItem_GetMinSize(*args, **kwargs)
9343
9344 def GetMinSizeWithBorder(*args, **kwargs):
9345 """
9346 GetMinSizeWithBorder(self) -> wxSize
9347
9348 Get the minimum size needed for the item with space for the borders
9349 added, if needed.
9350 """
9351 return __core.wxSizerItem_GetMinSizeWithBorder(*args, **kwargs)
9352
9353 def SetInitSize(*args, **kwargs):
9354 """SetInitSize(self, int x, int y)"""
9355 return __core.wxSizerItem_SetInitSize(*args, **kwargs)
9356
9357 def SetRatioWH(*args, **kwargs):
9358 """
9359 SetRatioWH(self, int width, int height)
9360
9361 Set the ratio item attribute.
9362 """
9363 return __core.wxSizerItem_SetRatioWH(*args, **kwargs)
9364
9365 def SetRatioSize(*args, **kwargs):
9366 """
9367 SetRatioSize(self, wxSize size)
9368
9369 Set the ratio item attribute.
9370 """
9371 return __core.wxSizerItem_SetRatioSize(*args, **kwargs)
9372
9373 def SetRatio(*args, **kwargs):
9374 """
9375 SetRatio(self, float ratio)
9376
9377 Set the ratio item attribute.
9378 """
9379 return __core.wxSizerItem_SetRatio(*args, **kwargs)
9380
9381 def GetRatio(*args, **kwargs):
9382 """
9383 GetRatio(self) -> float
9384
9385 Set the ratio item attribute.
9386 """
9387 return __core.wxSizerItem_GetRatio(*args, **kwargs)
9388
9389 def GetRect(*args, **kwargs):
9390 """
9391 GetRect(self) -> wxRect
9392
9393 Returns the rectangle that the sizer item should occupy
9394 """
9395 return __core.wxSizerItem_GetRect(*args, **kwargs)
9396
9397 def IsWindow(*args, **kwargs):
9398 """
9399 IsWindow(self) -> bool
9400
9401 Is this sizer item a window?
9402 """
9403 return __core.wxSizerItem_IsWindow(*args, **kwargs)
9404
9405 def IsSizer(*args, **kwargs):
9406 """
9407 IsSizer(self) -> bool
9408
9409 Is this sizer item a subsizer?
9410 """
9411 return __core.wxSizerItem_IsSizer(*args, **kwargs)
9412
9413 def IsSpacer(*args, **kwargs):
9414 """
9415 IsSpacer(self) -> bool
9416
9417 Is this sizer item a spacer?
9418 """
9419 return __core.wxSizerItem_IsSpacer(*args, **kwargs)
9420
9421 def SetProportion(*args, **kwargs):
9422 """
9423 SetProportion(self, int proportion)
9424
9425 Set the proportion value for this item.
9426 """
9427 return __core.wxSizerItem_SetProportion(*args, **kwargs)
9428
9429 def GetProportion(*args, **kwargs):
9430 """
9431 GetProportion(self) -> int
9432
9433 Get the proportion value for this item.
9434 """
9435 return __core.wxSizerItem_GetProportion(*args, **kwargs)
9436
9437 SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.")
9438 GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.")
9439 def SetFlag(*args, **kwargs):
9440 """
9441 SetFlag(self, int flag)
9442
9443 Set the flag value for this item.
9444 """
9445 return __core.wxSizerItem_SetFlag(*args, **kwargs)
9446
9447 def GetFlag(*args, **kwargs):
9448 """
9449 GetFlag(self) -> int
9450
9451 Get the flag value for this item.
9452 """
9453 return __core.wxSizerItem_GetFlag(*args, **kwargs)
9454
9455 def SetBorder(*args, **kwargs):
9456 """
9457 SetBorder(self, int border)
9458
9459 Set the border value for this item.
9460 """
9461 return __core.wxSizerItem_SetBorder(*args, **kwargs)
9462
9463 def GetBorder(*args, **kwargs):
9464 """
9465 GetBorder(self) -> int
9466
9467 Get the border value for this item.
9468 """
9469 return __core.wxSizerItem_GetBorder(*args, **kwargs)
9470
9471 def GetWindow(*args, **kwargs):
9472 """
9473 GetWindow(self) -> wxWindow
9474
9475 Get the window (if any) that is managed by this sizer item.
9476 """
9477 return __core.wxSizerItem_GetWindow(*args, **kwargs)
9478
9479 def SetWindow(*args, **kwargs):
9480 """
9481 SetWindow(self, wxWindow window)
9482
9483 Set the window to be managed by this sizer item.
9484 """
9485 return __core.wxSizerItem_SetWindow(*args, **kwargs)
9486
9487 def GetSizer(*args, **kwargs):
9488 """
9489 GetSizer(self) -> wxSizer
9490
9491 Get the subsizer (if any) that is managed by this sizer item.
9492 """
9493 return __core.wxSizerItem_GetSizer(*args, **kwargs)
9494
9495 def SetSizer(*args, **kwargs):
9496 """
9497 SetSizer(self, wxSizer sizer)
9498
9499 Set the subsizer to be managed by this sizer item.
9500 """
9501 return __core.wxSizerItem_SetSizer(*args, **kwargs)
9502
9503 def GetSpacer(*args, **kwargs):
9504 """
9505 GetSpacer(self) -> wxSize
9506
9507 Get the size of the spacer managed by this sizer item.
9508 """
9509 return __core.wxSizerItem_GetSpacer(*args, **kwargs)
9510
9511 def SetSpacer(*args, **kwargs):
9512 """
9513 SetSpacer(self, wxSize size)
9514
9515 Set the size of the spacer to be managed by this sizer item.
9516 """
9517 return __core.wxSizerItem_SetSpacer(*args, **kwargs)
9518
9519 def Show(*args, **kwargs):
9520 """
9521 Show(self, bool show)
9522
9523 Set the show item attribute, which sizers use to determine if the item
9524 is to be made part of the layout or not. If the item is tracking a
9525 window then it is shown or hidden as needed.
9526 """
9527 return __core.wxSizerItem_Show(*args, **kwargs)
9528
9529 def IsShown(*args, **kwargs):
9530 """
9531 IsShown(self) -> bool
9532
9533 Is the item to be shown in the layout?
9534 """
9535 return __core.wxSizerItem_IsShown(*args, **kwargs)
9536
9537 def GetPosition(*args, **kwargs):
9538 """
9539 GetPosition(self) -> wxPoint
9540
9541 Returns the current position of the item, as set in the last Layout.
9542 """
9543 return __core.wxSizerItem_GetPosition(*args, **kwargs)
9544
9545 def GetUserData(*args, **kwargs):
9546 """
9547 GetUserData(self) -> PyObject
9548
9549 Returns the userData associated with this sizer item, or None if there
9550 isn't any.
9551 """
9552 return __core.wxSizerItem_GetUserData(*args, **kwargs)
9553
9554
9555 class wxSizerItemPtr(wxSizerItem):
9556 def __init__(self, this):
9557 self.this = this
9558 if not hasattr(self,"thisown"): self.thisown = 0
9559 self.__class__ = wxSizerItem
9560 __core.wxSizerItem_swigregister(wxSizerItemPtr)
9561
9562 def SizerItemWindow(*args, **kwargs):
9563 """
9564 SizerItemWindow(wxWindow window, int proportion, int flag, int border,
9565 PyObject userData=None) -> wxSizerItem
9566
9567 Constructs a `wx.SizerItem` for tracking a window.
9568 """
9569 val = __core.new_SizerItemWindow(*args, **kwargs)
9570 val.thisown = 1
9571 return val
9572
9573 def SizerItemSpacer(*args, **kwargs):
9574 """
9575 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
9576 PyObject userData=None) -> wxSizerItem
9577
9578 Constructs a `wx.SizerItem` for tracking a spacer.
9579 """
9580 val = __core.new_SizerItemSpacer(*args, **kwargs)
9581 val.thisown = 1
9582 return val
9583
9584 def SizerItemSizer(*args, **kwargs):
9585 """
9586 SizerItemSizer(wxSizer sizer, int proportion, int flag, int border,
9587 PyObject userData=None) -> wxSizerItem
9588
9589 Constructs a `wx.SizerItem` for tracking a subsizer
9590 """
9591 val = __core.new_SizerItemSizer(*args, **kwargs)
9592 val.thisown = 1
9593 return val
9594
9595 class wxSizer(wxObject):
9596 """
9597 wx.Sizer is the abstract base class used for laying out subwindows in
9598 a window. You cannot use wx.Sizer directly; instead, you will have to
9599 use one of the sizer classes derived from it such as `wx.BoxSizer`,
9600 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
9601 and `wx.GridBagSizer`.
9602
9603 The concept implemented by sizers in wxWidgets is closely related to
9604 layout tools in other GUI toolkits, such as Java's AWT, the GTK
9605 toolkit or the Qt toolkit. It is based upon the idea of the individual
9606 subwindows reporting their minimal required size and their ability to
9607 get stretched if the size of the parent window has changed. This will
9608 most often mean that the programmer does not set the original size of
9609 a dialog in the beginning, rather the dialog will assigned a sizer and
9610 this sizer will be queried about the recommended size. The sizer in
9611 turn will query its children, which can be normal windows or contorls,
9612 empty space or other sizers, so that a hierarchy of sizers can be
9613 constructed. Note that wxSizer does not derive from wxWindow and thus
9614 do not interfere with tab ordering and requires very little resources
9615 compared to a real window on screen.
9616
9617 What makes sizers so well fitted for use in wxWidgets is the fact that
9618 every control reports its own minimal size and the algorithm can
9619 handle differences in font sizes or different window (dialog item)
9620 sizes on different platforms without problems. If for example the
9621 standard font as well as the overall design of Mac widgets requires
9622 more space than on Windows, then the initial size of a dialog using a
9623 sizer will automatically be bigger on Mac than on Windows.
9624 """
9625 def __init__(self): raise RuntimeError, "No constructor defined"
9626 def __repr__(self):
9627 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9628 def _setOORInfo(*args, **kwargs):
9629 """_setOORInfo(self, PyObject _self)"""
9630 return __core.wxSizer__setOORInfo(*args, **kwargs)
9631
9632 def Add(*args, **kwargs):
9633 """
9634 Add(self, item, int proportion=0, int flag=0, int border=0,
9635 PyObject userData=None) -> wx.SizerItem
9636
9637 Appends a child item to the sizer.
9638 """
9639 return __core.wxSizer_Add(*args, **kwargs)
9640
9641 def Insert(*args, **kwargs):
9642 """
9643 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
9644 PyObject userData=None) -> wx.SizerItem
9645
9646 Inserts a new item into the list of items managed by this sizer before
9647 the item at index *before*. See `Add` for a description of the parameters.
9648 """
9649 return __core.wxSizer_Insert(*args, **kwargs)
9650
9651 def Prepend(*args, **kwargs):
9652 """
9653 Prepend(self, item, int proportion=0, int flag=0, int border=0,
9654 PyObject userData=None) -> wx.SizerItem
9655
9656 Adds a new item to the begining of the list of sizer items managed by
9657 this sizer. See `Add` for a description of the parameters.
9658 """
9659 return __core.wxSizer_Prepend(*args, **kwargs)
9660
9661 def Remove(*args, **kwargs):
9662 """
9663 Remove(self, item) -> bool
9664
9665 Removes an item from the sizer and destroys it. This method does not
9666 cause any layout or resizing to take place, call `Layout` to update
9667 the layout on screen after removing a child from the sizer. The
9668 *item* parameter can be either a window, a sizer, or the zero-based
9669 index of an item to remove. Returns True if the child item was found
9670 and removed.
9671 """
9672 return __core.wxSizer_Remove(*args, **kwargs)
9673
9674 def Detach(*args, **kwargs):
9675 """
9676 Detach(self, item) -> bool
9677
9678 Detaches an item from the sizer without destroying it. This method
9679 does not cause any layout or resizing to take place, call `Layout` to
9680 do so. The *item* parameter can be either a window, a sizer, or the
9681 zero-based index of the item to be detached. Returns True if the child item
9682 was found and detached.
9683 """
9684 return __core.wxSizer_Detach(*args, **kwargs)
9685
9686 def GetItem(*args, **kwargs):
9687 """
9688 GetItem(self, item) -> wx.SizerItem
9689
9690 Returns the `wx.SizerItem` which holds the *item* given. The *item*
9691 parameter can be either a window, a sizer, or the zero-based index of
9692 the item to be detached.
9693 """
9694 return __core.wxSizer_GetItem(*args, **kwargs)
9695
9696 def _SetItemMinSize(*args, **kwargs):
9697 """_SetItemMinSize(self, PyObject item, wxSize size)"""
9698 return __core.wxSizer__SetItemMinSize(*args, **kwargs)
9699
9700 def SetItemMinSize(self, item, *args):
9701 """
9702 SetItemMinSize(self, item, Size size)
9703
9704 Sets the minimum size that will be allocated for an item in the sizer.
9705 The *item* parameter can be either a window, a sizer, or the
9706 zero-based index of the item. If a window or sizer is given then it
9707 will be searched for recursivly in subsizers if neccessary.
9708 """
9709 if len(args) == 2:
9710 # for backward compatibility accept separate width,height args too
9711 return self._SetItemMinSize(item, args)
9712 else:
9713 return self._SetItemMinSize(item, args[0])
9714
9715 def AddItem(*args, **kwargs):
9716 """
9717 AddItem(self, SizerItem item)
9718
9719 Adds a `wx.SizerItem` to the sizer.
9720 """
9721 return __core.wxSizer_AddItem(*args, **kwargs)
9722
9723 def InsertItem(*args, **kwargs):
9724 """
9725 InsertItem(self, int index, SizerItem item)
9726
9727 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
9728 """
9729 return __core.wxSizer_InsertItem(*args, **kwargs)
9730
9731 def PrependItem(*args, **kwargs):
9732 """
9733 PrependItem(self, SizerItem item)
9734
9735 Prepends a `wx.SizerItem` to the sizer.
9736 """
9737 return __core.wxSizer_PrependItem(*args, **kwargs)
9738
9739 def AddMany(self, items):
9740 """
9741 AddMany is a convenience method for adding several items
9742 to a sizer at one time. Simply pass it a list of tuples,
9743 where each tuple consists of the parameters that you
9744 would normally pass to the `Add` method.
9745 """
9746 for item in items:
9747 if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)):
9748 item = (item, )
9749 self.Add(*item)
9750
9751 # for backwards compatibility only, please do not use in new code
9752 def AddWindow(self, *args, **kw):
9753 """Compatibility alias for `Add`."""
9754 return self.Add(*args, **kw)
9755 def AddSizer(self, *args, **kw):
9756 """Compatibility alias for `Add`."""
9757 return self.Add(*args, **kw)
9758 def AddSpacer(self, *args, **kw):
9759 """Compatibility alias for `Add`."""
9760 return self.Add(*args, **kw)
9761
9762 def PrependWindow(self, *args, **kw):
9763 """Compatibility alias for `Prepend`."""
9764 return self.Prepend(*args, **kw)
9765 def PrependSizer(self, *args, **kw):
9766 """Compatibility alias for `Prepend`."""
9767 return self.Prepend(*args, **kw)
9768 def PrependSpacer(self, *args, **kw):
9769 """Compatibility alias for `Prepend`."""
9770 return self.Prepend(*args, **kw)
9771
9772 def InsertWindow(self, *args, **kw):
9773 """Compatibility alias for `Insert`."""
9774 return self.Insert(*args, **kw)
9775 def InsertSizer(self, *args, **kw):
9776 """Compatibility alias for `Insert`."""
9777 return self.Insert(*args, **kw)
9778 def InsertSpacer(self, *args, **kw):
9779 """Compatibility alias for `Insert`."""
9780 return self.Insert(*args, **kw)
9781
9782 def RemoveWindow(self, *args, **kw):
9783 """Compatibility alias for `Remove`."""
9784 return self.Remove(*args, **kw)
9785 def RemoveSizer(self, *args, **kw):
9786 """Compatibility alias for `Remove`."""
9787 return self.Remove(*args, **kw)
9788 def RemovePos(self, *args, **kw):
9789 """Compatibility alias for `Remove`."""
9790 return self.Remove(*args, **kw)
9791
9792
9793 def SetDimension(*args, **kwargs):
9794 """
9795 SetDimension(self, int x, int y, int width, int height)
9796
9797 Call this to force the sizer to take the given dimension and thus
9798 force the items owned by the sizer to resize themselves according to
9799 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
9800 methods.
9801 """
9802 return __core.wxSizer_SetDimension(*args, **kwargs)
9803
9804 def SetMinSize(*args, **kwargs):
9805 """
9806 SetMinSize(self, wxSize size)
9807
9808 Call this to give the sizer a minimal size. Normally, the sizer will
9809 calculate its minimal size based purely on how much space its children
9810 need. After calling this method `GetMinSize` will return either the
9811 minimal size as requested by its children or the minimal size set
9812 here, depending on which is bigger.
9813 """
9814 return __core.wxSizer_SetMinSize(*args, **kwargs)
9815
9816 def GetSize(*args, **kwargs):
9817 """
9818 GetSize(self) -> wxSize
9819
9820 Returns the current size of the space managed by the sizer.
9821 """
9822 return __core.wxSizer_GetSize(*args, **kwargs)
9823
9824 def GetPosition(*args, **kwargs):
9825 """
9826 GetPosition(self) -> wxPoint
9827
9828 Returns the current position of the sizer's managed space.
9829 """
9830 return __core.wxSizer_GetPosition(*args, **kwargs)
9831
9832 def GetMinSize(*args, **kwargs):
9833 """
9834 GetMinSize(self) -> wxSize
9835
9836 Returns the minimal size of the sizer. This is either the combined
9837 minimal size of all the children and their borders or the minimal size
9838 set by SetMinSize, depending on which is bigger.
9839 """
9840 return __core.wxSizer_GetMinSize(*args, **kwargs)
9841
9842 def GetSizeTuple(self):
9843 return self.GetSize().Get()
9844 def GetPositionTuple(self):
9845 return self.GetPosition().Get()
9846 def GetMinSizeTuple(self):
9847 return self.GetMinSize().Get()
9848
9849 def RecalcSizes(*args, **kwargs):
9850 """
9851 RecalcSizes(self)
9852
9853 Using the sizes calculated by `CalcMin` reposition and resize all the
9854 items managed by this sizer. You should not need to call this directly as
9855 it is called by `Layout`.
9856 """
9857 return __core.wxSizer_RecalcSizes(*args, **kwargs)
9858
9859 def CalcMin(*args, **kwargs):
9860 """
9861 CalcMin(self) -> wxSize
9862
9863 This method is where the sizer will do the actual calculation of its
9864 children's minimal sizes. You should not need to call this directly as
9865 it is called by `Layout`.
9866 """
9867 return __core.wxSizer_CalcMin(*args, **kwargs)
9868
9869 def Layout(*args, **kwargs):
9870 """
9871 Layout(self)
9872
9873 This method will force the recalculation and layout of the items
9874 controlled by the sizer using the current space allocated to the
9875 sizer. Normally this is called automatically from the owning window's
9876 EVT_SIZE handler, but it is also useful to call it from user code when
9877 one of the items in a sizer change size, or items are added or
9878 removed.
9879 """
9880 return __core.wxSizer_Layout(*args, **kwargs)
9881
9882 def Fit(*args, **kwargs):
9883 """
9884 Fit(self, wxWindow window) -> wxSize
9885
9886 Tell the sizer to resize the *window* to match the sizer's minimal
9887 size. This is commonly done in the constructor of the window itself in
9888 order to set its initial size to match the needs of the children as
9889 determined by the sizer. Returns the new size.
9890
9891 For a top level window this is the total window size, not the client size.
9892 """
9893 return __core.wxSizer_Fit(*args, **kwargs)
9894
9895 def FitInside(*args, **kwargs):
9896 """
9897 FitInside(self, wxWindow window)
9898
9899 Tell the sizer to resize the *virtual size* of the *window* to match the
9900 sizer's minimal size. This will not alter the on screen size of the
9901 window, but may cause the addition/removal/alteration of scrollbars
9902 required to view the virtual area in windows which manage it.
9903
9904 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
9905
9906 """
9907 return __core.wxSizer_FitInside(*args, **kwargs)
9908
9909 def SetSizeHints(*args, **kwargs):
9910 """
9911 SetSizeHints(self, wxWindow window)
9912
9913 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
9914 match the sizer's minimal size. This is commonly done in the
9915 constructor of the window itself if the window is resizable (as are
9916 many dialogs under Unix and frames on probably all platforms) in order
9917 to prevent the window from being sized smaller than the minimal size
9918 required by the sizer.
9919 """
9920 return __core.wxSizer_SetSizeHints(*args, **kwargs)
9921
9922 def SetVirtualSizeHints(*args, **kwargs):
9923 """
9924 SetVirtualSizeHints(self, wxWindow window)
9925
9926 Tell the sizer to set the minimal size of the window virtual area to
9927 match the sizer's minimal size. For windows with managed scrollbars
9928 this will set them appropriately.
9929
9930 :see: `wx.ScrolledWindow.SetScrollbars`
9931
9932 """
9933 return __core.wxSizer_SetVirtualSizeHints(*args, **kwargs)
9934
9935 def Clear(*args, **kwargs):
9936 """
9937 Clear(self, bool deleteWindows=False)
9938
9939 Clear all items from the sizer, optionally destroying the window items
9940 as well.
9941 """
9942 return __core.wxSizer_Clear(*args, **kwargs)
9943
9944 def DeleteWindows(*args, **kwargs):
9945 """
9946 DeleteWindows(self)
9947
9948 Destroy all windows managed by the sizer.
9949 """
9950 return __core.wxSizer_DeleteWindows(*args, **kwargs)
9951
9952 def GetChildren(*args, **kwargs):
9953 """
9954 GetChildren(self) -> list
9955
9956 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
9957 """
9958 return __core.wxSizer_GetChildren(*args, **kwargs)
9959
9960 def Show(*args, **kwargs):
9961 """
9962 Show(self, item, bool show=True, bool recursive=false) -> bool
9963
9964 Shows or hides an item managed by the sizer. To make a sizer item
9965 disappear or reappear, use Show followed by `Layout`. The *item*
9966 parameter can be either a window, a sizer, or the zero-based index of
9967 the item. Use the recursive parameter to show or hide an item in a
9968 subsizer. Returns True if the item was found.
9969 """
9970 return __core.wxSizer_Show(*args, **kwargs)
9971
9972 def IsShown(*args, **kwargs):
9973 """
9974 IsShown(self, item)
9975
9976 Determines if the item is currently shown. sizer. To make a sizer
9977 item disappear or reappear, use Show followed by `Layout`. The *item*
9978 parameter can be either a window, a sizer, or the zero-based index of
9979 the item.
9980 """
9981 return __core.wxSizer_IsShown(*args, **kwargs)
9982
9983 def Hide(self, item, recursive=False):
9984 """
9985 A convenience method for `Show`(item, False, recursive).
9986 """
9987 return self.Show(item, False, recursive)
9988
9989 def ShowItems(*args, **kwargs):
9990 """
9991 ShowItems(self, bool show)
9992
9993 Recursively call `wx.SizerItem.Show` on all sizer items.
9994 """
9995 return __core.wxSizer_ShowItems(*args, **kwargs)
9996
9997
9998 class wxSizerPtr(wxSizer):
9999 def __init__(self, this):
10000 self.this = this
10001 if not hasattr(self,"thisown"): self.thisown = 0
10002 self.__class__ = wxSizer
10003 __core.wxSizer_swigregister(wxSizerPtr)
10004
10005 class wxPySizer(wxSizer):
10006 """
10007 wx.PySizer is a special version of `wx.Sizer` that has been
10008 instrumented to allow the C++ virtual methods to be overloaded in
10009 Python derived classes. You would derive from this class if you are
10010 wanting to implement a custom sizer in Python code. Simply implement
10011 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
10012 For example::
10013
10014 class MySizer(wx.PySizer):
10015 def __init__(self):
10016 wx.PySizer.__init__(self)
10017
10018 def CalcMin(self):
10019 for item in self.GetChildren():
10020 # calculate the total minimum width and height needed
10021 # by all items in the sizer according to this sizer's
10022 # layout algorithm.
10023 ...
10024 return wx.Size(width, height)
10025
10026 def RecalcSizes(self):
10027 # find the space allotted to this sizer
10028 pos = self.GetPosition()
10029 size = self.GetSize()
10030 for item in self.GetChildren():
10031 # Recalculate (if necessary) the position and size of
10032 # each item and then call item.SetDimension to do the
10033 # actual positioning and sizing of the items within the
10034 # space alloted to this sizer.
10035 ...
10036 item.SetDimension(itemPos, itemSize)
10037
10038
10039 When `Layout` is called it first calls `CalcMin` followed by
10040 `RecalcSizes` so you can optimize a bit by saving the results of
10041 `CalcMin` and reusing them in `RecalcSizes`.
10042
10043 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
10044
10045
10046 """
10047 def __repr__(self):
10048 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10049 def __init__(self, *args, **kwargs):
10050 """
10051 __init__(self) -> wxPySizer
10052
10053 Creates a wx.PySizer. Must be called from the __init__ in the derived
10054 class.
10055 """
10056 newobj = __core.new_wxPySizer(*args, **kwargs)
10057 self.this = newobj.this
10058 self.thisown = 1
10059 del newobj.thisown
10060 self._setCallbackInfo(self, PySizer);self._setOORInfo(self)
10061
10062 def _setCallbackInfo(*args, **kwargs):
10063 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
10064 return __core.wxPySizer__setCallbackInfo(*args, **kwargs)
10065
10066
10067 class wxPySizerPtr(wxPySizer):
10068 def __init__(self, this):
10069 self.this = this
10070 if not hasattr(self,"thisown"): self.thisown = 0
10071 self.__class__ = wxPySizer
10072 __core.wxPySizer_swigregister(wxPySizerPtr)
10073
10074 #---------------------------------------------------------------------------
10075
10076 class wxBoxSizer(wxSizer):
10077 """
10078 The basic idea behind a box sizer is that windows will most often be
10079 laid out in rather simple basic geometry, typically in a row or a
10080 column or nested hierarchies of either. A wx.BoxSizer will lay out
10081 its items in a simple row or column, depending on the orientation
10082 parameter passed to the constructor.
10083 """
10084 def __repr__(self):
10085 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10086 def __init__(self, *args, **kwargs):
10087 """
10088 __init__(self, int orient=wxHORIZONTAL) -> wxBoxSizer
10089
10090 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
10091 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
10092 sizer.
10093 """
10094 newobj = __core.new_wxBoxSizer(*args, **kwargs)
10095 self.this = newobj.this
10096 self.thisown = 1
10097 del newobj.thisown
10098 self._setOORInfo(self)
10099
10100 def GetOrientation(*args, **kwargs):
10101 """
10102 GetOrientation(self) -> int
10103
10104 Returns the current orientation of the sizer.
10105 """
10106 return __core.wxBoxSizer_GetOrientation(*args, **kwargs)
10107
10108 def SetOrientation(*args, **kwargs):
10109 """
10110 SetOrientation(self, int orient)
10111
10112 Resets the orientation of the sizer.
10113 """
10114 return __core.wxBoxSizer_SetOrientation(*args, **kwargs)
10115
10116
10117 class wxBoxSizerPtr(wxBoxSizer):
10118 def __init__(self, this):
10119 self.this = this
10120 if not hasattr(self,"thisown"): self.thisown = 0
10121 self.__class__ = wxBoxSizer
10122 __core.wxBoxSizer_swigregister(wxBoxSizerPtr)
10123
10124 #---------------------------------------------------------------------------
10125
10126 class wxStaticBoxSizer(wxBoxSizer):
10127 """
10128 wx.StaticBoxSizer derives from and functions identically to the
10129 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
10130 manages. Note that this static box must be created separately and
10131 passed to the sizer constructor.
10132 """
10133 def __repr__(self):
10134 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10135 def __init__(self, *args, **kwargs):
10136 """
10137 __init__(self, wxStaticBox box, int orient=wxHORIZONTAL) -> wxStaticBoxSizer
10138
10139 Constructor. It takes an associated static box and the orientation
10140 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
10141 ``wx.HORIZONTAL``.
10142 """
10143 newobj = __core.new_wxStaticBoxSizer(*args, **kwargs)
10144 self.this = newobj.this
10145 self.thisown = 1
10146 del newobj.thisown
10147 self._setOORInfo(self)
10148
10149 def GetStaticBox(*args, **kwargs):
10150 """
10151 GetStaticBox(self) -> wxStaticBox
10152
10153 Returns the static box associated with this sizer.
10154 """
10155 return __core.wxStaticBoxSizer_GetStaticBox(*args, **kwargs)
10156
10157
10158 class wxStaticBoxSizerPtr(wxStaticBoxSizer):
10159 def __init__(self, this):
10160 self.this = this
10161 if not hasattr(self,"thisown"): self.thisown = 0
10162 self.__class__ = wxStaticBoxSizer
10163 __core.wxStaticBoxSizer_swigregister(wxStaticBoxSizerPtr)
10164
10165 #---------------------------------------------------------------------------
10166
10167 class wxGridSizer(wxSizer):
10168 """
10169 A grid sizer is a sizer which lays out its children in a
10170 two-dimensional table with all cells having the same size. In other
10171 words, the width of each cell within the grid is the width of the
10172 widest item added to the sizer and the height of each grid cell is the
10173 height of the tallest item. An optional vertical and/or horizontal
10174 gap between items can also be specified (in pixels.)
10175
10176 Items are placed in the cells of the grid in the order they are added,
10177 in row-major order. In other words, the first row is filled first,
10178 then the second, and so on until all items have been added. (If
10179 neccessary, additional rows will be added as items are added.) If you
10180 need to have greater control over the cells that items are placed in
10181 then use the `wx.GridBagSizer`.
10182
10183 """
10184 def __repr__(self):
10185 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10186 def __init__(self, *args, **kwargs):
10187 """
10188 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> wxGridSizer
10189
10190 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
10191 of columns and rows in the sizer - if either of the parameters is
10192 zero, it will be calculated to from the total number of children in
10193 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10194 define extra space between all children.
10195 """
10196 newobj = __core.new_wxGridSizer(*args, **kwargs)
10197 self.this = newobj.this
10198 self.thisown = 1
10199 del newobj.thisown
10200 self._setOORInfo(self)
10201
10202 def SetCols(*args, **kwargs):
10203 """
10204 SetCols(self, int cols)
10205
10206 Sets the number of columns in the sizer.
10207 """
10208 return __core.wxGridSizer_SetCols(*args, **kwargs)
10209
10210 def SetRows(*args, **kwargs):
10211 """
10212 SetRows(self, int rows)
10213
10214 Sets the number of rows in the sizer.
10215 """
10216 return __core.wxGridSizer_SetRows(*args, **kwargs)
10217
10218 def SetVGap(*args, **kwargs):
10219 """
10220 SetVGap(self, int gap)
10221
10222 Sets the vertical gap (in pixels) between the cells in the sizer.
10223 """
10224 return __core.wxGridSizer_SetVGap(*args, **kwargs)
10225
10226 def SetHGap(*args, **kwargs):
10227 """
10228 SetHGap(self, int gap)
10229
10230 Sets the horizontal gap (in pixels) between cells in the sizer
10231 """
10232 return __core.wxGridSizer_SetHGap(*args, **kwargs)
10233
10234 def GetCols(*args, **kwargs):
10235 """
10236 GetCols(self) -> int
10237
10238 Returns the number of columns in the sizer.
10239 """
10240 return __core.wxGridSizer_GetCols(*args, **kwargs)
10241
10242 def GetRows(*args, **kwargs):
10243 """
10244 GetRows(self) -> int
10245
10246 Returns the number of rows in the sizer.
10247 """
10248 return __core.wxGridSizer_GetRows(*args, **kwargs)
10249
10250 def GetVGap(*args, **kwargs):
10251 """
10252 GetVGap(self) -> int
10253
10254 Returns the vertical gap (in pixels) between the cells in the sizer.
10255 """
10256 return __core.wxGridSizer_GetVGap(*args, **kwargs)
10257
10258 def GetHGap(*args, **kwargs):
10259 """
10260 GetHGap(self) -> int
10261
10262 Returns the horizontal gap (in pixels) between cells in the sizer.
10263 """
10264 return __core.wxGridSizer_GetHGap(*args, **kwargs)
10265
10266
10267 class wxGridSizerPtr(wxGridSizer):
10268 def __init__(self, this):
10269 self.this = this
10270 if not hasattr(self,"thisown"): self.thisown = 0
10271 self.__class__ = wxGridSizer
10272 __core.wxGridSizer_swigregister(wxGridSizerPtr)
10273
10274 #---------------------------------------------------------------------------
10275
10276 wxFLEX_GROWMODE_NONE = __core.wxFLEX_GROWMODE_NONE
10277 wxFLEX_GROWMODE_SPECIFIED = __core.wxFLEX_GROWMODE_SPECIFIED
10278 wxFLEX_GROWMODE_ALL = __core.wxFLEX_GROWMODE_ALL
10279 class wxFlexGridSizer(wxGridSizer):
10280 """
10281 A flex grid sizer is a sizer which lays out its children in a
10282 two-dimensional table with all table cells in one row having the same
10283 height and all cells in one column having the same width, but all
10284 rows or all columns are not necessarily the same height or width as in
10285 the `wx.GridSizer`.
10286
10287 wx.FlexGridSizer can also size items equally in one direction but
10288 unequally ("flexibly") in the other. If the sizer is only flexible
10289 in one direction (this can be changed using `SetFlexibleDirection`), it
10290 needs to be decided how the sizer should grow in the other ("non
10291 flexible") direction in order to fill the available space. The
10292 `SetNonFlexibleGrowMode` method serves this purpose.
10293
10294
10295 """
10296 def __repr__(self):
10297 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10298 def __init__(self, *args, **kwargs):
10299 """
10300 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> wxFlexGridSizer
10301
10302 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
10303 number of columns and rows in the sizer - if either of the parameters
10304 is zero, it will be calculated to from the total number of children in
10305 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10306 define extra space between all children.
10307 """
10308 newobj = __core.new_wxFlexGridSizer(*args, **kwargs)
10309 self.this = newobj.this
10310 self.thisown = 1
10311 del newobj.thisown
10312 self._setOORInfo(self)
10313
10314 def AddGrowableRow(*args, **kwargs):
10315 """
10316 AddGrowableRow(self, size_t idx, int proportion=0)
10317
10318 Specifies that row *idx* (starting from zero) should be grown if there
10319 is extra space available to the sizer.
10320
10321 The *proportion* parameter has the same meaning as the stretch factor
10322 for the box sizers except that if all proportions are 0, then all
10323 columns are resized equally (instead of not being resized at all).
10324 """
10325 return __core.wxFlexGridSizer_AddGrowableRow(*args, **kwargs)
10326
10327 def RemoveGrowableRow(*args, **kwargs):
10328 """
10329 RemoveGrowableRow(self, size_t idx)
10330
10331 Specifies that row *idx* is no longer growable.
10332 """
10333 return __core.wxFlexGridSizer_RemoveGrowableRow(*args, **kwargs)
10334
10335 def AddGrowableCol(*args, **kwargs):
10336 """
10337 AddGrowableCol(self, size_t idx, int proportion=0)
10338
10339 Specifies that column *idx* (starting from zero) should be grown if
10340 there is extra space available to the sizer.
10341
10342 The *proportion* parameter has the same meaning as the stretch factor
10343 for the box sizers except that if all proportions are 0, then all
10344 columns are resized equally (instead of not being resized at all).
10345 """
10346 return __core.wxFlexGridSizer_AddGrowableCol(*args, **kwargs)
10347
10348 def RemoveGrowableCol(*args, **kwargs):
10349 """
10350 RemoveGrowableCol(self, size_t idx)
10351
10352 Specifies that column *idx* is no longer growable.
10353 """
10354 return __core.wxFlexGridSizer_RemoveGrowableCol(*args, **kwargs)
10355
10356 def SetFlexibleDirection(*args, **kwargs):
10357 """
10358 SetFlexibleDirection(self, int direction)
10359
10360 Specifies whether the sizer should flexibly resize its columns, rows,
10361 or both. Argument *direction* can be one of the following values. Any
10362 other value is ignored.
10363
10364 ============== =======================================
10365 wx.VERTICAL Rows are flexibly sized.
10366 wx.HORIZONTAL Columns are flexibly sized.
10367 wx.BOTH Both rows and columns are flexibly sized
10368 (this is the default value).
10369 ============== =======================================
10370
10371 Note that this method does not trigger relayout.
10372
10373 """
10374 return __core.wxFlexGridSizer_SetFlexibleDirection(*args, **kwargs)
10375
10376 def GetFlexibleDirection(*args, **kwargs):
10377 """
10378 GetFlexibleDirection(self) -> int
10379
10380 Returns a value that specifies whether the sizer
10381 flexibly resizes its columns, rows, or both (default).
10382
10383 :see: `SetFlexibleDirection`
10384 """
10385 return __core.wxFlexGridSizer_GetFlexibleDirection(*args, **kwargs)
10386
10387 def SetNonFlexibleGrowMode(*args, **kwargs):
10388 """
10389 SetNonFlexibleGrowMode(self, int mode)
10390
10391 Specifies how the sizer should grow in the non-flexible direction if
10392 there is one (so `SetFlexibleDirection` must have been called
10393 previously). Argument *mode* can be one of the following values:
10394
10395 ========================== =================================================
10396 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
10397 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
10398 `AddGrowableCol` and `AddGrowableRow`. In this
10399 case equal sizing applies to minimum sizes of
10400 columns or rows (this is the default value).
10401 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
10402 the non flexible direction, whether they are
10403 growable or not in the flexbile direction.
10404 ========================== =================================================
10405
10406 Note that this method does not trigger relayout.
10407
10408
10409 """
10410 return __core.wxFlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs)
10411
10412 def GetNonFlexibleGrowMode(*args, **kwargs):
10413 """
10414 GetNonFlexibleGrowMode(self) -> int
10415
10416 Returns the value that specifies how the sizer grows in the
10417 non-flexible direction if there is one.
10418
10419 :see: `SetNonFlexibleGrowMode`
10420 """
10421 return __core.wxFlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
10422
10423 def GetRowHeights(*args, **kwargs):
10424 """
10425 GetRowHeights(self) -> list
10426
10427 Returns a list of integers representing the heights of each of the
10428 rows in the sizer.
10429 """
10430 return __core.wxFlexGridSizer_GetRowHeights(*args, **kwargs)
10431
10432 def GetColWidths(*args, **kwargs):
10433 """
10434 GetColWidths(self) -> list
10435
10436 Returns a list of integers representing the widths of each of the
10437 columns in the sizer.
10438 """
10439 return __core.wxFlexGridSizer_GetColWidths(*args, **kwargs)
10440
10441
10442 class wxFlexGridSizerPtr(wxFlexGridSizer):
10443 def __init__(self, this):
10444 self.this = this
10445 if not hasattr(self,"thisown"): self.thisown = 0
10446 self.__class__ = wxFlexGridSizer
10447 __core.wxFlexGridSizer_swigregister(wxFlexGridSizerPtr)
10448
10449 class wxStdDialogButtonSizer(wxBoxSizer):
10450 """
10451 A special sizer that knows how to order and position standard buttons
10452 in order to conform to the current platform's standards. You simply
10453 need to add each `wx.Button` to the sizer, and be sure to create the
10454 buttons using the standard ID's. Then call `Realize` and the sizer
10455 will take care of the rest.
10456
10457 """
10458 def __repr__(self):
10459 return "<%s.%s; proxy of C++ wxStdDialogButtonSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10460 def __init__(self, *args, **kwargs):
10461 """__init__(self) -> wxStdDialogButtonSizer"""
10462 newobj = __core.new_wxStdDialogButtonSizer(*args, **kwargs)
10463 self.this = newobj.this
10464 self.thisown = 1
10465 del newobj.thisown
10466 def AddButton(*args, **kwargs):
10467 """
10468 AddButton(self, wxButton button)
10469
10470 Use this to add the buttons to this sizer. Do not use the `Add`
10471 method in the base class.
10472 """
10473 return __core.wxStdDialogButtonSizer_AddButton(*args, **kwargs)
10474
10475 def Realize(*args, **kwargs):
10476 """
10477 Realize(self)
10478
10479 This funciton needs to be called after all the buttons have been added
10480 to the sizer. It will reorder them and position them in a platform
10481 specifc manner.
10482 """
10483 return __core.wxStdDialogButtonSizer_Realize(*args, **kwargs)
10484
10485 def SetAffirmativeButton(*args, **kwargs):
10486 """SetAffirmativeButton(self, wxButton button)"""
10487 return __core.wxStdDialogButtonSizer_SetAffirmativeButton(*args, **kwargs)
10488
10489 def SetNegativeButton(*args, **kwargs):
10490 """SetNegativeButton(self, wxButton button)"""
10491 return __core.wxStdDialogButtonSizer_SetNegativeButton(*args, **kwargs)
10492
10493 def SetCancelButton(*args, **kwargs):
10494 """SetCancelButton(self, wxButton button)"""
10495 return __core.wxStdDialogButtonSizer_SetCancelButton(*args, **kwargs)
10496
10497 def GetAffirmativeButton(*args, **kwargs):
10498 """GetAffirmativeButton(self) -> wxButton"""
10499 return __core.wxStdDialogButtonSizer_GetAffirmativeButton(*args, **kwargs)
10500
10501 def GetApplyButton(*args, **kwargs):
10502 """GetApplyButton(self) -> wxButton"""
10503 return __core.wxStdDialogButtonSizer_GetApplyButton(*args, **kwargs)
10504
10505 def GetNegativeButton(*args, **kwargs):
10506 """GetNegativeButton(self) -> wxButton"""
10507 return __core.wxStdDialogButtonSizer_GetNegativeButton(*args, **kwargs)
10508
10509 def GetCancelButton(*args, **kwargs):
10510 """GetCancelButton(self) -> wxButton"""
10511 return __core.wxStdDialogButtonSizer_GetCancelButton(*args, **kwargs)
10512
10513 def GetHelpButton(*args, **kwargs):
10514 """GetHelpButton(self) -> wxButton"""
10515 return __core.wxStdDialogButtonSizer_GetHelpButton(*args, **kwargs)
10516
10517
10518 class wxStdDialogButtonSizerPtr(wxStdDialogButtonSizer):
10519 def __init__(self, this):
10520 self.this = this
10521 if not hasattr(self,"thisown"): self.thisown = 0
10522 self.__class__ = wxStdDialogButtonSizer
10523 __core.wxStdDialogButtonSizer_swigregister(wxStdDialogButtonSizerPtr)
10524
10525 #---------------------------------------------------------------------------
10526
10527 class wxGBPosition(object):
10528 """
10529 This class represents the position of an item in a virtual grid of
10530 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10531 typemaps that will automatically convert from a 2-element sequence of
10532 integers to a wx.GBPosition, so you can use the more pythonic
10533 representation of the position nearly transparently in Python code.
10534 """
10535 def __repr__(self):
10536 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10537 def __init__(self, *args, **kwargs):
10538 """
10539 __init__(self, int row=0, int col=0) -> wxGBPosition
10540
10541 This class represents the position of an item in a virtual grid of
10542 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10543 typemaps that will automatically convert from a 2-element sequence of
10544 integers to a wx.GBPosition, so you can use the more pythonic
10545 representation of the position nearly transparently in Python code.
10546 """
10547 newobj = __core.new_wxGBPosition(*args, **kwargs)
10548 self.this = newobj.this
10549 self.thisown = 1
10550 del newobj.thisown
10551 def GetRow(*args, **kwargs):
10552 """GetRow(self) -> int"""
10553 return __core.wxGBPosition_GetRow(*args, **kwargs)
10554
10555 def GetCol(*args, **kwargs):
10556 """GetCol(self) -> int"""
10557 return __core.wxGBPosition_GetCol(*args, **kwargs)
10558
10559 def SetRow(*args, **kwargs):
10560 """SetRow(self, int row)"""
10561 return __core.wxGBPosition_SetRow(*args, **kwargs)
10562
10563 def SetCol(*args, **kwargs):
10564 """SetCol(self, int col)"""
10565 return __core.wxGBPosition_SetCol(*args, **kwargs)
10566
10567 def __eq__(*args, **kwargs):
10568 """__eq__(self, wxGBPosition other) -> bool"""
10569 return __core.wxGBPosition___eq__(*args, **kwargs)
10570
10571 def __ne__(*args, **kwargs):
10572 """__ne__(self, wxGBPosition other) -> bool"""
10573 return __core.wxGBPosition___ne__(*args, **kwargs)
10574
10575 def Set(*args, **kwargs):
10576 """Set(self, int row=0, int col=0)"""
10577 return __core.wxGBPosition_Set(*args, **kwargs)
10578
10579 def Get(*args, **kwargs):
10580 """Get(self) -> PyObject"""
10581 return __core.wxGBPosition_Get(*args, **kwargs)
10582
10583 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
10584 def __str__(self): return str(self.Get())
10585 def __repr__(self): return 'wx.GBPosition'+str(self.Get())
10586 def __len__(self): return len(self.Get())
10587 def __getitem__(self, index): return self.Get()[index]
10588 def __setitem__(self, index, val):
10589 if index == 0: self.SetRow(val)
10590 elif index == 1: self.SetCol(val)
10591 else: raise IndexError
10592 def __nonzero__(self): return self.Get() != (0,0)
10593 __safe_for_unpickling__ = True
10594 def __reduce__(self): return (wx.GBPosition, self.Get())
10595
10596 row = property(GetRow, SetRow)
10597 col = property(GetCol, SetCol)
10598
10599
10600 class wxGBPositionPtr(wxGBPosition):
10601 def __init__(self, this):
10602 self.this = this
10603 if not hasattr(self,"thisown"): self.thisown = 0
10604 self.__class__ = wxGBPosition
10605 __core.wxGBPosition_swigregister(wxGBPositionPtr)
10606
10607 class wxGBSpan(object):
10608 """
10609 This class is used to hold the row and column spanning attributes of
10610 items in a `wx.GridBagSizer`. wxPython has typemaps that will
10611 automatically convert from a 2-element sequence of integers to a
10612 wx.GBSpan, so you can use the more pythonic representation of the span
10613 nearly transparently in Python code.
10614
10615 """
10616 def __repr__(self):
10617 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10618 def __init__(self, *args, **kwargs):
10619 """
10620 __init__(self, int rowspan=1, int colspan=1) -> wxGBSpan
10621
10622 Construct a new wxGBSpan, optionally setting the rowspan and
10623 colspan. The default is (1,1). (Meaning that the item occupies one
10624 cell in each direction.
10625 """
10626 newobj = __core.new_wxGBSpan(*args, **kwargs)
10627 self.this = newobj.this
10628 self.thisown = 1
10629 del newobj.thisown
10630 def GetRowspan(*args, **kwargs):
10631 """GetRowspan(self) -> int"""
10632 return __core.wxGBSpan_GetRowspan(*args, **kwargs)
10633
10634 def GetColspan(*args, **kwargs):
10635 """GetColspan(self) -> int"""
10636 return __core.wxGBSpan_GetColspan(*args, **kwargs)
10637
10638 def SetRowspan(*args, **kwargs):
10639 """SetRowspan(self, int rowspan)"""
10640 return __core.wxGBSpan_SetRowspan(*args, **kwargs)
10641
10642 def SetColspan(*args, **kwargs):
10643 """SetColspan(self, int colspan)"""
10644 return __core.wxGBSpan_SetColspan(*args, **kwargs)
10645
10646 def __eq__(*args, **kwargs):
10647 """__eq__(self, wxGBSpan other) -> bool"""
10648 return __core.wxGBSpan___eq__(*args, **kwargs)
10649
10650 def __ne__(*args, **kwargs):
10651 """__ne__(self, wxGBSpan other) -> bool"""
10652 return __core.wxGBSpan___ne__(*args, **kwargs)
10653
10654 def Set(*args, **kwargs):
10655 """Set(self, int rowspan=1, int colspan=1)"""
10656 return __core.wxGBSpan_Set(*args, **kwargs)
10657
10658 def Get(*args, **kwargs):
10659 """Get(self) -> PyObject"""
10660 return __core.wxGBSpan_Get(*args, **kwargs)
10661
10662 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
10663 def __str__(self): return str(self.Get())
10664 def __repr__(self): return 'wx.GBSpan'+str(self.Get())
10665 def __len__(self): return len(self.Get())
10666 def __getitem__(self, index): return self.Get()[index]
10667 def __setitem__(self, index, val):
10668 if index == 0: self.SetRowspan(val)
10669 elif index == 1: self.SetColspan(val)
10670 else: raise IndexError
10671 def __nonzero__(self): return self.Get() != (0,0)
10672 __safe_for_unpickling__ = True
10673 def __reduce__(self): return (wx.GBSpan, self.Get())
10674
10675 rowspan = property(GetRowspan, SetRowspan)
10676 colspan = property(GetColspan, SetColspan)
10677
10678
10679 class wxGBSpanPtr(wxGBSpan):
10680 def __init__(self, this):
10681 self.this = this
10682 if not hasattr(self,"thisown"): self.thisown = 0
10683 self.__class__ = wxGBSpan
10684 __core.wxGBSpan_swigregister(wxGBSpanPtr)
10685
10686 class wxGBSizerItem(wxSizerItem):
10687 """
10688 The wx.GBSizerItem class is used to track the additional data about
10689 items in a `wx.GridBagSizer` such as the item's position in the grid
10690 and how many rows or columns it spans.
10691
10692 """
10693 def __repr__(self):
10694 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10695 def __init__(self, *args, **kwargs):
10696 """
10697 __init__(self) -> wxGBSizerItem
10698
10699 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
10700 size will need to be set, as well as a position and span before this
10701 item can be used in a Sizer.
10702
10703 You will probably never need to create a wx.GBSizerItem directly as they
10704 are created automatically when the sizer's Add method is called.
10705 """
10706 newobj = __core.new_wxGBSizerItem(*args, **kwargs)
10707 self.this = newobj.this
10708 self.thisown = 1
10709 del newobj.thisown
10710 def GetPos(*args, **kwargs):
10711 """
10712 GetPos(self) -> wxGBPosition
10713
10714 Get the grid position of the item
10715 """
10716 return __core.wxGBSizerItem_GetPos(*args, **kwargs)
10717
10718 def GetPosTuple(self): return self.GetPos().Get()
10719 def GetSpan(*args, **kwargs):
10720 """
10721 GetSpan(self) -> wxGBSpan
10722
10723 Get the row and column spanning of the item
10724 """
10725 return __core.wxGBSizerItem_GetSpan(*args, **kwargs)
10726
10727 def GetSpanTuple(self): return self.GetSpan().Get()
10728 def SetPos(*args, **kwargs):
10729 """
10730 SetPos(self, wxGBPosition pos) -> bool
10731
10732 If the item is already a member of a sizer then first ensure that
10733 there is no other item that would intersect with this one at the new
10734 position, then set the new position. Returns True if the change is
10735 successful and after the next Layout() the item will be moved.
10736 """
10737 return __core.wxGBSizerItem_SetPos(*args, **kwargs)
10738
10739 def SetSpan(*args, **kwargs):
10740 """
10741 SetSpan(self, wxGBSpan span) -> bool
10742
10743 If the item is already a member of a sizer then first ensure that
10744 there is no other item that would intersect with this one with its new
10745 spanning size, then set the new spanning. Returns True if the change
10746 is successful and after the next Layout() the item will be resized.
10747
10748 """
10749 return __core.wxGBSizerItem_SetSpan(*args, **kwargs)
10750
10751 def Intersects(*args, **kwargs):
10752 """
10753 Intersects(self, wxGBSizerItem other) -> bool
10754
10755 Returns True if this item and the other item instersect.
10756 """
10757 return __core.wxGBSizerItem_Intersects(*args, **kwargs)
10758
10759 def IntersectsPos(*args, **kwargs):
10760 """
10761 IntersectsPos(self, wxGBPosition pos, wxGBSpan span) -> bool
10762
10763 Returns True if the given pos/span would intersect with this item.
10764 """
10765 return __core.wxGBSizerItem_IntersectsPos(*args, **kwargs)
10766
10767 def GetEndPos(*args, **kwargs):
10768 """
10769 GetEndPos(self) -> wxGBPosition
10770
10771 Get the row and column of the endpoint of this item.
10772 """
10773 return __core.wxGBSizerItem_GetEndPos(*args, **kwargs)
10774
10775 def GetGBSizer(*args, **kwargs):
10776 """
10777 GetGBSizer(self) -> wxGridBagSizer
10778
10779 Get the sizer this item is a member of.
10780 """
10781 return __core.wxGBSizerItem_GetGBSizer(*args, **kwargs)
10782
10783 def SetGBSizer(*args, **kwargs):
10784 """
10785 SetGBSizer(self, wxGridBagSizer sizer)
10786
10787 Set the sizer this item is a member of.
10788 """
10789 return __core.wxGBSizerItem_SetGBSizer(*args, **kwargs)
10790
10791
10792 class wxGBSizerItemPtr(wxGBSizerItem):
10793 def __init__(self, this):
10794 self.this = this
10795 if not hasattr(self,"thisown"): self.thisown = 0
10796 self.__class__ = wxGBSizerItem
10797 __core.wxGBSizerItem_swigregister(wxGBSizerItemPtr)
10798 wxDefaultSpan = cvar.wxDefaultSpan
10799
10800 def GBSizerItemWindow(*args, **kwargs):
10801 """
10802 GBSizerItemWindow(wxWindow window, wxGBPosition pos, wxGBSpan span, int flag,
10803 int border, PyObject userData=None) -> wxGBSizerItem
10804
10805 Construct a `wx.GBSizerItem` for a window.
10806 """
10807 val = __core.new_GBSizerItemWindow(*args, **kwargs)
10808 val.thisown = 1
10809 return val
10810
10811 def GBSizerItemSizer(*args, **kwargs):
10812 """
10813 GBSizerItemSizer(wxSizer sizer, wxGBPosition pos, wxGBSpan span, int flag,
10814 int border, PyObject userData=None) -> wxGBSizerItem
10815
10816 Construct a `wx.GBSizerItem` for a sizer
10817 """
10818 val = __core.new_GBSizerItemSizer(*args, **kwargs)
10819 val.thisown = 1
10820 return val
10821
10822 def GBSizerItemSpacer(*args, **kwargs):
10823 """
10824 GBSizerItemSpacer(int width, int height, wxGBPosition pos, wxGBSpan span,
10825 int flag, int border, PyObject userData=None) -> wxGBSizerItem
10826
10827 Construct a `wx.GBSizerItem` for a spacer.
10828 """
10829 val = __core.new_GBSizerItemSpacer(*args, **kwargs)
10830 val.thisown = 1
10831 return val
10832
10833 class wxGridBagSizer(wxFlexGridSizer):
10834 """
10835 A `wx.Sizer` that can lay out items in a virtual grid like a
10836 `wx.FlexGridSizer` but in this case explicit positioning of the items
10837 is allowed using `wx.GBPosition`, and items can optionally span more
10838 than one row and/or column using `wx.GBSpan`. The total size of the
10839 virtual grid is determined by the largest row and column that items are
10840 positioned at, adjusted for spanning.
10841
10842 """
10843 def __repr__(self):
10844 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10845 def __init__(self, *args, **kwargs):
10846 """
10847 __init__(self, int vgap=0, int hgap=0) -> wxGridBagSizer
10848
10849 Constructor, with optional parameters to specify the gap between the
10850 rows and columns.
10851 """
10852 newobj = __core.new_wxGridBagSizer(*args, **kwargs)
10853 self.this = newobj.this
10854 self.thisown = 1
10855 del newobj.thisown
10856 self._setOORInfo(self)
10857
10858 def Add(*args, **kwargs):
10859 """
10860 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
10861 int border=0, userData=None) -> wx.GBSizerItem
10862
10863 Adds an item to the sizer at the grid cell *pos*, optionally spanning
10864 more than one row or column as specified with *span*. The remaining
10865 args behave similarly to `wx.Sizer.Add`.
10866
10867 Returns True if the item was successfully placed at the given cell
10868 position, False if something was already there.
10869
10870 """
10871 return __core.wxGridBagSizer_Add(*args, **kwargs)
10872
10873 def AddItem(*args, **kwargs):
10874 """
10875 Add(self, GBSizerItem item) -> wx.GBSizerItem
10876
10877 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
10878 the item was successfully placed at its given cell position, False if
10879 something was already there.
10880 """
10881 return __core.wxGridBagSizer_AddItem(*args, **kwargs)
10882
10883 def GetCellSize(*args, **kwargs):
10884 """
10885 GetCellSize(self, int row, int col) -> wxSize
10886
10887 Get the size of the specified cell, including hgap and
10888 vgap. Only valid after a Layout.
10889 """
10890 return __core.wxGridBagSizer_GetCellSize(*args, **kwargs)
10891
10892 def GetEmptyCellSize(*args, **kwargs):
10893 """
10894 GetEmptyCellSize(self) -> wxSize
10895
10896 Get the size used for cells in the grid with no item.
10897 """
10898 return __core.wxGridBagSizer_GetEmptyCellSize(*args, **kwargs)
10899
10900 def SetEmptyCellSize(*args, **kwargs):
10901 """
10902 SetEmptyCellSize(self, wxSize sz)
10903
10904 Set the size used for cells in the grid with no item.
10905 """
10906 return __core.wxGridBagSizer_SetEmptyCellSize(*args, **kwargs)
10907
10908 def GetItemPosition(*args):
10909 """
10910 GetItemPosition(self, item) -> GBPosition
10911
10912 Get the grid position of the specified *item* where *item* is either a
10913 window or subsizer that is a member of this sizer, or a zero-based
10914 index of an item.
10915 """
10916 return __core.wxGridBagSizer_GetItemPosition(*args)
10917
10918 def SetItemPosition(*args):
10919 """
10920 SetItemPosition(self, item, GBPosition pos) -> bool
10921
10922 Set the grid position of the specified *item* where *item* is either a
10923 window or subsizer that is a member of this sizer, or a zero-based
10924 index of an item. Returns True on success. If the move is not
10925 allowed (because an item is already there) then False is returned.
10926
10927 """
10928 return __core.wxGridBagSizer_SetItemPosition(*args)
10929
10930 def GetItemSpan(*args):
10931 """
10932 GetItemSpan(self, item) -> GBSpan
10933
10934 Get the row/col spanning of the specified *item* where *item* is
10935 either a window or subsizer that is a member of this sizer, or a
10936 zero-based index of an item.
10937 """
10938 return __core.wxGridBagSizer_GetItemSpan(*args)
10939
10940 def SetItemSpan(*args):
10941 """
10942 SetItemSpan(self, item, GBSpan span) -> bool
10943
10944 Set the row/col spanning of the specified *item* where *item* is
10945 either a window or subsizer that is a member of this sizer, or a
10946 zero-based index of an item. Returns True on success. If the move is
10947 not allowed (because an item is already there) then False is returned.
10948 """
10949 return __core.wxGridBagSizer_SetItemSpan(*args)
10950
10951 def FindItem(*args):
10952 """
10953 FindItem(self, item) -> GBSizerItem
10954
10955 Find the sizer item for the given window or subsizer, returns None if
10956 not found. (non-recursive)
10957 """
10958 return __core.wxGridBagSizer_FindItem(*args)
10959
10960 def FindItemAtPosition(*args, **kwargs):
10961 """
10962 FindItemAtPosition(self, wxGBPosition pos) -> wxGBSizerItem
10963
10964 Return the sizer item for the given grid cell, or None if there is no
10965 item at that position. (non-recursive)
10966 """
10967 return __core.wxGridBagSizer_FindItemAtPosition(*args, **kwargs)
10968
10969 def FindItemAtPoint(*args, **kwargs):
10970 """
10971 FindItemAtPoint(self, wxPoint pt) -> wxGBSizerItem
10972
10973 Return the sizer item located at the point given in *pt*, or None if
10974 there is no item at that point. The (x,y) coordinates in pt correspond
10975 to the client coordinates of the window using the sizer for
10976 layout. (non-recursive)
10977 """
10978 return __core.wxGridBagSizer_FindItemAtPoint(*args, **kwargs)
10979
10980 def CheckForIntersection(*args, **kwargs):
10981 """
10982 CheckForIntersection(self, wxGBSizerItem item, wxGBSizerItem excludeItem=None) -> bool
10983
10984 Look at all items and see if any intersect (or would overlap) the
10985 given *item*. Returns True if so, False if there would be no overlap.
10986 If an *excludeItem* is given then it will not be checked for
10987 intersection, for example it may be the item we are checking the
10988 position of.
10989
10990 """
10991 return __core.wxGridBagSizer_CheckForIntersection(*args, **kwargs)
10992
10993 def CheckForIntersectionPos(*args, **kwargs):
10994 """
10995 CheckForIntersectionPos(self, wxGBPosition pos, wxGBSpan span, wxGBSizerItem excludeItem=None) -> bool
10996
10997 Look at all items and see if any intersect (or would overlap) the
10998 given position and span. Returns True if so, False if there would be
10999 no overlap. If an *excludeItem* is given then it will not be checked
11000 for intersection, for example it may be the item we are checking the
11001 position of.
11002 """
11003 return __core.wxGridBagSizer_CheckForIntersectionPos(*args, **kwargs)
11004
11005
11006 class wxGridBagSizerPtr(wxGridBagSizer):
11007 def __init__(self, this):
11008 self.this = this
11009 if not hasattr(self,"thisown"): self.thisown = 0
11010 self.__class__ = wxGridBagSizer
11011 __core.wxGridBagSizer_swigregister(wxGridBagSizerPtr)
11012
11013 #---------------------------------------------------------------------------
11014
11015 wxLeft = __core.wxLeft
11016 wxTop = __core.wxTop
11017 wxRight = __core.wxRight
11018 wxBottom = __core.wxBottom
11019 wxWidth = __core.wxWidth
11020 wxHeight = __core.wxHeight
11021 wxCentre = __core.wxCentre
11022 wxCenter = __core.wxCenter
11023 wxCentreX = __core.wxCentreX
11024 wxCentreY = __core.wxCentreY
11025 wxUnconstrained = __core.wxUnconstrained
11026 wxAsIs = __core.wxAsIs
11027 wxPercentOf = __core.wxPercentOf
11028 wxAbove = __core.wxAbove
11029 wxBelow = __core.wxBelow
11030 wxLeftOf = __core.wxLeftOf
11031 wxRightOf = __core.wxRightOf
11032 wxSameAs = __core.wxSameAs
11033 wxAbsolute = __core.wxAbsolute
11034 class wxIndividualLayoutConstraint(wxObject):
11035 """
11036 Objects of this class are stored in the `wx.LayoutConstraints` class as
11037 one of eight possible constraints that a window can be involved in.
11038 You will never need to create an instance of
11039 wx.IndividualLayoutConstraint, rather you should create a
11040 `wx.LayoutConstraints` instance and use the individual contstraints
11041 that it contains.
11042 """
11043 def __init__(self): raise RuntimeError, "No constructor defined"
11044 def __repr__(self):
11045 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
11046 def Set(*args, **kwargs):
11047 """
11048 Set(self, int rel, wxWindow otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
11049
11050 Sets the properties of the constraint. Normally called by one of the
11051 convenience functions such as Above, RightOf, SameAs.
11052 """
11053 return __core.wxIndividualLayoutConstraint_Set(*args, **kwargs)
11054
11055 def LeftOf(*args, **kwargs):
11056 """
11057 LeftOf(self, wxWindow sibling, int marg=0)
11058
11059 Constrains this edge to be to the left of the given window, with an
11060 optional margin. Implicitly, this is relative to the left edge of the
11061 other window.
11062 """
11063 return __core.wxIndividualLayoutConstraint_LeftOf(*args, **kwargs)
11064
11065 def RightOf(*args, **kwargs):
11066 """
11067 RightOf(self, wxWindow sibling, int marg=0)
11068
11069 Constrains this edge to be to the right of the given window, with an
11070 optional margin. Implicitly, this is relative to the right edge of the
11071 other window.
11072 """
11073 return __core.wxIndividualLayoutConstraint_RightOf(*args, **kwargs)
11074
11075 def Above(*args, **kwargs):
11076 """
11077 Above(self, wxWindow sibling, int marg=0)
11078
11079 Constrains this edge to be above the given window, with an optional
11080 margin. Implicitly, this is relative to the top edge of the other
11081 window.
11082 """
11083 return __core.wxIndividualLayoutConstraint_Above(*args, **kwargs)
11084
11085 def Below(*args, **kwargs):
11086 """
11087 Below(self, wxWindow sibling, int marg=0)
11088
11089 Constrains this edge to be below the given window, with an optional
11090 margin. Implicitly, this is relative to the bottom edge of the other
11091 window.
11092 """
11093 return __core.wxIndividualLayoutConstraint_Below(*args, **kwargs)
11094
11095 def SameAs(*args, **kwargs):
11096 """
11097 SameAs(self, wxWindow otherW, int edge, int marg=0)
11098
11099 Constrains this edge or dimension to be to the same as the edge of the
11100 given window, with an optional margin.
11101 """
11102 return __core.wxIndividualLayoutConstraint_SameAs(*args, **kwargs)
11103
11104 def PercentOf(*args, **kwargs):
11105 """
11106 PercentOf(self, wxWindow otherW, int wh, int per)
11107
11108 Constrains this edge or dimension to be to a percentage of the given
11109 window, with an optional margin.
11110 """
11111 return __core.wxIndividualLayoutConstraint_PercentOf(*args, **kwargs)
11112
11113 def Absolute(*args, **kwargs):
11114 """
11115 Absolute(self, int val)
11116
11117 Constrains this edge or dimension to be the given absolute value.
11118 """
11119 return __core.wxIndividualLayoutConstraint_Absolute(*args, **kwargs)
11120
11121 def Unconstrained(*args, **kwargs):
11122 """
11123 Unconstrained(self)
11124
11125 Sets this edge or dimension to be unconstrained, that is, dependent on
11126 other edges and dimensions from which this value can be deduced.
11127 """
11128 return __core.wxIndividualLayoutConstraint_Unconstrained(*args, **kwargs)
11129
11130 def AsIs(*args, **kwargs):
11131 """
11132 AsIs(self)
11133
11134 Sets this edge or constraint to be whatever the window's value is at
11135 the moment. If either of the width and height constraints are *as is*,
11136 the window will not be resized, but moved instead. This is important
11137 when considering panel items which are intended to have a default
11138 size, such as a button, which may take its size from the size of the
11139 button label.
11140 """
11141 return __core.wxIndividualLayoutConstraint_AsIs(*args, **kwargs)
11142
11143 def GetOtherWindow(*args, **kwargs):
11144 """GetOtherWindow(self) -> wxWindow"""
11145 return __core.wxIndividualLayoutConstraint_GetOtherWindow(*args, **kwargs)
11146
11147 def GetMyEdge(*args, **kwargs):
11148 """GetMyEdge(self) -> int"""
11149 return __core.wxIndividualLayoutConstraint_GetMyEdge(*args, **kwargs)
11150
11151 def SetEdge(*args, **kwargs):
11152 """SetEdge(self, int which)"""
11153 return __core.wxIndividualLayoutConstraint_SetEdge(*args, **kwargs)
11154
11155 def SetValue(*args, **kwargs):
11156 """SetValue(self, int v)"""
11157 return __core.wxIndividualLayoutConstraint_SetValue(*args, **kwargs)
11158
11159 def GetMargin(*args, **kwargs):
11160 """GetMargin(self) -> int"""
11161 return __core.wxIndividualLayoutConstraint_GetMargin(*args, **kwargs)
11162
11163 def SetMargin(*args, **kwargs):
11164 """SetMargin(self, int m)"""
11165 return __core.wxIndividualLayoutConstraint_SetMargin(*args, **kwargs)
11166
11167 def GetValue(*args, **kwargs):
11168 """GetValue(self) -> int"""
11169 return __core.wxIndividualLayoutConstraint_GetValue(*args, **kwargs)
11170
11171 def GetPercent(*args, **kwargs):
11172 """GetPercent(self) -> int"""
11173 return __core.wxIndividualLayoutConstraint_GetPercent(*args, **kwargs)
11174
11175 def GetOtherEdge(*args, **kwargs):
11176 """GetOtherEdge(self) -> int"""
11177 return __core.wxIndividualLayoutConstraint_GetOtherEdge(*args, **kwargs)
11178
11179 def GetDone(*args, **kwargs):
11180 """GetDone(self) -> bool"""
11181 return __core.wxIndividualLayoutConstraint_GetDone(*args, **kwargs)
11182
11183 def SetDone(*args, **kwargs):
11184 """SetDone(self, bool d)"""
11185 return __core.wxIndividualLayoutConstraint_SetDone(*args, **kwargs)
11186
11187 def GetRelationship(*args, **kwargs):
11188 """GetRelationship(self) -> int"""
11189 return __core.wxIndividualLayoutConstraint_GetRelationship(*args, **kwargs)
11190
11191 def SetRelationship(*args, **kwargs):
11192 """SetRelationship(self, int r)"""
11193 return __core.wxIndividualLayoutConstraint_SetRelationship(*args, **kwargs)
11194
11195 def ResetIfWin(*args, **kwargs):
11196 """
11197 ResetIfWin(self, wxWindow otherW) -> bool
11198
11199 Reset constraint if it mentions otherWin
11200 """
11201 return __core.wxIndividualLayoutConstraint_ResetIfWin(*args, **kwargs)
11202
11203 def SatisfyConstraint(*args, **kwargs):
11204 """
11205 SatisfyConstraint(self, wxLayoutConstraints constraints, wxWindow win) -> bool
11206
11207 Try to satisfy constraint
11208 """
11209 return __core.wxIndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs)
11210
11211 def GetEdge(*args, **kwargs):
11212 """
11213 GetEdge(self, int which, wxWindow thisWin, wxWindow other) -> int
11214
11215 Get the value of this edge or dimension, or if this
11216 is not determinable, -1.
11217 """
11218 return __core.wxIndividualLayoutConstraint_GetEdge(*args, **kwargs)
11219
11220
11221 class wxIndividualLayoutConstraintPtr(wxIndividualLayoutConstraint):
11222 def __init__(self, this):
11223 self.this = this
11224 if not hasattr(self,"thisown"): self.thisown = 0
11225 self.__class__ = wxIndividualLayoutConstraint
11226 __core.wxIndividualLayoutConstraint_swigregister(wxIndividualLayoutConstraintPtr)
11227
11228 class wxLayoutConstraints(wxObject):
11229 """
11230 **Note:** constraints are now deprecated and you should use sizers
11231 instead.
11232
11233 Objects of this class can be associated with a window to define its
11234 layout constraints, with respect to siblings or its parent.
11235
11236 The class consists of the following eight constraints of class
11237 wx.IndividualLayoutConstraint, some or all of which should be accessed
11238 directly to set the appropriate constraints.
11239
11240 * left: represents the left hand edge of the window
11241 * right: represents the right hand edge of the window
11242 * top: represents the top edge of the window
11243 * bottom: represents the bottom edge of the window
11244 * width: represents the width of the window
11245 * height: represents the height of the window
11246 * centreX: represents the horizontal centre point of the window
11247 * centreY: represents the vertical centre point of the window
11248
11249 Most constraints are initially set to have the relationship
11250 wxUnconstrained, which means that their values should be calculated by
11251 looking at known constraints. The exceptions are width and height,
11252 which are set to wxAsIs to ensure that if the user does not specify a
11253 constraint, the existing width and height will be used, to be
11254 compatible with panel items which often have take a default size. If
11255 the constraint is ``wx.AsIs``, the dimension will not be changed.
11256
11257 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
11258
11259 """
11260 def __repr__(self):
11261 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
11262 left = property(__core.wxLayoutConstraints_left_get)
11263 top = property(__core.wxLayoutConstraints_top_get)
11264 right = property(__core.wxLayoutConstraints_right_get)
11265 bottom = property(__core.wxLayoutConstraints_bottom_get)
11266 width = property(__core.wxLayoutConstraints_width_get)
11267 height = property(__core.wxLayoutConstraints_height_get)
11268 centreX = property(__core.wxLayoutConstraints_centreX_get)
11269 centreY = property(__core.wxLayoutConstraints_centreY_get)
11270 def __init__(self, *args, **kwargs):
11271 """__init__(self) -> wxLayoutConstraints"""
11272 newobj = __core.new_wxLayoutConstraints(*args, **kwargs)
11273 self.this = newobj.this
11274 self.thisown = 1
11275 del newobj.thisown
11276 def SatisfyConstraints(*args, **kwargs):
11277 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
11278 return __core.wxLayoutConstraints_SatisfyConstraints(*args, **kwargs)
11279
11280 def AreSatisfied(*args, **kwargs):
11281 """AreSatisfied(self) -> bool"""
11282 return __core.wxLayoutConstraints_AreSatisfied(*args, **kwargs)
11283
11284
11285 class wxLayoutConstraintsPtr(wxLayoutConstraints):
11286 def __init__(self, this):
11287 self.this = this
11288 if not hasattr(self,"thisown"): self.thisown = 0
11289 self.__class__ = wxLayoutConstraints
11290 __core.wxLayoutConstraints_swigregister(wxLayoutConstraintsPtr)
11291
11292 #----------------------------------------------------------------------------
11293
11294 # Use Python's bool constants if available, make some if not
11295 try:
11296 True
11297 except NameError:
11298 __builtins__.True = 1==1
11299 __builtins__.False = 1==0
11300 def bool(value): return not not value
11301 __builtins__.bool = bool
11302
11303
11304
11305 # workarounds for bad wxRTTI names
11306 __wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
11307 __wxPyPtrTypeMap['wxSlider95'] = 'wxSlider'
11308 __wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar'
11309
11310
11311 #----------------------------------------------------------------------------
11312 # Load version numbers from __version__... Ensure that major and minor
11313 # versions are the same for both wxPython and wxWidgets.
11314
11315 from __version__ import *
11316 __version__ = VERSION_STRING
11317
11318 assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWidgets version mismatch"
11319 assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWidgets version mismatch"
11320 if RELEASE_VERSION != _core_.RELEASE_VERSION:
11321 import warnings
11322 warnings.warn("wxPython/wxWidgets release number mismatch")
11323
11324 #----------------------------------------------------------------------------
11325
11326 # Set the default string<-->unicode conversion encoding from the
11327 # locale. This encoding is used when string or unicode objects need
11328 # to be converted in order to pass them to wxWidgets. Please be aware
11329 # that the default encoding within the same locale may be slightly
11330 # different on different platforms. For example, please see
11331 # http://www.alanwood.net/demos/charsetdiffs.html for differences
11332 # between the common latin/roman encodings.
11333
11334 default = _sys.getdefaultencoding()
11335 if default == 'ascii':
11336 import locale
11337 import codecs
11338 try:
11339 default = locale.getdefaultlocale()[1]
11340 codecs.lookup(default)
11341 except (ValueError, LookupError):
11342 default = _sys.getdefaultencoding()
11343 del locale
11344 del codecs
11345 if default:
11346 wx.SetDefaultPyEncoding(default)
11347 del default
11348
11349 #----------------------------------------------------------------------------
11350
11351 class PyDeadObjectError(AttributeError):
11352 pass
11353
11354 class _wxPyDeadObject(object):
11355 """
11356 Instances of wx objects that are OOR capable will have their __class__
11357 changed to this class when the C++ object is deleted. This should help
11358 prevent crashes due to referencing a bogus C++ pointer.
11359 """
11360 reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
11361 attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed."
11362
11363 def __repr__(self):
11364 if not hasattr(self, "_name"):
11365 self._name = "[unknown]"
11366 return self.reprStr % self._name
11367
11368 def __getattr__(self, *args):
11369 if not hasattr(self, "_name"):
11370 self._name = "[unknown]"
11371 raise PyDeadObjectError(self.attrStr % self._name)
11372
11373 def __nonzero__(self):
11374 return 0
11375
11376
11377
11378 class PyUnbornObjectError(AttributeError):
11379 pass
11380
11381 class _wxPyUnbornObject(object):
11382 """
11383 Some stock objects are created when the wx._core module is
11384 imported, but their C++ instance is not created until the wx.App
11385 object is created and initialized. These object instances will
11386 temporarily have their __class__ changed to this class so an
11387 exception will be raised if they are used before the C++ instance
11388 is ready.
11389 """
11390
11391 reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
11392 attrStr = "The C++ part of this object has not been initialized, attribute access not allowed."
11393
11394 def __repr__(self):
11395 #if not hasattr(self, "_name"):
11396 # self._name = "[unknown]"
11397 return self.reprStr #% self._name
11398
11399 def __getattr__(self, *args):
11400 #if not hasattr(self, "_name"):
11401 # self._name = "[unknown]"
11402 raise PyUnbornObjectError(self.attrStr) # % self._name )
11403
11404 def __nonzero__(self):
11405 return 0
11406
11407
11408 #----------------------------------------------------------------------------
11409
11410 def CallAfter(callable, *args, **kw):
11411 """
11412 Call the specified function after the current and pending event
11413 handlers have been completed. This is also good for making GUI
11414 method calls from non-GUI threads. Any extra positional or
11415 keyword args are passed on to the callable when it is called.
11416
11417 :see: `wx.FutureCall`
11418 """
11419 app = wx.GetApp()
11420 assert app is not None, 'No wx.App created yet'
11421
11422 if not hasattr(app, "_CallAfterId"):
11423 app._CallAfterId = wx.NewEventType()
11424 app.Connect(-1, -1, app._CallAfterId,
11425 lambda event: event.callable(*event.args, **event.kw) )
11426 evt = wx.PyEvent()
11427 evt.SetEventType(app._CallAfterId)
11428 evt.callable = callable
11429 evt.args = args
11430 evt.kw = kw
11431 wx.PostEvent(app, evt)
11432
11433 #----------------------------------------------------------------------------
11434
11435
11436 class FutureCall:
11437 """
11438 A convenience class for `wx.Timer`, that calls the given callable
11439 object once after the given amount of milliseconds, passing any
11440 positional or keyword args. The return value of the callable is
11441 availbale after it has been run with the `GetResult` method.
11442
11443 If you don't need to get the return value or restart the timer
11444 then there is no need to hold a reference to this object. It will
11445 hold a reference to itself while the timer is running (the timer
11446 has a reference to self.Notify) but the cycle will be broken when
11447 the timer completes, automatically cleaning up the wx.FutureCall
11448 object.
11449
11450 :see: `wx.CallAfter`
11451 """
11452 def __init__(self, millis, callable, *args, **kwargs):
11453 self.millis = millis
11454 self.callable = callable
11455 self.SetArgs(*args, **kwargs)
11456 self.runCount = 0
11457 self.running = False
11458 self.hasRun = False
11459 self.result = None
11460 self.timer = None
11461 self.Start()
11462
11463 def __del__(self):
11464 self.Stop()
11465
11466
11467 def Start(self, millis=None, *args, **kwargs):
11468 """
11469 (Re)start the timer
11470 """
11471 self.hasRun = False
11472 if millis is not None:
11473 self.millis = millis
11474 if args or kwargs:
11475 self.SetArgs(*args, **kwargs)
11476 self.Stop()
11477 self.timer = wx.PyTimer(self.Notify)
11478 self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
11479 self.running = True
11480 Restart = Start
11481
11482
11483 def Stop(self):
11484 """
11485 Stop and destroy the timer.
11486 """
11487 if self.timer is not None:
11488 self.timer.Stop()
11489 self.timer = None
11490
11491
11492 def GetInterval(self):
11493 if self.timer is not None:
11494 return self.timer.GetInterval()
11495 else:
11496 return 0
11497
11498
11499 def IsRunning(self):
11500 return self.timer is not None and self.timer.IsRunning()
11501
11502
11503 def SetArgs(self, *args, **kwargs):
11504 """
11505 (Re)set the args passed to the callable object. This is
11506 useful in conjunction with Restart if you want to schedule a
11507 new call to the same callable object but with different
11508 parameters.
11509 """
11510 self.args = args
11511 self.kwargs = kwargs
11512
11513
11514 def HasRun(self):
11515 return self.hasRun
11516
11517 def GetResult(self):
11518 return self.result
11519
11520 def Notify(self):
11521 """
11522 The timer has expired so call the callable.
11523 """
11524 if self.callable and getattr(self.callable, 'im_self', True):
11525 self.runCount += 1
11526 self.running = False
11527 self.result = self.callable(*self.args, **self.kwargs)
11528 self.hasRun = True
11529 if not self.running:
11530 # if it wasn't restarted, then cleanup
11531 wx.CallAfter(self.Stop)
11532
11533
11534
11535 #----------------------------------------------------------------------------
11536 # Control which items in this module should be documented by epydoc.
11537 # We allow only classes and functions, which will help reduce the size
11538 # of the docs by filtering out the zillions of constants, EVT objects,
11539 # and etc that don't make much sense by themselves, but are instead
11540 # documented (or will be) as part of the classes/functions/methods
11541 # where they should be used.
11542
11543 class __DocFilter:
11544 """
11545 A filter for epydoc that only allows non-Ptr classes and
11546 fucntions, in order to reduce the clutter in the API docs.
11547 """
11548 def __init__(self, globals):
11549 self._globals = globals
11550
11551 def __call__(self, name):
11552 import types
11553 obj = self._globals.get(name, None)
11554 if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]:
11555 return False
11556 if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'):
11557 return False
11558 return True
11559
11560 #----------------------------------------------------------------------------
11561 #----------------------------------------------------------------------------
11562
11563 # Import other modules in this package that should show up in the
11564 # "core" wx namespace
11565 from _gdi import *
11566 from _windows import *
11567 from _controls import *
11568 from _misc import *
11569
11570
11571 # Fixup the stock objects since they can't be used yet. (They will be
11572 # restored in wx.PyApp.OnInit.)
11573 _core_._wxPyFixStockObjects()
11574
11575 #----------------------------------------------------------------------------
11576 #----------------------------------------------------------------------------
11577
11578