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