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