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