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