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