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