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