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