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