]>
Commit | Line | Data |
---|---|---|
1 | # This file was created automatically by SWIG 1.3.27. | |
2 | # Don't modify this file, modify the SWIG interface instead. | |
3 | ||
4 | import _misc_ | |
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 | import _core | |
48 | wx = _core | |
49 | #--------------------------------------------------------------------------- | |
50 | ||
51 | SYS_OEM_FIXED_FONT = _misc_.SYS_OEM_FIXED_FONT | |
52 | SYS_ANSI_FIXED_FONT = _misc_.SYS_ANSI_FIXED_FONT | |
53 | SYS_ANSI_VAR_FONT = _misc_.SYS_ANSI_VAR_FONT | |
54 | SYS_SYSTEM_FONT = _misc_.SYS_SYSTEM_FONT | |
55 | SYS_DEVICE_DEFAULT_FONT = _misc_.SYS_DEVICE_DEFAULT_FONT | |
56 | SYS_DEFAULT_PALETTE = _misc_.SYS_DEFAULT_PALETTE | |
57 | SYS_SYSTEM_FIXED_FONT = _misc_.SYS_SYSTEM_FIXED_FONT | |
58 | SYS_DEFAULT_GUI_FONT = _misc_.SYS_DEFAULT_GUI_FONT | |
59 | SYS_ICONTITLE_FONT = _misc_.SYS_ICONTITLE_FONT | |
60 | SYS_COLOUR_SCROLLBAR = _misc_.SYS_COLOUR_SCROLLBAR | |
61 | SYS_COLOUR_BACKGROUND = _misc_.SYS_COLOUR_BACKGROUND | |
62 | SYS_COLOUR_DESKTOP = _misc_.SYS_COLOUR_DESKTOP | |
63 | SYS_COLOUR_ACTIVECAPTION = _misc_.SYS_COLOUR_ACTIVECAPTION | |
64 | SYS_COLOUR_INACTIVECAPTION = _misc_.SYS_COLOUR_INACTIVECAPTION | |
65 | SYS_COLOUR_MENU = _misc_.SYS_COLOUR_MENU | |
66 | SYS_COLOUR_WINDOW = _misc_.SYS_COLOUR_WINDOW | |
67 | SYS_COLOUR_WINDOWFRAME = _misc_.SYS_COLOUR_WINDOWFRAME | |
68 | SYS_COLOUR_MENUTEXT = _misc_.SYS_COLOUR_MENUTEXT | |
69 | SYS_COLOUR_WINDOWTEXT = _misc_.SYS_COLOUR_WINDOWTEXT | |
70 | SYS_COLOUR_CAPTIONTEXT = _misc_.SYS_COLOUR_CAPTIONTEXT | |
71 | SYS_COLOUR_ACTIVEBORDER = _misc_.SYS_COLOUR_ACTIVEBORDER | |
72 | SYS_COLOUR_INACTIVEBORDER = _misc_.SYS_COLOUR_INACTIVEBORDER | |
73 | SYS_COLOUR_APPWORKSPACE = _misc_.SYS_COLOUR_APPWORKSPACE | |
74 | SYS_COLOUR_HIGHLIGHT = _misc_.SYS_COLOUR_HIGHLIGHT | |
75 | SYS_COLOUR_HIGHLIGHTTEXT = _misc_.SYS_COLOUR_HIGHLIGHTTEXT | |
76 | SYS_COLOUR_BTNFACE = _misc_.SYS_COLOUR_BTNFACE | |
77 | SYS_COLOUR_3DFACE = _misc_.SYS_COLOUR_3DFACE | |
78 | SYS_COLOUR_BTNSHADOW = _misc_.SYS_COLOUR_BTNSHADOW | |
79 | SYS_COLOUR_3DSHADOW = _misc_.SYS_COLOUR_3DSHADOW | |
80 | SYS_COLOUR_GRAYTEXT = _misc_.SYS_COLOUR_GRAYTEXT | |
81 | SYS_COLOUR_BTNTEXT = _misc_.SYS_COLOUR_BTNTEXT | |
82 | SYS_COLOUR_INACTIVECAPTIONTEXT = _misc_.SYS_COLOUR_INACTIVECAPTIONTEXT | |
83 | SYS_COLOUR_BTNHIGHLIGHT = _misc_.SYS_COLOUR_BTNHIGHLIGHT | |
84 | SYS_COLOUR_BTNHILIGHT = _misc_.SYS_COLOUR_BTNHILIGHT | |
85 | SYS_COLOUR_3DHIGHLIGHT = _misc_.SYS_COLOUR_3DHIGHLIGHT | |
86 | SYS_COLOUR_3DHILIGHT = _misc_.SYS_COLOUR_3DHILIGHT | |
87 | SYS_COLOUR_3DDKSHADOW = _misc_.SYS_COLOUR_3DDKSHADOW | |
88 | SYS_COLOUR_3DLIGHT = _misc_.SYS_COLOUR_3DLIGHT | |
89 | SYS_COLOUR_INFOTEXT = _misc_.SYS_COLOUR_INFOTEXT | |
90 | SYS_COLOUR_INFOBK = _misc_.SYS_COLOUR_INFOBK | |
91 | SYS_COLOUR_LISTBOX = _misc_.SYS_COLOUR_LISTBOX | |
92 | SYS_COLOUR_HOTLIGHT = _misc_.SYS_COLOUR_HOTLIGHT | |
93 | SYS_COLOUR_GRADIENTACTIVECAPTION = _misc_.SYS_COLOUR_GRADIENTACTIVECAPTION | |
94 | SYS_COLOUR_GRADIENTINACTIVECAPTION = _misc_.SYS_COLOUR_GRADIENTINACTIVECAPTION | |
95 | SYS_COLOUR_MENUHILIGHT = _misc_.SYS_COLOUR_MENUHILIGHT | |
96 | SYS_COLOUR_MENUBAR = _misc_.SYS_COLOUR_MENUBAR | |
97 | SYS_COLOUR_MAX = _misc_.SYS_COLOUR_MAX | |
98 | SYS_MOUSE_BUTTONS = _misc_.SYS_MOUSE_BUTTONS | |
99 | SYS_BORDER_X = _misc_.SYS_BORDER_X | |
100 | SYS_BORDER_Y = _misc_.SYS_BORDER_Y | |
101 | SYS_CURSOR_X = _misc_.SYS_CURSOR_X | |
102 | SYS_CURSOR_Y = _misc_.SYS_CURSOR_Y | |
103 | SYS_DCLICK_X = _misc_.SYS_DCLICK_X | |
104 | SYS_DCLICK_Y = _misc_.SYS_DCLICK_Y | |
105 | SYS_DRAG_X = _misc_.SYS_DRAG_X | |
106 | SYS_DRAG_Y = _misc_.SYS_DRAG_Y | |
107 | SYS_EDGE_X = _misc_.SYS_EDGE_X | |
108 | SYS_EDGE_Y = _misc_.SYS_EDGE_Y | |
109 | SYS_HSCROLL_ARROW_X = _misc_.SYS_HSCROLL_ARROW_X | |
110 | SYS_HSCROLL_ARROW_Y = _misc_.SYS_HSCROLL_ARROW_Y | |
111 | SYS_HTHUMB_X = _misc_.SYS_HTHUMB_X | |
112 | SYS_ICON_X = _misc_.SYS_ICON_X | |
113 | SYS_ICON_Y = _misc_.SYS_ICON_Y | |
114 | SYS_ICONSPACING_X = _misc_.SYS_ICONSPACING_X | |
115 | SYS_ICONSPACING_Y = _misc_.SYS_ICONSPACING_Y | |
116 | SYS_WINDOWMIN_X = _misc_.SYS_WINDOWMIN_X | |
117 | SYS_WINDOWMIN_Y = _misc_.SYS_WINDOWMIN_Y | |
118 | SYS_SCREEN_X = _misc_.SYS_SCREEN_X | |
119 | SYS_SCREEN_Y = _misc_.SYS_SCREEN_Y | |
120 | SYS_FRAMESIZE_X = _misc_.SYS_FRAMESIZE_X | |
121 | SYS_FRAMESIZE_Y = _misc_.SYS_FRAMESIZE_Y | |
122 | SYS_SMALLICON_X = _misc_.SYS_SMALLICON_X | |
123 | SYS_SMALLICON_Y = _misc_.SYS_SMALLICON_Y | |
124 | SYS_HSCROLL_Y = _misc_.SYS_HSCROLL_Y | |
125 | SYS_VSCROLL_X = _misc_.SYS_VSCROLL_X | |
126 | SYS_VSCROLL_ARROW_X = _misc_.SYS_VSCROLL_ARROW_X | |
127 | SYS_VSCROLL_ARROW_Y = _misc_.SYS_VSCROLL_ARROW_Y | |
128 | SYS_VTHUMB_Y = _misc_.SYS_VTHUMB_Y | |
129 | SYS_CAPTION_Y = _misc_.SYS_CAPTION_Y | |
130 | SYS_MENU_Y = _misc_.SYS_MENU_Y | |
131 | SYS_NETWORK_PRESENT = _misc_.SYS_NETWORK_PRESENT | |
132 | SYS_PENWINDOWS_PRESENT = _misc_.SYS_PENWINDOWS_PRESENT | |
133 | SYS_SHOW_SOUNDS = _misc_.SYS_SHOW_SOUNDS | |
134 | SYS_SWAP_BUTTONS = _misc_.SYS_SWAP_BUTTONS | |
135 | SYS_CAN_DRAW_FRAME_DECORATIONS = _misc_.SYS_CAN_DRAW_FRAME_DECORATIONS | |
136 | SYS_CAN_ICONIZE_FRAME = _misc_.SYS_CAN_ICONIZE_FRAME | |
137 | SYS_SCREEN_NONE = _misc_.SYS_SCREEN_NONE | |
138 | SYS_SCREEN_TINY = _misc_.SYS_SCREEN_TINY | |
139 | SYS_SCREEN_PDA = _misc_.SYS_SCREEN_PDA | |
140 | SYS_SCREEN_SMALL = _misc_.SYS_SCREEN_SMALL | |
141 | SYS_SCREEN_DESKTOP = _misc_.SYS_SCREEN_DESKTOP | |
142 | class SystemSettings(object): | |
143 | """Proxy of C++ SystemSettings class""" | |
144 | def __init__(self): raise RuntimeError, "No constructor defined" | |
145 | def __repr__(self): | |
146 | return "<%s.%s; proxy of C++ wxSystemSettings instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
147 | def GetColour(*args, **kwargs): | |
148 | """GetColour(int index) -> Colour""" | |
149 | return _misc_.SystemSettings_GetColour(*args, **kwargs) | |
150 | ||
151 | GetColour = staticmethod(GetColour) | |
152 | def GetFont(*args, **kwargs): | |
153 | """GetFont(int index) -> Font""" | |
154 | return _misc_.SystemSettings_GetFont(*args, **kwargs) | |
155 | ||
156 | GetFont = staticmethod(GetFont) | |
157 | def GetMetric(*args, **kwargs): | |
158 | """GetMetric(int index, Window win=None) -> int""" | |
159 | return _misc_.SystemSettings_GetMetric(*args, **kwargs) | |
160 | ||
161 | GetMetric = staticmethod(GetMetric) | |
162 | def HasFeature(*args, **kwargs): | |
163 | """HasFeature(int index) -> bool""" | |
164 | return _misc_.SystemSettings_HasFeature(*args, **kwargs) | |
165 | ||
166 | HasFeature = staticmethod(HasFeature) | |
167 | def GetScreenType(*args, **kwargs): | |
168 | """GetScreenType() -> int""" | |
169 | return _misc_.SystemSettings_GetScreenType(*args, **kwargs) | |
170 | ||
171 | GetScreenType = staticmethod(GetScreenType) | |
172 | def SetScreenType(*args, **kwargs): | |
173 | """SetScreenType(int screen)""" | |
174 | return _misc_.SystemSettings_SetScreenType(*args, **kwargs) | |
175 | ||
176 | SetScreenType = staticmethod(SetScreenType) | |
177 | ||
178 | class SystemSettingsPtr(SystemSettings): | |
179 | def __init__(self, this): | |
180 | self.this = this | |
181 | if not hasattr(self,"thisown"): self.thisown = 0 | |
182 | self.__class__ = SystemSettings | |
183 | _misc_.SystemSettings_swigregister(SystemSettingsPtr) | |
184 | ||
185 | def SystemSettings_GetColour(*args, **kwargs): | |
186 | """SystemSettings_GetColour(int index) -> Colour""" | |
187 | return _misc_.SystemSettings_GetColour(*args, **kwargs) | |
188 | ||
189 | def SystemSettings_GetFont(*args, **kwargs): | |
190 | """SystemSettings_GetFont(int index) -> Font""" | |
191 | return _misc_.SystemSettings_GetFont(*args, **kwargs) | |
192 | ||
193 | def SystemSettings_GetMetric(*args, **kwargs): | |
194 | """SystemSettings_GetMetric(int index, Window win=None) -> int""" | |
195 | return _misc_.SystemSettings_GetMetric(*args, **kwargs) | |
196 | ||
197 | def SystemSettings_HasFeature(*args, **kwargs): | |
198 | """SystemSettings_HasFeature(int index) -> bool""" | |
199 | return _misc_.SystemSettings_HasFeature(*args, **kwargs) | |
200 | ||
201 | def SystemSettings_GetScreenType(*args, **kwargs): | |
202 | """SystemSettings_GetScreenType() -> int""" | |
203 | return _misc_.SystemSettings_GetScreenType(*args, **kwargs) | |
204 | ||
205 | def SystemSettings_SetScreenType(*args, **kwargs): | |
206 | """SystemSettings_SetScreenType(int screen)""" | |
207 | return _misc_.SystemSettings_SetScreenType(*args, **kwargs) | |
208 | ||
209 | class SystemOptions(_core.Object): | |
210 | """Proxy of C++ SystemOptions class""" | |
211 | def __repr__(self): | |
212 | return "<%s.%s; proxy of C++ wxSystemOptions instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
213 | def __init__(self, *args, **kwargs): | |
214 | """__init__(self) -> SystemOptions""" | |
215 | newobj = _misc_.new_SystemOptions(*args, **kwargs) | |
216 | self.this = newobj.this | |
217 | self.thisown = 1 | |
218 | del newobj.thisown | |
219 | def SetOption(*args, **kwargs): | |
220 | """SetOption(String name, String value)""" | |
221 | return _misc_.SystemOptions_SetOption(*args, **kwargs) | |
222 | ||
223 | SetOption = staticmethod(SetOption) | |
224 | def SetOptionInt(*args, **kwargs): | |
225 | """SetOptionInt(String name, int value)""" | |
226 | return _misc_.SystemOptions_SetOptionInt(*args, **kwargs) | |
227 | ||
228 | SetOptionInt = staticmethod(SetOptionInt) | |
229 | def GetOption(*args, **kwargs): | |
230 | """GetOption(String name) -> String""" | |
231 | return _misc_.SystemOptions_GetOption(*args, **kwargs) | |
232 | ||
233 | GetOption = staticmethod(GetOption) | |
234 | def GetOptionInt(*args, **kwargs): | |
235 | """GetOptionInt(String name) -> int""" | |
236 | return _misc_.SystemOptions_GetOptionInt(*args, **kwargs) | |
237 | ||
238 | GetOptionInt = staticmethod(GetOptionInt) | |
239 | def HasOption(*args, **kwargs): | |
240 | """HasOption(String name) -> bool""" | |
241 | return _misc_.SystemOptions_HasOption(*args, **kwargs) | |
242 | ||
243 | HasOption = staticmethod(HasOption) | |
244 | def IsFalse(*args, **kwargs): | |
245 | """IsFalse(String name) -> bool""" | |
246 | return _misc_.SystemOptions_IsFalse(*args, **kwargs) | |
247 | ||
248 | IsFalse = staticmethod(IsFalse) | |
249 | ||
250 | class SystemOptionsPtr(SystemOptions): | |
251 | def __init__(self, this): | |
252 | self.this = this | |
253 | if not hasattr(self,"thisown"): self.thisown = 0 | |
254 | self.__class__ = SystemOptions | |
255 | _misc_.SystemOptions_swigregister(SystemOptionsPtr) | |
256 | cvar = _misc_.cvar | |
257 | WINDOW_DEFAULT_VARIANT = cvar.WINDOW_DEFAULT_VARIANT | |
258 | ||
259 | def SystemOptions_SetOption(*args, **kwargs): | |
260 | """SystemOptions_SetOption(String name, String value)""" | |
261 | return _misc_.SystemOptions_SetOption(*args, **kwargs) | |
262 | ||
263 | def SystemOptions_SetOptionInt(*args, **kwargs): | |
264 | """SystemOptions_SetOptionInt(String name, int value)""" | |
265 | return _misc_.SystemOptions_SetOptionInt(*args, **kwargs) | |
266 | ||
267 | def SystemOptions_GetOption(*args, **kwargs): | |
268 | """SystemOptions_GetOption(String name) -> String""" | |
269 | return _misc_.SystemOptions_GetOption(*args, **kwargs) | |
270 | ||
271 | def SystemOptions_GetOptionInt(*args, **kwargs): | |
272 | """SystemOptions_GetOptionInt(String name) -> int""" | |
273 | return _misc_.SystemOptions_GetOptionInt(*args, **kwargs) | |
274 | ||
275 | def SystemOptions_HasOption(*args, **kwargs): | |
276 | """SystemOptions_HasOption(String name) -> bool""" | |
277 | return _misc_.SystemOptions_HasOption(*args, **kwargs) | |
278 | ||
279 | def SystemOptions_IsFalse(*args, **kwargs): | |
280 | """SystemOptions_IsFalse(String name) -> bool""" | |
281 | return _misc_.SystemOptions_IsFalse(*args, **kwargs) | |
282 | ||
283 | #--------------------------------------------------------------------------- | |
284 | ||
285 | ||
286 | def NewId(*args, **kwargs): | |
287 | """NewId() -> long""" | |
288 | return _misc_.NewId(*args, **kwargs) | |
289 | ||
290 | def RegisterId(*args, **kwargs): | |
291 | """RegisterId(long id)""" | |
292 | return _misc_.RegisterId(*args, **kwargs) | |
293 | ||
294 | def GetCurrentId(*args, **kwargs): | |
295 | """GetCurrentId() -> long""" | |
296 | return _misc_.GetCurrentId(*args, **kwargs) | |
297 | ||
298 | def IsStockID(*args, **kwargs): | |
299 | """IsStockID(int id) -> bool""" | |
300 | return _misc_.IsStockID(*args, **kwargs) | |
301 | ||
302 | def IsStockLabel(*args, **kwargs): | |
303 | """IsStockLabel(int id, String label) -> bool""" | |
304 | return _misc_.IsStockLabel(*args, **kwargs) | |
305 | ||
306 | def GetStockLabel(*args, **kwargs): | |
307 | """GetStockLabel(int id, bool withCodes=True, String accelerator=EmptyString) -> String""" | |
308 | return _misc_.GetStockLabel(*args, **kwargs) | |
309 | ||
310 | def Bell(*args, **kwargs): | |
311 | """Bell()""" | |
312 | return _misc_.Bell(*args, **kwargs) | |
313 | ||
314 | def EndBusyCursor(*args, **kwargs): | |
315 | """EndBusyCursor()""" | |
316 | return _misc_.EndBusyCursor(*args, **kwargs) | |
317 | ||
318 | def GetElapsedTime(*args, **kwargs): | |
319 | """GetElapsedTime(bool resetTimer=True) -> long""" | |
320 | return _misc_.GetElapsedTime(*args, **kwargs) | |
321 | ||
322 | def IsBusy(*args, **kwargs): | |
323 | """IsBusy() -> bool""" | |
324 | return _misc_.IsBusy(*args, **kwargs) | |
325 | ||
326 | def Now(*args, **kwargs): | |
327 | """Now() -> String""" | |
328 | return _misc_.Now(*args, **kwargs) | |
329 | ||
330 | def Shell(*args, **kwargs): | |
331 | """Shell(String command=EmptyString) -> bool""" | |
332 | return _misc_.Shell(*args, **kwargs) | |
333 | ||
334 | def StartTimer(*args, **kwargs): | |
335 | """StartTimer()""" | |
336 | return _misc_.StartTimer(*args, **kwargs) | |
337 | ||
338 | def GetOsVersion(*args, **kwargs): | |
339 | """GetOsVersion() -> (platform, major, minor)""" | |
340 | return _misc_.GetOsVersion(*args, **kwargs) | |
341 | ||
342 | def GetOsDescription(*args, **kwargs): | |
343 | """GetOsDescription() -> String""" | |
344 | return _misc_.GetOsDescription(*args, **kwargs) | |
345 | ||
346 | def GetFreeMemory(*args, **kwargs): | |
347 | """GetFreeMemory() -> wxMemorySize""" | |
348 | return _misc_.GetFreeMemory(*args, **kwargs) | |
349 | SHUTDOWN_POWEROFF = _misc_.SHUTDOWN_POWEROFF | |
350 | SHUTDOWN_REBOOT = _misc_.SHUTDOWN_REBOOT | |
351 | ||
352 | def Shutdown(*args, **kwargs): | |
353 | """Shutdown(int wFlags) -> bool""" | |
354 | return _misc_.Shutdown(*args, **kwargs) | |
355 | ||
356 | def Sleep(*args, **kwargs): | |
357 | """Sleep(int secs)""" | |
358 | return _misc_.Sleep(*args, **kwargs) | |
359 | ||
360 | def MilliSleep(*args, **kwargs): | |
361 | """MilliSleep(unsigned long milliseconds)""" | |
362 | return _misc_.MilliSleep(*args, **kwargs) | |
363 | ||
364 | def MicroSleep(*args, **kwargs): | |
365 | """MicroSleep(unsigned long microseconds)""" | |
366 | return _misc_.MicroSleep(*args, **kwargs) | |
367 | Usleep = MilliSleep | |
368 | ||
369 | def EnableTopLevelWindows(*args, **kwargs): | |
370 | """EnableTopLevelWindows(bool enable)""" | |
371 | return _misc_.EnableTopLevelWindows(*args, **kwargs) | |
372 | ||
373 | def StripMenuCodes(*args, **kwargs): | |
374 | """StripMenuCodes(String in) -> String""" | |
375 | return _misc_.StripMenuCodes(*args, **kwargs) | |
376 | ||
377 | def GetEmailAddress(*args, **kwargs): | |
378 | """GetEmailAddress() -> String""" | |
379 | return _misc_.GetEmailAddress(*args, **kwargs) | |
380 | ||
381 | def GetHostName(*args, **kwargs): | |
382 | """GetHostName() -> String""" | |
383 | return _misc_.GetHostName(*args, **kwargs) | |
384 | ||
385 | def GetFullHostName(*args, **kwargs): | |
386 | """GetFullHostName() -> String""" | |
387 | return _misc_.GetFullHostName(*args, **kwargs) | |
388 | ||
389 | def GetUserId(*args, **kwargs): | |
390 | """GetUserId() -> String""" | |
391 | return _misc_.GetUserId(*args, **kwargs) | |
392 | ||
393 | def GetUserName(*args, **kwargs): | |
394 | """GetUserName() -> String""" | |
395 | return _misc_.GetUserName(*args, **kwargs) | |
396 | ||
397 | def GetHomeDir(*args, **kwargs): | |
398 | """GetHomeDir() -> String""" | |
399 | return _misc_.GetHomeDir(*args, **kwargs) | |
400 | ||
401 | def GetUserHome(*args, **kwargs): | |
402 | """GetUserHome(String user=EmptyString) -> String""" | |
403 | return _misc_.GetUserHome(*args, **kwargs) | |
404 | ||
405 | def GetProcessId(*args, **kwargs): | |
406 | """GetProcessId() -> unsigned long""" | |
407 | return _misc_.GetProcessId(*args, **kwargs) | |
408 | ||
409 | def Trap(*args, **kwargs): | |
410 | """Trap()""" | |
411 | return _misc_.Trap(*args, **kwargs) | |
412 | ||
413 | def FileSelector(*args, **kwargs): | |
414 | """ | |
415 | FileSelector(String message=FileSelectorPromptStr, String default_path=EmptyString, | |
416 | String default_filename=EmptyString, | |
417 | String default_extension=EmptyString, | |
418 | String wildcard=FileSelectorDefaultWildcardStr, | |
419 | int flags=0, Window parent=None, int x=-1, | |
420 | int y=-1) -> String | |
421 | """ | |
422 | return _misc_.FileSelector(*args, **kwargs) | |
423 | ||
424 | def LoadFileSelector(*args, **kwargs): | |
425 | """ | |
426 | LoadFileSelector(String what, String extension, String default_name=EmptyString, | |
427 | Window parent=None) -> String | |
428 | """ | |
429 | return _misc_.LoadFileSelector(*args, **kwargs) | |
430 | ||
431 | def SaveFileSelector(*args, **kwargs): | |
432 | """ | |
433 | SaveFileSelector(String what, String extension, String default_name=EmptyString, | |
434 | Window parent=None) -> String | |
435 | """ | |
436 | return _misc_.SaveFileSelector(*args, **kwargs) | |
437 | ||
438 | def DirSelector(*args, **kwargs): | |
439 | """ | |
440 | DirSelector(String message=DirSelectorPromptStr, String defaultPath=EmptyString, | |
441 | long style=DD_DEFAULT_STYLE, | |
442 | Point pos=DefaultPosition, Window parent=None) -> String | |
443 | """ | |
444 | return _misc_.DirSelector(*args, **kwargs) | |
445 | ||
446 | def GetTextFromUser(*args, **kwargs): | |
447 | """ | |
448 | GetTextFromUser(String message, String caption=EmptyString, String default_value=EmptyString, | |
449 | Window parent=None, | |
450 | int x=-1, int y=-1, bool centre=True) -> String | |
451 | """ | |
452 | return _misc_.GetTextFromUser(*args, **kwargs) | |
453 | ||
454 | def GetPasswordFromUser(*args, **kwargs): | |
455 | """ | |
456 | GetPasswordFromUser(String message, String caption=EmptyString, String default_value=EmptyString, | |
457 | Window parent=None) -> String | |
458 | """ | |
459 | return _misc_.GetPasswordFromUser(*args, **kwargs) | |
460 | ||
461 | def GetSingleChoice(*args, **kwargs): | |
462 | """ | |
463 | GetSingleChoice(String message, String caption, int choices, Window parent=None, | |
464 | int x=-1, int y=-1, bool centre=True, | |
465 | int width=150, int height=200) -> String | |
466 | """ | |
467 | return _misc_.GetSingleChoice(*args, **kwargs) | |
468 | ||
469 | def GetSingleChoiceIndex(*args, **kwargs): | |
470 | """ | |
471 | GetSingleChoiceIndex(String message, String caption, int choices, Window parent=None, | |
472 | int x=-1, int y=-1, bool centre=True, | |
473 | int width=150, int height=200) -> int | |
474 | """ | |
475 | return _misc_.GetSingleChoiceIndex(*args, **kwargs) | |
476 | ||
477 | def MessageBox(*args, **kwargs): | |
478 | """ | |
479 | MessageBox(String message, String caption=EmptyString, int style=wxOK|wxCENTRE, | |
480 | Window parent=None, int x=-1, | |
481 | int y=-1) -> int | |
482 | """ | |
483 | return _misc_.MessageBox(*args, **kwargs) | |
484 | ||
485 | def ColourDisplay(*args, **kwargs): | |
486 | """ColourDisplay() -> bool""" | |
487 | return _misc_.ColourDisplay(*args, **kwargs) | |
488 | ||
489 | def DisplayDepth(*args, **kwargs): | |
490 | """DisplayDepth() -> int""" | |
491 | return _misc_.DisplayDepth(*args, **kwargs) | |
492 | ||
493 | def GetDisplayDepth(*args, **kwargs): | |
494 | """GetDisplayDepth() -> int""" | |
495 | return _misc_.GetDisplayDepth(*args, **kwargs) | |
496 | ||
497 | def DisplaySize(*args, **kwargs): | |
498 | """DisplaySize() -> (width, height)""" | |
499 | return _misc_.DisplaySize(*args, **kwargs) | |
500 | ||
501 | def GetDisplaySize(*args, **kwargs): | |
502 | """GetDisplaySize() -> Size""" | |
503 | return _misc_.GetDisplaySize(*args, **kwargs) | |
504 | ||
505 | def DisplaySizeMM(*args, **kwargs): | |
506 | """DisplaySizeMM() -> (width, height)""" | |
507 | return _misc_.DisplaySizeMM(*args, **kwargs) | |
508 | ||
509 | def GetDisplaySizeMM(*args, **kwargs): | |
510 | """GetDisplaySizeMM() -> Size""" | |
511 | return _misc_.GetDisplaySizeMM(*args, **kwargs) | |
512 | ||
513 | def ClientDisplayRect(*args, **kwargs): | |
514 | """ClientDisplayRect() -> (x, y, width, height)""" | |
515 | return _misc_.ClientDisplayRect(*args, **kwargs) | |
516 | ||
517 | def GetClientDisplayRect(*args, **kwargs): | |
518 | """GetClientDisplayRect() -> Rect""" | |
519 | return _misc_.GetClientDisplayRect(*args, **kwargs) | |
520 | ||
521 | def SetCursor(*args, **kwargs): | |
522 | """SetCursor(Cursor cursor)""" | |
523 | return _misc_.SetCursor(*args, **kwargs) | |
524 | ||
525 | def GetXDisplay(*args, **kwargs): | |
526 | """ | |
527 | GetXDisplay() -> void | |
528 | ||
529 | Returns a swigified pointer to the X11 display. Returns None on | |
530 | other platforms. | |
531 | """ | |
532 | return _misc_.GetXDisplay(*args, **kwargs) | |
533 | ||
534 | def BeginBusyCursor(*args, **kwargs): | |
535 | """BeginBusyCursor(Cursor cursor=wxHOURGLASS_CURSOR)""" | |
536 | return _misc_.BeginBusyCursor(*args, **kwargs) | |
537 | ||
538 | def GetMousePosition(*args, **kwargs): | |
539 | """ | |
540 | GetMousePosition() -> Point | |
541 | ||
542 | Get the current mouse position on the screen. | |
543 | """ | |
544 | return _misc_.GetMousePosition(*args, **kwargs) | |
545 | ||
546 | def FindWindowAtPointer(*args, **kwargs): | |
547 | """ | |
548 | FindWindowAtPointer() -> Window | |
549 | ||
550 | Returns the window currently under the mouse pointer, if it belongs to | |
551 | this application. Otherwise it returns None. | |
552 | """ | |
553 | return _misc_.FindWindowAtPointer(*args, **kwargs) | |
554 | ||
555 | def GetActiveWindow(*args, **kwargs): | |
556 | """ | |
557 | GetActiveWindow() -> Window | |
558 | ||
559 | Get the currently active window of this application, or None | |
560 | """ | |
561 | return _misc_.GetActiveWindow(*args, **kwargs) | |
562 | ||
563 | def GenericFindWindowAtPoint(*args, **kwargs): | |
564 | """GenericFindWindowAtPoint(Point pt) -> Window""" | |
565 | return _misc_.GenericFindWindowAtPoint(*args, **kwargs) | |
566 | ||
567 | def FindWindowAtPoint(*args, **kwargs): | |
568 | """FindWindowAtPoint(Point pt) -> Window""" | |
569 | return _misc_.FindWindowAtPoint(*args, **kwargs) | |
570 | ||
571 | def GetTopLevelParent(*args, **kwargs): | |
572 | """GetTopLevelParent(Window win) -> Window""" | |
573 | return _misc_.GetTopLevelParent(*args, **kwargs) | |
574 | ||
575 | def LaunchDefaultBrowser(*args, **kwargs): | |
576 | """ | |
577 | LaunchDefaultBrowser(String url) -> bool | |
578 | ||
579 | Launches the user's default browser and tells it to open the location | |
580 | at ``url``. Returns ``True`` if the application was successfully | |
581 | launched. | |
582 | """ | |
583 | return _misc_.LaunchDefaultBrowser(*args, **kwargs) | |
584 | ||
585 | def GetKeyState(*args, **kwargs): | |
586 | """ | |
587 | GetKeyState(int key) -> bool | |
588 | ||
589 | Get the state of a key (true if pressed or toggled on, false if not.) | |
590 | This is generally most useful getting the state of the modifier or | |
591 | toggle keys. On some platforms those may be the only keys that this | |
592 | function is able to detect. | |
593 | ||
594 | """ | |
595 | return _misc_.GetKeyState(*args, **kwargs) | |
596 | class MouseState(object): | |
597 | """ | |
598 | `wx.MouseState` is used to hold information about mouse button and | |
599 | modifier key states and is what is returned from `wx.GetMouseState`. | |
600 | """ | |
601 | def __repr__(self): | |
602 | return "<%s.%s; proxy of C++ wxMouseState instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
603 | def __init__(self, *args, **kwargs): | |
604 | """ | |
605 | __init__(self) -> MouseState | |
606 | ||
607 | `wx.MouseState` is used to hold information about mouse button and | |
608 | modifier key states and is what is returned from `wx.GetMouseState`. | |
609 | """ | |
610 | newobj = _misc_.new_MouseState(*args, **kwargs) | |
611 | self.this = newobj.this | |
612 | self.thisown = 1 | |
613 | del newobj.thisown | |
614 | def __del__(self, destroy=_misc_.delete_MouseState): | |
615 | """__del__(self)""" | |
616 | try: | |
617 | if self.thisown: destroy(self) | |
618 | except: pass | |
619 | ||
620 | def GetX(*args, **kwargs): | |
621 | """GetX(self) -> int""" | |
622 | return _misc_.MouseState_GetX(*args, **kwargs) | |
623 | ||
624 | def GetY(*args, **kwargs): | |
625 | """GetY(self) -> int""" | |
626 | return _misc_.MouseState_GetY(*args, **kwargs) | |
627 | ||
628 | def LeftDown(*args, **kwargs): | |
629 | """LeftDown(self) -> bool""" | |
630 | return _misc_.MouseState_LeftDown(*args, **kwargs) | |
631 | ||
632 | def MiddleDown(*args, **kwargs): | |
633 | """MiddleDown(self) -> bool""" | |
634 | return _misc_.MouseState_MiddleDown(*args, **kwargs) | |
635 | ||
636 | def RightDown(*args, **kwargs): | |
637 | """RightDown(self) -> bool""" | |
638 | return _misc_.MouseState_RightDown(*args, **kwargs) | |
639 | ||
640 | def ControlDown(*args, **kwargs): | |
641 | """ControlDown(self) -> bool""" | |
642 | return _misc_.MouseState_ControlDown(*args, **kwargs) | |
643 | ||
644 | def ShiftDown(*args, **kwargs): | |
645 | """ShiftDown(self) -> bool""" | |
646 | return _misc_.MouseState_ShiftDown(*args, **kwargs) | |
647 | ||
648 | def AltDown(*args, **kwargs): | |
649 | """AltDown(self) -> bool""" | |
650 | return _misc_.MouseState_AltDown(*args, **kwargs) | |
651 | ||
652 | def MetaDown(*args, **kwargs): | |
653 | """MetaDown(self) -> bool""" | |
654 | return _misc_.MouseState_MetaDown(*args, **kwargs) | |
655 | ||
656 | def CmdDown(*args, **kwargs): | |
657 | """CmdDown(self) -> bool""" | |
658 | return _misc_.MouseState_CmdDown(*args, **kwargs) | |
659 | ||
660 | def SetX(*args, **kwargs): | |
661 | """SetX(self, int x)""" | |
662 | return _misc_.MouseState_SetX(*args, **kwargs) | |
663 | ||
664 | def SetY(*args, **kwargs): | |
665 | """SetY(self, int y)""" | |
666 | return _misc_.MouseState_SetY(*args, **kwargs) | |
667 | ||
668 | def SetLeftDown(*args, **kwargs): | |
669 | """SetLeftDown(self, bool down)""" | |
670 | return _misc_.MouseState_SetLeftDown(*args, **kwargs) | |
671 | ||
672 | def SetMiddleDown(*args, **kwargs): | |
673 | """SetMiddleDown(self, bool down)""" | |
674 | return _misc_.MouseState_SetMiddleDown(*args, **kwargs) | |
675 | ||
676 | def SetRightDown(*args, **kwargs): | |
677 | """SetRightDown(self, bool down)""" | |
678 | return _misc_.MouseState_SetRightDown(*args, **kwargs) | |
679 | ||
680 | def SetControlDown(*args, **kwargs): | |
681 | """SetControlDown(self, bool down)""" | |
682 | return _misc_.MouseState_SetControlDown(*args, **kwargs) | |
683 | ||
684 | def SetShiftDown(*args, **kwargs): | |
685 | """SetShiftDown(self, bool down)""" | |
686 | return _misc_.MouseState_SetShiftDown(*args, **kwargs) | |
687 | ||
688 | def SetAltDown(*args, **kwargs): | |
689 | """SetAltDown(self, bool down)""" | |
690 | return _misc_.MouseState_SetAltDown(*args, **kwargs) | |
691 | ||
692 | def SetMetaDown(*args, **kwargs): | |
693 | """SetMetaDown(self, bool down)""" | |
694 | return _misc_.MouseState_SetMetaDown(*args, **kwargs) | |
695 | ||
696 | x = property(GetX, SetX) | |
697 | y = property(GetY, SetY) | |
698 | leftDown = property(LeftDown, SetLeftDown) | |
699 | middleDown = property(MiddleDown, SetMiddleDown) | |
700 | rightDown = property(RightDown, SetRightDown) | |
701 | controlDown = property(ControlDown, SetControlDown) | |
702 | shiftDown = property(ShiftDown, SetShiftDown) | |
703 | altDown = property(AltDown, SetAltDown) | |
704 | metaDown = property(MetaDown, SetMetaDown) | |
705 | cmdDown = property(CmdDown) | |
706 | ||
707 | ||
708 | class MouseStatePtr(MouseState): | |
709 | def __init__(self, this): | |
710 | self.this = this | |
711 | if not hasattr(self,"thisown"): self.thisown = 0 | |
712 | self.__class__ = MouseState | |
713 | _misc_.MouseState_swigregister(MouseStatePtr) | |
714 | FileSelectorPromptStr = cvar.FileSelectorPromptStr | |
715 | FileSelectorDefaultWildcardStr = cvar.FileSelectorDefaultWildcardStr | |
716 | DirSelectorPromptStr = cvar.DirSelectorPromptStr | |
717 | ||
718 | ||
719 | def GetMouseState(*args, **kwargs): | |
720 | """ | |
721 | GetMouseState() -> MouseState | |
722 | ||
723 | Returns the current state of the mouse. Returns an instance of a | |
724 | `wx.MouseState` object that contains the current position of the mouse | |
725 | pointer in screen coordinants, as well as boolean values indicating | |
726 | the up/down status of the mouse buttons and the modifier keys. | |
727 | """ | |
728 | return _misc_.GetMouseState(*args, **kwargs) | |
729 | ||
730 | def WakeUpMainThread(*args, **kwargs): | |
731 | """WakeUpMainThread()""" | |
732 | return _misc_.WakeUpMainThread(*args, **kwargs) | |
733 | ||
734 | def MutexGuiEnter(*args, **kwargs): | |
735 | """MutexGuiEnter()""" | |
736 | return _misc_.MutexGuiEnter(*args, **kwargs) | |
737 | ||
738 | def MutexGuiLeave(*args, **kwargs): | |
739 | """MutexGuiLeave()""" | |
740 | return _misc_.MutexGuiLeave(*args, **kwargs) | |
741 | class MutexGuiLocker(object): | |
742 | """Proxy of C++ MutexGuiLocker class""" | |
743 | def __repr__(self): | |
744 | return "<%s.%s; proxy of C++ wxMutexGuiLocker instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
745 | def __init__(self, *args, **kwargs): | |
746 | """__init__(self) -> MutexGuiLocker""" | |
747 | newobj = _misc_.new_MutexGuiLocker(*args, **kwargs) | |
748 | self.this = newobj.this | |
749 | self.thisown = 1 | |
750 | del newobj.thisown | |
751 | def __del__(self, destroy=_misc_.delete_MutexGuiLocker): | |
752 | """__del__(self)""" | |
753 | try: | |
754 | if self.thisown: destroy(self) | |
755 | except: pass | |
756 | ||
757 | ||
758 | class MutexGuiLockerPtr(MutexGuiLocker): | |
759 | def __init__(self, this): | |
760 | self.this = this | |
761 | if not hasattr(self,"thisown"): self.thisown = 0 | |
762 | self.__class__ = MutexGuiLocker | |
763 | _misc_.MutexGuiLocker_swigregister(MutexGuiLockerPtr) | |
764 | ||
765 | ||
766 | def Thread_IsMain(*args, **kwargs): | |
767 | """Thread_IsMain() -> bool""" | |
768 | return _misc_.Thread_IsMain(*args, **kwargs) | |
769 | #--------------------------------------------------------------------------- | |
770 | ||
771 | class ToolTip(_core.Object): | |
772 | """Proxy of C++ ToolTip class""" | |
773 | def __repr__(self): | |
774 | return "<%s.%s; proxy of C++ wxToolTip instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
775 | def __init__(self, *args, **kwargs): | |
776 | """__init__(self, String tip) -> ToolTip""" | |
777 | newobj = _misc_.new_ToolTip(*args, **kwargs) | |
778 | self.this = newobj.this | |
779 | self.thisown = 1 | |
780 | del newobj.thisown | |
781 | def SetTip(*args, **kwargs): | |
782 | """SetTip(self, String tip)""" | |
783 | return _misc_.ToolTip_SetTip(*args, **kwargs) | |
784 | ||
785 | def GetTip(*args, **kwargs): | |
786 | """GetTip(self) -> String""" | |
787 | return _misc_.ToolTip_GetTip(*args, **kwargs) | |
788 | ||
789 | def GetWindow(*args, **kwargs): | |
790 | """GetWindow(self) -> Window""" | |
791 | return _misc_.ToolTip_GetWindow(*args, **kwargs) | |
792 | ||
793 | def Enable(*args, **kwargs): | |
794 | """Enable(bool flag)""" | |
795 | return _misc_.ToolTip_Enable(*args, **kwargs) | |
796 | ||
797 | Enable = staticmethod(Enable) | |
798 | def SetDelay(*args, **kwargs): | |
799 | """SetDelay(long milliseconds)""" | |
800 | return _misc_.ToolTip_SetDelay(*args, **kwargs) | |
801 | ||
802 | SetDelay = staticmethod(SetDelay) | |
803 | ||
804 | class ToolTipPtr(ToolTip): | |
805 | def __init__(self, this): | |
806 | self.this = this | |
807 | if not hasattr(self,"thisown"): self.thisown = 0 | |
808 | self.__class__ = ToolTip | |
809 | _misc_.ToolTip_swigregister(ToolTipPtr) | |
810 | ||
811 | def ToolTip_Enable(*args, **kwargs): | |
812 | """ToolTip_Enable(bool flag)""" | |
813 | return _misc_.ToolTip_Enable(*args, **kwargs) | |
814 | ||
815 | def ToolTip_SetDelay(*args, **kwargs): | |
816 | """ToolTip_SetDelay(long milliseconds)""" | |
817 | return _misc_.ToolTip_SetDelay(*args, **kwargs) | |
818 | ||
819 | class Caret(object): | |
820 | """Proxy of C++ Caret class""" | |
821 | def __repr__(self): | |
822 | return "<%s.%s; proxy of C++ wxCaret instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
823 | def __init__(self, *args, **kwargs): | |
824 | """__init__(self, Window window, Size size) -> Caret""" | |
825 | newobj = _misc_.new_Caret(*args, **kwargs) | |
826 | self.this = newobj.this | |
827 | self.thisown = 1 | |
828 | del newobj.thisown | |
829 | def Destroy(*args, **kwargs): | |
830 | """ | |
831 | Destroy(self) | |
832 | ||
833 | Deletes the C++ object this Python object is a proxy for. | |
834 | """ | |
835 | return _misc_.Caret_Destroy(*args, **kwargs) | |
836 | ||
837 | def IsOk(*args, **kwargs): | |
838 | """IsOk(self) -> bool""" | |
839 | return _misc_.Caret_IsOk(*args, **kwargs) | |
840 | ||
841 | def IsVisible(*args, **kwargs): | |
842 | """IsVisible(self) -> bool""" | |
843 | return _misc_.Caret_IsVisible(*args, **kwargs) | |
844 | ||
845 | def GetPosition(*args, **kwargs): | |
846 | """GetPosition(self) -> Point""" | |
847 | return _misc_.Caret_GetPosition(*args, **kwargs) | |
848 | ||
849 | def GetPositionTuple(*args, **kwargs): | |
850 | """GetPositionTuple() -> (x,y)""" | |
851 | return _misc_.Caret_GetPositionTuple(*args, **kwargs) | |
852 | ||
853 | def GetSize(*args, **kwargs): | |
854 | """GetSize(self) -> Size""" | |
855 | return _misc_.Caret_GetSize(*args, **kwargs) | |
856 | ||
857 | def GetSizeTuple(*args, **kwargs): | |
858 | """GetSizeTuple() -> (width, height)""" | |
859 | return _misc_.Caret_GetSizeTuple(*args, **kwargs) | |
860 | ||
861 | def GetWindow(*args, **kwargs): | |
862 | """GetWindow(self) -> Window""" | |
863 | return _misc_.Caret_GetWindow(*args, **kwargs) | |
864 | ||
865 | def MoveXY(*args, **kwargs): | |
866 | """MoveXY(self, int x, int y)""" | |
867 | return _misc_.Caret_MoveXY(*args, **kwargs) | |
868 | ||
869 | def Move(*args, **kwargs): | |
870 | """Move(self, Point pt)""" | |
871 | return _misc_.Caret_Move(*args, **kwargs) | |
872 | ||
873 | def SetSizeWH(*args, **kwargs): | |
874 | """SetSizeWH(self, int width, int height)""" | |
875 | return _misc_.Caret_SetSizeWH(*args, **kwargs) | |
876 | ||
877 | def SetSize(*args, **kwargs): | |
878 | """SetSize(self, Size size)""" | |
879 | return _misc_.Caret_SetSize(*args, **kwargs) | |
880 | ||
881 | def Show(*args, **kwargs): | |
882 | """Show(self, int show=True)""" | |
883 | return _misc_.Caret_Show(*args, **kwargs) | |
884 | ||
885 | def Hide(*args, **kwargs): | |
886 | """Hide(self)""" | |
887 | return _misc_.Caret_Hide(*args, **kwargs) | |
888 | ||
889 | def __nonzero__(self): return self.IsOk() | |
890 | def GetBlinkTime(*args, **kwargs): | |
891 | """GetBlinkTime() -> int""" | |
892 | return _misc_.Caret_GetBlinkTime(*args, **kwargs) | |
893 | ||
894 | GetBlinkTime = staticmethod(GetBlinkTime) | |
895 | def SetBlinkTime(*args, **kwargs): | |
896 | """SetBlinkTime(int milliseconds)""" | |
897 | return _misc_.Caret_SetBlinkTime(*args, **kwargs) | |
898 | ||
899 | SetBlinkTime = staticmethod(SetBlinkTime) | |
900 | ||
901 | class CaretPtr(Caret): | |
902 | def __init__(self, this): | |
903 | self.this = this | |
904 | if not hasattr(self,"thisown"): self.thisown = 0 | |
905 | self.__class__ = Caret | |
906 | _misc_.Caret_swigregister(CaretPtr) | |
907 | ||
908 | def Caret_GetBlinkTime(*args, **kwargs): | |
909 | """Caret_GetBlinkTime() -> int""" | |
910 | return _misc_.Caret_GetBlinkTime(*args, **kwargs) | |
911 | ||
912 | def Caret_SetBlinkTime(*args, **kwargs): | |
913 | """Caret_SetBlinkTime(int milliseconds)""" | |
914 | return _misc_.Caret_SetBlinkTime(*args, **kwargs) | |
915 | ||
916 | class BusyCursor(object): | |
917 | """Proxy of C++ BusyCursor class""" | |
918 | def __repr__(self): | |
919 | return "<%s.%s; proxy of C++ wxBusyCursor instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
920 | def __init__(self, *args, **kwargs): | |
921 | """__init__(self, Cursor cursor=wxHOURGLASS_CURSOR) -> BusyCursor""" | |
922 | newobj = _misc_.new_BusyCursor(*args, **kwargs) | |
923 | self.this = newobj.this | |
924 | self.thisown = 1 | |
925 | del newobj.thisown | |
926 | def __del__(self, destroy=_misc_.delete_BusyCursor): | |
927 | """__del__(self)""" | |
928 | try: | |
929 | if self.thisown: destroy(self) | |
930 | except: pass | |
931 | ||
932 | ||
933 | class BusyCursorPtr(BusyCursor): | |
934 | def __init__(self, this): | |
935 | self.this = this | |
936 | if not hasattr(self,"thisown"): self.thisown = 0 | |
937 | self.__class__ = BusyCursor | |
938 | _misc_.BusyCursor_swigregister(BusyCursorPtr) | |
939 | ||
940 | class WindowDisabler(object): | |
941 | """Proxy of C++ WindowDisabler class""" | |
942 | def __repr__(self): | |
943 | return "<%s.%s; proxy of C++ wxWindowDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
944 | def __init__(self, *args, **kwargs): | |
945 | """__init__(self, Window winToSkip=None) -> WindowDisabler""" | |
946 | newobj = _misc_.new_WindowDisabler(*args, **kwargs) | |
947 | self.this = newobj.this | |
948 | self.thisown = 1 | |
949 | del newobj.thisown | |
950 | def __del__(self, destroy=_misc_.delete_WindowDisabler): | |
951 | """__del__(self)""" | |
952 | try: | |
953 | if self.thisown: destroy(self) | |
954 | except: pass | |
955 | ||
956 | ||
957 | class WindowDisablerPtr(WindowDisabler): | |
958 | def __init__(self, this): | |
959 | self.this = this | |
960 | if not hasattr(self,"thisown"): self.thisown = 0 | |
961 | self.__class__ = WindowDisabler | |
962 | _misc_.WindowDisabler_swigregister(WindowDisablerPtr) | |
963 | ||
964 | class BusyInfo(_core.Object): | |
965 | """Proxy of C++ BusyInfo class""" | |
966 | def __repr__(self): | |
967 | return "<%s.%s; proxy of C++ wxBusyInfo instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
968 | def __init__(self, *args, **kwargs): | |
969 | """__init__(self, String message) -> BusyInfo""" | |
970 | newobj = _misc_.new_BusyInfo(*args, **kwargs) | |
971 | self.this = newobj.this | |
972 | self.thisown = 1 | |
973 | del newobj.thisown | |
974 | def __del__(self, destroy=_misc_.delete_BusyInfo): | |
975 | """__del__(self)""" | |
976 | try: | |
977 | if self.thisown: destroy(self) | |
978 | except: pass | |
979 | ||
980 | ||
981 | class BusyInfoPtr(BusyInfo): | |
982 | def __init__(self, this): | |
983 | self.this = this | |
984 | if not hasattr(self,"thisown"): self.thisown = 0 | |
985 | self.__class__ = BusyInfo | |
986 | _misc_.BusyInfo_swigregister(BusyInfoPtr) | |
987 | ||
988 | class StopWatch(object): | |
989 | """Proxy of C++ StopWatch class""" | |
990 | def __repr__(self): | |
991 | return "<%s.%s; proxy of C++ wxStopWatch instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
992 | def __init__(self, *args, **kwargs): | |
993 | """__init__(self) -> StopWatch""" | |
994 | newobj = _misc_.new_StopWatch(*args, **kwargs) | |
995 | self.this = newobj.this | |
996 | self.thisown = 1 | |
997 | del newobj.thisown | |
998 | def Start(*args, **kwargs): | |
999 | """Start(self, long t0=0)""" | |
1000 | return _misc_.StopWatch_Start(*args, **kwargs) | |
1001 | ||
1002 | def Pause(*args, **kwargs): | |
1003 | """Pause(self)""" | |
1004 | return _misc_.StopWatch_Pause(*args, **kwargs) | |
1005 | ||
1006 | def Resume(*args, **kwargs): | |
1007 | """Resume(self)""" | |
1008 | return _misc_.StopWatch_Resume(*args, **kwargs) | |
1009 | ||
1010 | def Time(*args, **kwargs): | |
1011 | """Time(self) -> long""" | |
1012 | return _misc_.StopWatch_Time(*args, **kwargs) | |
1013 | ||
1014 | ||
1015 | class StopWatchPtr(StopWatch): | |
1016 | def __init__(self, this): | |
1017 | self.this = this | |
1018 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1019 | self.__class__ = StopWatch | |
1020 | _misc_.StopWatch_swigregister(StopWatchPtr) | |
1021 | ||
1022 | class FileHistory(_core.Object): | |
1023 | """Proxy of C++ FileHistory class""" | |
1024 | def __repr__(self): | |
1025 | return "<%s.%s; proxy of C++ wxFileHistory instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1026 | def __init__(self, *args, **kwargs): | |
1027 | """__init__(self, int maxFiles=9, int idBase=ID_FILE1) -> FileHistory""" | |
1028 | newobj = _misc_.new_FileHistory(*args, **kwargs) | |
1029 | self.this = newobj.this | |
1030 | self.thisown = 1 | |
1031 | del newobj.thisown | |
1032 | def __del__(self, destroy=_misc_.delete_FileHistory): | |
1033 | """__del__(self)""" | |
1034 | try: | |
1035 | if self.thisown: destroy(self) | |
1036 | except: pass | |
1037 | ||
1038 | def AddFileToHistory(*args, **kwargs): | |
1039 | """AddFileToHistory(self, String file)""" | |
1040 | return _misc_.FileHistory_AddFileToHistory(*args, **kwargs) | |
1041 | ||
1042 | def RemoveFileFromHistory(*args, **kwargs): | |
1043 | """RemoveFileFromHistory(self, int i)""" | |
1044 | return _misc_.FileHistory_RemoveFileFromHistory(*args, **kwargs) | |
1045 | ||
1046 | def GetMaxFiles(*args, **kwargs): | |
1047 | """GetMaxFiles(self) -> int""" | |
1048 | return _misc_.FileHistory_GetMaxFiles(*args, **kwargs) | |
1049 | ||
1050 | def UseMenu(*args, **kwargs): | |
1051 | """UseMenu(self, Menu menu)""" | |
1052 | return _misc_.FileHistory_UseMenu(*args, **kwargs) | |
1053 | ||
1054 | def RemoveMenu(*args, **kwargs): | |
1055 | """RemoveMenu(self, Menu menu)""" | |
1056 | return _misc_.FileHistory_RemoveMenu(*args, **kwargs) | |
1057 | ||
1058 | def Load(*args, **kwargs): | |
1059 | """Load(self, ConfigBase config)""" | |
1060 | return _misc_.FileHistory_Load(*args, **kwargs) | |
1061 | ||
1062 | def Save(*args, **kwargs): | |
1063 | """Save(self, ConfigBase config)""" | |
1064 | return _misc_.FileHistory_Save(*args, **kwargs) | |
1065 | ||
1066 | def AddFilesToMenu(*args, **kwargs): | |
1067 | """AddFilesToMenu(self)""" | |
1068 | return _misc_.FileHistory_AddFilesToMenu(*args, **kwargs) | |
1069 | ||
1070 | def AddFilesToThisMenu(*args, **kwargs): | |
1071 | """AddFilesToThisMenu(self, Menu menu)""" | |
1072 | return _misc_.FileHistory_AddFilesToThisMenu(*args, **kwargs) | |
1073 | ||
1074 | def GetHistoryFile(*args, **kwargs): | |
1075 | """GetHistoryFile(self, int i) -> String""" | |
1076 | return _misc_.FileHistory_GetHistoryFile(*args, **kwargs) | |
1077 | ||
1078 | def GetCount(*args, **kwargs): | |
1079 | """GetCount(self) -> int""" | |
1080 | return _misc_.FileHistory_GetCount(*args, **kwargs) | |
1081 | ||
1082 | GetNoHistoryFiles = GetCount | |
1083 | ||
1084 | class FileHistoryPtr(FileHistory): | |
1085 | def __init__(self, this): | |
1086 | self.this = this | |
1087 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1088 | self.__class__ = FileHistory | |
1089 | _misc_.FileHistory_swigregister(FileHistoryPtr) | |
1090 | ||
1091 | class SingleInstanceChecker(object): | |
1092 | """Proxy of C++ SingleInstanceChecker class""" | |
1093 | def __repr__(self): | |
1094 | return "<%s.%s; proxy of C++ wxSingleInstanceChecker instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1095 | def __init__(self, *args, **kwargs): | |
1096 | """__init__(self, String name, String path=EmptyString) -> SingleInstanceChecker""" | |
1097 | newobj = _misc_.new_SingleInstanceChecker(*args, **kwargs) | |
1098 | self.this = newobj.this | |
1099 | self.thisown = 1 | |
1100 | del newobj.thisown | |
1101 | def __del__(self, destroy=_misc_.delete_SingleInstanceChecker): | |
1102 | """__del__(self)""" | |
1103 | try: | |
1104 | if self.thisown: destroy(self) | |
1105 | except: pass | |
1106 | ||
1107 | def Create(*args, **kwargs): | |
1108 | """Create(self, String name, String path=EmptyString) -> bool""" | |
1109 | return _misc_.SingleInstanceChecker_Create(*args, **kwargs) | |
1110 | ||
1111 | def IsAnotherRunning(*args, **kwargs): | |
1112 | """IsAnotherRunning(self) -> bool""" | |
1113 | return _misc_.SingleInstanceChecker_IsAnotherRunning(*args, **kwargs) | |
1114 | ||
1115 | ||
1116 | class SingleInstanceCheckerPtr(SingleInstanceChecker): | |
1117 | def __init__(self, this): | |
1118 | self.this = this | |
1119 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1120 | self.__class__ = SingleInstanceChecker | |
1121 | _misc_.SingleInstanceChecker_swigregister(SingleInstanceCheckerPtr) | |
1122 | ||
1123 | def PreSingleInstanceChecker(*args, **kwargs): | |
1124 | """PreSingleInstanceChecker() -> SingleInstanceChecker""" | |
1125 | val = _misc_.new_PreSingleInstanceChecker(*args, **kwargs) | |
1126 | val.thisown = 1 | |
1127 | return val | |
1128 | ||
1129 | ||
1130 | def DrawWindowOnDC(*args, **kwargs): | |
1131 | """DrawWindowOnDC(Window window, DC dc) -> bool""" | |
1132 | return _misc_.DrawWindowOnDC(*args, **kwargs) | |
1133 | #--------------------------------------------------------------------------- | |
1134 | ||
1135 | class TipProvider(object): | |
1136 | """Proxy of C++ TipProvider class""" | |
1137 | def __init__(self): raise RuntimeError, "No constructor defined" | |
1138 | def __repr__(self): | |
1139 | return "<%s.%s; proxy of C++ wxTipProvider instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1140 | def __del__(self, destroy=_misc_.delete_TipProvider): | |
1141 | """__del__(self)""" | |
1142 | try: | |
1143 | if self.thisown: destroy(self) | |
1144 | except: pass | |
1145 | ||
1146 | def GetTip(*args, **kwargs): | |
1147 | """GetTip(self) -> String""" | |
1148 | return _misc_.TipProvider_GetTip(*args, **kwargs) | |
1149 | ||
1150 | def GetCurrentTip(*args, **kwargs): | |
1151 | """GetCurrentTip(self) -> size_t""" | |
1152 | return _misc_.TipProvider_GetCurrentTip(*args, **kwargs) | |
1153 | ||
1154 | def PreprocessTip(*args, **kwargs): | |
1155 | """PreprocessTip(self, String tip) -> String""" | |
1156 | return _misc_.TipProvider_PreprocessTip(*args, **kwargs) | |
1157 | ||
1158 | ||
1159 | class TipProviderPtr(TipProvider): | |
1160 | def __init__(self, this): | |
1161 | self.this = this | |
1162 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1163 | self.__class__ = TipProvider | |
1164 | _misc_.TipProvider_swigregister(TipProviderPtr) | |
1165 | ||
1166 | class PyTipProvider(TipProvider): | |
1167 | """Proxy of C++ PyTipProvider class""" | |
1168 | def __repr__(self): | |
1169 | return "<%s.%s; proxy of C++ wxPyTipProvider instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1170 | def __init__(self, *args, **kwargs): | |
1171 | """__init__(self, size_t currentTip) -> PyTipProvider""" | |
1172 | newobj = _misc_.new_PyTipProvider(*args, **kwargs) | |
1173 | self.this = newobj.this | |
1174 | self.thisown = 1 | |
1175 | del newobj.thisown | |
1176 | self._setCallbackInfo(self, PyTipProvider) | |
1177 | ||
1178 | def _setCallbackInfo(*args, **kwargs): | |
1179 | """_setCallbackInfo(self, PyObject self, PyObject _class)""" | |
1180 | return _misc_.PyTipProvider__setCallbackInfo(*args, **kwargs) | |
1181 | ||
1182 | ||
1183 | class PyTipProviderPtr(PyTipProvider): | |
1184 | def __init__(self, this): | |
1185 | self.this = this | |
1186 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1187 | self.__class__ = PyTipProvider | |
1188 | _misc_.PyTipProvider_swigregister(PyTipProviderPtr) | |
1189 | ||
1190 | ||
1191 | def ShowTip(*args, **kwargs): | |
1192 | """ShowTip(Window parent, TipProvider tipProvider, bool showAtStartup=True) -> bool""" | |
1193 | return _misc_.ShowTip(*args, **kwargs) | |
1194 | ||
1195 | def CreateFileTipProvider(*args, **kwargs): | |
1196 | """CreateFileTipProvider(String filename, size_t currentTip) -> TipProvider""" | |
1197 | return _misc_.CreateFileTipProvider(*args, **kwargs) | |
1198 | #--------------------------------------------------------------------------- | |
1199 | ||
1200 | TIMER_CONTINUOUS = _misc_.TIMER_CONTINUOUS | |
1201 | TIMER_ONE_SHOT = _misc_.TIMER_ONE_SHOT | |
1202 | wxEVT_TIMER = _misc_.wxEVT_TIMER | |
1203 | class Timer(_core.EvtHandler): | |
1204 | """Proxy of C++ Timer class""" | |
1205 | def __repr__(self): | |
1206 | return "<%s.%s; proxy of C++ wxPyTimer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1207 | def __init__(self, *args, **kwargs): | |
1208 | """__init__(self, EvtHandler owner=None, int id=-1) -> Timer""" | |
1209 | newobj = _misc_.new_Timer(*args, **kwargs) | |
1210 | self.this = newobj.this | |
1211 | self.thisown = 1 | |
1212 | del newobj.thisown | |
1213 | self._setCallbackInfo(self, Timer, 0); self._setOORInfo(self, 0) | |
1214 | ||
1215 | def __del__(self, destroy=_misc_.delete_Timer): | |
1216 | """__del__(self)""" | |
1217 | try: | |
1218 | if self.thisown: destroy(self) | |
1219 | except: pass | |
1220 | ||
1221 | def _setCallbackInfo(*args, **kwargs): | |
1222 | """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=1)""" | |
1223 | return _misc_.Timer__setCallbackInfo(*args, **kwargs) | |
1224 | ||
1225 | def SetOwner(*args, **kwargs): | |
1226 | """SetOwner(self, EvtHandler owner, int id=-1)""" | |
1227 | return _misc_.Timer_SetOwner(*args, **kwargs) | |
1228 | ||
1229 | def GetOwner(*args, **kwargs): | |
1230 | """GetOwner(self) -> EvtHandler""" | |
1231 | return _misc_.Timer_GetOwner(*args, **kwargs) | |
1232 | ||
1233 | def Start(*args, **kwargs): | |
1234 | """Start(self, int milliseconds=-1, bool oneShot=False) -> bool""" | |
1235 | return _misc_.Timer_Start(*args, **kwargs) | |
1236 | ||
1237 | def Stop(*args, **kwargs): | |
1238 | """Stop(self)""" | |
1239 | return _misc_.Timer_Stop(*args, **kwargs) | |
1240 | ||
1241 | def IsRunning(*args, **kwargs): | |
1242 | """IsRunning(self) -> bool""" | |
1243 | return _misc_.Timer_IsRunning(*args, **kwargs) | |
1244 | ||
1245 | def GetInterval(*args, **kwargs): | |
1246 | """GetInterval(self) -> int""" | |
1247 | return _misc_.Timer_GetInterval(*args, **kwargs) | |
1248 | ||
1249 | def IsOneShot(*args, **kwargs): | |
1250 | """IsOneShot(self) -> bool""" | |
1251 | return _misc_.Timer_IsOneShot(*args, **kwargs) | |
1252 | ||
1253 | def GetId(*args, **kwargs): | |
1254 | """GetId(self) -> int""" | |
1255 | return _misc_.Timer_GetId(*args, **kwargs) | |
1256 | ||
1257 | def Destroy(self): | |
1258 | """NO-OP: Timers must be destroyed by normal refrence counting""" | |
1259 | pass | |
1260 | ||
1261 | ||
1262 | class TimerPtr(Timer): | |
1263 | def __init__(self, this): | |
1264 | self.this = this | |
1265 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1266 | self.__class__ = Timer | |
1267 | _misc_.Timer_swigregister(TimerPtr) | |
1268 | ||
1269 | # For backwards compatibility with 2.4 | |
1270 | class PyTimer(Timer): | |
1271 | def __init__(self, notify): | |
1272 | Timer.__init__(self) | |
1273 | self.notify = notify | |
1274 | ||
1275 | def Notify(self): | |
1276 | if self.notify: | |
1277 | self.notify() | |
1278 | ||
1279 | ||
1280 | EVT_TIMER = wx.PyEventBinder( wxEVT_TIMER, 1 ) | |
1281 | ||
1282 | ||
1283 | class TimerEvent(_core.Event): | |
1284 | """Proxy of C++ TimerEvent class""" | |
1285 | def __repr__(self): | |
1286 | return "<%s.%s; proxy of C++ wxTimerEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1287 | def __init__(self, *args, **kwargs): | |
1288 | """__init__(self, int timerid=0, int interval=0) -> TimerEvent""" | |
1289 | newobj = _misc_.new_TimerEvent(*args, **kwargs) | |
1290 | self.this = newobj.this | |
1291 | self.thisown = 1 | |
1292 | del newobj.thisown | |
1293 | def GetInterval(*args, **kwargs): | |
1294 | """GetInterval(self) -> int""" | |
1295 | return _misc_.TimerEvent_GetInterval(*args, **kwargs) | |
1296 | ||
1297 | ||
1298 | class TimerEventPtr(TimerEvent): | |
1299 | def __init__(self, this): | |
1300 | self.this = this | |
1301 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1302 | self.__class__ = TimerEvent | |
1303 | _misc_.TimerEvent_swigregister(TimerEventPtr) | |
1304 | ||
1305 | class TimerRunner(object): | |
1306 | """Proxy of C++ TimerRunner class""" | |
1307 | def __repr__(self): | |
1308 | return "<%s.%s; proxy of C++ wxTimerRunner instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1309 | def __init__(self, *args): | |
1310 | """ | |
1311 | __init__(self, wxTimer timer) -> TimerRunner | |
1312 | __init__(self, wxTimer timer, int milli, bool oneShot=False) -> TimerRunner | |
1313 | __init__(self, wxTimer timer, int milli) -> TimerRunner | |
1314 | """ | |
1315 | newobj = _misc_.new_TimerRunner(*args) | |
1316 | self.this = newobj.this | |
1317 | self.thisown = 1 | |
1318 | del newobj.thisown | |
1319 | def __del__(self, destroy=_misc_.delete_TimerRunner): | |
1320 | """__del__(self)""" | |
1321 | try: | |
1322 | if self.thisown: destroy(self) | |
1323 | except: pass | |
1324 | ||
1325 | def Start(*args, **kwargs): | |
1326 | """Start(self, int milli, bool oneShot=False)""" | |
1327 | return _misc_.TimerRunner_Start(*args, **kwargs) | |
1328 | ||
1329 | ||
1330 | class TimerRunnerPtr(TimerRunner): | |
1331 | def __init__(self, this): | |
1332 | self.this = this | |
1333 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1334 | self.__class__ = TimerRunner | |
1335 | _misc_.TimerRunner_swigregister(TimerRunnerPtr) | |
1336 | ||
1337 | #--------------------------------------------------------------------------- | |
1338 | ||
1339 | LOG_FatalError = _misc_.LOG_FatalError | |
1340 | LOG_Error = _misc_.LOG_Error | |
1341 | LOG_Warning = _misc_.LOG_Warning | |
1342 | LOG_Message = _misc_.LOG_Message | |
1343 | LOG_Status = _misc_.LOG_Status | |
1344 | LOG_Info = _misc_.LOG_Info | |
1345 | LOG_Debug = _misc_.LOG_Debug | |
1346 | LOG_Trace = _misc_.LOG_Trace | |
1347 | LOG_Progress = _misc_.LOG_Progress | |
1348 | LOG_User = _misc_.LOG_User | |
1349 | LOG_Max = _misc_.LOG_Max | |
1350 | TRACE_MemAlloc = _misc_.TRACE_MemAlloc | |
1351 | TRACE_Messages = _misc_.TRACE_Messages | |
1352 | TRACE_ResAlloc = _misc_.TRACE_ResAlloc | |
1353 | TRACE_RefCount = _misc_.TRACE_RefCount | |
1354 | TRACE_OleCalls = _misc_.TRACE_OleCalls | |
1355 | TraceMemAlloc = _misc_.TraceMemAlloc | |
1356 | TraceMessages = _misc_.TraceMessages | |
1357 | TraceResAlloc = _misc_.TraceResAlloc | |
1358 | TraceRefCount = _misc_.TraceRefCount | |
1359 | TraceOleCalls = _misc_.TraceOleCalls | |
1360 | class Log(object): | |
1361 | """Proxy of C++ Log class""" | |
1362 | def __repr__(self): | |
1363 | return "<%s.%s; proxy of C++ wxLog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1364 | def __init__(self, *args, **kwargs): | |
1365 | """__init__(self) -> Log""" | |
1366 | newobj = _misc_.new_Log(*args, **kwargs) | |
1367 | self.this = newobj.this | |
1368 | self.thisown = 1 | |
1369 | del newobj.thisown | |
1370 | def IsEnabled(*args, **kwargs): | |
1371 | """IsEnabled() -> bool""" | |
1372 | return _misc_.Log_IsEnabled(*args, **kwargs) | |
1373 | ||
1374 | IsEnabled = staticmethod(IsEnabled) | |
1375 | def EnableLogging(*args, **kwargs): | |
1376 | """EnableLogging(bool doIt=True) -> bool""" | |
1377 | return _misc_.Log_EnableLogging(*args, **kwargs) | |
1378 | ||
1379 | EnableLogging = staticmethod(EnableLogging) | |
1380 | def OnLog(*args, **kwargs): | |
1381 | """OnLog(wxLogLevel level, wxChar szString, time_t t)""" | |
1382 | return _misc_.Log_OnLog(*args, **kwargs) | |
1383 | ||
1384 | OnLog = staticmethod(OnLog) | |
1385 | def Flush(*args, **kwargs): | |
1386 | """Flush(self)""" | |
1387 | return _misc_.Log_Flush(*args, **kwargs) | |
1388 | ||
1389 | def FlushActive(*args, **kwargs): | |
1390 | """FlushActive()""" | |
1391 | return _misc_.Log_FlushActive(*args, **kwargs) | |
1392 | ||
1393 | FlushActive = staticmethod(FlushActive) | |
1394 | def GetActiveTarget(*args, **kwargs): | |
1395 | """GetActiveTarget() -> Log""" | |
1396 | return _misc_.Log_GetActiveTarget(*args, **kwargs) | |
1397 | ||
1398 | GetActiveTarget = staticmethod(GetActiveTarget) | |
1399 | def SetActiveTarget(*args, **kwargs): | |
1400 | """SetActiveTarget(Log pLogger) -> Log""" | |
1401 | return _misc_.Log_SetActiveTarget(*args, **kwargs) | |
1402 | ||
1403 | SetActiveTarget = staticmethod(SetActiveTarget) | |
1404 | def Suspend(*args, **kwargs): | |
1405 | """Suspend()""" | |
1406 | return _misc_.Log_Suspend(*args, **kwargs) | |
1407 | ||
1408 | Suspend = staticmethod(Suspend) | |
1409 | def Resume(*args, **kwargs): | |
1410 | """Resume()""" | |
1411 | return _misc_.Log_Resume(*args, **kwargs) | |
1412 | ||
1413 | Resume = staticmethod(Resume) | |
1414 | def SetVerbose(*args, **kwargs): | |
1415 | """SetVerbose(bool bVerbose=True)""" | |
1416 | return _misc_.Log_SetVerbose(*args, **kwargs) | |
1417 | ||
1418 | SetVerbose = staticmethod(SetVerbose) | |
1419 | def SetLogLevel(*args, **kwargs): | |
1420 | """SetLogLevel(wxLogLevel logLevel)""" | |
1421 | return _misc_.Log_SetLogLevel(*args, **kwargs) | |
1422 | ||
1423 | SetLogLevel = staticmethod(SetLogLevel) | |
1424 | def DontCreateOnDemand(*args, **kwargs): | |
1425 | """DontCreateOnDemand()""" | |
1426 | return _misc_.Log_DontCreateOnDemand(*args, **kwargs) | |
1427 | ||
1428 | DontCreateOnDemand = staticmethod(DontCreateOnDemand) | |
1429 | def SetTraceMask(*args, **kwargs): | |
1430 | """SetTraceMask(wxTraceMask ulMask)""" | |
1431 | return _misc_.Log_SetTraceMask(*args, **kwargs) | |
1432 | ||
1433 | SetTraceMask = staticmethod(SetTraceMask) | |
1434 | def AddTraceMask(*args, **kwargs): | |
1435 | """AddTraceMask(String str)""" | |
1436 | return _misc_.Log_AddTraceMask(*args, **kwargs) | |
1437 | ||
1438 | AddTraceMask = staticmethod(AddTraceMask) | |
1439 | def RemoveTraceMask(*args, **kwargs): | |
1440 | """RemoveTraceMask(String str)""" | |
1441 | return _misc_.Log_RemoveTraceMask(*args, **kwargs) | |
1442 | ||
1443 | RemoveTraceMask = staticmethod(RemoveTraceMask) | |
1444 | def ClearTraceMasks(*args, **kwargs): | |
1445 | """ClearTraceMasks()""" | |
1446 | return _misc_.Log_ClearTraceMasks(*args, **kwargs) | |
1447 | ||
1448 | ClearTraceMasks = staticmethod(ClearTraceMasks) | |
1449 | def GetTraceMasks(*args, **kwargs): | |
1450 | """GetTraceMasks() -> wxArrayString""" | |
1451 | return _misc_.Log_GetTraceMasks(*args, **kwargs) | |
1452 | ||
1453 | GetTraceMasks = staticmethod(GetTraceMasks) | |
1454 | def SetTimestamp(*args, **kwargs): | |
1455 | """SetTimestamp(wxChar ts)""" | |
1456 | return _misc_.Log_SetTimestamp(*args, **kwargs) | |
1457 | ||
1458 | SetTimestamp = staticmethod(SetTimestamp) | |
1459 | def GetVerbose(*args, **kwargs): | |
1460 | """GetVerbose() -> bool""" | |
1461 | return _misc_.Log_GetVerbose(*args, **kwargs) | |
1462 | ||
1463 | GetVerbose = staticmethod(GetVerbose) | |
1464 | def GetTraceMask(*args, **kwargs): | |
1465 | """GetTraceMask() -> wxTraceMask""" | |
1466 | return _misc_.Log_GetTraceMask(*args, **kwargs) | |
1467 | ||
1468 | GetTraceMask = staticmethod(GetTraceMask) | |
1469 | def IsAllowedTraceMask(*args, **kwargs): | |
1470 | """IsAllowedTraceMask(wxChar mask) -> bool""" | |
1471 | return _misc_.Log_IsAllowedTraceMask(*args, **kwargs) | |
1472 | ||
1473 | IsAllowedTraceMask = staticmethod(IsAllowedTraceMask) | |
1474 | def GetLogLevel(*args, **kwargs): | |
1475 | """GetLogLevel() -> wxLogLevel""" | |
1476 | return _misc_.Log_GetLogLevel(*args, **kwargs) | |
1477 | ||
1478 | GetLogLevel = staticmethod(GetLogLevel) | |
1479 | def GetTimestamp(*args, **kwargs): | |
1480 | """GetTimestamp() -> wxChar""" | |
1481 | return _misc_.Log_GetTimestamp(*args, **kwargs) | |
1482 | ||
1483 | GetTimestamp = staticmethod(GetTimestamp) | |
1484 | def TimeStamp(*args, **kwargs): | |
1485 | """TimeStamp() -> String""" | |
1486 | return _misc_.Log_TimeStamp(*args, **kwargs) | |
1487 | ||
1488 | TimeStamp = staticmethod(TimeStamp) | |
1489 | def Destroy(*args, **kwargs): | |
1490 | """Destroy(self)""" | |
1491 | return _misc_.Log_Destroy(*args, **kwargs) | |
1492 | ||
1493 | ||
1494 | class LogPtr(Log): | |
1495 | def __init__(self, this): | |
1496 | self.this = this | |
1497 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1498 | self.__class__ = Log | |
1499 | _misc_.Log_swigregister(LogPtr) | |
1500 | ||
1501 | def Log_IsEnabled(*args, **kwargs): | |
1502 | """Log_IsEnabled() -> bool""" | |
1503 | return _misc_.Log_IsEnabled(*args, **kwargs) | |
1504 | ||
1505 | def Log_EnableLogging(*args, **kwargs): | |
1506 | """Log_EnableLogging(bool doIt=True) -> bool""" | |
1507 | return _misc_.Log_EnableLogging(*args, **kwargs) | |
1508 | ||
1509 | def Log_OnLog(*args, **kwargs): | |
1510 | """Log_OnLog(wxLogLevel level, wxChar szString, time_t t)""" | |
1511 | return _misc_.Log_OnLog(*args, **kwargs) | |
1512 | ||
1513 | def Log_FlushActive(*args, **kwargs): | |
1514 | """Log_FlushActive()""" | |
1515 | return _misc_.Log_FlushActive(*args, **kwargs) | |
1516 | ||
1517 | def Log_GetActiveTarget(*args, **kwargs): | |
1518 | """Log_GetActiveTarget() -> Log""" | |
1519 | return _misc_.Log_GetActiveTarget(*args, **kwargs) | |
1520 | ||
1521 | def Log_SetActiveTarget(*args, **kwargs): | |
1522 | """Log_SetActiveTarget(Log pLogger) -> Log""" | |
1523 | return _misc_.Log_SetActiveTarget(*args, **kwargs) | |
1524 | ||
1525 | def Log_Suspend(*args, **kwargs): | |
1526 | """Log_Suspend()""" | |
1527 | return _misc_.Log_Suspend(*args, **kwargs) | |
1528 | ||
1529 | def Log_Resume(*args, **kwargs): | |
1530 | """Log_Resume()""" | |
1531 | return _misc_.Log_Resume(*args, **kwargs) | |
1532 | ||
1533 | def Log_SetVerbose(*args, **kwargs): | |
1534 | """Log_SetVerbose(bool bVerbose=True)""" | |
1535 | return _misc_.Log_SetVerbose(*args, **kwargs) | |
1536 | ||
1537 | def Log_SetLogLevel(*args, **kwargs): | |
1538 | """Log_SetLogLevel(wxLogLevel logLevel)""" | |
1539 | return _misc_.Log_SetLogLevel(*args, **kwargs) | |
1540 | ||
1541 | def Log_DontCreateOnDemand(*args, **kwargs): | |
1542 | """Log_DontCreateOnDemand()""" | |
1543 | return _misc_.Log_DontCreateOnDemand(*args, **kwargs) | |
1544 | ||
1545 | def Log_SetTraceMask(*args, **kwargs): | |
1546 | """Log_SetTraceMask(wxTraceMask ulMask)""" | |
1547 | return _misc_.Log_SetTraceMask(*args, **kwargs) | |
1548 | ||
1549 | def Log_AddTraceMask(*args, **kwargs): | |
1550 | """Log_AddTraceMask(String str)""" | |
1551 | return _misc_.Log_AddTraceMask(*args, **kwargs) | |
1552 | ||
1553 | def Log_RemoveTraceMask(*args, **kwargs): | |
1554 | """Log_RemoveTraceMask(String str)""" | |
1555 | return _misc_.Log_RemoveTraceMask(*args, **kwargs) | |
1556 | ||
1557 | def Log_ClearTraceMasks(*args, **kwargs): | |
1558 | """Log_ClearTraceMasks()""" | |
1559 | return _misc_.Log_ClearTraceMasks(*args, **kwargs) | |
1560 | ||
1561 | def Log_GetTraceMasks(*args, **kwargs): | |
1562 | """Log_GetTraceMasks() -> wxArrayString""" | |
1563 | return _misc_.Log_GetTraceMasks(*args, **kwargs) | |
1564 | ||
1565 | def Log_SetTimestamp(*args, **kwargs): | |
1566 | """Log_SetTimestamp(wxChar ts)""" | |
1567 | return _misc_.Log_SetTimestamp(*args, **kwargs) | |
1568 | ||
1569 | def Log_GetVerbose(*args, **kwargs): | |
1570 | """Log_GetVerbose() -> bool""" | |
1571 | return _misc_.Log_GetVerbose(*args, **kwargs) | |
1572 | ||
1573 | def Log_GetTraceMask(*args, **kwargs): | |
1574 | """Log_GetTraceMask() -> wxTraceMask""" | |
1575 | return _misc_.Log_GetTraceMask(*args, **kwargs) | |
1576 | ||
1577 | def Log_IsAllowedTraceMask(*args, **kwargs): | |
1578 | """Log_IsAllowedTraceMask(wxChar mask) -> bool""" | |
1579 | return _misc_.Log_IsAllowedTraceMask(*args, **kwargs) | |
1580 | ||
1581 | def Log_GetLogLevel(*args, **kwargs): | |
1582 | """Log_GetLogLevel() -> wxLogLevel""" | |
1583 | return _misc_.Log_GetLogLevel(*args, **kwargs) | |
1584 | ||
1585 | def Log_GetTimestamp(*args, **kwargs): | |
1586 | """Log_GetTimestamp() -> wxChar""" | |
1587 | return _misc_.Log_GetTimestamp(*args, **kwargs) | |
1588 | ||
1589 | def Log_TimeStamp(*args, **kwargs): | |
1590 | """Log_TimeStamp() -> String""" | |
1591 | return _misc_.Log_TimeStamp(*args, **kwargs) | |
1592 | ||
1593 | class LogStderr(Log): | |
1594 | """Proxy of C++ LogStderr class""" | |
1595 | def __repr__(self): | |
1596 | return "<%s.%s; proxy of C++ wxLogStderr instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1597 | def __init__(self, *args, **kwargs): | |
1598 | """__init__(self) -> LogStderr""" | |
1599 | newobj = _misc_.new_LogStderr(*args, **kwargs) | |
1600 | self.this = newobj.this | |
1601 | self.thisown = 1 | |
1602 | del newobj.thisown | |
1603 | ||
1604 | class LogStderrPtr(LogStderr): | |
1605 | def __init__(self, this): | |
1606 | self.this = this | |
1607 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1608 | self.__class__ = LogStderr | |
1609 | _misc_.LogStderr_swigregister(LogStderrPtr) | |
1610 | ||
1611 | class LogTextCtrl(Log): | |
1612 | """Proxy of C++ LogTextCtrl class""" | |
1613 | def __repr__(self): | |
1614 | return "<%s.%s; proxy of C++ wxLogTextCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1615 | def __init__(self, *args, **kwargs): | |
1616 | """__init__(self, wxTextCtrl pTextCtrl) -> LogTextCtrl""" | |
1617 | newobj = _misc_.new_LogTextCtrl(*args, **kwargs) | |
1618 | self.this = newobj.this | |
1619 | self.thisown = 1 | |
1620 | del newobj.thisown | |
1621 | ||
1622 | class LogTextCtrlPtr(LogTextCtrl): | |
1623 | def __init__(self, this): | |
1624 | self.this = this | |
1625 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1626 | self.__class__ = LogTextCtrl | |
1627 | _misc_.LogTextCtrl_swigregister(LogTextCtrlPtr) | |
1628 | ||
1629 | class LogGui(Log): | |
1630 | """Proxy of C++ LogGui class""" | |
1631 | def __repr__(self): | |
1632 | return "<%s.%s; proxy of C++ wxLogGui instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1633 | def __init__(self, *args, **kwargs): | |
1634 | """__init__(self) -> LogGui""" | |
1635 | newobj = _misc_.new_LogGui(*args, **kwargs) | |
1636 | self.this = newobj.this | |
1637 | self.thisown = 1 | |
1638 | del newobj.thisown | |
1639 | ||
1640 | class LogGuiPtr(LogGui): | |
1641 | def __init__(self, this): | |
1642 | self.this = this | |
1643 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1644 | self.__class__ = LogGui | |
1645 | _misc_.LogGui_swigregister(LogGuiPtr) | |
1646 | ||
1647 | class LogWindow(Log): | |
1648 | """Proxy of C++ LogWindow class""" | |
1649 | def __repr__(self): | |
1650 | return "<%s.%s; proxy of C++ wxLogWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1651 | def __init__(self, *args, **kwargs): | |
1652 | """__init__(self, wxFrame pParent, String szTitle, bool bShow=True, bool bPassToOld=True) -> LogWindow""" | |
1653 | newobj = _misc_.new_LogWindow(*args, **kwargs) | |
1654 | self.this = newobj.this | |
1655 | self.thisown = 1 | |
1656 | del newobj.thisown | |
1657 | def Show(*args, **kwargs): | |
1658 | """Show(self, bool bShow=True)""" | |
1659 | return _misc_.LogWindow_Show(*args, **kwargs) | |
1660 | ||
1661 | def GetFrame(*args, **kwargs): | |
1662 | """GetFrame(self) -> wxFrame""" | |
1663 | return _misc_.LogWindow_GetFrame(*args, **kwargs) | |
1664 | ||
1665 | def GetOldLog(*args, **kwargs): | |
1666 | """GetOldLog(self) -> Log""" | |
1667 | return _misc_.LogWindow_GetOldLog(*args, **kwargs) | |
1668 | ||
1669 | def IsPassingMessages(*args, **kwargs): | |
1670 | """IsPassingMessages(self) -> bool""" | |
1671 | return _misc_.LogWindow_IsPassingMessages(*args, **kwargs) | |
1672 | ||
1673 | def PassMessages(*args, **kwargs): | |
1674 | """PassMessages(self, bool bDoPass)""" | |
1675 | return _misc_.LogWindow_PassMessages(*args, **kwargs) | |
1676 | ||
1677 | ||
1678 | class LogWindowPtr(LogWindow): | |
1679 | def __init__(self, this): | |
1680 | self.this = this | |
1681 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1682 | self.__class__ = LogWindow | |
1683 | _misc_.LogWindow_swigregister(LogWindowPtr) | |
1684 | ||
1685 | class LogChain(Log): | |
1686 | """Proxy of C++ LogChain class""" | |
1687 | def __repr__(self): | |
1688 | return "<%s.%s; proxy of C++ wxLogChain instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1689 | def __init__(self, *args, **kwargs): | |
1690 | """__init__(self, Log logger) -> LogChain""" | |
1691 | newobj = _misc_.new_LogChain(*args, **kwargs) | |
1692 | self.this = newobj.this | |
1693 | self.thisown = 1 | |
1694 | del newobj.thisown | |
1695 | def SetLog(*args, **kwargs): | |
1696 | """SetLog(self, Log logger)""" | |
1697 | return _misc_.LogChain_SetLog(*args, **kwargs) | |
1698 | ||
1699 | def PassMessages(*args, **kwargs): | |
1700 | """PassMessages(self, bool bDoPass)""" | |
1701 | return _misc_.LogChain_PassMessages(*args, **kwargs) | |
1702 | ||
1703 | def IsPassingMessages(*args, **kwargs): | |
1704 | """IsPassingMessages(self) -> bool""" | |
1705 | return _misc_.LogChain_IsPassingMessages(*args, **kwargs) | |
1706 | ||
1707 | def GetOldLog(*args, **kwargs): | |
1708 | """GetOldLog(self) -> Log""" | |
1709 | return _misc_.LogChain_GetOldLog(*args, **kwargs) | |
1710 | ||
1711 | ||
1712 | class LogChainPtr(LogChain): | |
1713 | def __init__(self, this): | |
1714 | self.this = this | |
1715 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1716 | self.__class__ = LogChain | |
1717 | _misc_.LogChain_swigregister(LogChainPtr) | |
1718 | ||
1719 | class LogBuffer(Log): | |
1720 | """Proxy of C++ LogBuffer class""" | |
1721 | def __repr__(self): | |
1722 | return "<%s.%s; proxy of C++ wxLogBuffer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1723 | def __init__(self, *args, **kwargs): | |
1724 | """__init__(self) -> LogBuffer""" | |
1725 | newobj = _misc_.new_LogBuffer(*args, **kwargs) | |
1726 | self.this = newobj.this | |
1727 | self.thisown = 1 | |
1728 | del newobj.thisown | |
1729 | def GetBuffer(*args, **kwargs): | |
1730 | """GetBuffer(self) -> String""" | |
1731 | return _misc_.LogBuffer_GetBuffer(*args, **kwargs) | |
1732 | ||
1733 | def Flush(*args, **kwargs): | |
1734 | """Flush(self)""" | |
1735 | return _misc_.LogBuffer_Flush(*args, **kwargs) | |
1736 | ||
1737 | ||
1738 | class LogBufferPtr(LogBuffer): | |
1739 | def __init__(self, this): | |
1740 | self.this = this | |
1741 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1742 | self.__class__ = LogBuffer | |
1743 | _misc_.LogBuffer_swigregister(LogBufferPtr) | |
1744 | ||
1745 | ||
1746 | def SysErrorCode(*args, **kwargs): | |
1747 | """SysErrorCode() -> unsigned long""" | |
1748 | return _misc_.SysErrorCode(*args, **kwargs) | |
1749 | ||
1750 | def SysErrorMsg(*args, **kwargs): | |
1751 | """SysErrorMsg(unsigned long nErrCode=0) -> String""" | |
1752 | return _misc_.SysErrorMsg(*args, **kwargs) | |
1753 | ||
1754 | def LogFatalError(*args, **kwargs): | |
1755 | """LogFatalError(String msg)""" | |
1756 | return _misc_.LogFatalError(*args, **kwargs) | |
1757 | ||
1758 | def LogError(*args, **kwargs): | |
1759 | """LogError(String msg)""" | |
1760 | return _misc_.LogError(*args, **kwargs) | |
1761 | ||
1762 | def LogWarning(*args, **kwargs): | |
1763 | """LogWarning(String msg)""" | |
1764 | return _misc_.LogWarning(*args, **kwargs) | |
1765 | ||
1766 | def LogMessage(*args, **kwargs): | |
1767 | """LogMessage(String msg)""" | |
1768 | return _misc_.LogMessage(*args, **kwargs) | |
1769 | ||
1770 | def LogInfo(*args, **kwargs): | |
1771 | """LogInfo(String msg)""" | |
1772 | return _misc_.LogInfo(*args, **kwargs) | |
1773 | ||
1774 | def LogDebug(*args, **kwargs): | |
1775 | """LogDebug(String msg)""" | |
1776 | return _misc_.LogDebug(*args, **kwargs) | |
1777 | ||
1778 | def LogVerbose(*args, **kwargs): | |
1779 | """LogVerbose(String msg)""" | |
1780 | return _misc_.LogVerbose(*args, **kwargs) | |
1781 | ||
1782 | def LogStatus(*args, **kwargs): | |
1783 | """LogStatus(String msg)""" | |
1784 | return _misc_.LogStatus(*args, **kwargs) | |
1785 | ||
1786 | def LogStatusFrame(*args, **kwargs): | |
1787 | """LogStatusFrame(wxFrame pFrame, String msg)""" | |
1788 | return _misc_.LogStatusFrame(*args, **kwargs) | |
1789 | ||
1790 | def LogSysError(*args, **kwargs): | |
1791 | """LogSysError(String msg)""" | |
1792 | return _misc_.LogSysError(*args, **kwargs) | |
1793 | ||
1794 | def LogGeneric(*args, **kwargs): | |
1795 | """LogGeneric(unsigned long level, String msg)""" | |
1796 | return _misc_.LogGeneric(*args, **kwargs) | |
1797 | ||
1798 | def SafeShowMessage(*args, **kwargs): | |
1799 | """SafeShowMessage(String title, String text)""" | |
1800 | return _misc_.SafeShowMessage(*args, **kwargs) | |
1801 | class LogNull(object): | |
1802 | """Proxy of C++ LogNull class""" | |
1803 | def __repr__(self): | |
1804 | return "<%s.%s; proxy of C++ wxLogNull instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1805 | def __init__(self, *args, **kwargs): | |
1806 | """__init__(self) -> LogNull""" | |
1807 | newobj = _misc_.new_LogNull(*args, **kwargs) | |
1808 | self.this = newobj.this | |
1809 | self.thisown = 1 | |
1810 | del newobj.thisown | |
1811 | def __del__(self, destroy=_misc_.delete_LogNull): | |
1812 | """__del__(self)""" | |
1813 | try: | |
1814 | if self.thisown: destroy(self) | |
1815 | except: pass | |
1816 | ||
1817 | ||
1818 | class LogNullPtr(LogNull): | |
1819 | def __init__(self, this): | |
1820 | self.this = this | |
1821 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1822 | self.__class__ = LogNull | |
1823 | _misc_.LogNull_swigregister(LogNullPtr) | |
1824 | ||
1825 | def LogTrace(*args): | |
1826 | """ | |
1827 | LogTrace(unsigned long mask, String msg) | |
1828 | LogTrace(String mask, String msg) | |
1829 | """ | |
1830 | return _misc_.LogTrace(*args) | |
1831 | ||
1832 | class PyLog(Log): | |
1833 | """Proxy of C++ PyLog class""" | |
1834 | def __repr__(self): | |
1835 | return "<%s.%s; proxy of C++ wxPyLog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1836 | def __init__(self, *args, **kwargs): | |
1837 | """__init__(self) -> PyLog""" | |
1838 | newobj = _misc_.new_PyLog(*args, **kwargs) | |
1839 | self.this = newobj.this | |
1840 | self.thisown = 1 | |
1841 | del newobj.thisown | |
1842 | self._setCallbackInfo(self, PyLog) | |
1843 | ||
1844 | def _setCallbackInfo(*args, **kwargs): | |
1845 | """_setCallbackInfo(self, PyObject self, PyObject _class)""" | |
1846 | return _misc_.PyLog__setCallbackInfo(*args, **kwargs) | |
1847 | ||
1848 | ||
1849 | class PyLogPtr(PyLog): | |
1850 | def __init__(self, this): | |
1851 | self.this = this | |
1852 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1853 | self.__class__ = PyLog | |
1854 | _misc_.PyLog_swigregister(PyLogPtr) | |
1855 | ||
1856 | #--------------------------------------------------------------------------- | |
1857 | ||
1858 | PROCESS_DEFAULT = _misc_.PROCESS_DEFAULT | |
1859 | PROCESS_REDIRECT = _misc_.PROCESS_REDIRECT | |
1860 | KILL_OK = _misc_.KILL_OK | |
1861 | KILL_BAD_SIGNAL = _misc_.KILL_BAD_SIGNAL | |
1862 | KILL_ACCESS_DENIED = _misc_.KILL_ACCESS_DENIED | |
1863 | KILL_NO_PROCESS = _misc_.KILL_NO_PROCESS | |
1864 | KILL_ERROR = _misc_.KILL_ERROR | |
1865 | KILL_NOCHILDREN = _misc_.KILL_NOCHILDREN | |
1866 | KILL_CHILDREN = _misc_.KILL_CHILDREN | |
1867 | SIGNONE = _misc_.SIGNONE | |
1868 | SIGHUP = _misc_.SIGHUP | |
1869 | SIGINT = _misc_.SIGINT | |
1870 | SIGQUIT = _misc_.SIGQUIT | |
1871 | SIGILL = _misc_.SIGILL | |
1872 | SIGTRAP = _misc_.SIGTRAP | |
1873 | SIGABRT = _misc_.SIGABRT | |
1874 | SIGIOT = _misc_.SIGIOT | |
1875 | SIGEMT = _misc_.SIGEMT | |
1876 | SIGFPE = _misc_.SIGFPE | |
1877 | SIGKILL = _misc_.SIGKILL | |
1878 | SIGBUS = _misc_.SIGBUS | |
1879 | SIGSEGV = _misc_.SIGSEGV | |
1880 | SIGSYS = _misc_.SIGSYS | |
1881 | SIGPIPE = _misc_.SIGPIPE | |
1882 | SIGALRM = _misc_.SIGALRM | |
1883 | SIGTERM = _misc_.SIGTERM | |
1884 | class Process(_core.EvtHandler): | |
1885 | """Proxy of C++ Process class""" | |
1886 | def __repr__(self): | |
1887 | return "<%s.%s; proxy of C++ wxPyProcess instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1888 | def Kill(*args, **kwargs): | |
1889 | """Kill(int pid, int sig=SIGTERM, int flags=KILL_NOCHILDREN) -> int""" | |
1890 | return _misc_.Process_Kill(*args, **kwargs) | |
1891 | ||
1892 | Kill = staticmethod(Kill) | |
1893 | def Exists(*args, **kwargs): | |
1894 | """Exists(int pid) -> bool""" | |
1895 | return _misc_.Process_Exists(*args, **kwargs) | |
1896 | ||
1897 | Exists = staticmethod(Exists) | |
1898 | def Open(*args, **kwargs): | |
1899 | """Open(String cmd, int flags=EXEC_ASYNC) -> Process""" | |
1900 | return _misc_.Process_Open(*args, **kwargs) | |
1901 | ||
1902 | Open = staticmethod(Open) | |
1903 | def __init__(self, *args, **kwargs): | |
1904 | """__init__(self, EvtHandler parent=None, int id=-1) -> Process""" | |
1905 | newobj = _misc_.new_Process(*args, **kwargs) | |
1906 | self.this = newobj.this | |
1907 | self.thisown = 1 | |
1908 | del newobj.thisown | |
1909 | self._setCallbackInfo(self, Process) | |
1910 | ||
1911 | def _setCallbackInfo(*args, **kwargs): | |
1912 | """_setCallbackInfo(self, PyObject self, PyObject _class)""" | |
1913 | return _misc_.Process__setCallbackInfo(*args, **kwargs) | |
1914 | ||
1915 | def base_OnTerminate(*args, **kwargs): | |
1916 | """base_OnTerminate(self, int pid, int status)""" | |
1917 | return _misc_.Process_base_OnTerminate(*args, **kwargs) | |
1918 | ||
1919 | def Redirect(*args, **kwargs): | |
1920 | """Redirect(self)""" | |
1921 | return _misc_.Process_Redirect(*args, **kwargs) | |
1922 | ||
1923 | def IsRedirected(*args, **kwargs): | |
1924 | """IsRedirected(self) -> bool""" | |
1925 | return _misc_.Process_IsRedirected(*args, **kwargs) | |
1926 | ||
1927 | def Detach(*args, **kwargs): | |
1928 | """Detach(self)""" | |
1929 | return _misc_.Process_Detach(*args, **kwargs) | |
1930 | ||
1931 | def GetInputStream(*args, **kwargs): | |
1932 | """GetInputStream(self) -> InputStream""" | |
1933 | return _misc_.Process_GetInputStream(*args, **kwargs) | |
1934 | ||
1935 | def GetErrorStream(*args, **kwargs): | |
1936 | """GetErrorStream(self) -> InputStream""" | |
1937 | return _misc_.Process_GetErrorStream(*args, **kwargs) | |
1938 | ||
1939 | def GetOutputStream(*args, **kwargs): | |
1940 | """GetOutputStream(self) -> OutputStream""" | |
1941 | return _misc_.Process_GetOutputStream(*args, **kwargs) | |
1942 | ||
1943 | def CloseOutput(*args, **kwargs): | |
1944 | """CloseOutput(self)""" | |
1945 | return _misc_.Process_CloseOutput(*args, **kwargs) | |
1946 | ||
1947 | def IsInputOpened(*args, **kwargs): | |
1948 | """IsInputOpened(self) -> bool""" | |
1949 | return _misc_.Process_IsInputOpened(*args, **kwargs) | |
1950 | ||
1951 | def IsInputAvailable(*args, **kwargs): | |
1952 | """IsInputAvailable(self) -> bool""" | |
1953 | return _misc_.Process_IsInputAvailable(*args, **kwargs) | |
1954 | ||
1955 | def IsErrorAvailable(*args, **kwargs): | |
1956 | """IsErrorAvailable(self) -> bool""" | |
1957 | return _misc_.Process_IsErrorAvailable(*args, **kwargs) | |
1958 | ||
1959 | ||
1960 | class ProcessPtr(Process): | |
1961 | def __init__(self, this): | |
1962 | self.this = this | |
1963 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1964 | self.__class__ = Process | |
1965 | _misc_.Process_swigregister(ProcessPtr) | |
1966 | ||
1967 | def Process_Kill(*args, **kwargs): | |
1968 | """Process_Kill(int pid, int sig=SIGTERM, int flags=KILL_NOCHILDREN) -> int""" | |
1969 | return _misc_.Process_Kill(*args, **kwargs) | |
1970 | ||
1971 | def Process_Exists(*args, **kwargs): | |
1972 | """Process_Exists(int pid) -> bool""" | |
1973 | return _misc_.Process_Exists(*args, **kwargs) | |
1974 | ||
1975 | def Process_Open(*args, **kwargs): | |
1976 | """Process_Open(String cmd, int flags=EXEC_ASYNC) -> Process""" | |
1977 | return _misc_.Process_Open(*args, **kwargs) | |
1978 | ||
1979 | class ProcessEvent(_core.Event): | |
1980 | """Proxy of C++ ProcessEvent class""" | |
1981 | def __repr__(self): | |
1982 | return "<%s.%s; proxy of C++ wxProcessEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1983 | def __init__(self, *args, **kwargs): | |
1984 | """__init__(self, int id=0, int pid=0, int exitcode=0) -> ProcessEvent""" | |
1985 | newobj = _misc_.new_ProcessEvent(*args, **kwargs) | |
1986 | self.this = newobj.this | |
1987 | self.thisown = 1 | |
1988 | del newobj.thisown | |
1989 | def GetPid(*args, **kwargs): | |
1990 | """GetPid(self) -> int""" | |
1991 | return _misc_.ProcessEvent_GetPid(*args, **kwargs) | |
1992 | ||
1993 | def GetExitCode(*args, **kwargs): | |
1994 | """GetExitCode(self) -> int""" | |
1995 | return _misc_.ProcessEvent_GetExitCode(*args, **kwargs) | |
1996 | ||
1997 | m_pid = property(_misc_.ProcessEvent_m_pid_get, _misc_.ProcessEvent_m_pid_set) | |
1998 | m_exitcode = property(_misc_.ProcessEvent_m_exitcode_get, _misc_.ProcessEvent_m_exitcode_set) | |
1999 | ||
2000 | class ProcessEventPtr(ProcessEvent): | |
2001 | def __init__(self, this): | |
2002 | self.this = this | |
2003 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2004 | self.__class__ = ProcessEvent | |
2005 | _misc_.ProcessEvent_swigregister(ProcessEventPtr) | |
2006 | ||
2007 | wxEVT_END_PROCESS = _misc_.wxEVT_END_PROCESS | |
2008 | EVT_END_PROCESS = wx.PyEventBinder( wxEVT_END_PROCESS, 1 ) | |
2009 | ||
2010 | EXEC_ASYNC = _misc_.EXEC_ASYNC | |
2011 | EXEC_SYNC = _misc_.EXEC_SYNC | |
2012 | EXEC_NOHIDE = _misc_.EXEC_NOHIDE | |
2013 | EXEC_MAKE_GROUP_LEADER = _misc_.EXEC_MAKE_GROUP_LEADER | |
2014 | EXEC_NODISABLE = _misc_.EXEC_NODISABLE | |
2015 | ||
2016 | def Execute(*args, **kwargs): | |
2017 | """Execute(String command, int flags=EXEC_ASYNC, Process process=None) -> long""" | |
2018 | return _misc_.Execute(*args, **kwargs) | |
2019 | ||
2020 | def Kill(*args, **kwargs): | |
2021 | """Kill(long pid, int sig=SIGTERM, int rc, int flags=KILL_NOCHILDREN) -> int""" | |
2022 | return _misc_.Kill(*args, **kwargs) | |
2023 | #--------------------------------------------------------------------------- | |
2024 | ||
2025 | JOYSTICK1 = _misc_.JOYSTICK1 | |
2026 | JOYSTICK2 = _misc_.JOYSTICK2 | |
2027 | JOY_BUTTON_ANY = _misc_.JOY_BUTTON_ANY | |
2028 | JOY_BUTTON1 = _misc_.JOY_BUTTON1 | |
2029 | JOY_BUTTON2 = _misc_.JOY_BUTTON2 | |
2030 | JOY_BUTTON3 = _misc_.JOY_BUTTON3 | |
2031 | JOY_BUTTON4 = _misc_.JOY_BUTTON4 | |
2032 | class Joystick(object): | |
2033 | """Proxy of C++ Joystick class""" | |
2034 | def __repr__(self): | |
2035 | return "<%s.%s; proxy of C++ wxJoystick instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
2036 | def __init__(self, *args, **kwargs): | |
2037 | """__init__(self, int joystick=JOYSTICK1) -> Joystick""" | |
2038 | newobj = _misc_.new_Joystick(*args, **kwargs) | |
2039 | self.this = newobj.this | |
2040 | self.thisown = 1 | |
2041 | del newobj.thisown | |
2042 | def __del__(self, destroy=_misc_.delete_Joystick): | |
2043 | """__del__(self)""" | |
2044 | try: | |
2045 | if self.thisown: destroy(self) | |
2046 | except: pass | |
2047 | ||
2048 | def GetPosition(*args, **kwargs): | |
2049 | """GetPosition(self) -> Point""" | |
2050 | return _misc_.Joystick_GetPosition(*args, **kwargs) | |
2051 | ||
2052 | def GetZPosition(*args, **kwargs): | |
2053 | """GetZPosition(self) -> int""" | |
2054 | return _misc_.Joystick_GetZPosition(*args, **kwargs) | |
2055 | ||
2056 | def GetButtonState(*args, **kwargs): | |
2057 | """GetButtonState(self) -> int""" | |
2058 | return _misc_.Joystick_GetButtonState(*args, **kwargs) | |
2059 | ||
2060 | def GetPOVPosition(*args, **kwargs): | |
2061 | """GetPOVPosition(self) -> int""" | |
2062 | return _misc_.Joystick_GetPOVPosition(*args, **kwargs) | |
2063 | ||
2064 | def GetPOVCTSPosition(*args, **kwargs): | |
2065 | """GetPOVCTSPosition(self) -> int""" | |
2066 | return _misc_.Joystick_GetPOVCTSPosition(*args, **kwargs) | |
2067 | ||
2068 | def GetRudderPosition(*args, **kwargs): | |
2069 | """GetRudderPosition(self) -> int""" | |
2070 | return _misc_.Joystick_GetRudderPosition(*args, **kwargs) | |
2071 | ||
2072 | def GetUPosition(*args, **kwargs): | |
2073 | """GetUPosition(self) -> int""" | |
2074 | return _misc_.Joystick_GetUPosition(*args, **kwargs) | |
2075 | ||
2076 | def GetVPosition(*args, **kwargs): | |
2077 | """GetVPosition(self) -> int""" | |
2078 | return _misc_.Joystick_GetVPosition(*args, **kwargs) | |
2079 | ||
2080 | def GetMovementThreshold(*args, **kwargs): | |
2081 | """GetMovementThreshold(self) -> int""" | |
2082 | return _misc_.Joystick_GetMovementThreshold(*args, **kwargs) | |
2083 | ||
2084 | def SetMovementThreshold(*args, **kwargs): | |
2085 | """SetMovementThreshold(self, int threshold)""" | |
2086 | return _misc_.Joystick_SetMovementThreshold(*args, **kwargs) | |
2087 | ||
2088 | def IsOk(*args, **kwargs): | |
2089 | """IsOk(self) -> bool""" | |
2090 | return _misc_.Joystick_IsOk(*args, **kwargs) | |
2091 | ||
2092 | def GetNumberJoysticks(*args, **kwargs): | |
2093 | """GetNumberJoysticks(self) -> int""" | |
2094 | return _misc_.Joystick_GetNumberJoysticks(*args, **kwargs) | |
2095 | ||
2096 | def GetManufacturerId(*args, **kwargs): | |
2097 | """GetManufacturerId(self) -> int""" | |
2098 | return _misc_.Joystick_GetManufacturerId(*args, **kwargs) | |
2099 | ||
2100 | def GetProductId(*args, **kwargs): | |
2101 | """GetProductId(self) -> int""" | |
2102 | return _misc_.Joystick_GetProductId(*args, **kwargs) | |
2103 | ||
2104 | def GetProductName(*args, **kwargs): | |
2105 | """GetProductName(self) -> String""" | |
2106 | return _misc_.Joystick_GetProductName(*args, **kwargs) | |
2107 | ||
2108 | def GetXMin(*args, **kwargs): | |
2109 | """GetXMin(self) -> int""" | |
2110 | return _misc_.Joystick_GetXMin(*args, **kwargs) | |
2111 | ||
2112 | def GetYMin(*args, **kwargs): | |
2113 | """GetYMin(self) -> int""" | |
2114 | return _misc_.Joystick_GetYMin(*args, **kwargs) | |
2115 | ||
2116 | def GetZMin(*args, **kwargs): | |
2117 | """GetZMin(self) -> int""" | |
2118 | return _misc_.Joystick_GetZMin(*args, **kwargs) | |
2119 | ||
2120 | def GetXMax(*args, **kwargs): | |
2121 | """GetXMax(self) -> int""" | |
2122 | return _misc_.Joystick_GetXMax(*args, **kwargs) | |
2123 | ||
2124 | def GetYMax(*args, **kwargs): | |
2125 | """GetYMax(self) -> int""" | |
2126 | return _misc_.Joystick_GetYMax(*args, **kwargs) | |
2127 | ||
2128 | def GetZMax(*args, **kwargs): | |
2129 | """GetZMax(self) -> int""" | |
2130 | return _misc_.Joystick_GetZMax(*args, **kwargs) | |
2131 | ||
2132 | def GetNumberButtons(*args, **kwargs): | |
2133 | """GetNumberButtons(self) -> int""" | |
2134 | return _misc_.Joystick_GetNumberButtons(*args, **kwargs) | |
2135 | ||
2136 | def GetNumberAxes(*args, **kwargs): | |
2137 | """GetNumberAxes(self) -> int""" | |
2138 | return _misc_.Joystick_GetNumberAxes(*args, **kwargs) | |
2139 | ||
2140 | def GetMaxButtons(*args, **kwargs): | |
2141 | """GetMaxButtons(self) -> int""" | |
2142 | return _misc_.Joystick_GetMaxButtons(*args, **kwargs) | |
2143 | ||
2144 | def GetMaxAxes(*args, **kwargs): | |
2145 | """GetMaxAxes(self) -> int""" | |
2146 | return _misc_.Joystick_GetMaxAxes(*args, **kwargs) | |
2147 | ||
2148 | def GetPollingMin(*args, **kwargs): | |
2149 | """GetPollingMin(self) -> int""" | |
2150 | return _misc_.Joystick_GetPollingMin(*args, **kwargs) | |
2151 | ||
2152 | def GetPollingMax(*args, **kwargs): | |
2153 | """GetPollingMax(self) -> int""" | |
2154 | return _misc_.Joystick_GetPollingMax(*args, **kwargs) | |
2155 | ||
2156 | def GetRudderMin(*args, **kwargs): | |
2157 | """GetRudderMin(self) -> int""" | |
2158 | return _misc_.Joystick_GetRudderMin(*args, **kwargs) | |
2159 | ||
2160 | def GetRudderMax(*args, **kwargs): | |
2161 | """GetRudderMax(self) -> int""" | |
2162 | return _misc_.Joystick_GetRudderMax(*args, **kwargs) | |
2163 | ||
2164 | def GetUMin(*args, **kwargs): | |
2165 | """GetUMin(self) -> int""" | |
2166 | return _misc_.Joystick_GetUMin(*args, **kwargs) | |
2167 | ||
2168 | def GetUMax(*args, **kwargs): | |
2169 | """GetUMax(self) -> int""" | |
2170 | return _misc_.Joystick_GetUMax(*args, **kwargs) | |
2171 | ||
2172 | def GetVMin(*args, **kwargs): | |
2173 | """GetVMin(self) -> int""" | |
2174 | return _misc_.Joystick_GetVMin(*args, **kwargs) | |
2175 | ||
2176 | def GetVMax(*args, **kwargs): | |
2177 | """GetVMax(self) -> int""" | |
2178 | return _misc_.Joystick_GetVMax(*args, **kwargs) | |
2179 | ||
2180 | def HasRudder(*args, **kwargs): | |
2181 | """HasRudder(self) -> bool""" | |
2182 | return _misc_.Joystick_HasRudder(*args, **kwargs) | |
2183 | ||
2184 | def HasZ(*args, **kwargs): | |
2185 | """HasZ(self) -> bool""" | |
2186 | return _misc_.Joystick_HasZ(*args, **kwargs) | |
2187 | ||
2188 | def HasU(*args, **kwargs): | |
2189 | """HasU(self) -> bool""" | |
2190 | return _misc_.Joystick_HasU(*args, **kwargs) | |
2191 | ||
2192 | def HasV(*args, **kwargs): | |
2193 | """HasV(self) -> bool""" | |
2194 | return _misc_.Joystick_HasV(*args, **kwargs) | |
2195 | ||
2196 | def HasPOV(*args, **kwargs): | |
2197 | """HasPOV(self) -> bool""" | |
2198 | return _misc_.Joystick_HasPOV(*args, **kwargs) | |
2199 | ||
2200 | def HasPOV4Dir(*args, **kwargs): | |
2201 | """HasPOV4Dir(self) -> bool""" | |
2202 | return _misc_.Joystick_HasPOV4Dir(*args, **kwargs) | |
2203 | ||
2204 | def HasPOVCTS(*args, **kwargs): | |
2205 | """HasPOVCTS(self) -> bool""" | |
2206 | return _misc_.Joystick_HasPOVCTS(*args, **kwargs) | |
2207 | ||
2208 | def SetCapture(*args, **kwargs): | |
2209 | """SetCapture(self, Window win, int pollingFreq=0) -> bool""" | |
2210 | return _misc_.Joystick_SetCapture(*args, **kwargs) | |
2211 | ||
2212 | def ReleaseCapture(*args, **kwargs): | |
2213 | """ReleaseCapture(self) -> bool""" | |
2214 | return _misc_.Joystick_ReleaseCapture(*args, **kwargs) | |
2215 | ||
2216 | def __nonzero__(self): return self.IsOk() | |
2217 | ||
2218 | class JoystickPtr(Joystick): | |
2219 | def __init__(self, this): | |
2220 | self.this = this | |
2221 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2222 | self.__class__ = Joystick | |
2223 | _misc_.Joystick_swigregister(JoystickPtr) | |
2224 | ||
2225 | wxEVT_JOY_BUTTON_DOWN = _misc_.wxEVT_JOY_BUTTON_DOWN | |
2226 | wxEVT_JOY_BUTTON_UP = _misc_.wxEVT_JOY_BUTTON_UP | |
2227 | wxEVT_JOY_MOVE = _misc_.wxEVT_JOY_MOVE | |
2228 | wxEVT_JOY_ZMOVE = _misc_.wxEVT_JOY_ZMOVE | |
2229 | class JoystickEvent(_core.Event): | |
2230 | """Proxy of C++ JoystickEvent class""" | |
2231 | def __repr__(self): | |
2232 | return "<%s.%s; proxy of C++ wxJoystickEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
2233 | def __init__(self, *args, **kwargs): | |
2234 | """ | |
2235 | __init__(self, wxEventType type=wxEVT_NULL, int state=0, int joystick=JOYSTICK1, | |
2236 | int change=0) -> JoystickEvent | |
2237 | """ | |
2238 | newobj = _misc_.new_JoystickEvent(*args, **kwargs) | |
2239 | self.this = newobj.this | |
2240 | self.thisown = 1 | |
2241 | del newobj.thisown | |
2242 | def GetPosition(*args, **kwargs): | |
2243 | """GetPosition(self) -> Point""" | |
2244 | return _misc_.JoystickEvent_GetPosition(*args, **kwargs) | |
2245 | ||
2246 | def GetZPosition(*args, **kwargs): | |
2247 | """GetZPosition(self) -> int""" | |
2248 | return _misc_.JoystickEvent_GetZPosition(*args, **kwargs) | |
2249 | ||
2250 | def GetButtonState(*args, **kwargs): | |
2251 | """GetButtonState(self) -> int""" | |
2252 | return _misc_.JoystickEvent_GetButtonState(*args, **kwargs) | |
2253 | ||
2254 | def GetButtonChange(*args, **kwargs): | |
2255 | """GetButtonChange(self) -> int""" | |
2256 | return _misc_.JoystickEvent_GetButtonChange(*args, **kwargs) | |
2257 | ||
2258 | def GetJoystick(*args, **kwargs): | |
2259 | """GetJoystick(self) -> int""" | |
2260 | return _misc_.JoystickEvent_GetJoystick(*args, **kwargs) | |
2261 | ||
2262 | def SetJoystick(*args, **kwargs): | |
2263 | """SetJoystick(self, int stick)""" | |
2264 | return _misc_.JoystickEvent_SetJoystick(*args, **kwargs) | |
2265 | ||
2266 | def SetButtonState(*args, **kwargs): | |
2267 | """SetButtonState(self, int state)""" | |
2268 | return _misc_.JoystickEvent_SetButtonState(*args, **kwargs) | |
2269 | ||
2270 | def SetButtonChange(*args, **kwargs): | |
2271 | """SetButtonChange(self, int change)""" | |
2272 | return _misc_.JoystickEvent_SetButtonChange(*args, **kwargs) | |
2273 | ||
2274 | def SetPosition(*args, **kwargs): | |
2275 | """SetPosition(self, Point pos)""" | |
2276 | return _misc_.JoystickEvent_SetPosition(*args, **kwargs) | |
2277 | ||
2278 | def SetZPosition(*args, **kwargs): | |
2279 | """SetZPosition(self, int zPos)""" | |
2280 | return _misc_.JoystickEvent_SetZPosition(*args, **kwargs) | |
2281 | ||
2282 | def IsButton(*args, **kwargs): | |
2283 | """IsButton(self) -> bool""" | |
2284 | return _misc_.JoystickEvent_IsButton(*args, **kwargs) | |
2285 | ||
2286 | def IsMove(*args, **kwargs): | |
2287 | """IsMove(self) -> bool""" | |
2288 | return _misc_.JoystickEvent_IsMove(*args, **kwargs) | |
2289 | ||
2290 | def IsZMove(*args, **kwargs): | |
2291 | """IsZMove(self) -> bool""" | |
2292 | return _misc_.JoystickEvent_IsZMove(*args, **kwargs) | |
2293 | ||
2294 | def ButtonDown(*args, **kwargs): | |
2295 | """ButtonDown(self, int but=JOY_BUTTON_ANY) -> bool""" | |
2296 | return _misc_.JoystickEvent_ButtonDown(*args, **kwargs) | |
2297 | ||
2298 | def ButtonUp(*args, **kwargs): | |
2299 | """ButtonUp(self, int but=JOY_BUTTON_ANY) -> bool""" | |
2300 | return _misc_.JoystickEvent_ButtonUp(*args, **kwargs) | |
2301 | ||
2302 | def ButtonIsDown(*args, **kwargs): | |
2303 | """ButtonIsDown(self, int but=JOY_BUTTON_ANY) -> bool""" | |
2304 | return _misc_.JoystickEvent_ButtonIsDown(*args, **kwargs) | |
2305 | ||
2306 | m_pos = property(GetPosition, SetPosition) | |
2307 | m_zPosition = property(GetZPosition, SetZPosition) | |
2308 | m_buttonChange = property(GetButtonChange, SetButtonChange) | |
2309 | m_buttonState = property(GetButtonState, SetButtonState) | |
2310 | m_joyStick = property(GetJoystick, SetJoystick) | |
2311 | ||
2312 | ||
2313 | class JoystickEventPtr(JoystickEvent): | |
2314 | def __init__(self, this): | |
2315 | self.this = this | |
2316 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2317 | self.__class__ = JoystickEvent | |
2318 | _misc_.JoystickEvent_swigregister(JoystickEventPtr) | |
2319 | ||
2320 | EVT_JOY_BUTTON_DOWN = wx.PyEventBinder( wxEVT_JOY_BUTTON_DOWN ) | |
2321 | EVT_JOY_BUTTON_UP = wx.PyEventBinder( wxEVT_JOY_BUTTON_UP ) | |
2322 | EVT_JOY_MOVE = wx.PyEventBinder( wxEVT_JOY_MOVE ) | |
2323 | EVT_JOY_ZMOVE = wx.PyEventBinder( wxEVT_JOY_ZMOVE ) | |
2324 | ||
2325 | EVT_JOYSTICK_EVENTS = wx.PyEventBinder([ wxEVT_JOY_BUTTON_DOWN, | |
2326 | wxEVT_JOY_BUTTON_UP, | |
2327 | wxEVT_JOY_MOVE, | |
2328 | wxEVT_JOY_ZMOVE, | |
2329 | ]) | |
2330 | ||
2331 | ||
2332 | #--------------------------------------------------------------------------- | |
2333 | ||
2334 | SOUND_SYNC = _misc_.SOUND_SYNC | |
2335 | SOUND_ASYNC = _misc_.SOUND_ASYNC | |
2336 | SOUND_LOOP = _misc_.SOUND_LOOP | |
2337 | class Sound(object): | |
2338 | """Proxy of C++ Sound class""" | |
2339 | def __repr__(self): | |
2340 | return "<%s.%s; proxy of C++ wxSound instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
2341 | def __init__(self, *args, **kwargs): | |
2342 | """__init__(self, String fileName=EmptyString) -> Sound""" | |
2343 | newobj = _misc_.new_Sound(*args, **kwargs) | |
2344 | self.this = newobj.this | |
2345 | self.thisown = 1 | |
2346 | del newobj.thisown | |
2347 | def __del__(self, destroy=_misc_.delete_Sound): | |
2348 | """__del__(self)""" | |
2349 | try: | |
2350 | if self.thisown: destroy(self) | |
2351 | except: pass | |
2352 | ||
2353 | def Create(*args, **kwargs): | |
2354 | """Create(self, String fileName) -> bool""" | |
2355 | return _misc_.Sound_Create(*args, **kwargs) | |
2356 | ||
2357 | def CreateFromData(*args, **kwargs): | |
2358 | """CreateFromData(self, PyObject data) -> bool""" | |
2359 | return _misc_.Sound_CreateFromData(*args, **kwargs) | |
2360 | ||
2361 | def IsOk(*args, **kwargs): | |
2362 | """IsOk(self) -> bool""" | |
2363 | return _misc_.Sound_IsOk(*args, **kwargs) | |
2364 | ||
2365 | def Play(*args, **kwargs): | |
2366 | """Play(self, unsigned int flags=SOUND_ASYNC) -> bool""" | |
2367 | return _misc_.Sound_Play(*args, **kwargs) | |
2368 | ||
2369 | def PlaySound(*args, **kwargs): | |
2370 | """PlaySound(String filename, unsigned int flags=SOUND_ASYNC) -> bool""" | |
2371 | return _misc_.Sound_PlaySound(*args, **kwargs) | |
2372 | ||
2373 | PlaySound = staticmethod(PlaySound) | |
2374 | def Stop(*args, **kwargs): | |
2375 | """Stop()""" | |
2376 | return _misc_.Sound_Stop(*args, **kwargs) | |
2377 | ||
2378 | Stop = staticmethod(Stop) | |
2379 | def __nonzero__(self): return self.IsOk() | |
2380 | ||
2381 | class SoundPtr(Sound): | |
2382 | def __init__(self, this): | |
2383 | self.this = this | |
2384 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2385 | self.__class__ = Sound | |
2386 | _misc_.Sound_swigregister(SoundPtr) | |
2387 | ||
2388 | def SoundFromData(*args, **kwargs): | |
2389 | """SoundFromData(PyObject data) -> Sound""" | |
2390 | val = _misc_.new_SoundFromData(*args, **kwargs) | |
2391 | val.thisown = 1 | |
2392 | return val | |
2393 | ||
2394 | def Sound_PlaySound(*args, **kwargs): | |
2395 | """Sound_PlaySound(String filename, unsigned int flags=SOUND_ASYNC) -> bool""" | |
2396 | return _misc_.Sound_PlaySound(*args, **kwargs) | |
2397 | ||
2398 | def Sound_Stop(*args, **kwargs): | |
2399 | """Sound_Stop()""" | |
2400 | return _misc_.Sound_Stop(*args, **kwargs) | |
2401 | ||
2402 | #--------------------------------------------------------------------------- | |
2403 | ||
2404 | MAILCAP_STANDARD = _misc_.MAILCAP_STANDARD | |
2405 | MAILCAP_NETSCAPE = _misc_.MAILCAP_NETSCAPE | |
2406 | MAILCAP_KDE = _misc_.MAILCAP_KDE | |
2407 | MAILCAP_GNOME = _misc_.MAILCAP_GNOME | |
2408 | MAILCAP_ALL = _misc_.MAILCAP_ALL | |
2409 | class FileTypeInfo(object): | |
2410 | """Proxy of C++ FileTypeInfo class""" | |
2411 | def __repr__(self): | |
2412 | return "<%s.%s; proxy of C++ wxFileTypeInfo instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
2413 | def __init__(self, *args, **kwargs): | |
2414 | """__init__(self, String mimeType, String openCmd, String printCmd, String desc) -> FileTypeInfo""" | |
2415 | newobj = _misc_.new_FileTypeInfo(*args, **kwargs) | |
2416 | self.this = newobj.this | |
2417 | self.thisown = 1 | |
2418 | del newobj.thisown | |
2419 | def IsValid(*args, **kwargs): | |
2420 | """IsValid(self) -> bool""" | |
2421 | return _misc_.FileTypeInfo_IsValid(*args, **kwargs) | |
2422 | ||
2423 | def SetIcon(*args, **kwargs): | |
2424 | """SetIcon(self, String iconFile, int iconIndex=0)""" | |
2425 | return _misc_.FileTypeInfo_SetIcon(*args, **kwargs) | |
2426 | ||
2427 | def SetShortDesc(*args, **kwargs): | |
2428 | """SetShortDesc(self, String shortDesc)""" | |
2429 | return _misc_.FileTypeInfo_SetShortDesc(*args, **kwargs) | |
2430 | ||
2431 | def GetMimeType(*args, **kwargs): | |
2432 | """GetMimeType(self) -> String""" | |
2433 | return _misc_.FileTypeInfo_GetMimeType(*args, **kwargs) | |
2434 | ||
2435 | def GetOpenCommand(*args, **kwargs): | |
2436 | """GetOpenCommand(self) -> String""" | |
2437 | return _misc_.FileTypeInfo_GetOpenCommand(*args, **kwargs) | |
2438 | ||
2439 | def GetPrintCommand(*args, **kwargs): | |
2440 | """GetPrintCommand(self) -> String""" | |
2441 | return _misc_.FileTypeInfo_GetPrintCommand(*args, **kwargs) | |
2442 | ||
2443 | def GetShortDesc(*args, **kwargs): | |
2444 | """GetShortDesc(self) -> String""" | |
2445 | return _misc_.FileTypeInfo_GetShortDesc(*args, **kwargs) | |
2446 | ||
2447 | def GetDescription(*args, **kwargs): | |
2448 | """GetDescription(self) -> String""" | |
2449 | return _misc_.FileTypeInfo_GetDescription(*args, **kwargs) | |
2450 | ||
2451 | def GetExtensions(*args, **kwargs): | |
2452 | """GetExtensions(self) -> wxArrayString""" | |
2453 | return _misc_.FileTypeInfo_GetExtensions(*args, **kwargs) | |
2454 | ||
2455 | def GetExtensionsCount(*args, **kwargs): | |
2456 | """GetExtensionsCount(self) -> int""" | |
2457 | return _misc_.FileTypeInfo_GetExtensionsCount(*args, **kwargs) | |
2458 | ||
2459 | def GetIconFile(*args, **kwargs): | |
2460 | """GetIconFile(self) -> String""" | |
2461 | return _misc_.FileTypeInfo_GetIconFile(*args, **kwargs) | |
2462 | ||
2463 | def GetIconIndex(*args, **kwargs): | |
2464 | """GetIconIndex(self) -> int""" | |
2465 | return _misc_.FileTypeInfo_GetIconIndex(*args, **kwargs) | |
2466 | ||
2467 | ||
2468 | class FileTypeInfoPtr(FileTypeInfo): | |
2469 | def __init__(self, this): | |
2470 | self.this = this | |
2471 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2472 | self.__class__ = FileTypeInfo | |
2473 | _misc_.FileTypeInfo_swigregister(FileTypeInfoPtr) | |
2474 | ||
2475 | def FileTypeInfoSequence(*args, **kwargs): | |
2476 | """FileTypeInfoSequence(wxArrayString sArray) -> FileTypeInfo""" | |
2477 | val = _misc_.new_FileTypeInfoSequence(*args, **kwargs) | |
2478 | val.thisown = 1 | |
2479 | return val | |
2480 | ||
2481 | def NullFileTypeInfo(*args, **kwargs): | |
2482 | """NullFileTypeInfo() -> FileTypeInfo""" | |
2483 | val = _misc_.new_NullFileTypeInfo(*args, **kwargs) | |
2484 | val.thisown = 1 | |
2485 | return val | |
2486 | ||
2487 | class FileType(object): | |
2488 | """Proxy of C++ FileType class""" | |
2489 | def __repr__(self): | |
2490 | return "<%s.%s; proxy of C++ wxFileType instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
2491 | def __init__(self, *args, **kwargs): | |
2492 | """__init__(self, FileTypeInfo ftInfo) -> FileType""" | |
2493 | newobj = _misc_.new_FileType(*args, **kwargs) | |
2494 | self.this = newobj.this | |
2495 | self.thisown = 1 | |
2496 | del newobj.thisown | |
2497 | def __del__(self, destroy=_misc_.delete_FileType): | |
2498 | """__del__(self)""" | |
2499 | try: | |
2500 | if self.thisown: destroy(self) | |
2501 | except: pass | |
2502 | ||
2503 | def GetMimeType(*args, **kwargs): | |
2504 | """GetMimeType(self) -> PyObject""" | |
2505 | return _misc_.FileType_GetMimeType(*args, **kwargs) | |
2506 | ||
2507 | def GetMimeTypes(*args, **kwargs): | |
2508 | """GetMimeTypes(self) -> PyObject""" | |
2509 | return _misc_.FileType_GetMimeTypes(*args, **kwargs) | |
2510 | ||
2511 | def GetExtensions(*args, **kwargs): | |
2512 | """GetExtensions(self) -> PyObject""" | |
2513 | return _misc_.FileType_GetExtensions(*args, **kwargs) | |
2514 | ||
2515 | def GetIcon(*args, **kwargs): | |
2516 | """GetIcon(self) -> Icon""" | |
2517 | return _misc_.FileType_GetIcon(*args, **kwargs) | |
2518 | ||
2519 | def GetIconInfo(*args, **kwargs): | |
2520 | """GetIconInfo(self) -> PyObject""" | |
2521 | return _misc_.FileType_GetIconInfo(*args, **kwargs) | |
2522 | ||
2523 | def GetDescription(*args, **kwargs): | |
2524 | """GetDescription(self) -> PyObject""" | |
2525 | return _misc_.FileType_GetDescription(*args, **kwargs) | |
2526 | ||
2527 | def GetOpenCommand(*args, **kwargs): | |
2528 | """GetOpenCommand(self, String filename, String mimetype=EmptyString) -> PyObject""" | |
2529 | return _misc_.FileType_GetOpenCommand(*args, **kwargs) | |
2530 | ||
2531 | def GetPrintCommand(*args, **kwargs): | |
2532 | """GetPrintCommand(self, String filename, String mimetype=EmptyString) -> PyObject""" | |
2533 | return _misc_.FileType_GetPrintCommand(*args, **kwargs) | |
2534 | ||
2535 | def GetAllCommands(*args, **kwargs): | |
2536 | """GetAllCommands(self, String filename, String mimetype=EmptyString) -> PyObject""" | |
2537 | return _misc_.FileType_GetAllCommands(*args, **kwargs) | |
2538 | ||
2539 | def SetCommand(*args, **kwargs): | |
2540 | """SetCommand(self, String cmd, String verb, bool overwriteprompt=True) -> bool""" | |
2541 | return _misc_.FileType_SetCommand(*args, **kwargs) | |
2542 | ||
2543 | def SetDefaultIcon(*args, **kwargs): | |
2544 | """SetDefaultIcon(self, String cmd=EmptyString, int index=0) -> bool""" | |
2545 | return _misc_.FileType_SetDefaultIcon(*args, **kwargs) | |
2546 | ||
2547 | def Unassociate(*args, **kwargs): | |
2548 | """Unassociate(self) -> bool""" | |
2549 | return _misc_.FileType_Unassociate(*args, **kwargs) | |
2550 | ||
2551 | def ExpandCommand(*args, **kwargs): | |
2552 | """ExpandCommand(String command, String filename, String mimetype=EmptyString) -> String""" | |
2553 | return _misc_.FileType_ExpandCommand(*args, **kwargs) | |
2554 | ||
2555 | ExpandCommand = staticmethod(ExpandCommand) | |
2556 | ||
2557 | class FileTypePtr(FileType): | |
2558 | def __init__(self, this): | |
2559 | self.this = this | |
2560 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2561 | self.__class__ = FileType | |
2562 | _misc_.FileType_swigregister(FileTypePtr) | |
2563 | ||
2564 | def FileType_ExpandCommand(*args, **kwargs): | |
2565 | """FileType_ExpandCommand(String command, String filename, String mimetype=EmptyString) -> String""" | |
2566 | return _misc_.FileType_ExpandCommand(*args, **kwargs) | |
2567 | ||
2568 | class MimeTypesManager(object): | |
2569 | """Proxy of C++ MimeTypesManager class""" | |
2570 | def __repr__(self): | |
2571 | return "<%s.%s; proxy of C++ wxMimeTypesManager instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
2572 | def IsOfType(*args, **kwargs): | |
2573 | """IsOfType(String mimeType, String wildcard) -> bool""" | |
2574 | return _misc_.MimeTypesManager_IsOfType(*args, **kwargs) | |
2575 | ||
2576 | IsOfType = staticmethod(IsOfType) | |
2577 | def __init__(self, *args, **kwargs): | |
2578 | """__init__(self) -> MimeTypesManager""" | |
2579 | newobj = _misc_.new_MimeTypesManager(*args, **kwargs) | |
2580 | self.this = newobj.this | |
2581 | self.thisown = 1 | |
2582 | del newobj.thisown | |
2583 | def Initialize(*args, **kwargs): | |
2584 | """Initialize(self, int mailcapStyle=MAILCAP_ALL, String extraDir=EmptyString)""" | |
2585 | return _misc_.MimeTypesManager_Initialize(*args, **kwargs) | |
2586 | ||
2587 | def ClearData(*args, **kwargs): | |
2588 | """ClearData(self)""" | |
2589 | return _misc_.MimeTypesManager_ClearData(*args, **kwargs) | |
2590 | ||
2591 | def GetFileTypeFromExtension(*args, **kwargs): | |
2592 | """GetFileTypeFromExtension(self, String ext) -> FileType""" | |
2593 | return _misc_.MimeTypesManager_GetFileTypeFromExtension(*args, **kwargs) | |
2594 | ||
2595 | def GetFileTypeFromMimeType(*args, **kwargs): | |
2596 | """GetFileTypeFromMimeType(self, String mimeType) -> FileType""" | |
2597 | return _misc_.MimeTypesManager_GetFileTypeFromMimeType(*args, **kwargs) | |
2598 | ||
2599 | def ReadMailcap(*args, **kwargs): | |
2600 | """ReadMailcap(self, String filename, bool fallback=False) -> bool""" | |
2601 | return _misc_.MimeTypesManager_ReadMailcap(*args, **kwargs) | |
2602 | ||
2603 | def ReadMimeTypes(*args, **kwargs): | |
2604 | """ReadMimeTypes(self, String filename) -> bool""" | |
2605 | return _misc_.MimeTypesManager_ReadMimeTypes(*args, **kwargs) | |
2606 | ||
2607 | def EnumAllFileTypes(*args, **kwargs): | |
2608 | """EnumAllFileTypes(self) -> PyObject""" | |
2609 | return _misc_.MimeTypesManager_EnumAllFileTypes(*args, **kwargs) | |
2610 | ||
2611 | def AddFallback(*args, **kwargs): | |
2612 | """AddFallback(self, FileTypeInfo ft)""" | |
2613 | return _misc_.MimeTypesManager_AddFallback(*args, **kwargs) | |
2614 | ||
2615 | def Associate(*args, **kwargs): | |
2616 | """Associate(self, FileTypeInfo ftInfo) -> FileType""" | |
2617 | return _misc_.MimeTypesManager_Associate(*args, **kwargs) | |
2618 | ||
2619 | def Unassociate(*args, **kwargs): | |
2620 | """Unassociate(self, FileType ft) -> bool""" | |
2621 | return _misc_.MimeTypesManager_Unassociate(*args, **kwargs) | |
2622 | ||
2623 | def __del__(self, destroy=_misc_.delete_MimeTypesManager): | |
2624 | """__del__(self)""" | |
2625 | try: | |
2626 | if self.thisown: destroy(self) | |
2627 | except: pass | |
2628 | ||
2629 | ||
2630 | class MimeTypesManagerPtr(MimeTypesManager): | |
2631 | def __init__(self, this): | |
2632 | self.this = this | |
2633 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2634 | self.__class__ = MimeTypesManager | |
2635 | _misc_.MimeTypesManager_swigregister(MimeTypesManagerPtr) | |
2636 | TheMimeTypesManager = cvar.TheMimeTypesManager | |
2637 | ||
2638 | def MimeTypesManager_IsOfType(*args, **kwargs): | |
2639 | """MimeTypesManager_IsOfType(String mimeType, String wildcard) -> bool""" | |
2640 | return _misc_.MimeTypesManager_IsOfType(*args, **kwargs) | |
2641 | ||
2642 | #--------------------------------------------------------------------------- | |
2643 | ||
2644 | class ArtProvider(object): | |
2645 | """ | |
2646 | The wx.ArtProvider class is used to customize the look of wxWidgets | |
2647 | application. When wxWidgets needs to display an icon or a bitmap (e.g. | |
2648 | in the standard file dialog), it does not use hard-coded resource but | |
2649 | asks wx.ArtProvider for it instead. This way the users can plug in | |
2650 | their own wx.ArtProvider class and easily replace standard art with | |
2651 | his/her own version. It is easy thing to do: all that is needed is | |
2652 | to derive a class from wx.ArtProvider, override it's CreateBitmap | |
2653 | method and register the provider with wx.ArtProvider.PushProvider:: | |
2654 | ||
2655 | class MyArtProvider(wx.ArtProvider): | |
2656 | def __init__(self): | |
2657 | wx.ArtProvider.__init__(self) | |
2658 | ||
2659 | def CreateBitmap(self, artid, client, size): | |
2660 | ... | |
2661 | return bmp | |
2662 | ||
2663 | """ | |
2664 | def __repr__(self): | |
2665 | return "<%s.%s; proxy of C++ wxPyArtProvider instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
2666 | def __init__(self, *args, **kwargs): | |
2667 | """ | |
2668 | __init__(self) -> ArtProvider | |
2669 | ||
2670 | The wx.ArtProvider class is used to customize the look of wxWidgets | |
2671 | application. When wxWidgets needs to display an icon or a bitmap (e.g. | |
2672 | in the standard file dialog), it does not use hard-coded resource but | |
2673 | asks wx.ArtProvider for it instead. This way the users can plug in | |
2674 | their own wx.ArtProvider class and easily replace standard art with | |
2675 | his/her own version. It is easy thing to do: all that is needed is | |
2676 | to derive a class from wx.ArtProvider, override it's CreateBitmap | |
2677 | method and register the provider with wx.ArtProvider.PushProvider:: | |
2678 | ||
2679 | class MyArtProvider(wx.ArtProvider): | |
2680 | def __init__(self): | |
2681 | wx.ArtProvider.__init__(self) | |
2682 | ||
2683 | def CreateBitmap(self, artid, client, size): | |
2684 | ... | |
2685 | return bmp | |
2686 | ||
2687 | """ | |
2688 | newobj = _misc_.new_ArtProvider(*args, **kwargs) | |
2689 | self.this = newobj.this | |
2690 | self.thisown = 1 | |
2691 | del newobj.thisown | |
2692 | self._setCallbackInfo(self, ArtProvider) | |
2693 | ||
2694 | def _setCallbackInfo(*args, **kwargs): | |
2695 | """_setCallbackInfo(self, PyObject self, PyObject _class)""" | |
2696 | return _misc_.ArtProvider__setCallbackInfo(*args, **kwargs) | |
2697 | ||
2698 | def PushProvider(*args, **kwargs): | |
2699 | """ | |
2700 | PushProvider(ArtProvider provider) | |
2701 | ||
2702 | Add new provider to the top of providers stack. | |
2703 | """ | |
2704 | return _misc_.ArtProvider_PushProvider(*args, **kwargs) | |
2705 | ||
2706 | PushProvider = staticmethod(PushProvider) | |
2707 | def PopProvider(*args, **kwargs): | |
2708 | """ | |
2709 | PopProvider() -> bool | |
2710 | ||
2711 | Remove latest added provider and delete it. | |
2712 | """ | |
2713 | return _misc_.ArtProvider_PopProvider(*args, **kwargs) | |
2714 | ||
2715 | PopProvider = staticmethod(PopProvider) | |
2716 | def RemoveProvider(*args, **kwargs): | |
2717 | """ | |
2718 | RemoveProvider(ArtProvider provider) -> bool | |
2719 | ||
2720 | Remove provider. The provider must have been added previously! The | |
2721 | provider is _not_ deleted. | |
2722 | """ | |
2723 | return _misc_.ArtProvider_RemoveProvider(*args, **kwargs) | |
2724 | ||
2725 | RemoveProvider = staticmethod(RemoveProvider) | |
2726 | def GetBitmap(*args, **kwargs): | |
2727 | """ | |
2728 | GetBitmap(String id, String client=ART_OTHER, Size size=DefaultSize) -> Bitmap | |
2729 | ||
2730 | Query the providers for bitmap with given ID and return it. Return | |
2731 | wx.NullBitmap if no provider provides it. | |
2732 | """ | |
2733 | return _misc_.ArtProvider_GetBitmap(*args, **kwargs) | |
2734 | ||
2735 | GetBitmap = staticmethod(GetBitmap) | |
2736 | def GetIcon(*args, **kwargs): | |
2737 | """ | |
2738 | GetIcon(String id, String client=ART_OTHER, Size size=DefaultSize) -> Icon | |
2739 | ||
2740 | Query the providers for icon with given ID and return it. Return | |
2741 | wx.NullIcon if no provider provides it. | |
2742 | """ | |
2743 | return _misc_.ArtProvider_GetIcon(*args, **kwargs) | |
2744 | ||
2745 | GetIcon = staticmethod(GetIcon) | |
2746 | def GetSizeHint(*args, **kwargs): | |
2747 | """ | |
2748 | GetSizeHint(String client, bool platform_dependent=False) -> Size | |
2749 | ||
2750 | Get the size hint of an icon from a specific Art Client, queries the | |
2751 | topmost provider if platform_dependent = false | |
2752 | """ | |
2753 | return _misc_.ArtProvider_GetSizeHint(*args, **kwargs) | |
2754 | ||
2755 | GetSizeHint = staticmethod(GetSizeHint) | |
2756 | def Destroy(*args, **kwargs): | |
2757 | """Destroy(self)""" | |
2758 | return _misc_.ArtProvider_Destroy(*args, **kwargs) | |
2759 | ||
2760 | ||
2761 | class ArtProviderPtr(ArtProvider): | |
2762 | def __init__(self, this): | |
2763 | self.this = this | |
2764 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2765 | self.__class__ = ArtProvider | |
2766 | _misc_.ArtProvider_swigregister(ArtProviderPtr) | |
2767 | ART_TOOLBAR = cvar.ART_TOOLBAR | |
2768 | ART_MENU = cvar.ART_MENU | |
2769 | ART_FRAME_ICON = cvar.ART_FRAME_ICON | |
2770 | ART_CMN_DIALOG = cvar.ART_CMN_DIALOG | |
2771 | ART_HELP_BROWSER = cvar.ART_HELP_BROWSER | |
2772 | ART_MESSAGE_BOX = cvar.ART_MESSAGE_BOX | |
2773 | ART_BUTTON = cvar.ART_BUTTON | |
2774 | ART_OTHER = cvar.ART_OTHER | |
2775 | ART_ADD_BOOKMARK = cvar.ART_ADD_BOOKMARK | |
2776 | ART_DEL_BOOKMARK = cvar.ART_DEL_BOOKMARK | |
2777 | ART_HELP_SIDE_PANEL = cvar.ART_HELP_SIDE_PANEL | |
2778 | ART_HELP_SETTINGS = cvar.ART_HELP_SETTINGS | |
2779 | ART_HELP_BOOK = cvar.ART_HELP_BOOK | |
2780 | ART_HELP_FOLDER = cvar.ART_HELP_FOLDER | |
2781 | ART_HELP_PAGE = cvar.ART_HELP_PAGE | |
2782 | ART_GO_BACK = cvar.ART_GO_BACK | |
2783 | ART_GO_FORWARD = cvar.ART_GO_FORWARD | |
2784 | ART_GO_UP = cvar.ART_GO_UP | |
2785 | ART_GO_DOWN = cvar.ART_GO_DOWN | |
2786 | ART_GO_TO_PARENT = cvar.ART_GO_TO_PARENT | |
2787 | ART_GO_HOME = cvar.ART_GO_HOME | |
2788 | ART_FILE_OPEN = cvar.ART_FILE_OPEN | |
2789 | ART_FILE_SAVE = cvar.ART_FILE_SAVE | |
2790 | ART_FILE_SAVE_AS = cvar.ART_FILE_SAVE_AS | |
2791 | ART_PRINT = cvar.ART_PRINT | |
2792 | ART_HELP = cvar.ART_HELP | |
2793 | ART_TIP = cvar.ART_TIP | |
2794 | ART_REPORT_VIEW = cvar.ART_REPORT_VIEW | |
2795 | ART_LIST_VIEW = cvar.ART_LIST_VIEW | |
2796 | ART_NEW_DIR = cvar.ART_NEW_DIR | |
2797 | ART_HARDDISK = cvar.ART_HARDDISK | |
2798 | ART_FLOPPY = cvar.ART_FLOPPY | |
2799 | ART_CDROM = cvar.ART_CDROM | |
2800 | ART_REMOVABLE = cvar.ART_REMOVABLE | |
2801 | ART_FOLDER = cvar.ART_FOLDER | |
2802 | ART_FOLDER_OPEN = cvar.ART_FOLDER_OPEN | |
2803 | ART_GO_DIR_UP = cvar.ART_GO_DIR_UP | |
2804 | ART_EXECUTABLE_FILE = cvar.ART_EXECUTABLE_FILE | |
2805 | ART_NORMAL_FILE = cvar.ART_NORMAL_FILE | |
2806 | ART_TICK_MARK = cvar.ART_TICK_MARK | |
2807 | ART_CROSS_MARK = cvar.ART_CROSS_MARK | |
2808 | ART_ERROR = cvar.ART_ERROR | |
2809 | ART_QUESTION = cvar.ART_QUESTION | |
2810 | ART_WARNING = cvar.ART_WARNING | |
2811 | ART_INFORMATION = cvar.ART_INFORMATION | |
2812 | ART_MISSING_IMAGE = cvar.ART_MISSING_IMAGE | |
2813 | ART_COPY = cvar.ART_COPY | |
2814 | ART_CUT = cvar.ART_CUT | |
2815 | ART_PASTE = cvar.ART_PASTE | |
2816 | ART_DELETE = cvar.ART_DELETE | |
2817 | ART_NEW = cvar.ART_NEW | |
2818 | ART_UNDO = cvar.ART_UNDO | |
2819 | ART_REDO = cvar.ART_REDO | |
2820 | ART_QUIT = cvar.ART_QUIT | |
2821 | ART_FIND = cvar.ART_FIND | |
2822 | ART_FIND_AND_REPLACE = cvar.ART_FIND_AND_REPLACE | |
2823 | ||
2824 | def ArtProvider_PushProvider(*args, **kwargs): | |
2825 | """ | |
2826 | ArtProvider_PushProvider(ArtProvider provider) | |
2827 | ||
2828 | Add new provider to the top of providers stack. | |
2829 | """ | |
2830 | return _misc_.ArtProvider_PushProvider(*args, **kwargs) | |
2831 | ||
2832 | def ArtProvider_PopProvider(*args, **kwargs): | |
2833 | """ | |
2834 | ArtProvider_PopProvider() -> bool | |
2835 | ||
2836 | Remove latest added provider and delete it. | |
2837 | """ | |
2838 | return _misc_.ArtProvider_PopProvider(*args, **kwargs) | |
2839 | ||
2840 | def ArtProvider_RemoveProvider(*args, **kwargs): | |
2841 | """ | |
2842 | ArtProvider_RemoveProvider(ArtProvider provider) -> bool | |
2843 | ||
2844 | Remove provider. The provider must have been added previously! The | |
2845 | provider is _not_ deleted. | |
2846 | """ | |
2847 | return _misc_.ArtProvider_RemoveProvider(*args, **kwargs) | |
2848 | ||
2849 | def ArtProvider_GetBitmap(*args, **kwargs): | |
2850 | """ | |
2851 | ArtProvider_GetBitmap(String id, String client=ART_OTHER, Size size=DefaultSize) -> Bitmap | |
2852 | ||
2853 | Query the providers for bitmap with given ID and return it. Return | |
2854 | wx.NullBitmap if no provider provides it. | |
2855 | """ | |
2856 | return _misc_.ArtProvider_GetBitmap(*args, **kwargs) | |
2857 | ||
2858 | def ArtProvider_GetIcon(*args, **kwargs): | |
2859 | """ | |
2860 | ArtProvider_GetIcon(String id, String client=ART_OTHER, Size size=DefaultSize) -> Icon | |
2861 | ||
2862 | Query the providers for icon with given ID and return it. Return | |
2863 | wx.NullIcon if no provider provides it. | |
2864 | """ | |
2865 | return _misc_.ArtProvider_GetIcon(*args, **kwargs) | |
2866 | ||
2867 | def ArtProvider_GetSizeHint(*args, **kwargs): | |
2868 | """ | |
2869 | ArtProvider_GetSizeHint(String client, bool platform_dependent=False) -> Size | |
2870 | ||
2871 | Get the size hint of an icon from a specific Art Client, queries the | |
2872 | topmost provider if platform_dependent = false | |
2873 | """ | |
2874 | return _misc_.ArtProvider_GetSizeHint(*args, **kwargs) | |
2875 | ||
2876 | #--------------------------------------------------------------------------- | |
2877 | ||
2878 | CONFIG_USE_LOCAL_FILE = _misc_.CONFIG_USE_LOCAL_FILE | |
2879 | CONFIG_USE_GLOBAL_FILE = _misc_.CONFIG_USE_GLOBAL_FILE | |
2880 | CONFIG_USE_RELATIVE_PATH = _misc_.CONFIG_USE_RELATIVE_PATH | |
2881 | CONFIG_USE_NO_ESCAPE_CHARACTERS = _misc_.CONFIG_USE_NO_ESCAPE_CHARACTERS | |
2882 | class ConfigBase(object): | |
2883 | """ | |
2884 | wx.ConfigBase class defines the basic interface of all config | |
2885 | classes. It can not be used by itself (it is an abstract base class) | |
2886 | and you will always use one of its derivations: wx.Config or | |
2887 | wx.FileConfig. | |
2888 | ||
2889 | wx.ConfigBase organizes the items in a tree-like structure, modeled | |
2890 | after the Unix/Dos filesystem. There are groups that act like | |
2891 | directories and entries, key/value pairs that act like files. There | |
2892 | is always one current group given by the current path. As in the file | |
2893 | system case, to specify a key in the config class you must use a path | |
2894 | to it. Config classes also support the notion of the current group, | |
2895 | which makes it possible to use relative paths. | |
2896 | ||
2897 | Keys are pairs "key_name = value" where value may be of string, | |
2898 | integer floating point or boolean, you can not store binary data | |
2899 | without first encoding it as a string. For performance reasons items | |
2900 | should be kept small, no more than a couple kilobytes. | |
2901 | ||
2902 | """ | |
2903 | def __init__(self): raise RuntimeError, "No constructor defined" | |
2904 | def __repr__(self): | |
2905 | return "<%s.%s; proxy of C++ wxConfigBase instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
2906 | def __del__(self, destroy=_misc_.delete_ConfigBase): | |
2907 | """__del__(self)""" | |
2908 | try: | |
2909 | if self.thisown: destroy(self) | |
2910 | except: pass | |
2911 | ||
2912 | Type_Unknown = _misc_.ConfigBase_Type_Unknown | |
2913 | Type_String = _misc_.ConfigBase_Type_String | |
2914 | Type_Boolean = _misc_.ConfigBase_Type_Boolean | |
2915 | Type_Integer = _misc_.ConfigBase_Type_Integer | |
2916 | Type_Float = _misc_.ConfigBase_Type_Float | |
2917 | def Set(*args, **kwargs): | |
2918 | """ | |
2919 | Set(ConfigBase config) -> ConfigBase | |
2920 | ||
2921 | Sets the global config object (the one returned by Get) and returns a | |
2922 | reference to the previous global config object. | |
2923 | """ | |
2924 | return _misc_.ConfigBase_Set(*args, **kwargs) | |
2925 | ||
2926 | Set = staticmethod(Set) | |
2927 | def Get(*args, **kwargs): | |
2928 | """ | |
2929 | Get(bool createOnDemand=True) -> ConfigBase | |
2930 | ||
2931 | Returns the current global config object, creating one if neccessary. | |
2932 | """ | |
2933 | return _misc_.ConfigBase_Get(*args, **kwargs) | |
2934 | ||
2935 | Get = staticmethod(Get) | |
2936 | def Create(*args, **kwargs): | |
2937 | """ | |
2938 | Create() -> ConfigBase | |
2939 | ||
2940 | Create and return a new global config object. This function will | |
2941 | create the "best" implementation of wx.Config available for the | |
2942 | current platform. | |
2943 | """ | |
2944 | return _misc_.ConfigBase_Create(*args, **kwargs) | |
2945 | ||
2946 | Create = staticmethod(Create) | |
2947 | def DontCreateOnDemand(*args, **kwargs): | |
2948 | """ | |
2949 | DontCreateOnDemand() | |
2950 | ||
2951 | Should Get() try to create a new log object if there isn't a current | |
2952 | one? | |
2953 | """ | |
2954 | return _misc_.ConfigBase_DontCreateOnDemand(*args, **kwargs) | |
2955 | ||
2956 | DontCreateOnDemand = staticmethod(DontCreateOnDemand) | |
2957 | def SetPath(*args, **kwargs): | |
2958 | """ | |
2959 | SetPath(self, String path) | |
2960 | ||
2961 | Set current path: if the first character is '/', it's the absolute | |
2962 | path, otherwise it's a relative path. '..' is supported. If the | |
2963 | strPath doesn't exist it is created. | |
2964 | """ | |
2965 | return _misc_.ConfigBase_SetPath(*args, **kwargs) | |
2966 | ||
2967 | def GetPath(*args, **kwargs): | |
2968 | """ | |
2969 | GetPath(self) -> String | |
2970 | ||
2971 | Retrieve the current path (always as absolute path) | |
2972 | """ | |
2973 | return _misc_.ConfigBase_GetPath(*args, **kwargs) | |
2974 | ||
2975 | def GetFirstGroup(*args, **kwargs): | |
2976 | """ | |
2977 | GetFirstGroup() -> (more, value, index) | |
2978 | ||
2979 | Allows enumerating the subgroups in a config object. Returns a tuple | |
2980 | containing a flag indicating there are more items, the name of the | |
2981 | current item, and an index to pass to GetNextGroup to fetch the next | |
2982 | item. | |
2983 | """ | |
2984 | return _misc_.ConfigBase_GetFirstGroup(*args, **kwargs) | |
2985 | ||
2986 | def GetNextGroup(*args, **kwargs): | |
2987 | """ | |
2988 | GetNextGroup(long index) -> (more, value, index) | |
2989 | ||
2990 | Allows enumerating the subgroups in a config object. Returns a tuple | |
2991 | containing a flag indicating there are more items, the name of the | |
2992 | current item, and an index to pass to GetNextGroup to fetch the next | |
2993 | item. | |
2994 | """ | |
2995 | return _misc_.ConfigBase_GetNextGroup(*args, **kwargs) | |
2996 | ||
2997 | def GetFirstEntry(*args, **kwargs): | |
2998 | """ | |
2999 | GetFirstEntry() -> (more, value, index) | |
3000 | ||
3001 | Allows enumerating the entries in the current group in a config | |
3002 | object. Returns a tuple containing a flag indicating there are more | |
3003 | items, the name of the current item, and an index to pass to | |
3004 | GetNextGroup to fetch the next item. | |
3005 | """ | |
3006 | return _misc_.ConfigBase_GetFirstEntry(*args, **kwargs) | |
3007 | ||
3008 | def GetNextEntry(*args, **kwargs): | |
3009 | """ | |
3010 | GetNextEntry(long index) -> (more, value, index) | |
3011 | ||
3012 | Allows enumerating the entries in the current group in a config | |
3013 | object. Returns a tuple containing a flag indicating there are more | |
3014 | items, the name of the current item, and an index to pass to | |
3015 | GetNextGroup to fetch the next item. | |
3016 | """ | |
3017 | return _misc_.ConfigBase_GetNextEntry(*args, **kwargs) | |
3018 | ||
3019 | def GetNumberOfEntries(*args, **kwargs): | |
3020 | """ | |
3021 | GetNumberOfEntries(self, bool recursive=False) -> size_t | |
3022 | ||
3023 | Get the number of entries in the current group, with or without its | |
3024 | subgroups. | |
3025 | """ | |
3026 | return _misc_.ConfigBase_GetNumberOfEntries(*args, **kwargs) | |
3027 | ||
3028 | def GetNumberOfGroups(*args, **kwargs): | |
3029 | """ | |
3030 | GetNumberOfGroups(self, bool recursive=False) -> size_t | |
3031 | ||
3032 | Get the number of subgroups in the current group, with or without its | |
3033 | subgroups. | |
3034 | """ | |
3035 | return _misc_.ConfigBase_GetNumberOfGroups(*args, **kwargs) | |
3036 | ||
3037 | def HasGroup(*args, **kwargs): | |
3038 | """ | |
3039 | HasGroup(self, String name) -> bool | |
3040 | ||
3041 | Returns True if the group by this name exists | |
3042 | """ | |
3043 | return _misc_.ConfigBase_HasGroup(*args, **kwargs) | |
3044 | ||
3045 | def HasEntry(*args, **kwargs): | |
3046 | """ | |
3047 | HasEntry(self, String name) -> bool | |
3048 | ||
3049 | Returns True if the entry by this name exists | |
3050 | """ | |
3051 | return _misc_.ConfigBase_HasEntry(*args, **kwargs) | |
3052 | ||
3053 | def Exists(*args, **kwargs): | |
3054 | """ | |
3055 | Exists(self, String name) -> bool | |
3056 | ||
3057 | Returns True if either a group or an entry with a given name exists | |
3058 | """ | |
3059 | return _misc_.ConfigBase_Exists(*args, **kwargs) | |
3060 | ||
3061 | def GetEntryType(*args, **kwargs): | |
3062 | """ | |
3063 | GetEntryType(self, String name) -> int | |
3064 | ||
3065 | Get the type of the entry. Returns one of the wx.Config.Type_XXX values. | |
3066 | """ | |
3067 | return _misc_.ConfigBase_GetEntryType(*args, **kwargs) | |
3068 | ||
3069 | def Read(*args, **kwargs): | |
3070 | """ | |
3071 | Read(self, String key, String defaultVal=EmptyString) -> String | |
3072 | ||
3073 | Returns the value of key if it exists, defaultVal otherwise. | |
3074 | """ | |
3075 | return _misc_.ConfigBase_Read(*args, **kwargs) | |
3076 | ||
3077 | def ReadInt(*args, **kwargs): | |
3078 | """ | |
3079 | ReadInt(self, String key, long defaultVal=0) -> long | |
3080 | ||
3081 | Returns the value of key if it exists, defaultVal otherwise. | |
3082 | """ | |
3083 | return _misc_.ConfigBase_ReadInt(*args, **kwargs) | |
3084 | ||
3085 | def ReadFloat(*args, **kwargs): | |
3086 | """ | |
3087 | ReadFloat(self, String key, double defaultVal=0.0) -> double | |
3088 | ||
3089 | Returns the value of key if it exists, defaultVal otherwise. | |
3090 | """ | |
3091 | return _misc_.ConfigBase_ReadFloat(*args, **kwargs) | |
3092 | ||
3093 | def ReadBool(*args, **kwargs): | |
3094 | """ | |
3095 | ReadBool(self, String key, bool defaultVal=False) -> bool | |
3096 | ||
3097 | Returns the value of key if it exists, defaultVal otherwise. | |
3098 | """ | |
3099 | return _misc_.ConfigBase_ReadBool(*args, **kwargs) | |
3100 | ||
3101 | def Write(*args, **kwargs): | |
3102 | """ | |
3103 | Write(self, String key, String value) -> bool | |
3104 | ||
3105 | write the value (return True on success) | |
3106 | """ | |
3107 | return _misc_.ConfigBase_Write(*args, **kwargs) | |
3108 | ||
3109 | def WriteInt(*args, **kwargs): | |
3110 | """ | |
3111 | WriteInt(self, String key, long value) -> bool | |
3112 | ||
3113 | write the value (return True on success) | |
3114 | """ | |
3115 | return _misc_.ConfigBase_WriteInt(*args, **kwargs) | |
3116 | ||
3117 | def WriteFloat(*args, **kwargs): | |
3118 | """ | |
3119 | WriteFloat(self, String key, double value) -> bool | |
3120 | ||
3121 | write the value (return True on success) | |
3122 | """ | |
3123 | return _misc_.ConfigBase_WriteFloat(*args, **kwargs) | |
3124 | ||
3125 | def WriteBool(*args, **kwargs): | |
3126 | """ | |
3127 | WriteBool(self, String key, bool value) -> bool | |
3128 | ||
3129 | write the value (return True on success) | |
3130 | """ | |
3131 | return _misc_.ConfigBase_WriteBool(*args, **kwargs) | |
3132 | ||
3133 | def Flush(*args, **kwargs): | |
3134 | """ | |
3135 | Flush(self, bool currentOnly=False) -> bool | |
3136 | ||
3137 | permanently writes all changes | |
3138 | """ | |
3139 | return _misc_.ConfigBase_Flush(*args, **kwargs) | |
3140 | ||
3141 | def RenameEntry(*args, **kwargs): | |
3142 | """ | |
3143 | RenameEntry(self, String oldName, String newName) -> bool | |
3144 | ||
3145 | Rename an entry. Returns False on failure (probably because the new | |
3146 | name is already taken by an existing entry) | |
3147 | """ | |
3148 | return _misc_.ConfigBase_RenameEntry(*args, **kwargs) | |
3149 | ||
3150 | def RenameGroup(*args, **kwargs): | |
3151 | """ | |
3152 | RenameGroup(self, String oldName, String newName) -> bool | |
3153 | ||
3154 | Rename a group. Returns False on failure (probably because the new | |
3155 | name is already taken by an existing entry) | |
3156 | """ | |
3157 | return _misc_.ConfigBase_RenameGroup(*args, **kwargs) | |
3158 | ||
3159 | def DeleteEntry(*args, **kwargs): | |
3160 | """ | |
3161 | DeleteEntry(self, String key, bool deleteGroupIfEmpty=True) -> bool | |
3162 | ||
3163 | Deletes the specified entry and the group it belongs to if it was the | |
3164 | last key in it and the second parameter is True | |
3165 | """ | |
3166 | return _misc_.ConfigBase_DeleteEntry(*args, **kwargs) | |
3167 | ||
3168 | def DeleteGroup(*args, **kwargs): | |
3169 | """ | |
3170 | DeleteGroup(self, String key) -> bool | |
3171 | ||
3172 | Delete the group (with all subgroups) | |
3173 | """ | |
3174 | return _misc_.ConfigBase_DeleteGroup(*args, **kwargs) | |
3175 | ||
3176 | def DeleteAll(*args, **kwargs): | |
3177 | """ | |
3178 | DeleteAll(self) -> bool | |
3179 | ||
3180 | Delete the whole underlying object (disk file, registry key, ...) | |
3181 | primarly intended for use by deinstallation routine. | |
3182 | """ | |
3183 | return _misc_.ConfigBase_DeleteAll(*args, **kwargs) | |
3184 | ||
3185 | def SetExpandEnvVars(*args, **kwargs): | |
3186 | """ | |
3187 | SetExpandEnvVars(self, bool doIt=True) | |
3188 | ||
3189 | We can automatically expand environment variables in the config | |
3190 | entries this option is on by default, you can turn it on/off at any | |
3191 | time) | |
3192 | """ | |
3193 | return _misc_.ConfigBase_SetExpandEnvVars(*args, **kwargs) | |
3194 | ||
3195 | def IsExpandingEnvVars(*args, **kwargs): | |
3196 | """ | |
3197 | IsExpandingEnvVars(self) -> bool | |
3198 | ||
3199 | Are we currently expanding environment variables? | |
3200 | """ | |
3201 | return _misc_.ConfigBase_IsExpandingEnvVars(*args, **kwargs) | |
3202 | ||
3203 | def SetRecordDefaults(*args, **kwargs): | |
3204 | """ | |
3205 | SetRecordDefaults(self, bool doIt=True) | |
3206 | ||
3207 | Set whether the config objec should record default values. | |
3208 | """ | |
3209 | return _misc_.ConfigBase_SetRecordDefaults(*args, **kwargs) | |
3210 | ||
3211 | def IsRecordingDefaults(*args, **kwargs): | |
3212 | """ | |
3213 | IsRecordingDefaults(self) -> bool | |
3214 | ||
3215 | Are we currently recording default values? | |
3216 | """ | |
3217 | return _misc_.ConfigBase_IsRecordingDefaults(*args, **kwargs) | |
3218 | ||
3219 | def ExpandEnvVars(*args, **kwargs): | |
3220 | """ | |
3221 | ExpandEnvVars(self, String str) -> String | |
3222 | ||
3223 | Expand any environment variables in str and return the result | |
3224 | """ | |
3225 | return _misc_.ConfigBase_ExpandEnvVars(*args, **kwargs) | |
3226 | ||
3227 | def GetAppName(*args, **kwargs): | |
3228 | """GetAppName(self) -> String""" | |
3229 | return _misc_.ConfigBase_GetAppName(*args, **kwargs) | |
3230 | ||
3231 | def GetVendorName(*args, **kwargs): | |
3232 | """GetVendorName(self) -> String""" | |
3233 | return _misc_.ConfigBase_GetVendorName(*args, **kwargs) | |
3234 | ||
3235 | def SetAppName(*args, **kwargs): | |
3236 | """SetAppName(self, String appName)""" | |
3237 | return _misc_.ConfigBase_SetAppName(*args, **kwargs) | |
3238 | ||
3239 | def SetVendorName(*args, **kwargs): | |
3240 | """SetVendorName(self, String vendorName)""" | |
3241 | return _misc_.ConfigBase_SetVendorName(*args, **kwargs) | |
3242 | ||
3243 | def SetStyle(*args, **kwargs): | |
3244 | """SetStyle(self, long style)""" | |
3245 | return _misc_.ConfigBase_SetStyle(*args, **kwargs) | |
3246 | ||
3247 | def GetStyle(*args, **kwargs): | |
3248 | """GetStyle(self) -> long""" | |
3249 | return _misc_.ConfigBase_GetStyle(*args, **kwargs) | |
3250 | ||
3251 | ||
3252 | class ConfigBasePtr(ConfigBase): | |
3253 | def __init__(self, this): | |
3254 | self.this = this | |
3255 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3256 | self.__class__ = ConfigBase | |
3257 | _misc_.ConfigBase_swigregister(ConfigBasePtr) | |
3258 | ||
3259 | def ConfigBase_Set(*args, **kwargs): | |
3260 | """ | |
3261 | ConfigBase_Set(ConfigBase config) -> ConfigBase | |
3262 | ||
3263 | Sets the global config object (the one returned by Get) and returns a | |
3264 | reference to the previous global config object. | |
3265 | """ | |
3266 | return _misc_.ConfigBase_Set(*args, **kwargs) | |
3267 | ||
3268 | def ConfigBase_Get(*args, **kwargs): | |
3269 | """ | |
3270 | ConfigBase_Get(bool createOnDemand=True) -> ConfigBase | |
3271 | ||
3272 | Returns the current global config object, creating one if neccessary. | |
3273 | """ | |
3274 | return _misc_.ConfigBase_Get(*args, **kwargs) | |
3275 | ||
3276 | def ConfigBase_Create(*args, **kwargs): | |
3277 | """ | |
3278 | ConfigBase_Create() -> ConfigBase | |
3279 | ||
3280 | Create and return a new global config object. This function will | |
3281 | create the "best" implementation of wx.Config available for the | |
3282 | current platform. | |
3283 | """ | |
3284 | return _misc_.ConfigBase_Create(*args, **kwargs) | |
3285 | ||
3286 | def ConfigBase_DontCreateOnDemand(*args, **kwargs): | |
3287 | """ | |
3288 | ConfigBase_DontCreateOnDemand() | |
3289 | ||
3290 | Should Get() try to create a new log object if there isn't a current | |
3291 | one? | |
3292 | """ | |
3293 | return _misc_.ConfigBase_DontCreateOnDemand(*args, **kwargs) | |
3294 | ||
3295 | class Config(ConfigBase): | |
3296 | """ | |
3297 | This ConfigBase-derived class will use the registry on Windows, | |
3298 | and will be a wx.FileConfig on other platforms. | |
3299 | """ | |
3300 | def __repr__(self): | |
3301 | return "<%s.%s; proxy of C++ wxConfig instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
3302 | def __init__(self, *args, **kwargs): | |
3303 | """ | |
3304 | __init__(self, String appName=EmptyString, String vendorName=EmptyString, | |
3305 | String localFilename=EmptyString, String globalFilename=EmptyString, | |
3306 | long style=wxCONFIG_USE_LOCAL_FILE|wxCONFIG_USE_GLOBAL_FILE) -> Config | |
3307 | """ | |
3308 | newobj = _misc_.new_Config(*args, **kwargs) | |
3309 | self.this = newobj.this | |
3310 | self.thisown = 1 | |
3311 | del newobj.thisown | |
3312 | def __del__(self, destroy=_misc_.delete_Config): | |
3313 | """__del__(self)""" | |
3314 | try: | |
3315 | if self.thisown: destroy(self) | |
3316 | except: pass | |
3317 | ||
3318 | ||
3319 | class ConfigPtr(Config): | |
3320 | def __init__(self, this): | |
3321 | self.this = this | |
3322 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3323 | self.__class__ = Config | |
3324 | _misc_.Config_swigregister(ConfigPtr) | |
3325 | ||
3326 | class FileConfig(ConfigBase): | |
3327 | """This config class will use a file for storage on all platforms.""" | |
3328 | def __repr__(self): | |
3329 | return "<%s.%s; proxy of C++ wxFileConfig instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
3330 | def __init__(self, *args, **kwargs): | |
3331 | """ | |
3332 | __init__(self, String appName=EmptyString, String vendorName=EmptyString, | |
3333 | String localFilename=EmptyString, String globalFilename=EmptyString, | |
3334 | long style=wxCONFIG_USE_LOCAL_FILE|wxCONFIG_USE_GLOBAL_FILE) -> FileConfig | |
3335 | """ | |
3336 | newobj = _misc_.new_FileConfig(*args, **kwargs) | |
3337 | self.this = newobj.this | |
3338 | self.thisown = 1 | |
3339 | del newobj.thisown | |
3340 | def __del__(self, destroy=_misc_.delete_FileConfig): | |
3341 | """__del__(self)""" | |
3342 | try: | |
3343 | if self.thisown: destroy(self) | |
3344 | except: pass | |
3345 | ||
3346 | ||
3347 | class FileConfigPtr(FileConfig): | |
3348 | def __init__(self, this): | |
3349 | self.this = this | |
3350 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3351 | self.__class__ = FileConfig | |
3352 | _misc_.FileConfig_swigregister(FileConfigPtr) | |
3353 | ||
3354 | class ConfigPathChanger(object): | |
3355 | """ | |
3356 | A handy little class which changes current path to the path of given | |
3357 | entry and restores it in the destructoir: so if you declare a local | |
3358 | variable of this type, you work in the entry directory and the path is | |
3359 | automatically restored when the function returns. | |
3360 | """ | |
3361 | def __repr__(self): | |
3362 | return "<%s.%s; proxy of C++ wxConfigPathChanger instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
3363 | def __init__(self, *args, **kwargs): | |
3364 | """__init__(self, ConfigBase config, String entry) -> ConfigPathChanger""" | |
3365 | newobj = _misc_.new_ConfigPathChanger(*args, **kwargs) | |
3366 | self.this = newobj.this | |
3367 | self.thisown = 1 | |
3368 | del newobj.thisown | |
3369 | def __del__(self, destroy=_misc_.delete_ConfigPathChanger): | |
3370 | """__del__(self)""" | |
3371 | try: | |
3372 | if self.thisown: destroy(self) | |
3373 | except: pass | |
3374 | ||
3375 | def Name(*args, **kwargs): | |
3376 | """ | |
3377 | Name(self) -> String | |
3378 | ||
3379 | Get the key name | |
3380 | """ | |
3381 | return _misc_.ConfigPathChanger_Name(*args, **kwargs) | |
3382 | ||
3383 | ||
3384 | class ConfigPathChangerPtr(ConfigPathChanger): | |
3385 | def __init__(self, this): | |
3386 | self.this = this | |
3387 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3388 | self.__class__ = ConfigPathChanger | |
3389 | _misc_.ConfigPathChanger_swigregister(ConfigPathChangerPtr) | |
3390 | ||
3391 | ||
3392 | def ExpandEnvVars(*args, **kwargs): | |
3393 | """ | |
3394 | ExpandEnvVars(String sz) -> String | |
3395 | ||
3396 | Replace environment variables ($SOMETHING) with their values. The | |
3397 | format is $VARNAME or ${VARNAME} where VARNAME contains alphanumeric | |
3398 | characters and '_' only. '$' must be escaped ('\$') in order to be | |
3399 | taken literally. | |
3400 | """ | |
3401 | return _misc_.ExpandEnvVars(*args, **kwargs) | |
3402 | #--------------------------------------------------------------------------- | |
3403 | ||
3404 | class DateTime(object): | |
3405 | """Proxy of C++ DateTime class""" | |
3406 | def __repr__(self): | |
3407 | return "<%s.%s; proxy of C++ wxDateTime instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
3408 | Local = _misc_.DateTime_Local | |
3409 | GMT_12 = _misc_.DateTime_GMT_12 | |
3410 | GMT_11 = _misc_.DateTime_GMT_11 | |
3411 | GMT_10 = _misc_.DateTime_GMT_10 | |
3412 | GMT_9 = _misc_.DateTime_GMT_9 | |
3413 | GMT_8 = _misc_.DateTime_GMT_8 | |
3414 | GMT_7 = _misc_.DateTime_GMT_7 | |
3415 | GMT_6 = _misc_.DateTime_GMT_6 | |
3416 | GMT_5 = _misc_.DateTime_GMT_5 | |
3417 | GMT_4 = _misc_.DateTime_GMT_4 | |
3418 | GMT_3 = _misc_.DateTime_GMT_3 | |
3419 | GMT_2 = _misc_.DateTime_GMT_2 | |
3420 | GMT_1 = _misc_.DateTime_GMT_1 | |
3421 | GMT0 = _misc_.DateTime_GMT0 | |
3422 | GMT1 = _misc_.DateTime_GMT1 | |
3423 | GMT2 = _misc_.DateTime_GMT2 | |
3424 | GMT3 = _misc_.DateTime_GMT3 | |
3425 | GMT4 = _misc_.DateTime_GMT4 | |
3426 | GMT5 = _misc_.DateTime_GMT5 | |
3427 | GMT6 = _misc_.DateTime_GMT6 | |
3428 | GMT7 = _misc_.DateTime_GMT7 | |
3429 | GMT8 = _misc_.DateTime_GMT8 | |
3430 | GMT9 = _misc_.DateTime_GMT9 | |
3431 | GMT10 = _misc_.DateTime_GMT10 | |
3432 | GMT11 = _misc_.DateTime_GMT11 | |
3433 | GMT12 = _misc_.DateTime_GMT12 | |
3434 | WET = _misc_.DateTime_WET | |
3435 | WEST = _misc_.DateTime_WEST | |
3436 | CET = _misc_.DateTime_CET | |
3437 | CEST = _misc_.DateTime_CEST | |
3438 | EET = _misc_.DateTime_EET | |
3439 | EEST = _misc_.DateTime_EEST | |
3440 | MSK = _misc_.DateTime_MSK | |
3441 | MSD = _misc_.DateTime_MSD | |
3442 | AST = _misc_.DateTime_AST | |
3443 | ADT = _misc_.DateTime_ADT | |
3444 | EST = _misc_.DateTime_EST | |
3445 | EDT = _misc_.DateTime_EDT | |
3446 | CST = _misc_.DateTime_CST | |
3447 | CDT = _misc_.DateTime_CDT | |
3448 | MST = _misc_.DateTime_MST | |
3449 | MDT = _misc_.DateTime_MDT | |
3450 | PST = _misc_.DateTime_PST | |
3451 | PDT = _misc_.DateTime_PDT | |
3452 | HST = _misc_.DateTime_HST | |
3453 | AKST = _misc_.DateTime_AKST | |
3454 | AKDT = _misc_.DateTime_AKDT | |
3455 | A_WST = _misc_.DateTime_A_WST | |
3456 | A_CST = _misc_.DateTime_A_CST | |
3457 | A_EST = _misc_.DateTime_A_EST | |
3458 | A_ESST = _misc_.DateTime_A_ESST | |
3459 | UTC = _misc_.DateTime_UTC | |
3460 | Gregorian = _misc_.DateTime_Gregorian | |
3461 | Julian = _misc_.DateTime_Julian | |
3462 | Gr_Unknown = _misc_.DateTime_Gr_Unknown | |
3463 | Gr_Standard = _misc_.DateTime_Gr_Standard | |
3464 | Gr_Alaska = _misc_.DateTime_Gr_Alaska | |
3465 | Gr_Albania = _misc_.DateTime_Gr_Albania | |
3466 | Gr_Austria = _misc_.DateTime_Gr_Austria | |
3467 | Gr_Austria_Brixen = _misc_.DateTime_Gr_Austria_Brixen | |
3468 | Gr_Austria_Salzburg = _misc_.DateTime_Gr_Austria_Salzburg | |
3469 | Gr_Austria_Tyrol = _misc_.DateTime_Gr_Austria_Tyrol | |
3470 | Gr_Austria_Carinthia = _misc_.DateTime_Gr_Austria_Carinthia | |
3471 | Gr_Austria_Styria = _misc_.DateTime_Gr_Austria_Styria | |
3472 | Gr_Belgium = _misc_.DateTime_Gr_Belgium | |
3473 | Gr_Bulgaria = _misc_.DateTime_Gr_Bulgaria | |
3474 | Gr_Bulgaria_1 = _misc_.DateTime_Gr_Bulgaria_1 | |
3475 | Gr_Bulgaria_2 = _misc_.DateTime_Gr_Bulgaria_2 | |
3476 | Gr_Bulgaria_3 = _misc_.DateTime_Gr_Bulgaria_3 | |
3477 | Gr_Canada = _misc_.DateTime_Gr_Canada | |
3478 | Gr_China = _misc_.DateTime_Gr_China | |
3479 | Gr_China_1 = _misc_.DateTime_Gr_China_1 | |
3480 | Gr_China_2 = _misc_.DateTime_Gr_China_2 | |
3481 | Gr_Czechoslovakia = _misc_.DateTime_Gr_Czechoslovakia | |
3482 | Gr_Denmark = _misc_.DateTime_Gr_Denmark | |
3483 | Gr_Egypt = _misc_.DateTime_Gr_Egypt | |
3484 | Gr_Estonia = _misc_.DateTime_Gr_Estonia | |
3485 | Gr_Finland = _misc_.DateTime_Gr_Finland | |
3486 | Gr_France = _misc_.DateTime_Gr_France | |
3487 | Gr_France_Alsace = _misc_.DateTime_Gr_France_Alsace | |
3488 | Gr_France_Lorraine = _misc_.DateTime_Gr_France_Lorraine | |
3489 | Gr_France_Strasbourg = _misc_.DateTime_Gr_France_Strasbourg | |
3490 | Gr_Germany = _misc_.DateTime_Gr_Germany | |
3491 | Gr_Germany_Catholic = _misc_.DateTime_Gr_Germany_Catholic | |
3492 | Gr_Germany_Prussia = _misc_.DateTime_Gr_Germany_Prussia | |
3493 | Gr_Germany_Protestant = _misc_.DateTime_Gr_Germany_Protestant | |
3494 | Gr_GreatBritain = _misc_.DateTime_Gr_GreatBritain | |
3495 | Gr_Greece = _misc_.DateTime_Gr_Greece | |
3496 | Gr_Hungary = _misc_.DateTime_Gr_Hungary | |
3497 | Gr_Ireland = _misc_.DateTime_Gr_Ireland | |
3498 | Gr_Italy = _misc_.DateTime_Gr_Italy | |
3499 | Gr_Japan = _misc_.DateTime_Gr_Japan | |
3500 | Gr_Japan_1 = _misc_.DateTime_Gr_Japan_1 | |
3501 | Gr_Japan_2 = _misc_.DateTime_Gr_Japan_2 | |
3502 | Gr_Japan_3 = _misc_.DateTime_Gr_Japan_3 | |
3503 | Gr_Latvia = _misc_.DateTime_Gr_Latvia | |
3504 | Gr_Lithuania = _misc_.DateTime_Gr_Lithuania | |
3505 | Gr_Luxemburg = _misc_.DateTime_Gr_Luxemburg | |
3506 | Gr_Netherlands = _misc_.DateTime_Gr_Netherlands | |
3507 | Gr_Netherlands_Groningen = _misc_.DateTime_Gr_Netherlands_Groningen | |
3508 | Gr_Netherlands_Gelderland = _misc_.DateTime_Gr_Netherlands_Gelderland | |
3509 | Gr_Netherlands_Utrecht = _misc_.DateTime_Gr_Netherlands_Utrecht | |
3510 | Gr_Netherlands_Friesland = _misc_.DateTime_Gr_Netherlands_Friesland | |
3511 | Gr_Norway = _misc_.DateTime_Gr_Norway | |
3512 | Gr_Poland = _misc_.DateTime_Gr_Poland | |
3513 | Gr_Portugal = _misc_.DateTime_Gr_Portugal | |
3514 | Gr_Romania = _misc_.DateTime_Gr_Romania | |
3515 | Gr_Russia = _misc_.DateTime_Gr_Russia | |
3516 | Gr_Scotland = _misc_.DateTime_Gr_Scotland | |
3517 | Gr_Spain = _misc_.DateTime_Gr_Spain | |
3518 | Gr_Sweden = _misc_.DateTime_Gr_Sweden | |
3519 | Gr_Switzerland = _misc_.DateTime_Gr_Switzerland | |
3520 | Gr_Switzerland_Catholic = _misc_.DateTime_Gr_Switzerland_Catholic | |
3521 | Gr_Switzerland_Protestant = _misc_.DateTime_Gr_Switzerland_Protestant | |
3522 | Gr_Turkey = _misc_.DateTime_Gr_Turkey | |
3523 | Gr_USA = _misc_.DateTime_Gr_USA | |
3524 | Gr_Wales = _misc_.DateTime_Gr_Wales | |
3525 | Gr_Yugoslavia = _misc_.DateTime_Gr_Yugoslavia | |
3526 | Country_Unknown = _misc_.DateTime_Country_Unknown | |
3527 | Country_Default = _misc_.DateTime_Country_Default | |
3528 | Country_WesternEurope_Start = _misc_.DateTime_Country_WesternEurope_Start | |
3529 | Country_EEC = _misc_.DateTime_Country_EEC | |
3530 | France = _misc_.DateTime_France | |
3531 | Germany = _misc_.DateTime_Germany | |
3532 | UK = _misc_.DateTime_UK | |
3533 | Country_WesternEurope_End = _misc_.DateTime_Country_WesternEurope_End | |
3534 | Russia = _misc_.DateTime_Russia | |
3535 | USA = _misc_.DateTime_USA | |
3536 | Jan = _misc_.DateTime_Jan | |
3537 | Feb = _misc_.DateTime_Feb | |
3538 | Mar = _misc_.DateTime_Mar | |
3539 | Apr = _misc_.DateTime_Apr | |
3540 | May = _misc_.DateTime_May | |
3541 | Jun = _misc_.DateTime_Jun | |
3542 | Jul = _misc_.DateTime_Jul | |
3543 | Aug = _misc_.DateTime_Aug | |
3544 | Sep = _misc_.DateTime_Sep | |
3545 | Oct = _misc_.DateTime_Oct | |
3546 | Nov = _misc_.DateTime_Nov | |
3547 | Dec = _misc_.DateTime_Dec | |
3548 | Inv_Month = _misc_.DateTime_Inv_Month | |
3549 | Sun = _misc_.DateTime_Sun | |
3550 | Mon = _misc_.DateTime_Mon | |
3551 | Tue = _misc_.DateTime_Tue | |
3552 | Wed = _misc_.DateTime_Wed | |
3553 | Thu = _misc_.DateTime_Thu | |
3554 | Fri = _misc_.DateTime_Fri | |
3555 | Sat = _misc_.DateTime_Sat | |
3556 | Inv_WeekDay = _misc_.DateTime_Inv_WeekDay | |
3557 | Inv_Year = _misc_.DateTime_Inv_Year | |
3558 | Name_Full = _misc_.DateTime_Name_Full | |
3559 | Name_Abbr = _misc_.DateTime_Name_Abbr | |
3560 | Default_First = _misc_.DateTime_Default_First | |
3561 | Monday_First = _misc_.DateTime_Monday_First | |
3562 | Sunday_First = _misc_.DateTime_Sunday_First | |
3563 | def SetCountry(*args, **kwargs): | |
3564 | """SetCountry(int country)""" | |
3565 | return _misc_.DateTime_SetCountry(*args, **kwargs) | |
3566 | ||
3567 | SetCountry = staticmethod(SetCountry) | |
3568 | def GetCountry(*args, **kwargs): | |
3569 | """GetCountry() -> int""" | |
3570 | return _misc_.DateTime_GetCountry(*args, **kwargs) | |
3571 | ||
3572 | GetCountry = staticmethod(GetCountry) | |
3573 | def IsWestEuropeanCountry(*args, **kwargs): | |
3574 | """IsWestEuropeanCountry(int country=Country_Default) -> bool""" | |
3575 | return _misc_.DateTime_IsWestEuropeanCountry(*args, **kwargs) | |
3576 | ||
3577 | IsWestEuropeanCountry = staticmethod(IsWestEuropeanCountry) | |
3578 | def GetCurrentYear(*args, **kwargs): | |
3579 | """GetCurrentYear(int cal=Gregorian) -> int""" | |
3580 | return _misc_.DateTime_GetCurrentYear(*args, **kwargs) | |
3581 | ||
3582 | GetCurrentYear = staticmethod(GetCurrentYear) | |
3583 | def ConvertYearToBC(*args, **kwargs): | |
3584 | """ConvertYearToBC(int year) -> int""" | |
3585 | return _misc_.DateTime_ConvertYearToBC(*args, **kwargs) | |
3586 | ||
3587 | ConvertYearToBC = staticmethod(ConvertYearToBC) | |
3588 | def GetCurrentMonth(*args, **kwargs): | |
3589 | """GetCurrentMonth(int cal=Gregorian) -> int""" | |
3590 | return _misc_.DateTime_GetCurrentMonth(*args, **kwargs) | |
3591 | ||
3592 | GetCurrentMonth = staticmethod(GetCurrentMonth) | |
3593 | def IsLeapYear(*args, **kwargs): | |
3594 | """IsLeapYear(int year=Inv_Year, int cal=Gregorian) -> bool""" | |
3595 | return _misc_.DateTime_IsLeapYear(*args, **kwargs) | |
3596 | ||
3597 | IsLeapYear = staticmethod(IsLeapYear) | |
3598 | def GetCentury(*args, **kwargs): | |
3599 | """GetCentury(int year=Inv_Year) -> int""" | |
3600 | return _misc_.DateTime_GetCentury(*args, **kwargs) | |
3601 | ||
3602 | GetCentury = staticmethod(GetCentury) | |
3603 | def GetNumberOfDaysinYear(*args, **kwargs): | |
3604 | """GetNumberOfDaysinYear(int year, int cal=Gregorian) -> int""" | |
3605 | return _misc_.DateTime_GetNumberOfDaysinYear(*args, **kwargs) | |
3606 | ||
3607 | GetNumberOfDaysinYear = staticmethod(GetNumberOfDaysinYear) | |
3608 | def GetNumberOfDaysInMonth(*args, **kwargs): | |
3609 | """GetNumberOfDaysInMonth(int month, int year=Inv_Year, int cal=Gregorian) -> int""" | |
3610 | return _misc_.DateTime_GetNumberOfDaysInMonth(*args, **kwargs) | |
3611 | ||
3612 | GetNumberOfDaysInMonth = staticmethod(GetNumberOfDaysInMonth) | |
3613 | def GetMonthName(*args, **kwargs): | |
3614 | """GetMonthName(int month, int flags=Name_Full) -> String""" | |
3615 | return _misc_.DateTime_GetMonthName(*args, **kwargs) | |
3616 | ||
3617 | GetMonthName = staticmethod(GetMonthName) | |
3618 | def GetWeekDayName(*args, **kwargs): | |
3619 | """GetWeekDayName(int weekday, int flags=Name_Full) -> String""" | |
3620 | return _misc_.DateTime_GetWeekDayName(*args, **kwargs) | |
3621 | ||
3622 | GetWeekDayName = staticmethod(GetWeekDayName) | |
3623 | def GetAmPmStrings(*args, **kwargs): | |
3624 | """ | |
3625 | GetAmPmStrings() -> (am, pm) | |
3626 | ||
3627 | Get the AM and PM strings in the current locale (may be empty) | |
3628 | """ | |
3629 | return _misc_.DateTime_GetAmPmStrings(*args, **kwargs) | |
3630 | ||
3631 | GetAmPmStrings = staticmethod(GetAmPmStrings) | |
3632 | def IsDSTApplicable(*args, **kwargs): | |
3633 | """IsDSTApplicable(int year=Inv_Year, int country=Country_Default) -> bool""" | |
3634 | return _misc_.DateTime_IsDSTApplicable(*args, **kwargs) | |
3635 | ||
3636 | IsDSTApplicable = staticmethod(IsDSTApplicable) | |
3637 | def GetBeginDST(*args, **kwargs): | |
3638 | """GetBeginDST(int year=Inv_Year, int country=Country_Default) -> DateTime""" | |
3639 | return _misc_.DateTime_GetBeginDST(*args, **kwargs) | |
3640 | ||
3641 | GetBeginDST = staticmethod(GetBeginDST) | |
3642 | def GetEndDST(*args, **kwargs): | |
3643 | """GetEndDST(int year=Inv_Year, int country=Country_Default) -> DateTime""" | |
3644 | return _misc_.DateTime_GetEndDST(*args, **kwargs) | |
3645 | ||
3646 | GetEndDST = staticmethod(GetEndDST) | |
3647 | def Now(*args, **kwargs): | |
3648 | """Now() -> DateTime""" | |
3649 | return _misc_.DateTime_Now(*args, **kwargs) | |
3650 | ||
3651 | Now = staticmethod(Now) | |
3652 | def UNow(*args, **kwargs): | |
3653 | """UNow() -> DateTime""" | |
3654 | return _misc_.DateTime_UNow(*args, **kwargs) | |
3655 | ||
3656 | UNow = staticmethod(UNow) | |
3657 | def Today(*args, **kwargs): | |
3658 | """Today() -> DateTime""" | |
3659 | return _misc_.DateTime_Today(*args, **kwargs) | |
3660 | ||
3661 | Today = staticmethod(Today) | |
3662 | def __init__(self, *args, **kwargs): | |
3663 | """__init__(self) -> DateTime""" | |
3664 | newobj = _misc_.new_DateTime(*args, **kwargs) | |
3665 | self.this = newobj.this | |
3666 | self.thisown = 1 | |
3667 | del newobj.thisown | |
3668 | def __del__(self, destroy=_misc_.delete_DateTime): | |
3669 | """__del__(self)""" | |
3670 | try: | |
3671 | if self.thisown: destroy(self) | |
3672 | except: pass | |
3673 | ||
3674 | def SetToCurrent(*args, **kwargs): | |
3675 | """SetToCurrent(self) -> DateTime""" | |
3676 | return _misc_.DateTime_SetToCurrent(*args, **kwargs) | |
3677 | ||
3678 | def SetTimeT(*args, **kwargs): | |
3679 | """SetTimeT(self, time_t timet) -> DateTime""" | |
3680 | return _misc_.DateTime_SetTimeT(*args, **kwargs) | |
3681 | ||
3682 | def SetJDN(*args, **kwargs): | |
3683 | """SetJDN(self, double jdn) -> DateTime""" | |
3684 | return _misc_.DateTime_SetJDN(*args, **kwargs) | |
3685 | ||
3686 | def SetHMS(*args, **kwargs): | |
3687 | """SetHMS(self, int hour, int minute=0, int second=0, int millisec=0) -> DateTime""" | |
3688 | return _misc_.DateTime_SetHMS(*args, **kwargs) | |
3689 | ||
3690 | def Set(*args, **kwargs): | |
3691 | """ | |
3692 | Set(self, int day, int month=Inv_Month, int year=Inv_Year, int hour=0, | |
3693 | int minute=0, int second=0, int millisec=0) -> DateTime | |
3694 | """ | |
3695 | return _misc_.DateTime_Set(*args, **kwargs) | |
3696 | ||
3697 | def ResetTime(*args, **kwargs): | |
3698 | """ResetTime(self) -> DateTime""" | |
3699 | return _misc_.DateTime_ResetTime(*args, **kwargs) | |
3700 | ||
3701 | def SetYear(*args, **kwargs): | |
3702 | """SetYear(self, int year) -> DateTime""" | |
3703 | return _misc_.DateTime_SetYear(*args, **kwargs) | |
3704 | ||
3705 | def SetMonth(*args, **kwargs): | |
3706 | """SetMonth(self, int month) -> DateTime""" | |
3707 | return _misc_.DateTime_SetMonth(*args, **kwargs) | |
3708 | ||
3709 | def SetDay(*args, **kwargs): | |
3710 | """SetDay(self, int day) -> DateTime""" | |
3711 | return _misc_.DateTime_SetDay(*args, **kwargs) | |
3712 | ||
3713 | def SetHour(*args, **kwargs): | |
3714 | """SetHour(self, int hour) -> DateTime""" | |
3715 | return _misc_.DateTime_SetHour(*args, **kwargs) | |
3716 | ||
3717 | def SetMinute(*args, **kwargs): | |
3718 | """SetMinute(self, int minute) -> DateTime""" | |
3719 | return _misc_.DateTime_SetMinute(*args, **kwargs) | |
3720 | ||
3721 | def SetSecond(*args, **kwargs): | |
3722 | """SetSecond(self, int second) -> DateTime""" | |
3723 | return _misc_.DateTime_SetSecond(*args, **kwargs) | |
3724 | ||
3725 | def SetMillisecond(*args, **kwargs): | |
3726 | """SetMillisecond(self, int millisecond) -> DateTime""" | |
3727 | return _misc_.DateTime_SetMillisecond(*args, **kwargs) | |
3728 | ||
3729 | def SetToWeekDayInSameWeek(*args, **kwargs): | |
3730 | """SetToWeekDayInSameWeek(self, int weekday, int flags=Monday_First) -> DateTime""" | |
3731 | return _misc_.DateTime_SetToWeekDayInSameWeek(*args, **kwargs) | |
3732 | ||
3733 | def GetWeekDayInSameWeek(*args, **kwargs): | |
3734 | """GetWeekDayInSameWeek(self, int weekday, int flags=Monday_First) -> DateTime""" | |
3735 | return _misc_.DateTime_GetWeekDayInSameWeek(*args, **kwargs) | |
3736 | ||
3737 | def SetToNextWeekDay(*args, **kwargs): | |
3738 | """SetToNextWeekDay(self, int weekday) -> DateTime""" | |
3739 | return _misc_.DateTime_SetToNextWeekDay(*args, **kwargs) | |
3740 | ||
3741 | def GetNextWeekDay(*args, **kwargs): | |
3742 | """GetNextWeekDay(self, int weekday) -> DateTime""" | |
3743 | return _misc_.DateTime_GetNextWeekDay(*args, **kwargs) | |
3744 | ||
3745 | def SetToPrevWeekDay(*args, **kwargs): | |
3746 | """SetToPrevWeekDay(self, int weekday) -> DateTime""" | |
3747 | return _misc_.DateTime_SetToPrevWeekDay(*args, **kwargs) | |
3748 | ||
3749 | def GetPrevWeekDay(*args, **kwargs): | |
3750 | """GetPrevWeekDay(self, int weekday) -> DateTime""" | |
3751 | return _misc_.DateTime_GetPrevWeekDay(*args, **kwargs) | |
3752 | ||
3753 | def SetToWeekDay(*args, **kwargs): | |
3754 | """SetToWeekDay(self, int weekday, int n=1, int month=Inv_Month, int year=Inv_Year) -> bool""" | |
3755 | return _misc_.DateTime_SetToWeekDay(*args, **kwargs) | |
3756 | ||
3757 | def SetToLastWeekDay(*args, **kwargs): | |
3758 | """SetToLastWeekDay(self, int weekday, int month=Inv_Month, int year=Inv_Year) -> bool""" | |
3759 | return _misc_.DateTime_SetToLastWeekDay(*args, **kwargs) | |
3760 | ||
3761 | def GetLastWeekDay(*args, **kwargs): | |
3762 | """GetLastWeekDay(self, int weekday, int month=Inv_Month, int year=Inv_Year) -> DateTime""" | |
3763 | return _misc_.DateTime_GetLastWeekDay(*args, **kwargs) | |
3764 | ||
3765 | def SetToTheWeek(*args, **kwargs): | |
3766 | """SetToTheWeek(self, int numWeek, int weekday=Mon, int flags=Monday_First) -> bool""" | |
3767 | return _misc_.DateTime_SetToTheWeek(*args, **kwargs) | |
3768 | ||
3769 | def GetWeek(*args, **kwargs): | |
3770 | """GetWeek(self, int numWeek, int weekday=Mon, int flags=Monday_First) -> DateTime""" | |
3771 | return _misc_.DateTime_GetWeek(*args, **kwargs) | |
3772 | ||
3773 | SetToTheWeek = wx._deprecated(SetToTheWeek, "SetToTheWeek is deprecated, use (static) SetToWeekOfYear instead") | |
3774 | GetWeek = wx._deprecated(GetWeek, "GetWeek is deprecated, use GetWeekOfYear instead") | |
3775 | ||
3776 | def SetToWeekOfYear(*args, **kwargs): | |
3777 | """SetToWeekOfYear(int year, int numWeek, int weekday=Mon) -> DateTime""" | |
3778 | return _misc_.DateTime_SetToWeekOfYear(*args, **kwargs) | |
3779 | ||
3780 | SetToWeekOfYear = staticmethod(SetToWeekOfYear) | |
3781 | def SetToLastMonthDay(*args, **kwargs): | |
3782 | """SetToLastMonthDay(self, int month=Inv_Month, int year=Inv_Year) -> DateTime""" | |
3783 | return _misc_.DateTime_SetToLastMonthDay(*args, **kwargs) | |
3784 | ||
3785 | def GetLastMonthDay(*args, **kwargs): | |
3786 | """GetLastMonthDay(self, int month=Inv_Month, int year=Inv_Year) -> DateTime""" | |
3787 | return _misc_.DateTime_GetLastMonthDay(*args, **kwargs) | |
3788 | ||
3789 | def SetToYearDay(*args, **kwargs): | |
3790 | """SetToYearDay(self, int yday) -> DateTime""" | |
3791 | return _misc_.DateTime_SetToYearDay(*args, **kwargs) | |
3792 | ||
3793 | def GetYearDay(*args, **kwargs): | |
3794 | """GetYearDay(self, int yday) -> DateTime""" | |
3795 | return _misc_.DateTime_GetYearDay(*args, **kwargs) | |
3796 | ||
3797 | def GetJulianDayNumber(*args, **kwargs): | |
3798 | """GetJulianDayNumber(self) -> double""" | |
3799 | return _misc_.DateTime_GetJulianDayNumber(*args, **kwargs) | |
3800 | ||
3801 | def GetJDN(*args, **kwargs): | |
3802 | """GetJDN(self) -> double""" | |
3803 | return _misc_.DateTime_GetJDN(*args, **kwargs) | |
3804 | ||
3805 | def GetModifiedJulianDayNumber(*args, **kwargs): | |
3806 | """GetModifiedJulianDayNumber(self) -> double""" | |
3807 | return _misc_.DateTime_GetModifiedJulianDayNumber(*args, **kwargs) | |
3808 | ||
3809 | def GetMJD(*args, **kwargs): | |
3810 | """GetMJD(self) -> double""" | |
3811 | return _misc_.DateTime_GetMJD(*args, **kwargs) | |
3812 | ||
3813 | def GetRataDie(*args, **kwargs): | |
3814 | """GetRataDie(self) -> double""" | |
3815 | return _misc_.DateTime_GetRataDie(*args, **kwargs) | |
3816 | ||
3817 | def ToTimezone(*args, **kwargs): | |
3818 | """ToTimezone(self, wxDateTime::TimeZone tz, bool noDST=False) -> DateTime""" | |
3819 | return _misc_.DateTime_ToTimezone(*args, **kwargs) | |
3820 | ||
3821 | def MakeTimezone(*args, **kwargs): | |
3822 | """MakeTimezone(self, wxDateTime::TimeZone tz, bool noDST=False) -> DateTime""" | |
3823 | return _misc_.DateTime_MakeTimezone(*args, **kwargs) | |
3824 | ||
3825 | def FromTimezone(*args, **kwargs): | |
3826 | """FromTimezone(self, wxDateTime::TimeZone tz, bool noDST=False) -> DateTime""" | |
3827 | return _misc_.DateTime_FromTimezone(*args, **kwargs) | |
3828 | ||
3829 | def MakeFromTimezone(*args, **kwargs): | |
3830 | """MakeFromTimezone(self, wxDateTime::TimeZone tz, bool noDST=False) -> DateTime""" | |
3831 | return _misc_.DateTime_MakeFromTimezone(*args, **kwargs) | |
3832 | ||
3833 | def ToUTC(*args, **kwargs): | |
3834 | """ToUTC(self, bool noDST=False) -> DateTime""" | |
3835 | return _misc_.DateTime_ToUTC(*args, **kwargs) | |
3836 | ||
3837 | def MakeUTC(*args, **kwargs): | |
3838 | """MakeUTC(self, bool noDST=False) -> DateTime""" | |
3839 | return _misc_.DateTime_MakeUTC(*args, **kwargs) | |
3840 | ||
3841 | def ToGMT(*args, **kwargs): | |
3842 | """ToGMT(self, bool noDST=False) -> DateTime""" | |
3843 | return _misc_.DateTime_ToGMT(*args, **kwargs) | |
3844 | ||
3845 | def MakeGMT(*args, **kwargs): | |
3846 | """MakeGMT(self, bool noDST=False) -> DateTime""" | |
3847 | return _misc_.DateTime_MakeGMT(*args, **kwargs) | |
3848 | ||
3849 | def FromUTC(*args, **kwargs): | |
3850 | """FromUTC(self, bool noDST=False) -> DateTime""" | |
3851 | return _misc_.DateTime_FromUTC(*args, **kwargs) | |
3852 | ||
3853 | def MakeFromUTC(*args, **kwargs): | |
3854 | """MakeFromUTC(self, bool noDST=False) -> DateTime""" | |
3855 | return _misc_.DateTime_MakeFromUTC(*args, **kwargs) | |
3856 | ||
3857 | def IsDST(*args, **kwargs): | |
3858 | """IsDST(self, int country=Country_Default) -> int""" | |
3859 | return _misc_.DateTime_IsDST(*args, **kwargs) | |
3860 | ||
3861 | def IsValid(*args, **kwargs): | |
3862 | """IsValid(self) -> bool""" | |
3863 | return _misc_.DateTime_IsValid(*args, **kwargs) | |
3864 | ||
3865 | Ok = IsValid | |
3866 | def __nonzero__(self): return self.Ok() | |
3867 | def GetTicks(*args, **kwargs): | |
3868 | """GetTicks(self) -> time_t""" | |
3869 | return _misc_.DateTime_GetTicks(*args, **kwargs) | |
3870 | ||
3871 | def GetYear(*args, **kwargs): | |
3872 | """GetYear(self, wxDateTime::TimeZone tz=LOCAL_TZ) -> int""" | |
3873 | return _misc_.DateTime_GetYear(*args, **kwargs) | |
3874 | ||
3875 | def GetMonth(*args, **kwargs): | |
3876 | """GetMonth(self, wxDateTime::TimeZone tz=LOCAL_TZ) -> int""" | |
3877 | return _misc_.DateTime_GetMonth(*args, **kwargs) | |
3878 | ||
3879 | def GetDay(*args, **kwargs): | |
3880 | """GetDay(self, wxDateTime::TimeZone tz=LOCAL_TZ) -> int""" | |
3881 | return _misc_.DateTime_GetDay(*args, **kwargs) | |
3882 | ||
3883 | def GetWeekDay(*args, **kwargs): | |
3884 | """GetWeekDay(self, wxDateTime::TimeZone tz=LOCAL_TZ) -> int""" | |
3885 | return _misc_.DateTime_GetWeekDay(*args, **kwargs) | |
3886 | ||
3887 | def GetHour(*args, **kwargs): | |
3888 | """GetHour(self, wxDateTime::TimeZone tz=LOCAL_TZ) -> int""" | |
3889 | return _misc_.DateTime_GetHour(*args, **kwargs) | |
3890 | ||
3891 | def GetMinute(*args, **kwargs): | |
3892 | """GetMinute(self, wxDateTime::TimeZone tz=LOCAL_TZ) -> int""" | |
3893 | return _misc_.DateTime_GetMinute(*args, **kwargs) | |
3894 | ||
3895 | def GetSecond(*args, **kwargs): | |
3896 | """GetSecond(self, wxDateTime::TimeZone tz=LOCAL_TZ) -> int""" | |
3897 | return _misc_.DateTime_GetSecond(*args, **kwargs) | |
3898 | ||
3899 | def GetMillisecond(*args, **kwargs): | |
3900 | """GetMillisecond(self, wxDateTime::TimeZone tz=LOCAL_TZ) -> int""" | |
3901 | return _misc_.DateTime_GetMillisecond(*args, **kwargs) | |
3902 | ||
3903 | def GetDayOfYear(*args, **kwargs): | |
3904 | """GetDayOfYear(self, wxDateTime::TimeZone tz=LOCAL_TZ) -> int""" | |
3905 | return _misc_.DateTime_GetDayOfYear(*args, **kwargs) | |
3906 | ||
3907 | def GetWeekOfYear(*args, **kwargs): | |
3908 | """GetWeekOfYear(self, int flags=Monday_First, wxDateTime::TimeZone tz=LOCAL_TZ) -> int""" | |
3909 | return _misc_.DateTime_GetWeekOfYear(*args, **kwargs) | |
3910 | ||
3911 | def GetWeekOfMonth(*args, **kwargs): | |
3912 | """GetWeekOfMonth(self, int flags=Monday_First, wxDateTime::TimeZone tz=LOCAL_TZ) -> int""" | |
3913 | return _misc_.DateTime_GetWeekOfMonth(*args, **kwargs) | |
3914 | ||
3915 | def IsWorkDay(*args, **kwargs): | |
3916 | """IsWorkDay(self, int country=Country_Default) -> bool""" | |
3917 | return _misc_.DateTime_IsWorkDay(*args, **kwargs) | |
3918 | ||
3919 | def IsEqualTo(*args, **kwargs): | |
3920 | """IsEqualTo(self, DateTime datetime) -> bool""" | |
3921 | return _misc_.DateTime_IsEqualTo(*args, **kwargs) | |
3922 | ||
3923 | def IsEarlierThan(*args, **kwargs): | |
3924 | """IsEarlierThan(self, DateTime datetime) -> bool""" | |
3925 | return _misc_.DateTime_IsEarlierThan(*args, **kwargs) | |
3926 | ||
3927 | def IsLaterThan(*args, **kwargs): | |
3928 | """IsLaterThan(self, DateTime datetime) -> bool""" | |
3929 | return _misc_.DateTime_IsLaterThan(*args, **kwargs) | |
3930 | ||
3931 | def IsStrictlyBetween(*args, **kwargs): | |
3932 | """IsStrictlyBetween(self, DateTime t1, DateTime t2) -> bool""" | |
3933 | return _misc_.DateTime_IsStrictlyBetween(*args, **kwargs) | |
3934 | ||
3935 | def IsBetween(*args, **kwargs): | |
3936 | """IsBetween(self, DateTime t1, DateTime t2) -> bool""" | |
3937 | return _misc_.DateTime_IsBetween(*args, **kwargs) | |
3938 | ||
3939 | def IsSameDate(*args, **kwargs): | |
3940 | """IsSameDate(self, DateTime dt) -> bool""" | |
3941 | return _misc_.DateTime_IsSameDate(*args, **kwargs) | |
3942 | ||
3943 | def IsSameTime(*args, **kwargs): | |
3944 | """IsSameTime(self, DateTime dt) -> bool""" | |
3945 | return _misc_.DateTime_IsSameTime(*args, **kwargs) | |
3946 | ||
3947 | def IsEqualUpTo(*args, **kwargs): | |
3948 | """IsEqualUpTo(self, DateTime dt, TimeSpan ts) -> bool""" | |
3949 | return _misc_.DateTime_IsEqualUpTo(*args, **kwargs) | |
3950 | ||
3951 | def AddTS(*args, **kwargs): | |
3952 | """AddTS(self, TimeSpan diff) -> DateTime""" | |
3953 | return _misc_.DateTime_AddTS(*args, **kwargs) | |
3954 | ||
3955 | def AddDS(*args, **kwargs): | |
3956 | """AddDS(self, DateSpan diff) -> DateTime""" | |
3957 | return _misc_.DateTime_AddDS(*args, **kwargs) | |
3958 | ||
3959 | def SubtractTS(*args, **kwargs): | |
3960 | """SubtractTS(self, TimeSpan diff) -> DateTime""" | |
3961 | return _misc_.DateTime_SubtractTS(*args, **kwargs) | |
3962 | ||
3963 | def SubtractDS(*args, **kwargs): | |
3964 | """SubtractDS(self, DateSpan diff) -> DateTime""" | |
3965 | return _misc_.DateTime_SubtractDS(*args, **kwargs) | |
3966 | ||
3967 | def Subtract(*args, **kwargs): | |
3968 | """Subtract(self, DateTime dt) -> TimeSpan""" | |
3969 | return _misc_.DateTime_Subtract(*args, **kwargs) | |
3970 | ||
3971 | def __iadd__(*args): | |
3972 | """ | |
3973 | __iadd__(self, TimeSpan diff) -> DateTime | |
3974 | __iadd__(self, DateSpan diff) -> DateTime | |
3975 | """ | |
3976 | return _misc_.DateTime___iadd__(*args) | |
3977 | ||
3978 | def __isub__(*args): | |
3979 | """ | |
3980 | __isub__(self, TimeSpan diff) -> DateTime | |
3981 | __isub__(self, DateSpan diff) -> DateTime | |
3982 | """ | |
3983 | return _misc_.DateTime___isub__(*args) | |
3984 | ||
3985 | def __add__(*args): | |
3986 | """ | |
3987 | __add__(self, TimeSpan other) -> DateTime | |
3988 | __add__(self, DateSpan other) -> DateTime | |
3989 | """ | |
3990 | return _misc_.DateTime___add__(*args) | |
3991 | ||
3992 | def __sub__(*args): | |
3993 | """ | |
3994 | __sub__(self, DateTime other) -> TimeSpan | |
3995 | __sub__(self, TimeSpan other) -> DateTime | |
3996 | __sub__(self, DateSpan other) -> DateTime | |
3997 | """ | |
3998 | return _misc_.DateTime___sub__(*args) | |
3999 | ||
4000 | def __lt__(*args, **kwargs): | |
4001 | """__lt__(self, DateTime other) -> bool""" | |
4002 | return _misc_.DateTime___lt__(*args, **kwargs) | |
4003 | ||
4004 | def __le__(*args, **kwargs): | |
4005 | """__le__(self, DateTime other) -> bool""" | |
4006 | return _misc_.DateTime___le__(*args, **kwargs) | |
4007 | ||
4008 | def __gt__(*args, **kwargs): | |
4009 | """__gt__(self, DateTime other) -> bool""" | |
4010 | return _misc_.DateTime___gt__(*args, **kwargs) | |
4011 | ||
4012 | def __ge__(*args, **kwargs): | |
4013 | """__ge__(self, DateTime other) -> bool""" | |
4014 | return _misc_.DateTime___ge__(*args, **kwargs) | |
4015 | ||
4016 | def __eq__(*args, **kwargs): | |
4017 | """__eq__(self, DateTime other) -> bool""" | |
4018 | return _misc_.DateTime___eq__(*args, **kwargs) | |
4019 | ||
4020 | def __ne__(*args, **kwargs): | |
4021 | """__ne__(self, DateTime other) -> bool""" | |
4022 | return _misc_.DateTime___ne__(*args, **kwargs) | |
4023 | ||
4024 | def ParseRfc822Date(*args, **kwargs): | |
4025 | """ParseRfc822Date(self, String date) -> int""" | |
4026 | return _misc_.DateTime_ParseRfc822Date(*args, **kwargs) | |
4027 | ||
4028 | def ParseFormat(*args, **kwargs): | |
4029 | """ParseFormat(self, String date, String format=DefaultDateTimeFormat, DateTime dateDef=DefaultDateTime) -> int""" | |
4030 | return _misc_.DateTime_ParseFormat(*args, **kwargs) | |
4031 | ||
4032 | def ParseDateTime(*args, **kwargs): | |
4033 | """ParseDateTime(self, String datetime) -> int""" | |
4034 | return _misc_.DateTime_ParseDateTime(*args, **kwargs) | |
4035 | ||
4036 | def ParseDate(*args, **kwargs): | |
4037 | """ParseDate(self, String date) -> int""" | |
4038 | return _misc_.DateTime_ParseDate(*args, **kwargs) | |
4039 | ||
4040 | def ParseTime(*args, **kwargs): | |
4041 | """ParseTime(self, String time) -> int""" | |
4042 | return _misc_.DateTime_ParseTime(*args, **kwargs) | |
4043 | ||
4044 | def Format(*args, **kwargs): | |
4045 | """Format(self, String format=DefaultDateTimeFormat, wxDateTime::TimeZone tz=LOCAL_TZ) -> String""" | |
4046 | return _misc_.DateTime_Format(*args, **kwargs) | |
4047 | ||
4048 | def FormatDate(*args, **kwargs): | |
4049 | """FormatDate(self) -> String""" | |
4050 | return _misc_.DateTime_FormatDate(*args, **kwargs) | |
4051 | ||
4052 | def FormatTime(*args, **kwargs): | |
4053 | """FormatTime(self) -> String""" | |
4054 | return _misc_.DateTime_FormatTime(*args, **kwargs) | |
4055 | ||
4056 | def FormatISODate(*args, **kwargs): | |
4057 | """FormatISODate(self) -> String""" | |
4058 | return _misc_.DateTime_FormatISODate(*args, **kwargs) | |
4059 | ||
4060 | def FormatISOTime(*args, **kwargs): | |
4061 | """FormatISOTime(self) -> String""" | |
4062 | return _misc_.DateTime_FormatISOTime(*args, **kwargs) | |
4063 | ||
4064 | def __repr__(self): | |
4065 | if self.IsValid(): | |
4066 | f = self.Format().encode(wx.GetDefaultPyEncoding()) | |
4067 | return '<wx.DateTime: \"%s\" at %s>' % ( f, self.this) | |
4068 | else: | |
4069 | return '<wx.DateTime: \"INVALID\" at %s>' % self.this | |
4070 | def __str__(self): | |
4071 | if self.IsValid(): | |
4072 | return self.Format().encode(wx.GetDefaultPyEncoding()) | |
4073 | else: | |
4074 | return "INVALID DateTime" | |
4075 | ||
4076 | ||
4077 | class DateTimePtr(DateTime): | |
4078 | def __init__(self, this): | |
4079 | self.this = this | |
4080 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4081 | self.__class__ = DateTime | |
4082 | _misc_.DateTime_swigregister(DateTimePtr) | |
4083 | DefaultDateTimeFormat = cvar.DefaultDateTimeFormat | |
4084 | DefaultTimeSpanFormat = cvar.DefaultTimeSpanFormat | |
4085 | ||
4086 | def DateTime_SetCountry(*args, **kwargs): | |
4087 | """DateTime_SetCountry(int country)""" | |
4088 | return _misc_.DateTime_SetCountry(*args, **kwargs) | |
4089 | ||
4090 | def DateTime_GetCountry(*args, **kwargs): | |
4091 | """DateTime_GetCountry() -> int""" | |
4092 | return _misc_.DateTime_GetCountry(*args, **kwargs) | |
4093 | ||
4094 | def DateTime_IsWestEuropeanCountry(*args, **kwargs): | |
4095 | """DateTime_IsWestEuropeanCountry(int country=Country_Default) -> bool""" | |
4096 | return _misc_.DateTime_IsWestEuropeanCountry(*args, **kwargs) | |
4097 | ||
4098 | def DateTime_GetCurrentYear(*args, **kwargs): | |
4099 | """DateTime_GetCurrentYear(int cal=Gregorian) -> int""" | |
4100 | return _misc_.DateTime_GetCurrentYear(*args, **kwargs) | |
4101 | ||
4102 | def DateTime_ConvertYearToBC(*args, **kwargs): | |
4103 | """DateTime_ConvertYearToBC(int year) -> int""" | |
4104 | return _misc_.DateTime_ConvertYearToBC(*args, **kwargs) | |
4105 | ||
4106 | def DateTime_GetCurrentMonth(*args, **kwargs): | |
4107 | """DateTime_GetCurrentMonth(int cal=Gregorian) -> int""" | |
4108 | return _misc_.DateTime_GetCurrentMonth(*args, **kwargs) | |
4109 | ||
4110 | def DateTime_IsLeapYear(*args, **kwargs): | |
4111 | """DateTime_IsLeapYear(int year=Inv_Year, int cal=Gregorian) -> bool""" | |
4112 | return _misc_.DateTime_IsLeapYear(*args, **kwargs) | |
4113 | ||
4114 | def DateTime_GetCentury(*args, **kwargs): | |
4115 | """DateTime_GetCentury(int year=Inv_Year) -> int""" | |
4116 | return _misc_.DateTime_GetCentury(*args, **kwargs) | |
4117 | ||
4118 | def DateTime_GetNumberOfDaysinYear(*args, **kwargs): | |
4119 | """DateTime_GetNumberOfDaysinYear(int year, int cal=Gregorian) -> int""" | |
4120 | return _misc_.DateTime_GetNumberOfDaysinYear(*args, **kwargs) | |
4121 | ||
4122 | def DateTime_GetNumberOfDaysInMonth(*args, **kwargs): | |
4123 | """DateTime_GetNumberOfDaysInMonth(int month, int year=Inv_Year, int cal=Gregorian) -> int""" | |
4124 | return _misc_.DateTime_GetNumberOfDaysInMonth(*args, **kwargs) | |
4125 | ||
4126 | def DateTime_GetMonthName(*args, **kwargs): | |
4127 | """DateTime_GetMonthName(int month, int flags=Name_Full) -> String""" | |
4128 | return _misc_.DateTime_GetMonthName(*args, **kwargs) | |
4129 | ||
4130 | def DateTime_GetWeekDayName(*args, **kwargs): | |
4131 | """DateTime_GetWeekDayName(int weekday, int flags=Name_Full) -> String""" | |
4132 | return _misc_.DateTime_GetWeekDayName(*args, **kwargs) | |
4133 | ||
4134 | def DateTime_GetAmPmStrings(*args, **kwargs): | |
4135 | """ | |
4136 | GetAmPmStrings() -> (am, pm) | |
4137 | ||
4138 | Get the AM and PM strings in the current locale (may be empty) | |
4139 | """ | |
4140 | return _misc_.DateTime_GetAmPmStrings(*args, **kwargs) | |
4141 | ||
4142 | def DateTime_IsDSTApplicable(*args, **kwargs): | |
4143 | """DateTime_IsDSTApplicable(int year=Inv_Year, int country=Country_Default) -> bool""" | |
4144 | return _misc_.DateTime_IsDSTApplicable(*args, **kwargs) | |
4145 | ||
4146 | def DateTime_GetBeginDST(*args, **kwargs): | |
4147 | """DateTime_GetBeginDST(int year=Inv_Year, int country=Country_Default) -> DateTime""" | |
4148 | return _misc_.DateTime_GetBeginDST(*args, **kwargs) | |
4149 | ||
4150 | def DateTime_GetEndDST(*args, **kwargs): | |
4151 | """DateTime_GetEndDST(int year=Inv_Year, int country=Country_Default) -> DateTime""" | |
4152 | return _misc_.DateTime_GetEndDST(*args, **kwargs) | |
4153 | ||
4154 | def DateTime_Now(*args, **kwargs): | |
4155 | """DateTime_Now() -> DateTime""" | |
4156 | return _misc_.DateTime_Now(*args, **kwargs) | |
4157 | ||
4158 | def DateTime_UNow(*args, **kwargs): | |
4159 | """DateTime_UNow() -> DateTime""" | |
4160 | return _misc_.DateTime_UNow(*args, **kwargs) | |
4161 | ||
4162 | def DateTime_Today(*args, **kwargs): | |
4163 | """DateTime_Today() -> DateTime""" | |
4164 | return _misc_.DateTime_Today(*args, **kwargs) | |
4165 | ||
4166 | def DateTimeFromTimeT(*args, **kwargs): | |
4167 | """DateTimeFromTimeT(time_t timet) -> DateTime""" | |
4168 | val = _misc_.new_DateTimeFromTimeT(*args, **kwargs) | |
4169 | val.thisown = 1 | |
4170 | return val | |
4171 | ||
4172 | def DateTimeFromJDN(*args, **kwargs): | |
4173 | """DateTimeFromJDN(double jdn) -> DateTime""" | |
4174 | val = _misc_.new_DateTimeFromJDN(*args, **kwargs) | |
4175 | val.thisown = 1 | |
4176 | return val | |
4177 | ||
4178 | def DateTimeFromHMS(*args, **kwargs): | |
4179 | """DateTimeFromHMS(int hour, int minute=0, int second=0, int millisec=0) -> DateTime""" | |
4180 | val = _misc_.new_DateTimeFromHMS(*args, **kwargs) | |
4181 | val.thisown = 1 | |
4182 | return val | |
4183 | ||
4184 | def DateTimeFromDMY(*args, **kwargs): | |
4185 | """ | |
4186 | DateTimeFromDMY(int day, int month=Inv_Month, int year=Inv_Year, int hour=0, | |
4187 | int minute=0, int second=0, int millisec=0) -> DateTime | |
4188 | """ | |
4189 | val = _misc_.new_DateTimeFromDMY(*args, **kwargs) | |
4190 | val.thisown = 1 | |
4191 | return val | |
4192 | ||
4193 | def DateTime_SetToWeekOfYear(*args, **kwargs): | |
4194 | """DateTime_SetToWeekOfYear(int year, int numWeek, int weekday=Mon) -> DateTime""" | |
4195 | return _misc_.DateTime_SetToWeekOfYear(*args, **kwargs) | |
4196 | ||
4197 | class TimeSpan(object): | |
4198 | """Proxy of C++ TimeSpan class""" | |
4199 | def __repr__(self): | |
4200 | return "<%s.%s; proxy of C++ wxTimeSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
4201 | def Seconds(*args, **kwargs): | |
4202 | """Seconds(long sec) -> TimeSpan""" | |
4203 | return _misc_.TimeSpan_Seconds(*args, **kwargs) | |
4204 | ||
4205 | Seconds = staticmethod(Seconds) | |
4206 | def Second(*args, **kwargs): | |
4207 | """Second() -> TimeSpan""" | |
4208 | return _misc_.TimeSpan_Second(*args, **kwargs) | |
4209 | ||
4210 | Second = staticmethod(Second) | |
4211 | def Minutes(*args, **kwargs): | |
4212 | """Minutes(long min) -> TimeSpan""" | |
4213 | return _misc_.TimeSpan_Minutes(*args, **kwargs) | |
4214 | ||
4215 | Minutes = staticmethod(Minutes) | |
4216 | def Minute(*args, **kwargs): | |
4217 | """Minute() -> TimeSpan""" | |
4218 | return _misc_.TimeSpan_Minute(*args, **kwargs) | |
4219 | ||
4220 | Minute = staticmethod(Minute) | |
4221 | def Hours(*args, **kwargs): | |
4222 | """Hours(long hours) -> TimeSpan""" | |
4223 | return _misc_.TimeSpan_Hours(*args, **kwargs) | |
4224 | ||
4225 | Hours = staticmethod(Hours) | |
4226 | def Hour(*args, **kwargs): | |
4227 | """Hour() -> TimeSpan""" | |
4228 | return _misc_.TimeSpan_Hour(*args, **kwargs) | |
4229 | ||
4230 | Hour = staticmethod(Hour) | |
4231 | def Days(*args, **kwargs): | |
4232 | """Days(long days) -> TimeSpan""" | |
4233 | return _misc_.TimeSpan_Days(*args, **kwargs) | |
4234 | ||
4235 | Days = staticmethod(Days) | |
4236 | def Day(*args, **kwargs): | |
4237 | """Day() -> TimeSpan""" | |
4238 | return _misc_.TimeSpan_Day(*args, **kwargs) | |
4239 | ||
4240 | Day = staticmethod(Day) | |
4241 | def Weeks(*args, **kwargs): | |
4242 | """Weeks(long days) -> TimeSpan""" | |
4243 | return _misc_.TimeSpan_Weeks(*args, **kwargs) | |
4244 | ||
4245 | Weeks = staticmethod(Weeks) | |
4246 | def Week(*args, **kwargs): | |
4247 | """Week() -> TimeSpan""" | |
4248 | return _misc_.TimeSpan_Week(*args, **kwargs) | |
4249 | ||
4250 | Week = staticmethod(Week) | |
4251 | def __init__(self, *args, **kwargs): | |
4252 | """__init__(self, long hours=0, long minutes=0, long seconds=0, long milliseconds=0) -> TimeSpan""" | |
4253 | newobj = _misc_.new_TimeSpan(*args, **kwargs) | |
4254 | self.this = newobj.this | |
4255 | self.thisown = 1 | |
4256 | del newobj.thisown | |
4257 | def __del__(self, destroy=_misc_.delete_TimeSpan): | |
4258 | """__del__(self)""" | |
4259 | try: | |
4260 | if self.thisown: destroy(self) | |
4261 | except: pass | |
4262 | ||
4263 | def Add(*args, **kwargs): | |
4264 | """Add(self, TimeSpan diff) -> TimeSpan""" | |
4265 | return _misc_.TimeSpan_Add(*args, **kwargs) | |
4266 | ||
4267 | def Subtract(*args, **kwargs): | |
4268 | """Subtract(self, TimeSpan diff) -> TimeSpan""" | |
4269 | return _misc_.TimeSpan_Subtract(*args, **kwargs) | |
4270 | ||
4271 | def Multiply(*args, **kwargs): | |
4272 | """Multiply(self, int n) -> TimeSpan""" | |
4273 | return _misc_.TimeSpan_Multiply(*args, **kwargs) | |
4274 | ||
4275 | def Neg(*args, **kwargs): | |
4276 | """Neg(self) -> TimeSpan""" | |
4277 | return _misc_.TimeSpan_Neg(*args, **kwargs) | |
4278 | ||
4279 | def Abs(*args, **kwargs): | |
4280 | """Abs(self) -> TimeSpan""" | |
4281 | return _misc_.TimeSpan_Abs(*args, **kwargs) | |
4282 | ||
4283 | def __iadd__(*args, **kwargs): | |
4284 | """__iadd__(self, TimeSpan diff) -> TimeSpan""" | |
4285 | return _misc_.TimeSpan___iadd__(*args, **kwargs) | |
4286 | ||
4287 | def __isub__(*args, **kwargs): | |
4288 | """__isub__(self, TimeSpan diff) -> TimeSpan""" | |
4289 | return _misc_.TimeSpan___isub__(*args, **kwargs) | |
4290 | ||
4291 | def __imul__(*args, **kwargs): | |
4292 | """__imul__(self, int n) -> TimeSpan""" | |
4293 | return _misc_.TimeSpan___imul__(*args, **kwargs) | |
4294 | ||
4295 | def __neg__(*args, **kwargs): | |
4296 | """__neg__(self) -> TimeSpan""" | |
4297 | return _misc_.TimeSpan___neg__(*args, **kwargs) | |
4298 | ||
4299 | def __add__(*args, **kwargs): | |
4300 | """__add__(self, TimeSpan other) -> TimeSpan""" | |
4301 | return _misc_.TimeSpan___add__(*args, **kwargs) | |
4302 | ||
4303 | def __sub__(*args, **kwargs): | |
4304 | """__sub__(self, TimeSpan other) -> TimeSpan""" | |
4305 | return _misc_.TimeSpan___sub__(*args, **kwargs) | |
4306 | ||
4307 | def __mul__(*args, **kwargs): | |
4308 | """__mul__(self, int n) -> TimeSpan""" | |
4309 | return _misc_.TimeSpan___mul__(*args, **kwargs) | |
4310 | ||
4311 | def __rmul__(*args, **kwargs): | |
4312 | """__rmul__(self, int n) -> TimeSpan""" | |
4313 | return _misc_.TimeSpan___rmul__(*args, **kwargs) | |
4314 | ||
4315 | def __lt__(*args, **kwargs): | |
4316 | """__lt__(self, TimeSpan other) -> bool""" | |
4317 | return _misc_.TimeSpan___lt__(*args, **kwargs) | |
4318 | ||
4319 | def __le__(*args, **kwargs): | |
4320 | """__le__(self, TimeSpan other) -> bool""" | |
4321 | return _misc_.TimeSpan___le__(*args, **kwargs) | |
4322 | ||
4323 | def __gt__(*args, **kwargs): | |
4324 | """__gt__(self, TimeSpan other) -> bool""" | |
4325 | return _misc_.TimeSpan___gt__(*args, **kwargs) | |
4326 | ||
4327 | def __ge__(*args, **kwargs): | |
4328 | """__ge__(self, TimeSpan other) -> bool""" | |
4329 | return _misc_.TimeSpan___ge__(*args, **kwargs) | |
4330 | ||
4331 | def __eq__(*args, **kwargs): | |
4332 | """__eq__(self, TimeSpan other) -> bool""" | |
4333 | return _misc_.TimeSpan___eq__(*args, **kwargs) | |
4334 | ||
4335 | def __ne__(*args, **kwargs): | |
4336 | """__ne__(self, TimeSpan other) -> bool""" | |
4337 | return _misc_.TimeSpan___ne__(*args, **kwargs) | |
4338 | ||
4339 | def IsNull(*args, **kwargs): | |
4340 | """IsNull(self) -> bool""" | |
4341 | return _misc_.TimeSpan_IsNull(*args, **kwargs) | |
4342 | ||
4343 | def IsPositive(*args, **kwargs): | |
4344 | """IsPositive(self) -> bool""" | |
4345 | return _misc_.TimeSpan_IsPositive(*args, **kwargs) | |
4346 | ||
4347 | def IsNegative(*args, **kwargs): | |
4348 | """IsNegative(self) -> bool""" | |
4349 | return _misc_.TimeSpan_IsNegative(*args, **kwargs) | |
4350 | ||
4351 | def IsEqualTo(*args, **kwargs): | |
4352 | """IsEqualTo(self, TimeSpan ts) -> bool""" | |
4353 | return _misc_.TimeSpan_IsEqualTo(*args, **kwargs) | |
4354 | ||
4355 | def IsLongerThan(*args, **kwargs): | |
4356 | """IsLongerThan(self, TimeSpan ts) -> bool""" | |
4357 | return _misc_.TimeSpan_IsLongerThan(*args, **kwargs) | |
4358 | ||
4359 | def IsShorterThan(*args, **kwargs): | |
4360 | """IsShorterThan(self, TimeSpan t) -> bool""" | |
4361 | return _misc_.TimeSpan_IsShorterThan(*args, **kwargs) | |
4362 | ||
4363 | def GetWeeks(*args, **kwargs): | |
4364 | """GetWeeks(self) -> int""" | |
4365 | return _misc_.TimeSpan_GetWeeks(*args, **kwargs) | |
4366 | ||
4367 | def GetDays(*args, **kwargs): | |
4368 | """GetDays(self) -> int""" | |
4369 | return _misc_.TimeSpan_GetDays(*args, **kwargs) | |
4370 | ||
4371 | def GetHours(*args, **kwargs): | |
4372 | """GetHours(self) -> int""" | |
4373 | return _misc_.TimeSpan_GetHours(*args, **kwargs) | |
4374 | ||
4375 | def GetMinutes(*args, **kwargs): | |
4376 | """GetMinutes(self) -> int""" | |
4377 | return _misc_.TimeSpan_GetMinutes(*args, **kwargs) | |
4378 | ||
4379 | def GetSeconds(*args, **kwargs): | |
4380 | """GetSeconds(self) -> wxLongLong""" | |
4381 | return _misc_.TimeSpan_GetSeconds(*args, **kwargs) | |
4382 | ||
4383 | def GetMilliseconds(*args, **kwargs): | |
4384 | """GetMilliseconds(self) -> wxLongLong""" | |
4385 | return _misc_.TimeSpan_GetMilliseconds(*args, **kwargs) | |
4386 | ||
4387 | def Format(*args, **kwargs): | |
4388 | """Format(self, String format=DefaultTimeSpanFormat) -> String""" | |
4389 | return _misc_.TimeSpan_Format(*args, **kwargs) | |
4390 | ||
4391 | def __repr__(self): | |
4392 | f = self.Format().encode(wx.GetDefaultPyEncoding()) | |
4393 | return '<wx.TimeSpan: \"%s\" at %s>' % ( f, self.this) | |
4394 | def __str__(self): | |
4395 | return self.Format().encode(wx.GetDefaultPyEncoding()) | |
4396 | ||
4397 | ||
4398 | class TimeSpanPtr(TimeSpan): | |
4399 | def __init__(self, this): | |
4400 | self.this = this | |
4401 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4402 | self.__class__ = TimeSpan | |
4403 | _misc_.TimeSpan_swigregister(TimeSpanPtr) | |
4404 | ||
4405 | def TimeSpan_Seconds(*args, **kwargs): | |
4406 | """TimeSpan_Seconds(long sec) -> TimeSpan""" | |
4407 | return _misc_.TimeSpan_Seconds(*args, **kwargs) | |
4408 | ||
4409 | def TimeSpan_Second(*args, **kwargs): | |
4410 | """TimeSpan_Second() -> TimeSpan""" | |
4411 | return _misc_.TimeSpan_Second(*args, **kwargs) | |
4412 | ||
4413 | def TimeSpan_Minutes(*args, **kwargs): | |
4414 | """TimeSpan_Minutes(long min) -> TimeSpan""" | |
4415 | return _misc_.TimeSpan_Minutes(*args, **kwargs) | |
4416 | ||
4417 | def TimeSpan_Minute(*args, **kwargs): | |
4418 | """TimeSpan_Minute() -> TimeSpan""" | |
4419 | return _misc_.TimeSpan_Minute(*args, **kwargs) | |
4420 | ||
4421 | def TimeSpan_Hours(*args, **kwargs): | |
4422 | """TimeSpan_Hours(long hours) -> TimeSpan""" | |
4423 | return _misc_.TimeSpan_Hours(*args, **kwargs) | |
4424 | ||
4425 | def TimeSpan_Hour(*args, **kwargs): | |
4426 | """TimeSpan_Hour() -> TimeSpan""" | |
4427 | return _misc_.TimeSpan_Hour(*args, **kwargs) | |
4428 | ||
4429 | def TimeSpan_Days(*args, **kwargs): | |
4430 | """TimeSpan_Days(long days) -> TimeSpan""" | |
4431 | return _misc_.TimeSpan_Days(*args, **kwargs) | |
4432 | ||
4433 | def TimeSpan_Day(*args, **kwargs): | |
4434 | """TimeSpan_Day() -> TimeSpan""" | |
4435 | return _misc_.TimeSpan_Day(*args, **kwargs) | |
4436 | ||
4437 | def TimeSpan_Weeks(*args, **kwargs): | |
4438 | """TimeSpan_Weeks(long days) -> TimeSpan""" | |
4439 | return _misc_.TimeSpan_Weeks(*args, **kwargs) | |
4440 | ||
4441 | def TimeSpan_Week(*args, **kwargs): | |
4442 | """TimeSpan_Week() -> TimeSpan""" | |
4443 | return _misc_.TimeSpan_Week(*args, **kwargs) | |
4444 | ||
4445 | class DateSpan(object): | |
4446 | """Proxy of C++ DateSpan class""" | |
4447 | def __repr__(self): | |
4448 | return "<%s.%s; proxy of C++ wxDateSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
4449 | def __init__(self, *args, **kwargs): | |
4450 | """__init__(self, int years=0, int months=0, int weeks=0, int days=0) -> DateSpan""" | |
4451 | newobj = _misc_.new_DateSpan(*args, **kwargs) | |
4452 | self.this = newobj.this | |
4453 | self.thisown = 1 | |
4454 | del newobj.thisown | |
4455 | def __del__(self, destroy=_misc_.delete_DateSpan): | |
4456 | """__del__(self)""" | |
4457 | try: | |
4458 | if self.thisown: destroy(self) | |
4459 | except: pass | |
4460 | ||
4461 | def Days(*args, **kwargs): | |
4462 | """Days(int days) -> DateSpan""" | |
4463 | return _misc_.DateSpan_Days(*args, **kwargs) | |
4464 | ||
4465 | Days = staticmethod(Days) | |
4466 | def Day(*args, **kwargs): | |
4467 | """Day() -> DateSpan""" | |
4468 | return _misc_.DateSpan_Day(*args, **kwargs) | |
4469 | ||
4470 | Day = staticmethod(Day) | |
4471 | def Weeks(*args, **kwargs): | |
4472 | """Weeks(int weeks) -> DateSpan""" | |
4473 | return _misc_.DateSpan_Weeks(*args, **kwargs) | |
4474 | ||
4475 | Weeks = staticmethod(Weeks) | |
4476 | def Week(*args, **kwargs): | |
4477 | """Week() -> DateSpan""" | |
4478 | return _misc_.DateSpan_Week(*args, **kwargs) | |
4479 | ||
4480 | Week = staticmethod(Week) | |
4481 | def Months(*args, **kwargs): | |
4482 | """Months(int mon) -> DateSpan""" | |
4483 | return _misc_.DateSpan_Months(*args, **kwargs) | |
4484 | ||
4485 | Months = staticmethod(Months) | |
4486 | def Month(*args, **kwargs): | |
4487 | """Month() -> DateSpan""" | |
4488 | return _misc_.DateSpan_Month(*args, **kwargs) | |
4489 | ||
4490 | Month = staticmethod(Month) | |
4491 | def Years(*args, **kwargs): | |
4492 | """Years(int years) -> DateSpan""" | |
4493 | return _misc_.DateSpan_Years(*args, **kwargs) | |
4494 | ||
4495 | Years = staticmethod(Years) | |
4496 | def Year(*args, **kwargs): | |
4497 | """Year() -> DateSpan""" | |
4498 | return _misc_.DateSpan_Year(*args, **kwargs) | |
4499 | ||
4500 | Year = staticmethod(Year) | |
4501 | def SetYears(*args, **kwargs): | |
4502 | """SetYears(self, int n) -> DateSpan""" | |
4503 | return _misc_.DateSpan_SetYears(*args, **kwargs) | |
4504 | ||
4505 | def SetMonths(*args, **kwargs): | |
4506 | """SetMonths(self, int n) -> DateSpan""" | |
4507 | return _misc_.DateSpan_SetMonths(*args, **kwargs) | |
4508 | ||
4509 | def SetWeeks(*args, **kwargs): | |
4510 | """SetWeeks(self, int n) -> DateSpan""" | |
4511 | return _misc_.DateSpan_SetWeeks(*args, **kwargs) | |
4512 | ||
4513 | def SetDays(*args, **kwargs): | |
4514 | """SetDays(self, int n) -> DateSpan""" | |
4515 | return _misc_.DateSpan_SetDays(*args, **kwargs) | |
4516 | ||
4517 | def GetYears(*args, **kwargs): | |
4518 | """GetYears(self) -> int""" | |
4519 | return _misc_.DateSpan_GetYears(*args, **kwargs) | |
4520 | ||
4521 | def GetMonths(*args, **kwargs): | |
4522 | """GetMonths(self) -> int""" | |
4523 | return _misc_.DateSpan_GetMonths(*args, **kwargs) | |
4524 | ||
4525 | def GetWeeks(*args, **kwargs): | |
4526 | """GetWeeks(self) -> int""" | |
4527 | return _misc_.DateSpan_GetWeeks(*args, **kwargs) | |
4528 | ||
4529 | def GetDays(*args, **kwargs): | |
4530 | """GetDays(self) -> int""" | |
4531 | return _misc_.DateSpan_GetDays(*args, **kwargs) | |
4532 | ||
4533 | def GetTotalDays(*args, **kwargs): | |
4534 | """GetTotalDays(self) -> int""" | |
4535 | return _misc_.DateSpan_GetTotalDays(*args, **kwargs) | |
4536 | ||
4537 | def Add(*args, **kwargs): | |
4538 | """Add(self, DateSpan other) -> DateSpan""" | |
4539 | return _misc_.DateSpan_Add(*args, **kwargs) | |
4540 | ||
4541 | def Subtract(*args, **kwargs): | |
4542 | """Subtract(self, DateSpan other) -> DateSpan""" | |
4543 | return _misc_.DateSpan_Subtract(*args, **kwargs) | |
4544 | ||
4545 | def Neg(*args, **kwargs): | |
4546 | """Neg(self) -> DateSpan""" | |
4547 | return _misc_.DateSpan_Neg(*args, **kwargs) | |
4548 | ||
4549 | def Multiply(*args, **kwargs): | |
4550 | """Multiply(self, int factor) -> DateSpan""" | |
4551 | return _misc_.DateSpan_Multiply(*args, **kwargs) | |
4552 | ||
4553 | def __iadd__(*args, **kwargs): | |
4554 | """__iadd__(self, DateSpan other) -> DateSpan""" | |
4555 | return _misc_.DateSpan___iadd__(*args, **kwargs) | |
4556 | ||
4557 | def __isub__(*args, **kwargs): | |
4558 | """__isub__(self, DateSpan other) -> DateSpan""" | |
4559 | return _misc_.DateSpan___isub__(*args, **kwargs) | |
4560 | ||
4561 | def __neg__(*args, **kwargs): | |
4562 | """__neg__(self) -> DateSpan""" | |
4563 | return _misc_.DateSpan___neg__(*args, **kwargs) | |
4564 | ||
4565 | def __imul__(*args, **kwargs): | |
4566 | """__imul__(self, int factor) -> DateSpan""" | |
4567 | return _misc_.DateSpan___imul__(*args, **kwargs) | |
4568 | ||
4569 | def __add__(*args, **kwargs): | |
4570 | """__add__(self, DateSpan other) -> DateSpan""" | |
4571 | return _misc_.DateSpan___add__(*args, **kwargs) | |
4572 | ||
4573 | def __sub__(*args, **kwargs): | |
4574 | """__sub__(self, DateSpan other) -> DateSpan""" | |
4575 | return _misc_.DateSpan___sub__(*args, **kwargs) | |
4576 | ||
4577 | def __mul__(*args, **kwargs): | |
4578 | """__mul__(self, int n) -> DateSpan""" | |
4579 | return _misc_.DateSpan___mul__(*args, **kwargs) | |
4580 | ||
4581 | def __rmul__(*args, **kwargs): | |
4582 | """__rmul__(self, int n) -> DateSpan""" | |
4583 | return _misc_.DateSpan___rmul__(*args, **kwargs) | |
4584 | ||
4585 | def __eq__(*args, **kwargs): | |
4586 | """__eq__(self, DateSpan other) -> bool""" | |
4587 | return _misc_.DateSpan___eq__(*args, **kwargs) | |
4588 | ||
4589 | def __ne__(*args, **kwargs): | |
4590 | """__ne__(self, DateSpan other) -> bool""" | |
4591 | return _misc_.DateSpan___ne__(*args, **kwargs) | |
4592 | ||
4593 | ||
4594 | class DateSpanPtr(DateSpan): | |
4595 | def __init__(self, this): | |
4596 | self.this = this | |
4597 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4598 | self.__class__ = DateSpan | |
4599 | _misc_.DateSpan_swigregister(DateSpanPtr) | |
4600 | ||
4601 | def DateSpan_Days(*args, **kwargs): | |
4602 | """DateSpan_Days(int days) -> DateSpan""" | |
4603 | return _misc_.DateSpan_Days(*args, **kwargs) | |
4604 | ||
4605 | def DateSpan_Day(*args, **kwargs): | |
4606 | """DateSpan_Day() -> DateSpan""" | |
4607 | return _misc_.DateSpan_Day(*args, **kwargs) | |
4608 | ||
4609 | def DateSpan_Weeks(*args, **kwargs): | |
4610 | """DateSpan_Weeks(int weeks) -> DateSpan""" | |
4611 | return _misc_.DateSpan_Weeks(*args, **kwargs) | |
4612 | ||
4613 | def DateSpan_Week(*args, **kwargs): | |
4614 | """DateSpan_Week() -> DateSpan""" | |
4615 | return _misc_.DateSpan_Week(*args, **kwargs) | |
4616 | ||
4617 | def DateSpan_Months(*args, **kwargs): | |
4618 | """DateSpan_Months(int mon) -> DateSpan""" | |
4619 | return _misc_.DateSpan_Months(*args, **kwargs) | |
4620 | ||
4621 | def DateSpan_Month(*args, **kwargs): | |
4622 | """DateSpan_Month() -> DateSpan""" | |
4623 | return _misc_.DateSpan_Month(*args, **kwargs) | |
4624 | ||
4625 | def DateSpan_Years(*args, **kwargs): | |
4626 | """DateSpan_Years(int years) -> DateSpan""" | |
4627 | return _misc_.DateSpan_Years(*args, **kwargs) | |
4628 | ||
4629 | def DateSpan_Year(*args, **kwargs): | |
4630 | """DateSpan_Year() -> DateSpan""" | |
4631 | return _misc_.DateSpan_Year(*args, **kwargs) | |
4632 | ||
4633 | ||
4634 | def GetLocalTime(*args, **kwargs): | |
4635 | """GetLocalTime() -> long""" | |
4636 | return _misc_.GetLocalTime(*args, **kwargs) | |
4637 | ||
4638 | def GetUTCTime(*args, **kwargs): | |
4639 | """GetUTCTime() -> long""" | |
4640 | return _misc_.GetUTCTime(*args, **kwargs) | |
4641 | ||
4642 | def GetCurrentTime(*args, **kwargs): | |
4643 | """GetCurrentTime() -> long""" | |
4644 | return _misc_.GetCurrentTime(*args, **kwargs) | |
4645 | ||
4646 | def GetLocalTimeMillis(*args, **kwargs): | |
4647 | """GetLocalTimeMillis() -> wxLongLong""" | |
4648 | return _misc_.GetLocalTimeMillis(*args, **kwargs) | |
4649 | #--------------------------------------------------------------------------- | |
4650 | ||
4651 | DF_INVALID = _misc_.DF_INVALID | |
4652 | DF_TEXT = _misc_.DF_TEXT | |
4653 | DF_BITMAP = _misc_.DF_BITMAP | |
4654 | DF_METAFILE = _misc_.DF_METAFILE | |
4655 | DF_SYLK = _misc_.DF_SYLK | |
4656 | DF_DIF = _misc_.DF_DIF | |
4657 | DF_TIFF = _misc_.DF_TIFF | |
4658 | DF_OEMTEXT = _misc_.DF_OEMTEXT | |
4659 | DF_DIB = _misc_.DF_DIB | |
4660 | DF_PALETTE = _misc_.DF_PALETTE | |
4661 | DF_PENDATA = _misc_.DF_PENDATA | |
4662 | DF_RIFF = _misc_.DF_RIFF | |
4663 | DF_WAVE = _misc_.DF_WAVE | |
4664 | DF_UNICODETEXT = _misc_.DF_UNICODETEXT | |
4665 | DF_ENHMETAFILE = _misc_.DF_ENHMETAFILE | |
4666 | DF_FILENAME = _misc_.DF_FILENAME | |
4667 | DF_LOCALE = _misc_.DF_LOCALE | |
4668 | DF_PRIVATE = _misc_.DF_PRIVATE | |
4669 | DF_HTML = _misc_.DF_HTML | |
4670 | DF_MAX = _misc_.DF_MAX | |
4671 | class DataFormat(object): | |
4672 | """ | |
4673 | A wx.DataFormat is an encapsulation of a platform-specific format | |
4674 | handle which is used by the system for the clipboard and drag and drop | |
4675 | operations. The applications are usually only interested in, for | |
4676 | example, pasting data from the clipboard only if the data is in a | |
4677 | format the program understands. A data format is is used to uniquely | |
4678 | identify this format. | |
4679 | """ | |
4680 | def __repr__(self): | |
4681 | return "<%s.%s; proxy of C++ wxDataFormat instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
4682 | def __init__(self, *args, **kwargs): | |
4683 | """ | |
4684 | __init__(self, int type) -> DataFormat | |
4685 | ||
4686 | Constructs a data format object for one of the standard data formats | |
4687 | or an empty data object (use SetType or SetId later in this case) | |
4688 | """ | |
4689 | newobj = _misc_.new_DataFormat(*args, **kwargs) | |
4690 | self.this = newobj.this | |
4691 | self.thisown = 1 | |
4692 | del newobj.thisown | |
4693 | def __del__(self, destroy=_misc_.delete_DataFormat): | |
4694 | """__del__(self)""" | |
4695 | try: | |
4696 | if self.thisown: destroy(self) | |
4697 | except: pass | |
4698 | ||
4699 | def __eq__(*args): | |
4700 | """ | |
4701 | __eq__(self, int format) -> bool | |
4702 | __eq__(self, DataFormat format) -> bool | |
4703 | """ | |
4704 | return _misc_.DataFormat___eq__(*args) | |
4705 | ||
4706 | def __ne__(*args): | |
4707 | """ | |
4708 | __ne__(self, int format) -> bool | |
4709 | __ne__(self, DataFormat format) -> bool | |
4710 | """ | |
4711 | return _misc_.DataFormat___ne__(*args) | |
4712 | ||
4713 | def SetType(*args, **kwargs): | |
4714 | """ | |
4715 | SetType(self, int format) | |
4716 | ||
4717 | Sets the format to the given value, which should be one of wx.DF_XXX | |
4718 | constants. | |
4719 | """ | |
4720 | return _misc_.DataFormat_SetType(*args, **kwargs) | |
4721 | ||
4722 | def GetType(*args, **kwargs): | |
4723 | """ | |
4724 | GetType(self) -> int | |
4725 | ||
4726 | Returns the platform-specific number identifying the format. | |
4727 | """ | |
4728 | return _misc_.DataFormat_GetType(*args, **kwargs) | |
4729 | ||
4730 | def GetId(*args, **kwargs): | |
4731 | """ | |
4732 | GetId(self) -> String | |
4733 | ||
4734 | Returns the name of a custom format (this function will fail for a | |
4735 | standard format). | |
4736 | """ | |
4737 | return _misc_.DataFormat_GetId(*args, **kwargs) | |
4738 | ||
4739 | def SetId(*args, **kwargs): | |
4740 | """ | |
4741 | SetId(self, String format) | |
4742 | ||
4743 | Sets the format to be the custom format identified by the given name. | |
4744 | """ | |
4745 | return _misc_.DataFormat_SetId(*args, **kwargs) | |
4746 | ||
4747 | ||
4748 | class DataFormatPtr(DataFormat): | |
4749 | def __init__(self, this): | |
4750 | self.this = this | |
4751 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4752 | self.__class__ = DataFormat | |
4753 | _misc_.DataFormat_swigregister(DataFormatPtr) | |
4754 | DefaultDateTime = cvar.DefaultDateTime | |
4755 | ||
4756 | def CustomDataFormat(*args, **kwargs): | |
4757 | """ | |
4758 | CustomDataFormat(String format) -> DataFormat | |
4759 | ||
4760 | Constructs a data format object for a custom format identified by its | |
4761 | name. | |
4762 | """ | |
4763 | val = _misc_.new_CustomDataFormat(*args, **kwargs) | |
4764 | val.thisown = 1 | |
4765 | return val | |
4766 | ||
4767 | class DataObject(object): | |
4768 | """ | |
4769 | A wx.DataObject represents data that can be copied to or from the | |
4770 | clipboard, or dragged and dropped. The important thing about | |
4771 | wx.DataObject is that this is a 'smart' piece of data unlike usual | |
4772 | 'dumb' data containers such as memory buffers or files. Being 'smart' | |
4773 | here means that the data object itself should know what data formats | |
4774 | it supports and how to render itself in each of supported formats. | |
4775 | ||
4776 | **NOTE**: This class is an abstract base class and can not be used | |
4777 | directly from Python. If you need a custom type of data object then | |
4778 | you should instead derive from `wx.PyDataObjectSimple` or use | |
4779 | `wx.CustomDataObject`. | |
4780 | ||
4781 | """ | |
4782 | def __init__(self): raise RuntimeError, "No constructor defined" | |
4783 | def __repr__(self): | |
4784 | return "<%s.%s; proxy of C++ wxDataObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
4785 | Get = _misc_.DataObject_Get | |
4786 | Set = _misc_.DataObject_Set | |
4787 | Both = _misc_.DataObject_Both | |
4788 | def __del__(self, destroy=_misc_.delete_DataObject): | |
4789 | """__del__(self)""" | |
4790 | try: | |
4791 | if self.thisown: destroy(self) | |
4792 | except: pass | |
4793 | ||
4794 | def GetPreferredFormat(*args, **kwargs): | |
4795 | """ | |
4796 | GetPreferredFormat(self, int dir=Get) -> DataFormat | |
4797 | ||
4798 | Returns the preferred format for either rendering the data (if dir is | |
4799 | Get, its default value) or for setting it. Usually this will be the | |
4800 | native format of the wx.DataObject. | |
4801 | """ | |
4802 | return _misc_.DataObject_GetPreferredFormat(*args, **kwargs) | |
4803 | ||
4804 | def GetFormatCount(*args, **kwargs): | |
4805 | """ | |
4806 | GetFormatCount(self, int dir=Get) -> size_t | |
4807 | ||
4808 | Returns the number of available formats for rendering or setting the | |
4809 | data. | |
4810 | """ | |
4811 | return _misc_.DataObject_GetFormatCount(*args, **kwargs) | |
4812 | ||
4813 | def IsSupported(*args, **kwargs): | |
4814 | """ | |
4815 | IsSupported(self, DataFormat format, int dir=Get) -> bool | |
4816 | ||
4817 | Returns True if this format is supported. | |
4818 | """ | |
4819 | return _misc_.DataObject_IsSupported(*args, **kwargs) | |
4820 | ||
4821 | def GetDataSize(*args, **kwargs): | |
4822 | """ | |
4823 | GetDataSize(self, DataFormat format) -> size_t | |
4824 | ||
4825 | Get the (total) size of data for the given format | |
4826 | """ | |
4827 | return _misc_.DataObject_GetDataSize(*args, **kwargs) | |
4828 | ||
4829 | def GetAllFormats(*args, **kwargs): | |
4830 | """ | |
4831 | GetAllFormats(self, int dir=Get) -> [formats] | |
4832 | ||
4833 | Returns a list of all the wx.DataFormats that this dataobject supports | |
4834 | in the given direction. | |
4835 | """ | |
4836 | return _misc_.DataObject_GetAllFormats(*args, **kwargs) | |
4837 | ||
4838 | def GetDataHere(*args, **kwargs): | |
4839 | """ | |
4840 | GetDataHere(self, DataFormat format) -> String | |
4841 | ||
4842 | Get the data bytes in the specified format, returns None on failure. | |
4843 | ||
4844 | """ | |
4845 | return _misc_.DataObject_GetDataHere(*args, **kwargs) | |
4846 | ||
4847 | def SetData(*args, **kwargs): | |
4848 | """ | |
4849 | SetData(self, DataFormat format, String data) -> bool | |
4850 | ||
4851 | Set the data in the specified format from the bytes in the the data string. | |
4852 | ||
4853 | """ | |
4854 | return _misc_.DataObject_SetData(*args, **kwargs) | |
4855 | ||
4856 | ||
4857 | class DataObjectPtr(DataObject): | |
4858 | def __init__(self, this): | |
4859 | self.this = this | |
4860 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4861 | self.__class__ = DataObject | |
4862 | _misc_.DataObject_swigregister(DataObjectPtr) | |
4863 | FormatInvalid = cvar.FormatInvalid | |
4864 | ||
4865 | class DataObjectSimple(DataObject): | |
4866 | """ | |
4867 | wx.DataObjectSimple is a `wx.DataObject` which only supports one | |
4868 | format. This is the simplest possible `wx.DataObject` implementation. | |
4869 | ||
4870 | This is still an "abstract base class" meaning that you can't use it | |
4871 | directly. You either need to use one of the predefined base classes, | |
4872 | or derive your own class from `wx.PyDataObjectSimple`. | |
4873 | ||
4874 | """ | |
4875 | def __repr__(self): | |
4876 | return "<%s.%s; proxy of C++ wxDataObjectSimple instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
4877 | def __init__(self, *args, **kwargs): | |
4878 | """ | |
4879 | __init__(self, DataFormat format=FormatInvalid) -> DataObjectSimple | |
4880 | ||
4881 | Constructor accepts the supported format (none by default) which may | |
4882 | also be set later with `SetFormat`. | |
4883 | """ | |
4884 | newobj = _misc_.new_DataObjectSimple(*args, **kwargs) | |
4885 | self.this = newobj.this | |
4886 | self.thisown = 1 | |
4887 | del newobj.thisown | |
4888 | def GetFormat(*args, **kwargs): | |
4889 | """ | |
4890 | GetFormat(self) -> DataFormat | |
4891 | ||
4892 | Returns the (one and only one) format supported by this object. It is | |
4893 | assumed that the format is supported in both directions. | |
4894 | """ | |
4895 | return _misc_.DataObjectSimple_GetFormat(*args, **kwargs) | |
4896 | ||
4897 | def SetFormat(*args, **kwargs): | |
4898 | """ | |
4899 | SetFormat(self, DataFormat format) | |
4900 | ||
4901 | Sets the supported format. | |
4902 | """ | |
4903 | return _misc_.DataObjectSimple_SetFormat(*args, **kwargs) | |
4904 | ||
4905 | def GetDataSize(*args, **kwargs): | |
4906 | """ | |
4907 | GetDataSize(self) -> size_t | |
4908 | ||
4909 | Get the size of our data. | |
4910 | """ | |
4911 | return _misc_.DataObjectSimple_GetDataSize(*args, **kwargs) | |
4912 | ||
4913 | def GetDataHere(*args, **kwargs): | |
4914 | """ | |
4915 | GetDataHere(self) -> String | |
4916 | ||
4917 | Returns the data bytes from the data object as a string, returns None | |
4918 | on failure. Must be implemented in the derived class if the object | |
4919 | supports rendering its data. | |
4920 | """ | |
4921 | return _misc_.DataObjectSimple_GetDataHere(*args, **kwargs) | |
4922 | ||
4923 | def SetData(*args, **kwargs): | |
4924 | """ | |
4925 | SetData(self, String data) -> bool | |
4926 | ||
4927 | Copy the data value to the data object. Must be implemented in the | |
4928 | derived class if the object supports setting its data. | |
4929 | ||
4930 | """ | |
4931 | return _misc_.DataObjectSimple_SetData(*args, **kwargs) | |
4932 | ||
4933 | ||
4934 | class DataObjectSimplePtr(DataObjectSimple): | |
4935 | def __init__(self, this): | |
4936 | self.this = this | |
4937 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4938 | self.__class__ = DataObjectSimple | |
4939 | _misc_.DataObjectSimple_swigregister(DataObjectSimplePtr) | |
4940 | ||
4941 | class PyDataObjectSimple(DataObjectSimple): | |
4942 | """ | |
4943 | wx.PyDataObjectSimple is a version of `wx.DataObjectSimple` that is | |
4944 | Python-aware and knows how to reflect calls to its C++ virtual methods | |
4945 | to methods in the Python derived class. You should derive from this | |
4946 | class and overload `GetDataSize`, `GetDataHere` and `SetData` when you | |
4947 | need to create your own simple single-format type of `wx.DataObject`. | |
4948 | ||
4949 | """ | |
4950 | def __repr__(self): | |
4951 | return "<%s.%s; proxy of C++ wxPyDataObjectSimple instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
4952 | def __init__(self, *args, **kwargs): | |
4953 | """ | |
4954 | __init__(self, DataFormat format=FormatInvalid) -> PyDataObjectSimple | |
4955 | ||
4956 | wx.PyDataObjectSimple is a version of `wx.DataObjectSimple` that is | |
4957 | Python-aware and knows how to reflect calls to its C++ virtual methods | |
4958 | to methods in the Python derived class. You should derive from this | |
4959 | class and overload `GetDataSize`, `GetDataHere` and `SetData` when you | |
4960 | need to create your own simple single-format type of `wx.DataObject`. | |
4961 | ||
4962 | """ | |
4963 | newobj = _misc_.new_PyDataObjectSimple(*args, **kwargs) | |
4964 | self.this = newobj.this | |
4965 | self.thisown = 1 | |
4966 | del newobj.thisown | |
4967 | self._setCallbackInfo(self, PyDataObjectSimple) | |
4968 | ||
4969 | def _setCallbackInfo(*args, **kwargs): | |
4970 | """_setCallbackInfo(self, PyObject self, PyObject _class)""" | |
4971 | return _misc_.PyDataObjectSimple__setCallbackInfo(*args, **kwargs) | |
4972 | ||
4973 | ||
4974 | class PyDataObjectSimplePtr(PyDataObjectSimple): | |
4975 | def __init__(self, this): | |
4976 | self.this = this | |
4977 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4978 | self.__class__ = PyDataObjectSimple | |
4979 | _misc_.PyDataObjectSimple_swigregister(PyDataObjectSimplePtr) | |
4980 | ||
4981 | class DataObjectComposite(DataObject): | |
4982 | """ | |
4983 | wx.DataObjectComposite is the simplest `wx.DataObject` derivation | |
4984 | which may be sued to support multiple formats. It contains several | |
4985 | 'wx.DataObjectSimple` objects and supports any format supported by at | |
4986 | least one of them. Only one of these data objects is *preferred* (the | |
4987 | first one if not explicitly changed by using the second parameter of | |
4988 | `Add`) and its format determines the preferred format of the composite | |
4989 | data object as well. | |
4990 | ||
4991 | See `wx.DataObject` documentation for the reasons why you might prefer | |
4992 | to use wx.DataObject directly instead of wx.DataObjectComposite for | |
4993 | efficiency reasons. | |
4994 | ||
4995 | """ | |
4996 | def __repr__(self): | |
4997 | return "<%s.%s; proxy of C++ wxDataObjectComposite instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
4998 | def __init__(self, *args, **kwargs): | |
4999 | """ | |
5000 | __init__(self) -> DataObjectComposite | |
5001 | ||
5002 | wx.DataObjectComposite is the simplest `wx.DataObject` derivation | |
5003 | which may be sued to support multiple formats. It contains several | |
5004 | 'wx.DataObjectSimple` objects and supports any format supported by at | |
5005 | least one of them. Only one of these data objects is *preferred* (the | |
5006 | first one if not explicitly changed by using the second parameter of | |
5007 | `Add`) and its format determines the preferred format of the composite | |
5008 | data object as well. | |
5009 | ||
5010 | See `wx.DataObject` documentation for the reasons why you might prefer | |
5011 | to use wx.DataObject directly instead of wx.DataObjectComposite for | |
5012 | efficiency reasons. | |
5013 | ||
5014 | """ | |
5015 | newobj = _misc_.new_DataObjectComposite(*args, **kwargs) | |
5016 | self.this = newobj.this | |
5017 | self.thisown = 1 | |
5018 | del newobj.thisown | |
5019 | def Add(*args, **kwargs): | |
5020 | """ | |
5021 | Add(self, DataObjectSimple dataObject, bool preferred=False) | |
5022 | ||
5023 | Adds the dataObject to the list of supported objects and it becomes | |
5024 | the preferred object if preferred is True. | |
5025 | """ | |
5026 | return _misc_.DataObjectComposite_Add(*args, **kwargs) | |
5027 | ||
5028 | ||
5029 | class DataObjectCompositePtr(DataObjectComposite): | |
5030 | def __init__(self, this): | |
5031 | self.this = this | |
5032 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5033 | self.__class__ = DataObjectComposite | |
5034 | _misc_.DataObjectComposite_swigregister(DataObjectCompositePtr) | |
5035 | ||
5036 | class TextDataObject(DataObjectSimple): | |
5037 | """ | |
5038 | wx.TextDataObject is a specialization of `wx.DataObject` for text | |
5039 | data. It can be used without change to paste data into the `wx.Clipboard` | |
5040 | or a `wx.DropSource`. | |
5041 | ||
5042 | Alternativly, you may wish to derive a new class from the | |
5043 | `wx.PyTextDataObject` class for providing text on-demand in order to | |
5044 | minimize memory consumption when offering data in several formats, | |
5045 | such as plain text and RTF, because by default the text is stored in a | |
5046 | string in this class, but it might as well be generated on demand when | |
5047 | requested. For this, `GetTextLength` and `GetText` will have to be | |
5048 | overridden. | |
5049 | """ | |
5050 | def __repr__(self): | |
5051 | return "<%s.%s; proxy of C++ wxTextDataObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5052 | def __init__(self, *args, **kwargs): | |
5053 | """ | |
5054 | __init__(self, String text=EmptyString) -> TextDataObject | |
5055 | ||
5056 | Constructor, may be used to initialise the text (otherwise `SetText` | |
5057 | should be used later). | |
5058 | """ | |
5059 | newobj = _misc_.new_TextDataObject(*args, **kwargs) | |
5060 | self.this = newobj.this | |
5061 | self.thisown = 1 | |
5062 | del newobj.thisown | |
5063 | def GetTextLength(*args, **kwargs): | |
5064 | """ | |
5065 | GetTextLength(self) -> size_t | |
5066 | ||
5067 | Returns the data size. By default, returns the size of the text data | |
5068 | set in the constructor or using `SetText`. This can be overridden (via | |
5069 | `wx.PyTextDataObject`) to provide text size data on-demand. It is | |
5070 | recommended to return the text length plus 1 for a trailing zero, but | |
5071 | this is not strictly required. | |
5072 | """ | |
5073 | return _misc_.TextDataObject_GetTextLength(*args, **kwargs) | |
5074 | ||
5075 | def GetText(*args, **kwargs): | |
5076 | """ | |
5077 | GetText(self) -> String | |
5078 | ||
5079 | Returns the text associated with the data object. | |
5080 | """ | |
5081 | return _misc_.TextDataObject_GetText(*args, **kwargs) | |
5082 | ||
5083 | def SetText(*args, **kwargs): | |
5084 | """ | |
5085 | SetText(self, String text) | |
5086 | ||
5087 | Sets the text associated with the data object. This method is called | |
5088 | when the data object receives the data and, by default, copies the | |
5089 | text into the member variable. If you want to process the text on the | |
5090 | fly you may wish to override this function (via | |
5091 | `wx.PyTextDataObject`.) | |
5092 | """ | |
5093 | return _misc_.TextDataObject_SetText(*args, **kwargs) | |
5094 | ||
5095 | ||
5096 | class TextDataObjectPtr(TextDataObject): | |
5097 | def __init__(self, this): | |
5098 | self.this = this | |
5099 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5100 | self.__class__ = TextDataObject | |
5101 | _misc_.TextDataObject_swigregister(TextDataObjectPtr) | |
5102 | ||
5103 | class PyTextDataObject(TextDataObject): | |
5104 | """ | |
5105 | wx.PyTextDataObject is a version of `wx.TextDataObject` that is | |
5106 | Python-aware and knows how to reflect calls to its C++ virtual methods | |
5107 | to methods in the Python derived class. You should derive from this | |
5108 | class and overload `GetTextLength`, `GetText`, and `SetText` when you | |
5109 | want to be able to provide text on demand instead of preloading it | |
5110 | into the data object. | |
5111 | """ | |
5112 | def __repr__(self): | |
5113 | return "<%s.%s; proxy of C++ wxPyTextDataObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5114 | def __init__(self, *args, **kwargs): | |
5115 | """ | |
5116 | __init__(self, String text=EmptyString) -> PyTextDataObject | |
5117 | ||
5118 | wx.PyTextDataObject is a version of `wx.TextDataObject` that is | |
5119 | Python-aware and knows how to reflect calls to its C++ virtual methods | |
5120 | to methods in the Python derived class. You should derive from this | |
5121 | class and overload `GetTextLength`, `GetText`, and `SetText` when you | |
5122 | want to be able to provide text on demand instead of preloading it | |
5123 | into the data object. | |
5124 | """ | |
5125 | newobj = _misc_.new_PyTextDataObject(*args, **kwargs) | |
5126 | self.this = newobj.this | |
5127 | self.thisown = 1 | |
5128 | del newobj.thisown | |
5129 | self._setCallbackInfo(self, PyTextDataObject) | |
5130 | ||
5131 | def _setCallbackInfo(*args, **kwargs): | |
5132 | """_setCallbackInfo(self, PyObject self, PyObject _class)""" | |
5133 | return _misc_.PyTextDataObject__setCallbackInfo(*args, **kwargs) | |
5134 | ||
5135 | ||
5136 | class PyTextDataObjectPtr(PyTextDataObject): | |
5137 | def __init__(self, this): | |
5138 | self.this = this | |
5139 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5140 | self.__class__ = PyTextDataObject | |
5141 | _misc_.PyTextDataObject_swigregister(PyTextDataObjectPtr) | |
5142 | ||
5143 | class BitmapDataObject(DataObjectSimple): | |
5144 | """ | |
5145 | wx.BitmapDataObject is a specialization of wxDataObject for bitmap | |
5146 | data. It can be used without change to paste data into the `wx.Clipboard` | |
5147 | or a `wx.DropSource`. | |
5148 | ||
5149 | """ | |
5150 | def __repr__(self): | |
5151 | return "<%s.%s; proxy of C++ wxBitmapDataObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5152 | def __init__(self, *args, **kwargs): | |
5153 | """ | |
5154 | __init__(self, Bitmap bitmap=wxNullBitmap) -> BitmapDataObject | |
5155 | ||
5156 | Constructor, optionally passing a bitmap (otherwise use `SetBitmap` | |
5157 | later). | |
5158 | """ | |
5159 | newobj = _misc_.new_BitmapDataObject(*args, **kwargs) | |
5160 | self.this = newobj.this | |
5161 | self.thisown = 1 | |
5162 | del newobj.thisown | |
5163 | def GetBitmap(*args, **kwargs): | |
5164 | """ | |
5165 | GetBitmap(self) -> Bitmap | |
5166 | ||
5167 | Returns the bitmap associated with the data object. You may wish to | |
5168 | override this method (by deriving from `wx.PyBitmapDataObject`) when | |
5169 | offering data on-demand, but this is not required by wxWidgets' | |
5170 | internals. Use this method to get data in bitmap form from the | |
5171 | `wx.Clipboard`. | |
5172 | """ | |
5173 | return _misc_.BitmapDataObject_GetBitmap(*args, **kwargs) | |
5174 | ||
5175 | def SetBitmap(*args, **kwargs): | |
5176 | """ | |
5177 | SetBitmap(self, Bitmap bitmap) | |
5178 | ||
5179 | Sets the bitmap associated with the data object. This method is called | |
5180 | when the data object receives data. Usually there will be no reason to | |
5181 | override this function. | |
5182 | """ | |
5183 | return _misc_.BitmapDataObject_SetBitmap(*args, **kwargs) | |
5184 | ||
5185 | ||
5186 | class BitmapDataObjectPtr(BitmapDataObject): | |
5187 | def __init__(self, this): | |
5188 | self.this = this | |
5189 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5190 | self.__class__ = BitmapDataObject | |
5191 | _misc_.BitmapDataObject_swigregister(BitmapDataObjectPtr) | |
5192 | ||
5193 | class PyBitmapDataObject(BitmapDataObject): | |
5194 | """ | |
5195 | wx.PyBitmapDataObject is a version of `wx.BitmapDataObject` that is | |
5196 | Python-aware and knows how to reflect calls to its C++ virtual methods | |
5197 | to methods in the Python derived class. To be able to provide bitmap | |
5198 | data on demand derive from this class and overload `GetBitmap`. | |
5199 | """ | |
5200 | def __repr__(self): | |
5201 | return "<%s.%s; proxy of C++ wxPyBitmapDataObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5202 | def __init__(self, *args, **kwargs): | |
5203 | """ | |
5204 | __init__(self, Bitmap bitmap=wxNullBitmap) -> PyBitmapDataObject | |
5205 | ||
5206 | wx.PyBitmapDataObject is a version of `wx.BitmapDataObject` that is | |
5207 | Python-aware and knows how to reflect calls to its C++ virtual methods | |
5208 | to methods in the Python derived class. To be able to provide bitmap | |
5209 | data on demand derive from this class and overload `GetBitmap`. | |
5210 | """ | |
5211 | newobj = _misc_.new_PyBitmapDataObject(*args, **kwargs) | |
5212 | self.this = newobj.this | |
5213 | self.thisown = 1 | |
5214 | del newobj.thisown | |
5215 | self._setCallbackInfo(self, PyBitmapDataObject) | |
5216 | ||
5217 | def _setCallbackInfo(*args, **kwargs): | |
5218 | """_setCallbackInfo(self, PyObject self, PyObject _class)""" | |
5219 | return _misc_.PyBitmapDataObject__setCallbackInfo(*args, **kwargs) | |
5220 | ||
5221 | ||
5222 | class PyBitmapDataObjectPtr(PyBitmapDataObject): | |
5223 | def __init__(self, this): | |
5224 | self.this = this | |
5225 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5226 | self.__class__ = PyBitmapDataObject | |
5227 | _misc_.PyBitmapDataObject_swigregister(PyBitmapDataObjectPtr) | |
5228 | ||
5229 | class FileDataObject(DataObjectSimple): | |
5230 | """ | |
5231 | wx.FileDataObject is a specialization of `wx.DataObjectSimple` for | |
5232 | file names. The program works with it just as if it were a list of | |
5233 | absolute file names, but internally it uses the same format as | |
5234 | Explorer and other compatible programs under Windows or GNOME/KDE | |
5235 | filemanager under Unix which makes it possible to receive files from | |
5236 | them using this class. | |
5237 | """ | |
5238 | def __repr__(self): | |
5239 | return "<%s.%s; proxy of C++ wxFileDataObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5240 | def __init__(self, *args, **kwargs): | |
5241 | """__init__(self) -> FileDataObject""" | |
5242 | newobj = _misc_.new_FileDataObject(*args, **kwargs) | |
5243 | self.this = newobj.this | |
5244 | self.thisown = 1 | |
5245 | del newobj.thisown | |
5246 | def GetFilenames(*args, **kwargs): | |
5247 | """ | |
5248 | GetFilenames(self) -> [names] | |
5249 | ||
5250 | Returns a list of file names. | |
5251 | """ | |
5252 | return _misc_.FileDataObject_GetFilenames(*args, **kwargs) | |
5253 | ||
5254 | def AddFile(*args, **kwargs): | |
5255 | """ | |
5256 | AddFile(self, String filename) | |
5257 | ||
5258 | Adds a file to the list of files represented by this data object. | |
5259 | """ | |
5260 | return _misc_.FileDataObject_AddFile(*args, **kwargs) | |
5261 | ||
5262 | ||
5263 | class FileDataObjectPtr(FileDataObject): | |
5264 | def __init__(self, this): | |
5265 | self.this = this | |
5266 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5267 | self.__class__ = FileDataObject | |
5268 | _misc_.FileDataObject_swigregister(FileDataObjectPtr) | |
5269 | ||
5270 | class CustomDataObject(DataObjectSimple): | |
5271 | """ | |
5272 | wx.CustomDataObject is a specialization of `wx.DataObjectSimple` for | |
5273 | some application-specific data in arbitrary format. Python strings | |
5274 | are used for getting and setting data, but any picklable object can | |
5275 | easily be transfered via strings. A copy of the data is stored in the | |
5276 | data object. | |
5277 | """ | |
5278 | def __repr__(self): | |
5279 | return "<%s.%s; proxy of C++ wxCustomDataObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5280 | def __init__(self, *args): | |
5281 | """ | |
5282 | __init__(self, DataFormat format) -> CustomDataObject | |
5283 | __init__(self, String formatName) -> CustomDataObject | |
5284 | __init__(self) -> CustomDataObject | |
5285 | ||
5286 | wx.CustomDataObject is a specialization of `wx.DataObjectSimple` for | |
5287 | some application-specific data in arbitrary format. Python strings | |
5288 | are used for getting and setting data, but any picklable object can | |
5289 | easily be transfered via strings. A copy of the data is stored in the | |
5290 | data object. | |
5291 | """ | |
5292 | newobj = _misc_.new_CustomDataObject(*args) | |
5293 | self.this = newobj.this | |
5294 | self.thisown = 1 | |
5295 | del newobj.thisown | |
5296 | def SetData(*args, **kwargs): | |
5297 | """ | |
5298 | SetData(self, String data) -> bool | |
5299 | ||
5300 | Copy the data value to the data object. | |
5301 | """ | |
5302 | return _misc_.CustomDataObject_SetData(*args, **kwargs) | |
5303 | ||
5304 | TakeData = SetData | |
5305 | def GetSize(*args, **kwargs): | |
5306 | """ | |
5307 | GetSize(self) -> size_t | |
5308 | ||
5309 | Get the size of the data. | |
5310 | """ | |
5311 | return _misc_.CustomDataObject_GetSize(*args, **kwargs) | |
5312 | ||
5313 | def GetData(*args, **kwargs): | |
5314 | """ | |
5315 | GetData(self) -> String | |
5316 | ||
5317 | Returns the data bytes from the data object as a string. | |
5318 | """ | |
5319 | return _misc_.CustomDataObject_GetData(*args, **kwargs) | |
5320 | ||
5321 | ||
5322 | class CustomDataObjectPtr(CustomDataObject): | |
5323 | def __init__(self, this): | |
5324 | self.this = this | |
5325 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5326 | self.__class__ = CustomDataObject | |
5327 | _misc_.CustomDataObject_swigregister(CustomDataObjectPtr) | |
5328 | ||
5329 | class URLDataObject(DataObject): | |
5330 | """ | |
5331 | This data object holds a URL in a format that is compatible with some | |
5332 | browsers such that it is able to be dragged to or from them. | |
5333 | """ | |
5334 | def __repr__(self): | |
5335 | return "<%s.%s; proxy of C++ wxURLDataObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5336 | def __init__(self, *args, **kwargs): | |
5337 | """ | |
5338 | __init__(self) -> URLDataObject | |
5339 | ||
5340 | This data object holds a URL in a format that is compatible with some | |
5341 | browsers such that it is able to be dragged to or from them. | |
5342 | """ | |
5343 | newobj = _misc_.new_URLDataObject(*args, **kwargs) | |
5344 | self.this = newobj.this | |
5345 | self.thisown = 1 | |
5346 | del newobj.thisown | |
5347 | def GetURL(*args, **kwargs): | |
5348 | """ | |
5349 | GetURL(self) -> String | |
5350 | ||
5351 | Returns a string containing the current URL. | |
5352 | """ | |
5353 | return _misc_.URLDataObject_GetURL(*args, **kwargs) | |
5354 | ||
5355 | def SetURL(*args, **kwargs): | |
5356 | """ | |
5357 | SetURL(self, String url) | |
5358 | ||
5359 | Set the URL. | |
5360 | """ | |
5361 | return _misc_.URLDataObject_SetURL(*args, **kwargs) | |
5362 | ||
5363 | ||
5364 | class URLDataObjectPtr(URLDataObject): | |
5365 | def __init__(self, this): | |
5366 | self.this = this | |
5367 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5368 | self.__class__ = URLDataObject | |
5369 | _misc_.URLDataObject_swigregister(URLDataObjectPtr) | |
5370 | ||
5371 | class MetafileDataObject(DataObjectSimple): | |
5372 | """Proxy of C++ MetafileDataObject class""" | |
5373 | def __repr__(self): | |
5374 | return "<%s.%s; proxy of C++ wxMetafileDataObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5375 | def __init__(self, *args, **kwargs): | |
5376 | """__init__(self) -> MetafileDataObject""" | |
5377 | newobj = _misc_.new_MetafileDataObject(*args, **kwargs) | |
5378 | self.this = newobj.this | |
5379 | self.thisown = 1 | |
5380 | del newobj.thisown | |
5381 | ||
5382 | class MetafileDataObjectPtr(MetafileDataObject): | |
5383 | def __init__(self, this): | |
5384 | self.this = this | |
5385 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5386 | self.__class__ = MetafileDataObject | |
5387 | _misc_.MetafileDataObject_swigregister(MetafileDataObjectPtr) | |
5388 | ||
5389 | #--------------------------------------------------------------------------- | |
5390 | ||
5391 | Drag_CopyOnly = _misc_.Drag_CopyOnly | |
5392 | Drag_AllowMove = _misc_.Drag_AllowMove | |
5393 | Drag_DefaultMove = _misc_.Drag_DefaultMove | |
5394 | DragError = _misc_.DragError | |
5395 | DragNone = _misc_.DragNone | |
5396 | DragCopy = _misc_.DragCopy | |
5397 | DragMove = _misc_.DragMove | |
5398 | DragLink = _misc_.DragLink | |
5399 | DragCancel = _misc_.DragCancel | |
5400 | ||
5401 | def IsDragResultOk(*args, **kwargs): | |
5402 | """IsDragResultOk(int res) -> bool""" | |
5403 | return _misc_.IsDragResultOk(*args, **kwargs) | |
5404 | class DropSource(object): | |
5405 | """Proxy of C++ DropSource class""" | |
5406 | def __repr__(self): | |
5407 | return "<%s.%s; proxy of C++ wxPyDropSource instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5408 | def __init__(self, *args, **kwargs): | |
5409 | """ | |
5410 | __init__(self, Window win, Icon copy=wxNullIcon, Icon move=wxNullIcon, | |
5411 | Icon none=wxNullIcon) -> DropSource | |
5412 | """ | |
5413 | newobj = _misc_.new_DropSource(*args, **kwargs) | |
5414 | self.this = newobj.this | |
5415 | self.thisown = 1 | |
5416 | del newobj.thisown | |
5417 | self._setCallbackInfo(self, DropSource, 0) | |
5418 | ||
5419 | def _setCallbackInfo(*args, **kwargs): | |
5420 | """_setCallbackInfo(self, PyObject self, PyObject _class, int incref)""" | |
5421 | return _misc_.DropSource__setCallbackInfo(*args, **kwargs) | |
5422 | ||
5423 | def __del__(self, destroy=_misc_.delete_DropSource): | |
5424 | """__del__(self)""" | |
5425 | try: | |
5426 | if self.thisown: destroy(self) | |
5427 | except: pass | |
5428 | ||
5429 | def SetData(*args, **kwargs): | |
5430 | """SetData(self, DataObject data)""" | |
5431 | return _misc_.DropSource_SetData(*args, **kwargs) | |
5432 | ||
5433 | def GetDataObject(*args, **kwargs): | |
5434 | """GetDataObject(self) -> DataObject""" | |
5435 | return _misc_.DropSource_GetDataObject(*args, **kwargs) | |
5436 | ||
5437 | def SetCursor(*args, **kwargs): | |
5438 | """SetCursor(self, int res, Cursor cursor)""" | |
5439 | return _misc_.DropSource_SetCursor(*args, **kwargs) | |
5440 | ||
5441 | def DoDragDrop(*args, **kwargs): | |
5442 | """DoDragDrop(self, int flags=Drag_CopyOnly) -> int""" | |
5443 | return _misc_.DropSource_DoDragDrop(*args, **kwargs) | |
5444 | ||
5445 | def base_GiveFeedback(*args, **kwargs): | |
5446 | """base_GiveFeedback(self, int effect) -> bool""" | |
5447 | return _misc_.DropSource_base_GiveFeedback(*args, **kwargs) | |
5448 | ||
5449 | ||
5450 | class DropSourcePtr(DropSource): | |
5451 | def __init__(self, this): | |
5452 | self.this = this | |
5453 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5454 | self.__class__ = DropSource | |
5455 | _misc_.DropSource_swigregister(DropSourcePtr) | |
5456 | ||
5457 | def DROP_ICON(filename): | |
5458 | """ | |
5459 | Returns either a `wx.Cursor` or `wx.Icon` created from the image file | |
5460 | ``filename``. This function is useful with the `wx.DropSource` class | |
5461 | which, depending on platform accepts either a icon or a cursor. | |
5462 | """ | |
5463 | img = wx.Image(filename) | |
5464 | if wx.Platform == '__WXGTK__': | |
5465 | return wx.IconFromBitmap(wx.BitmapFromImage(img)) | |
5466 | else: | |
5467 | return wx.CursorFromImage(img) | |
5468 | ||
5469 | class DropTarget(object): | |
5470 | """Proxy of C++ DropTarget class""" | |
5471 | def __repr__(self): | |
5472 | return "<%s.%s; proxy of C++ wxPyDropTarget instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5473 | def __init__(self, *args, **kwargs): | |
5474 | """__init__(self, DataObject dataObject=None) -> DropTarget""" | |
5475 | newobj = _misc_.new_DropTarget(*args, **kwargs) | |
5476 | self.this = newobj.this | |
5477 | self.thisown = 1 | |
5478 | del newobj.thisown | |
5479 | self._setCallbackInfo(self, DropTarget) | |
5480 | ||
5481 | def _setCallbackInfo(*args, **kwargs): | |
5482 | """_setCallbackInfo(self, PyObject self, PyObject _class)""" | |
5483 | return _misc_.DropTarget__setCallbackInfo(*args, **kwargs) | |
5484 | ||
5485 | def __del__(self, destroy=_misc_.delete_DropTarget): | |
5486 | """__del__(self)""" | |
5487 | try: | |
5488 | if self.thisown: destroy(self) | |
5489 | except: pass | |
5490 | ||
5491 | def GetDataObject(*args, **kwargs): | |
5492 | """GetDataObject(self) -> DataObject""" | |
5493 | return _misc_.DropTarget_GetDataObject(*args, **kwargs) | |
5494 | ||
5495 | def SetDataObject(*args, **kwargs): | |
5496 | """SetDataObject(self, DataObject dataObject)""" | |
5497 | return _misc_.DropTarget_SetDataObject(*args, **kwargs) | |
5498 | ||
5499 | def base_OnEnter(*args, **kwargs): | |
5500 | """base_OnEnter(self, int x, int y, int def) -> int""" | |
5501 | return _misc_.DropTarget_base_OnEnter(*args, **kwargs) | |
5502 | ||
5503 | def base_OnDragOver(*args, **kwargs): | |
5504 | """base_OnDragOver(self, int x, int y, int def) -> int""" | |
5505 | return _misc_.DropTarget_base_OnDragOver(*args, **kwargs) | |
5506 | ||
5507 | def base_OnLeave(*args, **kwargs): | |
5508 | """base_OnLeave(self)""" | |
5509 | return _misc_.DropTarget_base_OnLeave(*args, **kwargs) | |
5510 | ||
5511 | def base_OnDrop(*args, **kwargs): | |
5512 | """base_OnDrop(self, int x, int y) -> bool""" | |
5513 | return _misc_.DropTarget_base_OnDrop(*args, **kwargs) | |
5514 | ||
5515 | def GetData(*args, **kwargs): | |
5516 | """GetData(self) -> bool""" | |
5517 | return _misc_.DropTarget_GetData(*args, **kwargs) | |
5518 | ||
5519 | def SetDefaultAction(*args, **kwargs): | |
5520 | """SetDefaultAction(self, int action)""" | |
5521 | return _misc_.DropTarget_SetDefaultAction(*args, **kwargs) | |
5522 | ||
5523 | def GetDefaultAction(*args, **kwargs): | |
5524 | """GetDefaultAction(self) -> int""" | |
5525 | return _misc_.DropTarget_GetDefaultAction(*args, **kwargs) | |
5526 | ||
5527 | ||
5528 | class DropTargetPtr(DropTarget): | |
5529 | def __init__(self, this): | |
5530 | self.this = this | |
5531 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5532 | self.__class__ = DropTarget | |
5533 | _misc_.DropTarget_swigregister(DropTargetPtr) | |
5534 | ||
5535 | PyDropTarget = DropTarget | |
5536 | class TextDropTarget(DropTarget): | |
5537 | """Proxy of C++ TextDropTarget class""" | |
5538 | def __repr__(self): | |
5539 | return "<%s.%s; proxy of C++ wxPyTextDropTarget instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5540 | def __init__(self, *args, **kwargs): | |
5541 | """__init__(self) -> TextDropTarget""" | |
5542 | newobj = _misc_.new_TextDropTarget(*args, **kwargs) | |
5543 | self.this = newobj.this | |
5544 | self.thisown = 1 | |
5545 | del newobj.thisown | |
5546 | self._setCallbackInfo(self, TextDropTarget) | |
5547 | ||
5548 | def _setCallbackInfo(*args, **kwargs): | |
5549 | """_setCallbackInfo(self, PyObject self, PyObject _class)""" | |
5550 | return _misc_.TextDropTarget__setCallbackInfo(*args, **kwargs) | |
5551 | ||
5552 | def base_OnEnter(*args, **kwargs): | |
5553 | """base_OnEnter(self, int x, int y, int def) -> int""" | |
5554 | return _misc_.TextDropTarget_base_OnEnter(*args, **kwargs) | |
5555 | ||
5556 | def base_OnDragOver(*args, **kwargs): | |
5557 | """base_OnDragOver(self, int x, int y, int def) -> int""" | |
5558 | return _misc_.TextDropTarget_base_OnDragOver(*args, **kwargs) | |
5559 | ||
5560 | def base_OnLeave(*args, **kwargs): | |
5561 | """base_OnLeave(self)""" | |
5562 | return _misc_.TextDropTarget_base_OnLeave(*args, **kwargs) | |
5563 | ||
5564 | def base_OnDrop(*args, **kwargs): | |
5565 | """base_OnDrop(self, int x, int y) -> bool""" | |
5566 | return _misc_.TextDropTarget_base_OnDrop(*args, **kwargs) | |
5567 | ||
5568 | def base_OnData(*args, **kwargs): | |
5569 | """base_OnData(self, int x, int y, int def) -> int""" | |
5570 | return _misc_.TextDropTarget_base_OnData(*args, **kwargs) | |
5571 | ||
5572 | ||
5573 | class TextDropTargetPtr(TextDropTarget): | |
5574 | def __init__(self, this): | |
5575 | self.this = this | |
5576 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5577 | self.__class__ = TextDropTarget | |
5578 | _misc_.TextDropTarget_swigregister(TextDropTargetPtr) | |
5579 | ||
5580 | class FileDropTarget(DropTarget): | |
5581 | """Proxy of C++ FileDropTarget class""" | |
5582 | def __repr__(self): | |
5583 | return "<%s.%s; proxy of C++ wxPyFileDropTarget instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5584 | def __init__(self, *args, **kwargs): | |
5585 | """__init__(self) -> FileDropTarget""" | |
5586 | newobj = _misc_.new_FileDropTarget(*args, **kwargs) | |
5587 | self.this = newobj.this | |
5588 | self.thisown = 1 | |
5589 | del newobj.thisown | |
5590 | self._setCallbackInfo(self, FileDropTarget) | |
5591 | ||
5592 | def _setCallbackInfo(*args, **kwargs): | |
5593 | """_setCallbackInfo(self, PyObject self, PyObject _class)""" | |
5594 | return _misc_.FileDropTarget__setCallbackInfo(*args, **kwargs) | |
5595 | ||
5596 | def base_OnEnter(*args, **kwargs): | |
5597 | """base_OnEnter(self, int x, int y, int def) -> int""" | |
5598 | return _misc_.FileDropTarget_base_OnEnter(*args, **kwargs) | |
5599 | ||
5600 | def base_OnDragOver(*args, **kwargs): | |
5601 | """base_OnDragOver(self, int x, int y, int def) -> int""" | |
5602 | return _misc_.FileDropTarget_base_OnDragOver(*args, **kwargs) | |
5603 | ||
5604 | def base_OnLeave(*args, **kwargs): | |
5605 | """base_OnLeave(self)""" | |
5606 | return _misc_.FileDropTarget_base_OnLeave(*args, **kwargs) | |
5607 | ||
5608 | def base_OnDrop(*args, **kwargs): | |
5609 | """base_OnDrop(self, int x, int y) -> bool""" | |
5610 | return _misc_.FileDropTarget_base_OnDrop(*args, **kwargs) | |
5611 | ||
5612 | def base_OnData(*args, **kwargs): | |
5613 | """base_OnData(self, int x, int y, int def) -> int""" | |
5614 | return _misc_.FileDropTarget_base_OnData(*args, **kwargs) | |
5615 | ||
5616 | ||
5617 | class FileDropTargetPtr(FileDropTarget): | |
5618 | def __init__(self, this): | |
5619 | self.this = this | |
5620 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5621 | self.__class__ = FileDropTarget | |
5622 | _misc_.FileDropTarget_swigregister(FileDropTargetPtr) | |
5623 | ||
5624 | #--------------------------------------------------------------------------- | |
5625 | ||
5626 | class Clipboard(_core.Object): | |
5627 | """ | |
5628 | wx.Clipboard represents the system clipboard and provides methods to | |
5629 | copy data to it or paste data from it. Normally, you should only use | |
5630 | ``wx.TheClipboard`` which is a reference to a global wx.Clipboard | |
5631 | instance. | |
5632 | ||
5633 | Call ``wx.TheClipboard``'s `Open` method to get ownership of the | |
5634 | clipboard. If this operation returns True, you now own the | |
5635 | clipboard. Call `SetData` to put data on the clipboard, or `GetData` | |
5636 | to retrieve data from the clipboard. Call `Close` to close the | |
5637 | clipboard and relinquish ownership. You should keep the clipboard open | |
5638 | only momentarily. | |
5639 | ||
5640 | :see: `wx.DataObject` | |
5641 | ||
5642 | """ | |
5643 | def __repr__(self): | |
5644 | return "<%s.%s; proxy of C++ wxClipboard instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5645 | def __init__(self, *args, **kwargs): | |
5646 | """__init__(self) -> Clipboard""" | |
5647 | newobj = _misc_.new_Clipboard(*args, **kwargs) | |
5648 | self.this = newobj.this | |
5649 | self.thisown = 1 | |
5650 | del newobj.thisown | |
5651 | def __del__(self, destroy=_misc_.delete_Clipboard): | |
5652 | """__del__(self)""" | |
5653 | try: | |
5654 | if self.thisown: destroy(self) | |
5655 | except: pass | |
5656 | ||
5657 | def Open(*args, **kwargs): | |
5658 | """ | |
5659 | Open(self) -> bool | |
5660 | ||
5661 | Call this function to open the clipboard before calling SetData and | |
5662 | GetData. Call Close when you have finished with the clipboard. You | |
5663 | should keep the clipboard open for only a very short time. Returns | |
5664 | True on success. | |
5665 | """ | |
5666 | return _misc_.Clipboard_Open(*args, **kwargs) | |
5667 | ||
5668 | def Close(*args, **kwargs): | |
5669 | """ | |
5670 | Close(self) | |
5671 | ||
5672 | Closes the clipboard. | |
5673 | """ | |
5674 | return _misc_.Clipboard_Close(*args, **kwargs) | |
5675 | ||
5676 | def IsOpened(*args, **kwargs): | |
5677 | """ | |
5678 | IsOpened(self) -> bool | |
5679 | ||
5680 | Query whether the clipboard is opened | |
5681 | """ | |
5682 | return _misc_.Clipboard_IsOpened(*args, **kwargs) | |
5683 | ||
5684 | def AddData(*args, **kwargs): | |
5685 | """ | |
5686 | AddData(self, DataObject data) -> bool | |
5687 | ||
5688 | Call this function to add the data object to the clipboard. You may | |
5689 | call this function repeatedly after having cleared the clipboard. | |
5690 | After this function has been called, the clipboard owns the data, so | |
5691 | do not delete the data explicitly. | |
5692 | ||
5693 | :see: `wx.DataObject` | |
5694 | """ | |
5695 | return _misc_.Clipboard_AddData(*args, **kwargs) | |
5696 | ||
5697 | def SetData(*args, **kwargs): | |
5698 | """ | |
5699 | SetData(self, DataObject data) -> bool | |
5700 | ||
5701 | Set the clipboard data, this is the same as `Clear` followed by | |
5702 | `AddData`. | |
5703 | ||
5704 | :see: `wx.DataObject` | |
5705 | """ | |
5706 | return _misc_.Clipboard_SetData(*args, **kwargs) | |
5707 | ||
5708 | def IsSupported(*args, **kwargs): | |
5709 | """ | |
5710 | IsSupported(self, DataFormat format) -> bool | |
5711 | ||
5712 | Returns True if the given format is available in the data object(s) on | |
5713 | the clipboard. | |
5714 | """ | |
5715 | return _misc_.Clipboard_IsSupported(*args, **kwargs) | |
5716 | ||
5717 | def GetData(*args, **kwargs): | |
5718 | """ | |
5719 | GetData(self, DataObject data) -> bool | |
5720 | ||
5721 | Call this function to fill data with data on the clipboard, if | |
5722 | available in the required format. Returns true on success. | |
5723 | """ | |
5724 | return _misc_.Clipboard_GetData(*args, **kwargs) | |
5725 | ||
5726 | def Clear(*args, **kwargs): | |
5727 | """ | |
5728 | Clear(self) | |
5729 | ||
5730 | Clears data from the clipboard object and also the system's clipboard | |
5731 | if possible. | |
5732 | """ | |
5733 | return _misc_.Clipboard_Clear(*args, **kwargs) | |
5734 | ||
5735 | def Flush(*args, **kwargs): | |
5736 | """ | |
5737 | Flush(self) -> bool | |
5738 | ||
5739 | Flushes the clipboard: this means that the data which is currently on | |
5740 | clipboard will stay available even after the application exits, | |
5741 | possibly eating memory, otherwise the clipboard will be emptied on | |
5742 | exit. Returns False if the operation is unsuccesful for any reason. | |
5743 | """ | |
5744 | return _misc_.Clipboard_Flush(*args, **kwargs) | |
5745 | ||
5746 | def UsePrimarySelection(*args, **kwargs): | |
5747 | """ | |
5748 | UsePrimarySelection(self, bool primary=True) | |
5749 | ||
5750 | On platforms supporting it (the X11 based platforms), selects the | |
5751 | so called PRIMARY SELECTION as the clipboard as opposed to the | |
5752 | normal clipboard, if primary is True. | |
5753 | """ | |
5754 | return _misc_.Clipboard_UsePrimarySelection(*args, **kwargs) | |
5755 | ||
5756 | def Get(*args, **kwargs): | |
5757 | """ | |
5758 | Get() -> Clipboard | |
5759 | ||
5760 | Returns global instance (wxTheClipboard) of the object. | |
5761 | """ | |
5762 | return _misc_.Clipboard_Get(*args, **kwargs) | |
5763 | ||
5764 | Get = staticmethod(Get) | |
5765 | ||
5766 | class ClipboardPtr(Clipboard): | |
5767 | def __init__(self, this): | |
5768 | self.this = this | |
5769 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5770 | self.__class__ = Clipboard | |
5771 | _misc_.Clipboard_swigregister(ClipboardPtr) | |
5772 | ||
5773 | def Clipboard_Get(*args, **kwargs): | |
5774 | """ | |
5775 | Clipboard_Get() -> Clipboard | |
5776 | ||
5777 | Returns global instance (wxTheClipboard) of the object. | |
5778 | """ | |
5779 | return _misc_.Clipboard_Get(*args, **kwargs) | |
5780 | ||
5781 | class _wxPyDelayedInitWrapper(object): | |
5782 | def __init__(self, initfunc, *args, **kwargs): | |
5783 | self._initfunc = initfunc | |
5784 | self._args = args | |
5785 | self._kwargs = kwargs | |
5786 | self._instance = None | |
5787 | def _checkInstance(self): | |
5788 | if self._instance is None: | |
5789 | if wx.GetApp(): | |
5790 | self._instance = self._initfunc(*self._args, **self._kwargs) | |
5791 | def __getattr__(self, name): | |
5792 | self._checkInstance() | |
5793 | return getattr(self._instance, name) | |
5794 | def __repr__(self): | |
5795 | self._checkInstance() | |
5796 | return repr(self._instance) | |
5797 | TheClipboard = _wxPyDelayedInitWrapper(Clipboard.Get) | |
5798 | ||
5799 | class ClipboardLocker(object): | |
5800 | """ | |
5801 | A helpful class for opening the clipboard and automatically | |
5802 | closing it when the locker is destroyed. | |
5803 | """ | |
5804 | def __repr__(self): | |
5805 | return "<%s.%s; proxy of C++ wxClipboardLocker instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5806 | def __init__(self, *args, **kwargs): | |
5807 | """ | |
5808 | __init__(self, Clipboard clipboard=None) -> ClipboardLocker | |
5809 | ||
5810 | A helpful class for opening the clipboard and automatically | |
5811 | closing it when the locker is destroyed. | |
5812 | """ | |
5813 | newobj = _misc_.new_ClipboardLocker(*args, **kwargs) | |
5814 | self.this = newobj.this | |
5815 | self.thisown = 1 | |
5816 | del newobj.thisown | |
5817 | def __del__(self, destroy=_misc_.delete_ClipboardLocker): | |
5818 | """__del__(self)""" | |
5819 | try: | |
5820 | if self.thisown: destroy(self) | |
5821 | except: pass | |
5822 | ||
5823 | def __nonzero__(*args, **kwargs): | |
5824 | """ | |
5825 | __nonzero__(self) -> bool | |
5826 | ||
5827 | A ClipboardLocker instance evaluates to True if the clipboard was | |
5828 | successfully opened. | |
5829 | """ | |
5830 | return _misc_.ClipboardLocker___nonzero__(*args, **kwargs) | |
5831 | ||
5832 | ||
5833 | class ClipboardLockerPtr(ClipboardLocker): | |
5834 | def __init__(self, this): | |
5835 | self.this = this | |
5836 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5837 | self.__class__ = ClipboardLocker | |
5838 | _misc_.ClipboardLocker_swigregister(ClipboardLockerPtr) | |
5839 | ||
5840 | #--------------------------------------------------------------------------- | |
5841 | ||
5842 | class VideoMode(object): | |
5843 | """A simple struct containing video mode parameters for a display""" | |
5844 | def __repr__(self): | |
5845 | return "<%s.%s; proxy of C++ wxVideoMode instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5846 | def __init__(self, *args, **kwargs): | |
5847 | """ | |
5848 | __init__(self, int width=0, int height=0, int depth=0, int freq=0) -> VideoMode | |
5849 | ||
5850 | A simple struct containing video mode parameters for a display | |
5851 | """ | |
5852 | newobj = _misc_.new_VideoMode(*args, **kwargs) | |
5853 | self.this = newobj.this | |
5854 | self.thisown = 1 | |
5855 | del newobj.thisown | |
5856 | def __del__(self, destroy=_misc_.delete_VideoMode): | |
5857 | """__del__(self)""" | |
5858 | try: | |
5859 | if self.thisown: destroy(self) | |
5860 | except: pass | |
5861 | ||
5862 | def Matches(*args, **kwargs): | |
5863 | """ | |
5864 | Matches(self, VideoMode other) -> bool | |
5865 | ||
5866 | Returns true if this mode matches the other one in the sense that all | |
5867 | non zero fields of the other mode have the same value in this | |
5868 | one (except for refresh which is allowed to have a greater value) | |
5869 | """ | |
5870 | return _misc_.VideoMode_Matches(*args, **kwargs) | |
5871 | ||
5872 | def GetWidth(*args, **kwargs): | |
5873 | """ | |
5874 | GetWidth(self) -> int | |
5875 | ||
5876 | Returns the screen width in pixels (e.g. 640*480), 0 means unspecified | |
5877 | """ | |
5878 | return _misc_.VideoMode_GetWidth(*args, **kwargs) | |
5879 | ||
5880 | def GetHeight(*args, **kwargs): | |
5881 | """ | |
5882 | GetHeight(self) -> int | |
5883 | ||
5884 | Returns the screen width in pixels (e.g. 640*480), 0 means | |
5885 | unspecified | |
5886 | """ | |
5887 | return _misc_.VideoMode_GetHeight(*args, **kwargs) | |
5888 | ||
5889 | def GetDepth(*args, **kwargs): | |
5890 | """ | |
5891 | GetDepth(self) -> int | |
5892 | ||
5893 | Returns the screen's bits per pixel (e.g. 32), 1 is monochrome and 0 | |
5894 | means unspecified/known | |
5895 | """ | |
5896 | return _misc_.VideoMode_GetDepth(*args, **kwargs) | |
5897 | ||
5898 | def IsOk(*args, **kwargs): | |
5899 | """ | |
5900 | IsOk(self) -> bool | |
5901 | ||
5902 | returns true if the object has been initialized | |
5903 | """ | |
5904 | return _misc_.VideoMode_IsOk(*args, **kwargs) | |
5905 | ||
5906 | def __nonzero__(self): return self.IsOk() | |
5907 | def __eq__(*args, **kwargs): | |
5908 | """__eq__(self, VideoMode other) -> bool""" | |
5909 | return _misc_.VideoMode___eq__(*args, **kwargs) | |
5910 | ||
5911 | def __ne__(*args, **kwargs): | |
5912 | """__ne__(self, VideoMode other) -> bool""" | |
5913 | return _misc_.VideoMode___ne__(*args, **kwargs) | |
5914 | ||
5915 | w = property(_misc_.VideoMode_w_get, _misc_.VideoMode_w_set) | |
5916 | h = property(_misc_.VideoMode_h_get, _misc_.VideoMode_h_set) | |
5917 | bpp = property(_misc_.VideoMode_bpp_get, _misc_.VideoMode_bpp_set) | |
5918 | refresh = property(_misc_.VideoMode_refresh_get, _misc_.VideoMode_refresh_set) | |
5919 | ||
5920 | class VideoModePtr(VideoMode): | |
5921 | def __init__(self, this): | |
5922 | self.this = this | |
5923 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5924 | self.__class__ = VideoMode | |
5925 | _misc_.VideoMode_swigregister(VideoModePtr) | |
5926 | ||
5927 | class Display(object): | |
5928 | """Represents a display/monitor attached to the system""" | |
5929 | def __repr__(self): | |
5930 | return "<%s.%s; proxy of C++ wxDisplay instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5931 | def __init__(self, *args, **kwargs): | |
5932 | """ | |
5933 | __init__(self, size_t index=0) -> Display | |
5934 | ||
5935 | Set up a Display instance with the specified display. The displays | |
5936 | are numbered from 0 to GetCount() - 1, 0 is always the primary display | |
5937 | and the only one which is always supported | |
5938 | """ | |
5939 | newobj = _misc_.new_Display(*args, **kwargs) | |
5940 | self.this = newobj.this | |
5941 | self.thisown = 1 | |
5942 | del newobj.thisown | |
5943 | def __del__(self, destroy=_misc_.delete_Display): | |
5944 | """__del__(self)""" | |
5945 | try: | |
5946 | if self.thisown: destroy(self) | |
5947 | except: pass | |
5948 | ||
5949 | def GetCount(*args, **kwargs): | |
5950 | """ | |
5951 | GetCount() -> size_t | |
5952 | ||
5953 | Return the number of available displays. | |
5954 | """ | |
5955 | return _misc_.Display_GetCount(*args, **kwargs) | |
5956 | ||
5957 | GetCount = staticmethod(GetCount) | |
5958 | def GetFromPoint(*args, **kwargs): | |
5959 | """ | |
5960 | GetFromPoint(Point pt) -> int | |
5961 | ||
5962 | Find the display where the given point lies, return wx.NOT_FOUND if it | |
5963 | doesn't belong to any display | |
5964 | """ | |
5965 | return _misc_.Display_GetFromPoint(*args, **kwargs) | |
5966 | ||
5967 | GetFromPoint = staticmethod(GetFromPoint) | |
5968 | def GetFromWindow(*args, **kwargs): | |
5969 | """ | |
5970 | GetFromWindow(Window window) -> int | |
5971 | ||
5972 | Find the display where the given window lies, return wx.NOT_FOUND if | |
5973 | it is not shown at all. | |
5974 | """ | |
5975 | return _misc_.Display_GetFromWindow(*args, **kwargs) | |
5976 | ||
5977 | GetFromWindow = staticmethod(GetFromWindow) | |
5978 | def IsOk(*args, **kwargs): | |
5979 | """ | |
5980 | IsOk(self) -> bool | |
5981 | ||
5982 | Return true if the object was initialized successfully | |
5983 | """ | |
5984 | return _misc_.Display_IsOk(*args, **kwargs) | |
5985 | ||
5986 | def __nonzero__(self): return self.IsOk() | |
5987 | def GetGeometry(*args, **kwargs): | |
5988 | """ | |
5989 | GetGeometry(self) -> Rect | |
5990 | ||
5991 | Returns the bounding rectangle of the display whose index was passed | |
5992 | to the constructor. | |
5993 | """ | |
5994 | return _misc_.Display_GetGeometry(*args, **kwargs) | |
5995 | ||
5996 | def GetName(*args, **kwargs): | |
5997 | """ | |
5998 | GetName(self) -> String | |
5999 | ||
6000 | Returns the display's name. A name is not available on all platforms. | |
6001 | """ | |
6002 | return _misc_.Display_GetName(*args, **kwargs) | |
6003 | ||
6004 | def IsPrimary(*args, **kwargs): | |
6005 | """ | |
6006 | IsPrimary(self) -> bool | |
6007 | ||
6008 | Returns true if the display is the primary display. The primary | |
6009 | display is the one whose index is 0. | |
6010 | """ | |
6011 | return _misc_.Display_IsPrimary(*args, **kwargs) | |
6012 | ||
6013 | def GetModes(*args, **kwargs): | |
6014 | """ | |
6015 | GetModes(VideoMode mode=DefaultVideoMode) -> [videoMode...] | |
6016 | ||
6017 | Enumerate all video modes supported by this display matching the given | |
6018 | one (in the sense of VideoMode.Match()). | |
6019 | ||
6020 | As any mode matches the default value of the argument and there is | |
6021 | always at least one video mode supported by display, the returned | |
6022 | array is only empty for the default value of the argument if this | |
6023 | function is not supported at all on this platform. | |
6024 | """ | |
6025 | return _misc_.Display_GetModes(*args, **kwargs) | |
6026 | ||
6027 | def GetCurrentMode(*args, **kwargs): | |
6028 | """ | |
6029 | GetCurrentMode(self) -> VideoMode | |
6030 | ||
6031 | Get the current video mode. | |
6032 | """ | |
6033 | return _misc_.Display_GetCurrentMode(*args, **kwargs) | |
6034 | ||
6035 | def ChangeMode(*args, **kwargs): | |
6036 | """ | |
6037 | ChangeMode(self, VideoMode mode=DefaultVideoMode) -> bool | |
6038 | ||
6039 | Changes the video mode of this display to the mode specified in the | |
6040 | mode parameter. | |
6041 | ||
6042 | If wx.DefaultVideoMode is passed in as the mode parameter, the defined | |
6043 | behaviour is that wx.Display will reset the video mode to the default | |
6044 | mode used by the display. On Windows, the behavior is normal. | |
6045 | However, there are differences on other platforms. On Unix variations | |
6046 | using X11 extensions it should behave as defined, but some | |
6047 | irregularities may occur. | |
6048 | ||
6049 | On wxMac passing in wx.DefaultVideoMode as the mode parameter does | |
6050 | nothing. This happens because Carbon no longer has access to | |
6051 | DMUseScreenPrefs, an undocumented function that changed the video mode | |
6052 | to the system default by using the system's 'scrn' resource. | |
6053 | ||
6054 | Returns True if succeeded, False otherwise | |
6055 | """ | |
6056 | return _misc_.Display_ChangeMode(*args, **kwargs) | |
6057 | ||
6058 | def ResetMode(*args, **kwargs): | |
6059 | """ | |
6060 | ResetMode(self) | |
6061 | ||
6062 | Restore the default video mode (just a more readable synonym) | |
6063 | """ | |
6064 | return _misc_.Display_ResetMode(*args, **kwargs) | |
6065 | ||
6066 | ||
6067 | class DisplayPtr(Display): | |
6068 | def __init__(self, this): | |
6069 | self.this = this | |
6070 | if not hasattr(self,"thisown"): self.thisown = 0 | |
6071 | self.__class__ = Display | |
6072 | _misc_.Display_swigregister(DisplayPtr) | |
6073 | DefaultVideoMode = cvar.DefaultVideoMode | |
6074 | ||
6075 | def Display_GetCount(*args, **kwargs): | |
6076 | """ | |
6077 | Display_GetCount() -> size_t | |
6078 | ||
6079 | Return the number of available displays. | |
6080 | """ | |
6081 | return _misc_.Display_GetCount(*args, **kwargs) | |
6082 | ||
6083 | def Display_GetFromPoint(*args, **kwargs): | |
6084 | """ | |
6085 | Display_GetFromPoint(Point pt) -> int | |
6086 | ||
6087 | Find the display where the given point lies, return wx.NOT_FOUND if it | |
6088 | doesn't belong to any display | |
6089 | """ | |
6090 | return _misc_.Display_GetFromPoint(*args, **kwargs) | |
6091 | ||
6092 | def Display_GetFromWindow(*args, **kwargs): | |
6093 | """ | |
6094 | Display_GetFromWindow(Window window) -> int | |
6095 | ||
6096 | Find the display where the given window lies, return wx.NOT_FOUND if | |
6097 | it is not shown at all. | |
6098 | """ | |
6099 | return _misc_.Display_GetFromWindow(*args, **kwargs) | |
6100 | ||
6101 | #--------------------------------------------------------------------------- | |
6102 | ||
6103 | class StandardPaths(object): | |
6104 | """ | |
6105 | wx.StandardPaths returns the standard locations in the file system and | |
6106 | should be used by the programs to find their data files in a portable | |
6107 | way. | |
6108 | ||
6109 | In the description of the methods below, the example return values are | |
6110 | given for the Unix, Windows and Mac OS X systems, however please note | |
6111 | that these are just the examples and the actual values may differ. For | |
6112 | example, under Windows: the system administrator may change the | |
6113 | standard directories locations, i.e. the Windows directory may be | |
6114 | named W:\Win2003 instead of the default C:\Windows. | |
6115 | ||
6116 | The strings appname and username should be replaced with the value | |
6117 | returned by `wx.App.GetAppName` and the name of the currently logged | |
6118 | in user, respectively. The string prefix is only used under Unix and | |
6119 | is /usr/local by default but may be changed using `SetInstallPrefix`. | |
6120 | ||
6121 | The directories returned by the methods of this class may or may not | |
6122 | exist. If they don't exist, it's up to the caller to create them, | |
6123 | wxStandardPaths doesn't do it. | |
6124 | ||
6125 | Finally note that these functions only work with standardly packaged | |
6126 | applications. I.e. under Unix you should follow the standard | |
6127 | installation conventions and under Mac you should create your | |
6128 | application bundle according to the Apple guidelines. Again, this | |
6129 | class doesn't help you to do it. | |
6130 | """ | |
6131 | def __init__(self): raise RuntimeError, "No constructor defined" | |
6132 | def __repr__(self): | |
6133 | return "<%s.%s; proxy of C++ wxStandardPaths instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
6134 | def Get(*args, **kwargs): | |
6135 | """ | |
6136 | Get() -> StandardPaths | |
6137 | ||
6138 | Return the global standard paths singleton | |
6139 | """ | |
6140 | return _misc_.StandardPaths_Get(*args, **kwargs) | |
6141 | ||
6142 | Get = staticmethod(Get) | |
6143 | def GetConfigDir(*args, **kwargs): | |
6144 | """ | |
6145 | GetConfigDir(self) -> String | |
6146 | ||
6147 | Return the directory with system config files: /etc under Unix, | |
6148 | 'c:\Documents and Settings\All Users\Application Data' under Windows, | |
6149 | /Library/Preferences for Mac | |
6150 | """ | |
6151 | return _misc_.StandardPaths_GetConfigDir(*args, **kwargs) | |
6152 | ||
6153 | def GetUserConfigDir(*args, **kwargs): | |
6154 | """ | |
6155 | GetUserConfigDir(self) -> String | |
6156 | ||
6157 | Return the directory for the user config files: $HOME under Unix, | |
6158 | 'c:\Documents and Settings\username' under Windows, and | |
6159 | ~/Library/Preferences under Mac | |
6160 | ||
6161 | Only use this if you have a single file to put there, otherwise | |
6162 | `GetUserDataDir` is more appropriate | |
6163 | """ | |
6164 | return _misc_.StandardPaths_GetUserConfigDir(*args, **kwargs) | |
6165 | ||
6166 | def GetDataDir(*args, **kwargs): | |
6167 | """ | |
6168 | GetDataDir(self) -> String | |
6169 | ||
6170 | Return the location of the application's global, (i.e. not | |
6171 | user-specific,) data files: prefix/share/appname under Unix, | |
6172 | 'c:\Program Files\appname' under Windows, | |
6173 | appname.app/Contents/SharedSupport app bundle directory under Mac. | |
6174 | """ | |
6175 | return _misc_.StandardPaths_GetDataDir(*args, **kwargs) | |
6176 | ||
6177 | def GetLocalDataDir(*args, **kwargs): | |
6178 | """ | |
6179 | GetLocalDataDir(self) -> String | |
6180 | ||
6181 | Return the location for application data files which are | |
6182 | host-specific. Same as `GetDataDir` except under Unix where it is | |
6183 | /etc/appname | |
6184 | """ | |
6185 | return _misc_.StandardPaths_GetLocalDataDir(*args, **kwargs) | |
6186 | ||
6187 | def GetUserDataDir(*args, **kwargs): | |
6188 | """ | |
6189 | GetUserDataDir(self) -> String | |
6190 | ||
6191 | Return the directory for the user-dependent application data files: | |
6192 | $HOME/.appname under Unix, c:\Documents and | |
6193 | Settings\username\Application Data\appname under Windows and | |
6194 | ~/Library/Application Support/appname under Mac | |
6195 | """ | |
6196 | return _misc_.StandardPaths_GetUserDataDir(*args, **kwargs) | |
6197 | ||
6198 | def GetUserLocalDataDir(*args, **kwargs): | |
6199 | """ | |
6200 | GetUserLocalDataDir(self) -> String | |
6201 | ||
6202 | Return the directory for user data files which shouldn't be shared | |
6203 | with the other machines | |
6204 | ||
6205 | Same as `GetUserDataDir` for all platforms except Windows where it is | |
6206 | the 'Local Settings\Application Data\appname' directory. | |
6207 | """ | |
6208 | return _misc_.StandardPaths_GetUserLocalDataDir(*args, **kwargs) | |
6209 | ||
6210 | def GetPluginsDir(*args, **kwargs): | |
6211 | """ | |
6212 | GetPluginsDir(self) -> String | |
6213 | ||
6214 | Return the directory where the loadable modules (plugins) live: | |
6215 | prefix/lib/appname under Unix, program directory under Windows and | |
6216 | Contents/Plugins app bundle subdirectory under Mac | |
6217 | """ | |
6218 | return _misc_.StandardPaths_GetPluginsDir(*args, **kwargs) | |
6219 | ||
6220 | def SetInstallPrefix(*args, **kwargs): | |
6221 | """ | |
6222 | SetInstallPrefix(self, String prefix) | |
6223 | ||
6224 | Set the program installation directory which is /usr/local by default. | |
6225 | This value will be used by other methods such as `GetDataDir` and | |
6226 | `GetPluginsDir` as the prefix for what they return. (This function | |
6227 | only has meaning on Unix systems.) | |
6228 | """ | |
6229 | return _misc_.StandardPaths_SetInstallPrefix(*args, **kwargs) | |
6230 | ||
6231 | def GetInstallPrefix(*args, **kwargs): | |
6232 | """ | |
6233 | GetInstallPrefix(self) -> String | |
6234 | ||
6235 | Get the program installation prefix. The default is the prefix where | |
6236 | Python is installed. (This function only has meaning on Unix systems.) | |
6237 | """ | |
6238 | return _misc_.StandardPaths_GetInstallPrefix(*args, **kwargs) | |
6239 | ||
6240 | ||
6241 | class StandardPathsPtr(StandardPaths): | |
6242 | def __init__(self, this): | |
6243 | self.this = this | |
6244 | if not hasattr(self,"thisown"): self.thisown = 0 | |
6245 | self.__class__ = StandardPaths | |
6246 | _misc_.StandardPaths_swigregister(StandardPathsPtr) | |
6247 | ||
6248 | def StandardPaths_Get(*args, **kwargs): | |
6249 | """ | |
6250 | StandardPaths_Get() -> StandardPaths | |
6251 | ||
6252 | Return the global standard paths singleton | |
6253 | """ | |
6254 | return _misc_.StandardPaths_Get(*args, **kwargs) | |
6255 | ||
6256 | ||
6257 |