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