]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/gtk/_misc.py
use wxUSE_DATEPICKCTRL
[wxWidgets.git] / wxPython / src / gtk / _misc.py
CommitLineData
70551f47 1# This file was created automatically by SWIG.
d14a1e28
RD
2# Don't modify this file, modify the SWIG interface instead.
3
54f9ee45 4import _misc_
d14a1e28 5
093d3ff1
RD
6def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
7 if (name == "this"):
8 if isinstance(value, class_type):
9 self.__dict__[name] = value.this
10 if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
11 del value.thisown
12 return
13 method = class_type.__swig_setmethods__.get(name,None)
14 if method: return method(self,value)
15 if (not static) or hasattr(self,name) or (name == "thisown"):
16 self.__dict__[name] = value
17 else:
18 raise AttributeError("You cannot add attributes to %s" % self)
19
20def _swig_setattr(self,class_type,name,value):
21 return _swig_setattr_nondynamic(self,class_type,name,value,0)
22
23def _swig_getattr(self,class_type,name):
24 method = class_type.__swig_getmethods__.get(name,None)
25 if method: return method(self)
26 raise AttributeError,name
27
28import types
29try:
30 _object = types.ObjectType
31 _newclass = 1
32except AttributeError:
33 class _object : pass
34 _newclass = 0
35del types
36
37
38def _swig_setattr_nondynamic_method(set):
39 def set_attr(self,name,value):
40 if hasattr(self,name) or (name in ("this", "thisown")):
41 set(self,name,value)
42 else:
43 raise AttributeError("You cannot add attributes to %s" % self)
44 return set_attr
45
46
54f9ee45
RD
47import _core
48wx = _core
d14a1e28
RD
49#---------------------------------------------------------------------------
50
54f9ee45
RD
51SYS_OEM_FIXED_FONT = _misc_.SYS_OEM_FIXED_FONT
52SYS_ANSI_FIXED_FONT = _misc_.SYS_ANSI_FIXED_FONT
53SYS_ANSI_VAR_FONT = _misc_.SYS_ANSI_VAR_FONT
54SYS_SYSTEM_FONT = _misc_.SYS_SYSTEM_FONT
55SYS_DEVICE_DEFAULT_FONT = _misc_.SYS_DEVICE_DEFAULT_FONT
56SYS_DEFAULT_PALETTE = _misc_.SYS_DEFAULT_PALETTE
57SYS_SYSTEM_FIXED_FONT = _misc_.SYS_SYSTEM_FIXED_FONT
58SYS_DEFAULT_GUI_FONT = _misc_.SYS_DEFAULT_GUI_FONT
59SYS_ICONTITLE_FONT = _misc_.SYS_ICONTITLE_FONT
60SYS_COLOUR_SCROLLBAR = _misc_.SYS_COLOUR_SCROLLBAR
61SYS_COLOUR_BACKGROUND = _misc_.SYS_COLOUR_BACKGROUND
62SYS_COLOUR_DESKTOP = _misc_.SYS_COLOUR_DESKTOP
63SYS_COLOUR_ACTIVECAPTION = _misc_.SYS_COLOUR_ACTIVECAPTION
64SYS_COLOUR_INACTIVECAPTION = _misc_.SYS_COLOUR_INACTIVECAPTION
65SYS_COLOUR_MENU = _misc_.SYS_COLOUR_MENU
66SYS_COLOUR_WINDOW = _misc_.SYS_COLOUR_WINDOW
67SYS_COLOUR_WINDOWFRAME = _misc_.SYS_COLOUR_WINDOWFRAME
68SYS_COLOUR_MENUTEXT = _misc_.SYS_COLOUR_MENUTEXT
69SYS_COLOUR_WINDOWTEXT = _misc_.SYS_COLOUR_WINDOWTEXT
70SYS_COLOUR_CAPTIONTEXT = _misc_.SYS_COLOUR_CAPTIONTEXT
71SYS_COLOUR_ACTIVEBORDER = _misc_.SYS_COLOUR_ACTIVEBORDER
72SYS_COLOUR_INACTIVEBORDER = _misc_.SYS_COLOUR_INACTIVEBORDER
73SYS_COLOUR_APPWORKSPACE = _misc_.SYS_COLOUR_APPWORKSPACE
74SYS_COLOUR_HIGHLIGHT = _misc_.SYS_COLOUR_HIGHLIGHT
75SYS_COLOUR_HIGHLIGHTTEXT = _misc_.SYS_COLOUR_HIGHLIGHTTEXT
76SYS_COLOUR_BTNFACE = _misc_.SYS_COLOUR_BTNFACE
77SYS_COLOUR_3DFACE = _misc_.SYS_COLOUR_3DFACE
78SYS_COLOUR_BTNSHADOW = _misc_.SYS_COLOUR_BTNSHADOW
79SYS_COLOUR_3DSHADOW = _misc_.SYS_COLOUR_3DSHADOW
80SYS_COLOUR_GRAYTEXT = _misc_.SYS_COLOUR_GRAYTEXT
81SYS_COLOUR_BTNTEXT = _misc_.SYS_COLOUR_BTNTEXT
82SYS_COLOUR_INACTIVECAPTIONTEXT = _misc_.SYS_COLOUR_INACTIVECAPTIONTEXT
83SYS_COLOUR_BTNHIGHLIGHT = _misc_.SYS_COLOUR_BTNHIGHLIGHT
84SYS_COLOUR_BTNHILIGHT = _misc_.SYS_COLOUR_BTNHILIGHT
85SYS_COLOUR_3DHIGHLIGHT = _misc_.SYS_COLOUR_3DHIGHLIGHT
86SYS_COLOUR_3DHILIGHT = _misc_.SYS_COLOUR_3DHILIGHT
87SYS_COLOUR_3DDKSHADOW = _misc_.SYS_COLOUR_3DDKSHADOW
88SYS_COLOUR_3DLIGHT = _misc_.SYS_COLOUR_3DLIGHT
89SYS_COLOUR_INFOTEXT = _misc_.SYS_COLOUR_INFOTEXT
90SYS_COLOUR_INFOBK = _misc_.SYS_COLOUR_INFOBK
91SYS_COLOUR_LISTBOX = _misc_.SYS_COLOUR_LISTBOX
92SYS_COLOUR_HOTLIGHT = _misc_.SYS_COLOUR_HOTLIGHT
93SYS_COLOUR_GRADIENTACTIVECAPTION = _misc_.SYS_COLOUR_GRADIENTACTIVECAPTION
94SYS_COLOUR_GRADIENTINACTIVECAPTION = _misc_.SYS_COLOUR_GRADIENTINACTIVECAPTION
95SYS_COLOUR_MENUHILIGHT = _misc_.SYS_COLOUR_MENUHILIGHT
96SYS_COLOUR_MENUBAR = _misc_.SYS_COLOUR_MENUBAR
97SYS_COLOUR_MAX = _misc_.SYS_COLOUR_MAX
98SYS_MOUSE_BUTTONS = _misc_.SYS_MOUSE_BUTTONS
99SYS_BORDER_X = _misc_.SYS_BORDER_X
100SYS_BORDER_Y = _misc_.SYS_BORDER_Y
101SYS_CURSOR_X = _misc_.SYS_CURSOR_X
102SYS_CURSOR_Y = _misc_.SYS_CURSOR_Y
103SYS_DCLICK_X = _misc_.SYS_DCLICK_X
104SYS_DCLICK_Y = _misc_.SYS_DCLICK_Y
105SYS_DRAG_X = _misc_.SYS_DRAG_X
106SYS_DRAG_Y = _misc_.SYS_DRAG_Y
107SYS_EDGE_X = _misc_.SYS_EDGE_X
108SYS_EDGE_Y = _misc_.SYS_EDGE_Y
109SYS_HSCROLL_ARROW_X = _misc_.SYS_HSCROLL_ARROW_X
110SYS_HSCROLL_ARROW_Y = _misc_.SYS_HSCROLL_ARROW_Y
111SYS_HTHUMB_X = _misc_.SYS_HTHUMB_X
112SYS_ICON_X = _misc_.SYS_ICON_X
113SYS_ICON_Y = _misc_.SYS_ICON_Y
114SYS_ICONSPACING_X = _misc_.SYS_ICONSPACING_X
115SYS_ICONSPACING_Y = _misc_.SYS_ICONSPACING_Y
116SYS_WINDOWMIN_X = _misc_.SYS_WINDOWMIN_X
117SYS_WINDOWMIN_Y = _misc_.SYS_WINDOWMIN_Y
118SYS_SCREEN_X = _misc_.SYS_SCREEN_X
119SYS_SCREEN_Y = _misc_.SYS_SCREEN_Y
120SYS_FRAMESIZE_X = _misc_.SYS_FRAMESIZE_X
121SYS_FRAMESIZE_Y = _misc_.SYS_FRAMESIZE_Y
122SYS_SMALLICON_X = _misc_.SYS_SMALLICON_X
123SYS_SMALLICON_Y = _misc_.SYS_SMALLICON_Y
124SYS_HSCROLL_Y = _misc_.SYS_HSCROLL_Y
125SYS_VSCROLL_X = _misc_.SYS_VSCROLL_X
126SYS_VSCROLL_ARROW_X = _misc_.SYS_VSCROLL_ARROW_X
127SYS_VSCROLL_ARROW_Y = _misc_.SYS_VSCROLL_ARROW_Y
128SYS_VTHUMB_Y = _misc_.SYS_VTHUMB_Y
129SYS_CAPTION_Y = _misc_.SYS_CAPTION_Y
130SYS_MENU_Y = _misc_.SYS_MENU_Y
131SYS_NETWORK_PRESENT = _misc_.SYS_NETWORK_PRESENT
132SYS_PENWINDOWS_PRESENT = _misc_.SYS_PENWINDOWS_PRESENT
133SYS_SHOW_SOUNDS = _misc_.SYS_SHOW_SOUNDS
134SYS_SWAP_BUTTONS = _misc_.SYS_SWAP_BUTTONS
135SYS_CAN_DRAW_FRAME_DECORATIONS = _misc_.SYS_CAN_DRAW_FRAME_DECORATIONS
136SYS_CAN_ICONIZE_FRAME = _misc_.SYS_CAN_ICONIZE_FRAME
137SYS_SCREEN_NONE = _misc_.SYS_SCREEN_NONE
138SYS_SCREEN_TINY = _misc_.SYS_SCREEN_TINY
139SYS_SCREEN_PDA = _misc_.SYS_SCREEN_PDA
140SYS_SCREEN_SMALL = _misc_.SYS_SCREEN_SMALL
141SYS_SCREEN_DESKTOP = _misc_.SYS_SCREEN_DESKTOP
d14a1e28 142class SystemSettings(object):
093d3ff1 143 """Proxy of C++ SystemSettings class"""
d14a1e28
RD
144 def __init__(self): raise RuntimeError, "No constructor defined"
145 def __repr__(self):
146 return "<%s.%s; proxy of C++ wxSystemSettings instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 147 def GetColour(*args, **kwargs):
66c033b4 148 """GetColour(int index) -> Colour"""
54f9ee45 149 return _misc_.SystemSettings_GetColour(*args, **kwargs)
e811c8ce
RD
150
151 GetColour = staticmethod(GetColour)
152 def GetFont(*args, **kwargs):
66c033b4 153 """GetFont(int index) -> Font"""
54f9ee45 154 return _misc_.SystemSettings_GetFont(*args, **kwargs)
e811c8ce
RD
155
156 GetFont = staticmethod(GetFont)
157 def GetMetric(*args, **kwargs):
66c033b4 158 """GetMetric(int index) -> int"""
54f9ee45 159 return _misc_.SystemSettings_GetMetric(*args, **kwargs)
e811c8ce
RD
160
161 GetMetric = staticmethod(GetMetric)
162 def HasFeature(*args, **kwargs):
66c033b4 163 """HasFeature(int index) -> bool"""
54f9ee45 164 return _misc_.SystemSettings_HasFeature(*args, **kwargs)
e811c8ce
RD
165
166 HasFeature = staticmethod(HasFeature)
167 def GetScreenType(*args, **kwargs):
66c033b4 168 """GetScreenType() -> int"""
54f9ee45 169 return _misc_.SystemSettings_GetScreenType(*args, **kwargs)
e811c8ce
RD
170
171 GetScreenType = staticmethod(GetScreenType)
172 def SetScreenType(*args, **kwargs):
66c033b4 173 """SetScreenType(int screen)"""
54f9ee45 174 return _misc_.SystemSettings_SetScreenType(*args, **kwargs)
e811c8ce
RD
175
176 SetScreenType = staticmethod(SetScreenType)
d14a1e28
RD
177
178class SystemSettingsPtr(SystemSettings):
179 def __init__(self, this):
9df61a29 180 self.this = this
d14a1e28
RD
181 if not hasattr(self,"thisown"): self.thisown = 0
182 self.__class__ = SystemSettings
54f9ee45 183_misc_.SystemSettings_swigregister(SystemSettingsPtr)
d14a1e28 184
e811c8ce 185def SystemSettings_GetColour(*args, **kwargs):
196addbf 186 """SystemSettings_GetColour(int index) -> Colour"""
54f9ee45 187 return _misc_.SystemSettings_GetColour(*args, **kwargs)
d14a1e28 188
e811c8ce 189def SystemSettings_GetFont(*args, **kwargs):
196addbf 190 """SystemSettings_GetFont(int index) -> Font"""
54f9ee45 191 return _misc_.SystemSettings_GetFont(*args, **kwargs)
d14a1e28 192
e811c8ce 193def SystemSettings_GetMetric(*args, **kwargs):
196addbf 194 """SystemSettings_GetMetric(int index) -> int"""
54f9ee45 195 return _misc_.SystemSettings_GetMetric(*args, **kwargs)
d14a1e28 196
e811c8ce 197def SystemSettings_HasFeature(*args, **kwargs):
196addbf 198 """SystemSettings_HasFeature(int index) -> bool"""
54f9ee45 199 return _misc_.SystemSettings_HasFeature(*args, **kwargs)
d14a1e28 200
e811c8ce 201def SystemSettings_GetScreenType(*args, **kwargs):
196addbf 202 """SystemSettings_GetScreenType() -> int"""
54f9ee45 203 return _misc_.SystemSettings_GetScreenType(*args, **kwargs)
d14a1e28 204
e811c8ce 205def SystemSettings_SetScreenType(*args, **kwargs):
196addbf 206 """SystemSettings_SetScreenType(int screen)"""
54f9ee45 207 return _misc_.SystemSettings_SetScreenType(*args, **kwargs)
d14a1e28 208
54f9ee45 209class SystemOptions(_core.Object):
093d3ff1 210 """Proxy of C++ SystemOptions class"""
e811c8ce
RD
211 def __repr__(self):
212 return "<%s.%s; proxy of C++ wxSystemOptions instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 213 def __init__(self, *args, **kwargs):
a95a7133 214 """__init__(self) -> SystemOptions"""
54f9ee45 215 newobj = _misc_.new_SystemOptions(*args, **kwargs)
d14a1e28
RD
216 self.this = newobj.this
217 self.thisown = 1
218 del newobj.thisown
e811c8ce 219 def SetOption(*args, **kwargs):
66c033b4 220 """SetOption(String name, String value)"""
54f9ee45 221 return _misc_.SystemOptions_SetOption(*args, **kwargs)
e811c8ce
RD
222
223 SetOption = staticmethod(SetOption)
224 def SetOptionInt(*args, **kwargs):
66c033b4 225 """SetOptionInt(String name, int value)"""
54f9ee45 226 return _misc_.SystemOptions_SetOptionInt(*args, **kwargs)
e811c8ce
RD
227
228 SetOptionInt = staticmethod(SetOptionInt)
229 def GetOption(*args, **kwargs):
66c033b4 230 """GetOption(String name) -> String"""
54f9ee45 231 return _misc_.SystemOptions_GetOption(*args, **kwargs)
e811c8ce
RD
232
233 GetOption = staticmethod(GetOption)
234 def GetOptionInt(*args, **kwargs):
66c033b4 235 """GetOptionInt(String name) -> int"""
54f9ee45 236 return _misc_.SystemOptions_GetOptionInt(*args, **kwargs)
e811c8ce
RD
237
238 GetOptionInt = staticmethod(GetOptionInt)
239 def HasOption(*args, **kwargs):
66c033b4 240 """HasOption(String name) -> bool"""
54f9ee45 241 return _misc_.SystemOptions_HasOption(*args, **kwargs)
e811c8ce
RD
242
243 HasOption = staticmethod(HasOption)
d14a1e28
RD
244
245class SystemOptionsPtr(SystemOptions):
246 def __init__(self, this):
9df61a29 247 self.this = this
d14a1e28
RD
248 if not hasattr(self,"thisown"): self.thisown = 0
249 self.__class__ = SystemOptions
54f9ee45 250_misc_.SystemOptions_swigregister(SystemOptionsPtr)
7e63a440
RD
251cvar = _misc_.cvar
252WINDOW_DEFAULT_VARIANT = cvar.WINDOW_DEFAULT_VARIANT
d14a1e28 253
e811c8ce 254def SystemOptions_SetOption(*args, **kwargs):
196addbf 255 """SystemOptions_SetOption(String name, String value)"""
54f9ee45 256 return _misc_.SystemOptions_SetOption(*args, **kwargs)
d14a1e28 257
e811c8ce 258def SystemOptions_SetOptionInt(*args, **kwargs):
196addbf 259 """SystemOptions_SetOptionInt(String name, int value)"""
54f9ee45 260 return _misc_.SystemOptions_SetOptionInt(*args, **kwargs)
d14a1e28 261
e811c8ce 262def SystemOptions_GetOption(*args, **kwargs):
196addbf 263 """SystemOptions_GetOption(String name) -> String"""
54f9ee45 264 return _misc_.SystemOptions_GetOption(*args, **kwargs)
d14a1e28 265
e811c8ce 266def SystemOptions_GetOptionInt(*args, **kwargs):
196addbf 267 """SystemOptions_GetOptionInt(String name) -> int"""
54f9ee45 268 return _misc_.SystemOptions_GetOptionInt(*args, **kwargs)
d14a1e28 269
e811c8ce 270def SystemOptions_HasOption(*args, **kwargs):
196addbf 271 """SystemOptions_HasOption(String name) -> bool"""
54f9ee45 272 return _misc_.SystemOptions_HasOption(*args, **kwargs)
d14a1e28
RD
273
274#---------------------------------------------------------------------------
275
276
e811c8ce
RD
277def NewId(*args, **kwargs):
278 """NewId() -> long"""
54f9ee45 279 return _misc_.NewId(*args, **kwargs)
d14a1e28 280
e811c8ce
RD
281def RegisterId(*args, **kwargs):
282 """RegisterId(long id)"""
54f9ee45 283 return _misc_.RegisterId(*args, **kwargs)
d14a1e28 284
e811c8ce
RD
285def GetCurrentId(*args, **kwargs):
286 """GetCurrentId() -> long"""
54f9ee45 287 return _misc_.GetCurrentId(*args, **kwargs)
d14a1e28 288
1f6967c2
RD
289def IsStockID(*args, **kwargs):
290 """IsStockID(int id) -> bool"""
291 return _misc_.IsStockID(*args, **kwargs)
023a034e 292
1f6967c2
RD
293def IsStockLabel(*args, **kwargs):
294 """IsStockLabel(int id, String label) -> bool"""
295 return _misc_.IsStockLabel(*args, **kwargs)
023a034e 296
1f6967c2 297def GetStockLabel(*args, **kwargs):
fef4c27a 298 """GetStockLabel(int id, bool withCodes=True, String accelerator=EmptyString) -> String"""
1f6967c2 299 return _misc_.GetStockLabel(*args, **kwargs)
023a034e 300
e811c8ce
RD
301def Bell(*args, **kwargs):
302 """Bell()"""
54f9ee45 303 return _misc_.Bell(*args, **kwargs)
d14a1e28 304
e811c8ce
RD
305def EndBusyCursor(*args, **kwargs):
306 """EndBusyCursor()"""
54f9ee45 307 return _misc_.EndBusyCursor(*args, **kwargs)
d14a1e28 308
e811c8ce
RD
309def GetElapsedTime(*args, **kwargs):
310 """GetElapsedTime(bool resetTimer=True) -> long"""
54f9ee45 311 return _misc_.GetElapsedTime(*args, **kwargs)
d14a1e28 312
e811c8ce 313def GetMousePosition(*args, **kwargs):
322913ce 314 """GetMousePosition() -> (x,y)"""
54f9ee45 315 return _misc_.GetMousePosition(*args, **kwargs)
d14a1e28 316
e811c8ce
RD
317def IsBusy(*args, **kwargs):
318 """IsBusy() -> bool"""
54f9ee45 319 return _misc_.IsBusy(*args, **kwargs)
d14a1e28 320
e811c8ce 321def Now(*args, **kwargs):
196addbf 322 """Now() -> String"""
54f9ee45 323 return _misc_.Now(*args, **kwargs)
d14a1e28 324
e811c8ce 325def Shell(*args, **kwargs):
196addbf 326 """Shell(String command=EmptyString) -> bool"""
54f9ee45 327 return _misc_.Shell(*args, **kwargs)
d14a1e28 328
e811c8ce
RD
329def StartTimer(*args, **kwargs):
330 """StartTimer()"""
54f9ee45 331 return _misc_.StartTimer(*args, **kwargs)
d14a1e28 332
e811c8ce 333def GetOsVersion(*args, **kwargs):
322913ce 334 """GetOsVersion() -> (platform, major, minor)"""
54f9ee45 335 return _misc_.GetOsVersion(*args, **kwargs)
d14a1e28 336
e811c8ce 337def GetOsDescription(*args, **kwargs):
196addbf 338 """GetOsDescription() -> String"""
54f9ee45 339 return _misc_.GetOsDescription(*args, **kwargs)
d14a1e28 340
e811c8ce
RD
341def GetFreeMemory(*args, **kwargs):
342 """GetFreeMemory() -> long"""
54f9ee45
RD
343 return _misc_.GetFreeMemory(*args, **kwargs)
344SHUTDOWN_POWEROFF = _misc_.SHUTDOWN_POWEROFF
345SHUTDOWN_REBOOT = _misc_.SHUTDOWN_REBOOT
d14a1e28 346
e811c8ce 347def Shutdown(*args, **kwargs):
196addbf 348 """Shutdown(int wFlags) -> bool"""
54f9ee45 349 return _misc_.Shutdown(*args, **kwargs)
e811c8ce
RD
350
351def Sleep(*args, **kwargs):
352 """Sleep(int secs)"""
54f9ee45 353 return _misc_.Sleep(*args, **kwargs)
e811c8ce 354
7f98d120
RD
355def MilliSleep(*args, **kwargs):
356 """MilliSleep(unsigned long milliseconds)"""
357 return _misc_.MilliSleep(*args, **kwargs)
358
359def MicroSleep(*args, **kwargs):
360 """MicroSleep(unsigned long microseconds)"""
361 return _misc_.MicroSleep(*args, **kwargs)
362Usleep = MilliSleep
e811c8ce
RD
363
364def EnableTopLevelWindows(*args, **kwargs):
365 """EnableTopLevelWindows(bool enable)"""
54f9ee45 366 return _misc_.EnableTopLevelWindows(*args, **kwargs)
e811c8ce
RD
367
368def StripMenuCodes(*args, **kwargs):
196addbf 369 """StripMenuCodes(String in) -> String"""
54f9ee45 370 return _misc_.StripMenuCodes(*args, **kwargs)
e811c8ce
RD
371
372def GetEmailAddress(*args, **kwargs):
196addbf 373 """GetEmailAddress() -> String"""
54f9ee45 374 return _misc_.GetEmailAddress(*args, **kwargs)
e811c8ce
RD
375
376def GetHostName(*args, **kwargs):
196addbf 377 """GetHostName() -> String"""
54f9ee45 378 return _misc_.GetHostName(*args, **kwargs)
e811c8ce
RD
379
380def GetFullHostName(*args, **kwargs):
196addbf 381 """GetFullHostName() -> String"""
54f9ee45 382 return _misc_.GetFullHostName(*args, **kwargs)
e811c8ce
RD
383
384def GetUserId(*args, **kwargs):
196addbf 385 """GetUserId() -> String"""
54f9ee45 386 return _misc_.GetUserId(*args, **kwargs)
e811c8ce
RD
387
388def GetUserName(*args, **kwargs):
196addbf 389 """GetUserName() -> String"""
54f9ee45 390 return _misc_.GetUserName(*args, **kwargs)
e811c8ce
RD
391
392def GetHomeDir(*args, **kwargs):
196addbf 393 """GetHomeDir() -> String"""
54f9ee45 394 return _misc_.GetHomeDir(*args, **kwargs)
e811c8ce
RD
395
396def GetUserHome(*args, **kwargs):
196addbf 397 """GetUserHome(String user=EmptyString) -> String"""
54f9ee45 398 return _misc_.GetUserHome(*args, **kwargs)
e811c8ce
RD
399
400def GetProcessId(*args, **kwargs):
401 """GetProcessId() -> unsigned long"""
54f9ee45 402 return _misc_.GetProcessId(*args, **kwargs)
e811c8ce
RD
403
404def Trap(*args, **kwargs):
405 """Trap()"""
54f9ee45 406 return _misc_.Trap(*args, **kwargs)
e811c8ce
RD
407
408def FileSelector(*args, **kwargs):
0df68c9f 409 """
b2dc1044 410 FileSelector(String message=FileSelectorPromptStr, String default_path=EmptyString,
196addbf
RD
411 String default_filename=EmptyString,
412 String default_extension=EmptyString,
b2dc1044
RD
413 String wildcard=FileSelectorDefaultWildcardStr,
414 int flags=0, Window parent=None, int x=-1,
415 int y=-1) -> String
0df68c9f 416 """
54f9ee45 417 return _misc_.FileSelector(*args, **kwargs)
e811c8ce
RD
418
419def LoadFileSelector(*args, **kwargs):
0df68c9f 420 """
196addbf
RD
421 LoadFileSelector(String what, String extension, String default_name=EmptyString,
422 Window parent=None) -> String
0df68c9f 423 """
54f9ee45 424 return _misc_.LoadFileSelector(*args, **kwargs)
e811c8ce
RD
425
426def SaveFileSelector(*args, **kwargs):
0df68c9f 427 """
196addbf
RD
428 SaveFileSelector(String what, String extension, String default_name=EmptyString,
429 Window parent=None) -> String
0df68c9f 430 """
54f9ee45 431 return _misc_.SaveFileSelector(*args, **kwargs)
e811c8ce
RD
432
433def DirSelector(*args, **kwargs):
0df68c9f 434 """
b2dc1044 435 DirSelector(String message=DirSelectorPromptStr, String defaultPath=EmptyString,
0df68c9f 436 long style=DD_DEFAULT_STYLE,
196addbf 437 Point pos=DefaultPosition, Window parent=None) -> String
0df68c9f 438 """
54f9ee45 439 return _misc_.DirSelector(*args, **kwargs)
e811c8ce
RD
440
441def GetTextFromUser(*args, **kwargs):
0df68c9f 442 """
196addbf
RD
443 GetTextFromUser(String message, String caption=EmptyString, String default_value=EmptyString,
444 Window parent=None,
445 int x=-1, int y=-1, bool centre=True) -> String
0df68c9f 446 """
54f9ee45 447 return _misc_.GetTextFromUser(*args, **kwargs)
e811c8ce
RD
448
449def GetPasswordFromUser(*args, **kwargs):
0df68c9f 450 """
196addbf
RD
451 GetPasswordFromUser(String message, String caption=EmptyString, String default_value=EmptyString,
452 Window parent=None) -> String
0df68c9f 453 """
54f9ee45 454 return _misc_.GetPasswordFromUser(*args, **kwargs)
e811c8ce
RD
455
456def GetSingleChoice(*args, **kwargs):
0df68c9f 457 """
093d3ff1
RD
458 GetSingleChoice(String message, String caption, int choices, Window parent=None,
459 int x=-1, int y=-1, bool centre=True,
460 int width=150, int height=200) -> String
0df68c9f 461 """
54f9ee45 462 return _misc_.GetSingleChoice(*args, **kwargs)
e811c8ce
RD
463
464def GetSingleChoiceIndex(*args, **kwargs):
0df68c9f 465 """
093d3ff1
RD
466 GetSingleChoiceIndex(String message, String caption, int choices, Window parent=None,
467 int x=-1, int y=-1, bool centre=True,
468 int width=150, int height=200) -> int
0df68c9f 469 """
54f9ee45 470 return _misc_.GetSingleChoiceIndex(*args, **kwargs)
e811c8ce
RD
471
472def MessageBox(*args, **kwargs):
0df68c9f 473 """
196addbf
RD
474 MessageBox(String message, String caption=EmptyString, int style=wxOK|wxCENTRE,
475 Window parent=None, int x=-1,
476 int y=-1) -> int
0df68c9f 477 """
54f9ee45 478 return _misc_.MessageBox(*args, **kwargs)
e811c8ce
RD
479
480def GetNumberFromUser(*args, **kwargs):
0df68c9f 481 """
196addbf
RD
482 GetNumberFromUser(String message, String prompt, String caption, long value,
483 long min=0, long max=100, Window parent=None,
0df68c9f
RD
484 Point pos=DefaultPosition) -> long
485 """
54f9ee45 486 return _misc_.GetNumberFromUser(*args, **kwargs)
e811c8ce
RD
487
488def ColourDisplay(*args, **kwargs):
489 """ColourDisplay() -> bool"""
54f9ee45 490 return _misc_.ColourDisplay(*args, **kwargs)
e811c8ce
RD
491
492def DisplayDepth(*args, **kwargs):
493 """DisplayDepth() -> int"""
54f9ee45 494 return _misc_.DisplayDepth(*args, **kwargs)
e811c8ce
RD
495
496def GetDisplayDepth(*args, **kwargs):
497 """GetDisplayDepth() -> int"""
54f9ee45 498 return _misc_.GetDisplayDepth(*args, **kwargs)
e811c8ce
RD
499
500def DisplaySize(*args, **kwargs):
322913ce 501 """DisplaySize() -> (width, height)"""
54f9ee45 502 return _misc_.DisplaySize(*args, **kwargs)
e811c8ce
RD
503
504def GetDisplaySize(*args, **kwargs):
505 """GetDisplaySize() -> Size"""
54f9ee45 506 return _misc_.GetDisplaySize(*args, **kwargs)
e811c8ce
RD
507
508def DisplaySizeMM(*args, **kwargs):
322913ce 509 """DisplaySizeMM() -> (width, height)"""
54f9ee45 510 return _misc_.DisplaySizeMM(*args, **kwargs)
e811c8ce
RD
511
512def GetDisplaySizeMM(*args, **kwargs):
513 """GetDisplaySizeMM() -> Size"""
54f9ee45 514 return _misc_.GetDisplaySizeMM(*args, **kwargs)
e811c8ce
RD
515
516def ClientDisplayRect(*args, **kwargs):
322913ce 517 """ClientDisplayRect() -> (x, y, width, height)"""
54f9ee45 518 return _misc_.ClientDisplayRect(*args, **kwargs)
e811c8ce
RD
519
520def GetClientDisplayRect(*args, **kwargs):
521 """GetClientDisplayRect() -> Rect"""
54f9ee45 522 return _misc_.GetClientDisplayRect(*args, **kwargs)
e811c8ce
RD
523
524def SetCursor(*args, **kwargs):
196addbf 525 """SetCursor(Cursor cursor)"""
54f9ee45 526 return _misc_.SetCursor(*args, **kwargs)
e811c8ce
RD
527
528def BeginBusyCursor(*args, **kwargs):
196addbf 529 """BeginBusyCursor(Cursor cursor=wxHOURGLASS_CURSOR)"""
54f9ee45 530 return _misc_.BeginBusyCursor(*args, **kwargs)
e811c8ce
RD
531
532def GetActiveWindow(*args, **kwargs):
533 """GetActiveWindow() -> Window"""
54f9ee45 534 return _misc_.GetActiveWindow(*args, **kwargs)
e811c8ce
RD
535
536def GenericFindWindowAtPoint(*args, **kwargs):
537 """GenericFindWindowAtPoint(Point pt) -> Window"""
54f9ee45 538 return _misc_.GenericFindWindowAtPoint(*args, **kwargs)
e811c8ce
RD
539
540def FindWindowAtPoint(*args, **kwargs):
541 """FindWindowAtPoint(Point pt) -> Window"""
54f9ee45 542 return _misc_.FindWindowAtPoint(*args, **kwargs)
e811c8ce
RD
543
544def GetTopLevelParent(*args, **kwargs):
545 """GetTopLevelParent(Window win) -> Window"""
54f9ee45 546 return _misc_.GetTopLevelParent(*args, **kwargs)
e811c8ce 547
39f61e25 548def GetKeyState(*args, **kwargs):
1a10c483
RD
549 """
550 GetKeyState(int key) -> bool
551
552 Get the state of a key (true if pressed or toggled on, false if not.)
553 This is generally most useful getting the state of the modifier or
554 toggle keys. On some platforms those may be the only keys that work.
555
556 """
54f9ee45 557 return _misc_.GetKeyState(*args, **kwargs)
39f61e25 558
e811c8ce
RD
559def WakeUpMainThread(*args, **kwargs):
560 """WakeUpMainThread()"""
54f9ee45 561 return _misc_.WakeUpMainThread(*args, **kwargs)
e811c8ce
RD
562
563def MutexGuiEnter(*args, **kwargs):
564 """MutexGuiEnter()"""
54f9ee45 565 return _misc_.MutexGuiEnter(*args, **kwargs)
e811c8ce
RD
566
567def MutexGuiLeave(*args, **kwargs):
568 """MutexGuiLeave()"""
54f9ee45 569 return _misc_.MutexGuiLeave(*args, **kwargs)
d14a1e28 570class MutexGuiLocker(object):
093d3ff1 571 """Proxy of C++ MutexGuiLocker class"""
e811c8ce
RD
572 def __repr__(self):
573 return "<%s.%s; proxy of C++ wxMutexGuiLocker instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 574 def __init__(self, *args, **kwargs):
a95a7133 575 """__init__(self) -> MutexGuiLocker"""
54f9ee45 576 newobj = _misc_.new_MutexGuiLocker(*args, **kwargs)
d14a1e28
RD
577 self.this = newobj.this
578 self.thisown = 1
579 del newobj.thisown
54f9ee45 580 def __del__(self, destroy=_misc_.delete_MutexGuiLocker):
a95a7133 581 """__del__(self)"""
d14a1e28
RD
582 try:
583 if self.thisown: destroy(self)
584 except: pass
e811c8ce 585
d14a1e28
RD
586
587class MutexGuiLockerPtr(MutexGuiLocker):
588 def __init__(self, this):
70551f47 589 self.this = this
d14a1e28
RD
590 if not hasattr(self,"thisown"): self.thisown = 0
591 self.__class__ = MutexGuiLocker
54f9ee45 592_misc_.MutexGuiLocker_swigregister(MutexGuiLockerPtr)
b2dc1044
RD
593FileSelectorPromptStr = cvar.FileSelectorPromptStr
594FileSelectorDefaultWildcardStr = cvar.FileSelectorDefaultWildcardStr
595DirSelectorPromptStr = cvar.DirSelectorPromptStr
d14a1e28
RD
596
597
e811c8ce
RD
598def Thread_IsMain(*args, **kwargs):
599 """Thread_IsMain() -> bool"""
54f9ee45 600 return _misc_.Thread_IsMain(*args, **kwargs)
d14a1e28
RD
601#---------------------------------------------------------------------------
602
54f9ee45 603class ToolTip(_core.Object):
093d3ff1 604 """Proxy of C++ ToolTip class"""
e811c8ce
RD
605 def __repr__(self):
606 return "<%s.%s; proxy of C++ wxToolTip instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 607 def __init__(self, *args, **kwargs):
a95a7133 608 """__init__(self, String tip) -> ToolTip"""
54f9ee45 609 newobj = _misc_.new_ToolTip(*args, **kwargs)
d14a1e28
RD
610 self.this = newobj.this
611 self.thisown = 1
612 del newobj.thisown
e811c8ce 613 def SetTip(*args, **kwargs):
a95a7133 614 """SetTip(self, String tip)"""
54f9ee45 615 return _misc_.ToolTip_SetTip(*args, **kwargs)
e811c8ce
RD
616
617 def GetTip(*args, **kwargs):
a95a7133 618 """GetTip(self) -> String"""
54f9ee45 619 return _misc_.ToolTip_GetTip(*args, **kwargs)
e811c8ce
RD
620
621 def GetWindow(*args, **kwargs):
a95a7133 622 """GetWindow(self) -> Window"""
54f9ee45 623 return _misc_.ToolTip_GetWindow(*args, **kwargs)
e811c8ce
RD
624
625 def Enable(*args, **kwargs):
66c033b4 626 """Enable(bool flag)"""
54f9ee45 627 return _misc_.ToolTip_Enable(*args, **kwargs)
e811c8ce
RD
628
629 Enable = staticmethod(Enable)
630 def SetDelay(*args, **kwargs):
66c033b4 631 """SetDelay(long milliseconds)"""
54f9ee45 632 return _misc_.ToolTip_SetDelay(*args, **kwargs)
e811c8ce
RD
633
634 SetDelay = staticmethod(SetDelay)
d14a1e28
RD
635
636class ToolTipPtr(ToolTip):
637 def __init__(self, this):
638 self.this = this
639 if not hasattr(self,"thisown"): self.thisown = 0
640 self.__class__ = ToolTip
54f9ee45 641_misc_.ToolTip_swigregister(ToolTipPtr)
d14a1e28 642
e811c8ce
RD
643def ToolTip_Enable(*args, **kwargs):
644 """ToolTip_Enable(bool flag)"""
54f9ee45 645 return _misc_.ToolTip_Enable(*args, **kwargs)
d14a1e28 646
e811c8ce
RD
647def ToolTip_SetDelay(*args, **kwargs):
648 """ToolTip_SetDelay(long milliseconds)"""
54f9ee45 649 return _misc_.ToolTip_SetDelay(*args, **kwargs)
d14a1e28
RD
650
651class Caret(object):
093d3ff1 652 """Proxy of C++ Caret class"""
e811c8ce
RD
653 def __repr__(self):
654 return "<%s.%s; proxy of C++ wxCaret instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 655 def __init__(self, *args, **kwargs):
a95a7133 656 """__init__(self, Window window, Size size) -> Caret"""
54f9ee45 657 newobj = _misc_.new_Caret(*args, **kwargs)
d14a1e28
RD
658 self.this = newobj.this
659 self.thisown = 1
660 del newobj.thisown
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,)
d14a1e28 2022 def __init__(self, *args, **kwargs):
0df68c9f 2023 """
a95a7133 2024 __init__(self, wxEventType type=wxEVT_NULL, int state=0, int joystick=JOYSTICK1,
0df68c9f
RD
2025 int change=0) -> JoystickEvent
2026 """
54f9ee45 2027 newobj = _misc_.new_JoystickEvent(*args, **kwargs)
d14a1e28
RD
2028 self.this = newobj.this
2029 self.thisown = 1
2030 del newobj.thisown
e811c8ce 2031 def GetPosition(*args, **kwargs):
a95a7133 2032 """GetPosition(self) -> Point"""
54f9ee45 2033 return _misc_.JoystickEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
2034
2035 def GetZPosition(*args, **kwargs):
a95a7133 2036 """GetZPosition(self) -> int"""
54f9ee45 2037 return _misc_.JoystickEvent_GetZPosition(*args, **kwargs)
e811c8ce
RD
2038
2039 def GetButtonState(*args, **kwargs):
a95a7133 2040 """GetButtonState(self) -> int"""
54f9ee45 2041 return _misc_.JoystickEvent_GetButtonState(*args, **kwargs)
e811c8ce
RD
2042
2043 def GetButtonChange(*args, **kwargs):
a95a7133 2044 """GetButtonChange(self) -> int"""
54f9ee45 2045 return _misc_.JoystickEvent_GetButtonChange(*args, **kwargs)
e811c8ce
RD
2046
2047 def GetJoystick(*args, **kwargs):
a95a7133 2048 """GetJoystick(self) -> int"""
54f9ee45 2049 return _misc_.JoystickEvent_GetJoystick(*args, **kwargs)
e811c8ce
RD
2050
2051 def SetJoystick(*args, **kwargs):
a95a7133 2052 """SetJoystick(self, int stick)"""
54f9ee45 2053 return _misc_.JoystickEvent_SetJoystick(*args, **kwargs)
e811c8ce
RD
2054
2055 def SetButtonState(*args, **kwargs):
a95a7133 2056 """SetButtonState(self, int state)"""
54f9ee45 2057 return _misc_.JoystickEvent_SetButtonState(*args, **kwargs)
e811c8ce
RD
2058
2059 def SetButtonChange(*args, **kwargs):
a95a7133 2060 """SetButtonChange(self, int change)"""
54f9ee45 2061 return _misc_.JoystickEvent_SetButtonChange(*args, **kwargs)
e811c8ce
RD
2062
2063 def SetPosition(*args, **kwargs):
a95a7133 2064 """SetPosition(self, Point pos)"""
54f9ee45 2065 return _misc_.JoystickEvent_SetPosition(*args, **kwargs)
e811c8ce
RD
2066
2067 def SetZPosition(*args, **kwargs):
a95a7133 2068 """SetZPosition(self, int zPos)"""
54f9ee45 2069 return _misc_.JoystickEvent_SetZPosition(*args, **kwargs)
e811c8ce
RD
2070
2071 def IsButton(*args, **kwargs):
a95a7133 2072 """IsButton(self) -> bool"""
54f9ee45 2073 return _misc_.JoystickEvent_IsButton(*args, **kwargs)
e811c8ce
RD
2074
2075 def IsMove(*args, **kwargs):
a95a7133 2076 """IsMove(self) -> bool"""
54f9ee45 2077 return _misc_.JoystickEvent_IsMove(*args, **kwargs)
e811c8ce
RD
2078
2079 def IsZMove(*args, **kwargs):
a95a7133 2080 """IsZMove(self) -> bool"""
54f9ee45 2081 return _misc_.JoystickEvent_IsZMove(*args, **kwargs)
e811c8ce
RD
2082
2083 def ButtonDown(*args, **kwargs):
a95a7133 2084 """ButtonDown(self, int but=JOY_BUTTON_ANY) -> bool"""
54f9ee45 2085 return _misc_.JoystickEvent_ButtonDown(*args, **kwargs)
e811c8ce
RD
2086
2087 def ButtonUp(*args, **kwargs):
a95a7133 2088 """ButtonUp(self, int but=JOY_BUTTON_ANY) -> bool"""
54f9ee45 2089 return _misc_.JoystickEvent_ButtonUp(*args, **kwargs)
e811c8ce
RD
2090
2091 def ButtonIsDown(*args, **kwargs):
a95a7133 2092 """ButtonIsDown(self, int but=JOY_BUTTON_ANY) -> bool"""
54f9ee45 2093 return _misc_.JoystickEvent_ButtonIsDown(*args, **kwargs)
e811c8ce 2094
7557b9b5
RD
2095 m_pos = property(GetPosition, SetPosition)
2096 m_zPosition = property(GetZPosition, SetZPosition)
2097 m_buttonChange = property(GetButtonChange, SetButtonChange)
2098 m_buttonState = property(GetButtonState, SetButtonState)
2099 m_joyStick = property(GetJoystick, SetJoystick)
2100
56f5d962 2101
d14a1e28
RD
2102class JoystickEventPtr(JoystickEvent):
2103 def __init__(self, this):
2104 self.this = this
2105 if not hasattr(self,"thisown"): self.thisown = 0
2106 self.__class__ = JoystickEvent
54f9ee45 2107_misc_.JoystickEvent_swigregister(JoystickEventPtr)
ab9bc19b 2108
d14a1e28
RD
2109EVT_JOY_BUTTON_DOWN = wx.PyEventBinder( wxEVT_JOY_BUTTON_DOWN )
2110EVT_JOY_BUTTON_UP = wx.PyEventBinder( wxEVT_JOY_BUTTON_UP )
2111EVT_JOY_MOVE = wx.PyEventBinder( wxEVT_JOY_MOVE )
2112EVT_JOY_ZMOVE = wx.PyEventBinder( wxEVT_JOY_ZMOVE )
ab9bc19b 2113
d14a1e28
RD
2114EVT_JOYSTICK_EVENTS = wx.PyEventBinder([ wxEVT_JOY_BUTTON_DOWN,
2115 wxEVT_JOY_BUTTON_UP,
2116 wxEVT_JOY_MOVE,
2117 wxEVT_JOY_ZMOVE,
2118 ])
5e40f9dd 2119
70551f47 2120
d14a1e28 2121#---------------------------------------------------------------------------
70551f47 2122
54f9ee45
RD
2123SOUND_SYNC = _misc_.SOUND_SYNC
2124SOUND_ASYNC = _misc_.SOUND_ASYNC
2125SOUND_LOOP = _misc_.SOUND_LOOP
4d5c3d91 2126class Sound(object):
093d3ff1 2127 """Proxy of C++ Sound class"""
e811c8ce 2128 def __repr__(self):
4d5c3d91 2129 return "<%s.%s; proxy of C++ wxSound instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
36cadbf7
RD
2130 def __init__(self, *args, **kwargs):
2131 """__init__(self, String fileName=EmptyString) -> Sound"""
2132 newobj = _misc_.new_Sound(*args, **kwargs)
d14a1e28
RD
2133 self.this = newobj.this
2134 self.thisown = 1
2135 del newobj.thisown
54f9ee45 2136 def __del__(self, destroy=_misc_.delete_Sound):
a95a7133 2137 """__del__(self)"""
d14a1e28
RD
2138 try:
2139 if self.thisown: destroy(self)
2140 except: pass
e811c8ce 2141
36cadbf7
RD
2142 def Create(*args, **kwargs):
2143 """Create(self, String fileName) -> bool"""
2144 return _misc_.Sound_Create(*args, **kwargs)
2145
2146 def CreateFromData(*args, **kwargs):
2147 """CreateFromData(self, PyObject data) -> bool"""
2148 return _misc_.Sound_CreateFromData(*args, **kwargs)
4d5c3d91 2149
e811c8ce 2150 def IsOk(*args, **kwargs):
a95a7133 2151 """IsOk(self) -> bool"""
54f9ee45 2152 return _misc_.Sound_IsOk(*args, **kwargs)
e811c8ce 2153
36cadbf7 2154 def Play(*args, **kwargs):
a95a7133 2155 """Play(self, unsigned int flags=SOUND_ASYNC) -> bool"""
36cadbf7 2156 return _misc_.Sound_Play(*args, **kwargs)
e811c8ce 2157
36cadbf7 2158 def PlaySound(*args, **kwargs):
66c033b4 2159 """PlaySound(String filename, unsigned int flags=SOUND_ASYNC) -> bool"""
36cadbf7 2160 return _misc_.Sound_PlaySound(*args, **kwargs)
4d5c3d91
RD
2161
2162 PlaySound = staticmethod(PlaySound)
2163 def Stop(*args, **kwargs):
66c033b4 2164 """Stop()"""
54f9ee45 2165 return _misc_.Sound_Stop(*args, **kwargs)
4d5c3d91
RD
2166
2167 Stop = staticmethod(Stop)
d14a1e28 2168 def __nonzero__(self): return self.IsOk()
bc29c5e0 2169
4d5c3d91 2170class SoundPtr(Sound):
d14a1e28
RD
2171 def __init__(self, this):
2172 self.this = this
2173 if not hasattr(self,"thisown"): self.thisown = 0
4d5c3d91 2174 self.__class__ = Sound
54f9ee45 2175_misc_.Sound_swigregister(SoundPtr)
70551f47 2176
36cadbf7
RD
2177def SoundFromData(*args, **kwargs):
2178 """SoundFromData(PyObject data) -> Sound"""
2179 val = _misc_.new_SoundFromData(*args, **kwargs)
2180 val.thisown = 1
2181 return val
2182
2183def Sound_PlaySound(*args, **kwargs):
4d5c3d91 2184 """Sound_PlaySound(String filename, unsigned int flags=SOUND_ASYNC) -> bool"""
36cadbf7 2185 return _misc_.Sound_PlaySound(*args, **kwargs)
4d5c3d91
RD
2186
2187def Sound_Stop(*args, **kwargs):
2188 """Sound_Stop()"""
54f9ee45 2189 return _misc_.Sound_Stop(*args, **kwargs)
70551f47 2190
d14a1e28
RD
2191#---------------------------------------------------------------------------
2192
54f9ee45
RD
2193MAILCAP_STANDARD = _misc_.MAILCAP_STANDARD
2194MAILCAP_NETSCAPE = _misc_.MAILCAP_NETSCAPE
2195MAILCAP_KDE = _misc_.MAILCAP_KDE
2196MAILCAP_GNOME = _misc_.MAILCAP_GNOME
2197MAILCAP_ALL = _misc_.MAILCAP_ALL
d14a1e28 2198class FileTypeInfo(object):
093d3ff1 2199 """Proxy of C++ FileTypeInfo class"""
e811c8ce
RD
2200 def __repr__(self):
2201 return "<%s.%s; proxy of C++ wxFileTypeInfo instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2202 def __init__(self, *args, **kwargs):
a95a7133 2203 """__init__(self, String mimeType, String openCmd, String printCmd, String desc) -> FileTypeInfo"""
54f9ee45 2204 newobj = _misc_.new_FileTypeInfo(*args, **kwargs)
d14a1e28
RD
2205 self.this = newobj.this
2206 self.thisown = 1
2207 del newobj.thisown
e811c8ce 2208 def IsValid(*args, **kwargs):
a95a7133 2209 """IsValid(self) -> bool"""
54f9ee45 2210 return _misc_.FileTypeInfo_IsValid(*args, **kwargs)
e811c8ce
RD
2211
2212 def SetIcon(*args, **kwargs):
a95a7133 2213 """SetIcon(self, String iconFile, int iconIndex=0)"""
54f9ee45 2214 return _misc_.FileTypeInfo_SetIcon(*args, **kwargs)
e811c8ce
RD
2215
2216 def SetShortDesc(*args, **kwargs):
a95a7133 2217 """SetShortDesc(self, String shortDesc)"""
54f9ee45 2218 return _misc_.FileTypeInfo_SetShortDesc(*args, **kwargs)
e811c8ce
RD
2219
2220 def GetMimeType(*args, **kwargs):
a95a7133 2221 """GetMimeType(self) -> String"""
54f9ee45 2222 return _misc_.FileTypeInfo_GetMimeType(*args, **kwargs)
e811c8ce
RD
2223
2224 def GetOpenCommand(*args, **kwargs):
a95a7133 2225 """GetOpenCommand(self) -> String"""
54f9ee45 2226 return _misc_.FileTypeInfo_GetOpenCommand(*args, **kwargs)
e811c8ce
RD
2227
2228 def GetPrintCommand(*args, **kwargs):
a95a7133 2229 """GetPrintCommand(self) -> String"""
54f9ee45 2230 return _misc_.FileTypeInfo_GetPrintCommand(*args, **kwargs)
e811c8ce
RD
2231
2232 def GetShortDesc(*args, **kwargs):
a95a7133 2233 """GetShortDesc(self) -> String"""
54f9ee45 2234 return _misc_.FileTypeInfo_GetShortDesc(*args, **kwargs)
e811c8ce
RD
2235
2236 def GetDescription(*args, **kwargs):
a95a7133 2237 """GetDescription(self) -> String"""
54f9ee45 2238 return _misc_.FileTypeInfo_GetDescription(*args, **kwargs)
e811c8ce
RD
2239
2240 def GetExtensions(*args, **kwargs):
a95a7133 2241 """GetExtensions(self) -> wxArrayString"""
54f9ee45 2242 return _misc_.FileTypeInfo_GetExtensions(*args, **kwargs)
e811c8ce
RD
2243
2244 def GetExtensionsCount(*args, **kwargs):
a95a7133 2245 """GetExtensionsCount(self) -> int"""
54f9ee45 2246 return _misc_.FileTypeInfo_GetExtensionsCount(*args, **kwargs)
e811c8ce
RD
2247
2248 def GetIconFile(*args, **kwargs):
a95a7133 2249 """GetIconFile(self) -> String"""
54f9ee45 2250 return _misc_.FileTypeInfo_GetIconFile(*args, **kwargs)
e811c8ce
RD
2251
2252 def GetIconIndex(*args, **kwargs):
a95a7133 2253 """GetIconIndex(self) -> int"""
54f9ee45 2254 return _misc_.FileTypeInfo_GetIconIndex(*args, **kwargs)
e811c8ce 2255
70551f47 2256
d14a1e28
RD
2257class FileTypeInfoPtr(FileTypeInfo):
2258 def __init__(self, this):
2259 self.this = this
2260 if not hasattr(self,"thisown"): self.thisown = 0
2261 self.__class__ = FileTypeInfo
54f9ee45 2262_misc_.FileTypeInfo_swigregister(FileTypeInfoPtr)
bc29c5e0 2263
d14a1e28 2264def FileTypeInfoSequence(*args, **kwargs):
e811c8ce 2265 """FileTypeInfoSequence(wxArrayString sArray) -> FileTypeInfo"""
54f9ee45 2266 val = _misc_.new_FileTypeInfoSequence(*args, **kwargs)
d14a1e28
RD
2267 val.thisown = 1
2268 return val
bc29c5e0 2269
d14a1e28 2270def NullFileTypeInfo(*args, **kwargs):
e811c8ce 2271 """NullFileTypeInfo() -> FileTypeInfo"""
54f9ee45 2272 val = _misc_.new_NullFileTypeInfo(*args, **kwargs)
d14a1e28
RD
2273 val.thisown = 1
2274 return val
bc29c5e0 2275
d14a1e28 2276class FileType(object):
093d3ff1 2277 """Proxy of C++ FileType class"""
e811c8ce
RD
2278 def __repr__(self):
2279 return "<%s.%s; proxy of C++ wxFileType instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2280 def __init__(self, *args, **kwargs):
a95a7133 2281 """__init__(self, FileTypeInfo ftInfo) -> FileType"""
54f9ee45 2282 newobj = _misc_.new_FileType(*args, **kwargs)
d14a1e28
RD
2283 self.this = newobj.this
2284 self.thisown = 1
2285 del newobj.thisown
54f9ee45 2286 def __del__(self, destroy=_misc_.delete_FileType):
a95a7133 2287 """__del__(self)"""
d14a1e28
RD
2288 try:
2289 if self.thisown: destroy(self)
2290 except: pass
e811c8ce
RD
2291
2292 def GetMimeType(*args, **kwargs):
a95a7133 2293 """GetMimeType(self) -> PyObject"""
54f9ee45 2294 return _misc_.FileType_GetMimeType(*args, **kwargs)
e811c8ce
RD
2295
2296 def GetMimeTypes(*args, **kwargs):
a95a7133 2297 """GetMimeTypes(self) -> PyObject"""
54f9ee45 2298 return _misc_.FileType_GetMimeTypes(*args, **kwargs)
e811c8ce
RD
2299
2300 def GetExtensions(*args, **kwargs):
a95a7133 2301 """GetExtensions(self) -> PyObject"""
54f9ee45 2302 return _misc_.FileType_GetExtensions(*args, **kwargs)
e811c8ce
RD
2303
2304 def GetIcon(*args, **kwargs):
a95a7133 2305 """GetIcon(self) -> Icon"""
54f9ee45 2306 return _misc_.FileType_GetIcon(*args, **kwargs)
e811c8ce
RD
2307
2308 def GetIconInfo(*args, **kwargs):
a95a7133 2309 """GetIconInfo(self) -> PyObject"""
54f9ee45 2310 return _misc_.FileType_GetIconInfo(*args, **kwargs)
e811c8ce
RD
2311
2312 def GetDescription(*args, **kwargs):
a95a7133 2313 """GetDescription(self) -> PyObject"""
54f9ee45 2314 return _misc_.FileType_GetDescription(*args, **kwargs)
e811c8ce
RD
2315
2316 def GetOpenCommand(*args, **kwargs):
a95a7133 2317 """GetOpenCommand(self, String filename, String mimetype=EmptyString) -> PyObject"""
54f9ee45 2318 return _misc_.FileType_GetOpenCommand(*args, **kwargs)
e811c8ce
RD
2319
2320 def GetPrintCommand(*args, **kwargs):
a95a7133 2321 """GetPrintCommand(self, String filename, String mimetype=EmptyString) -> PyObject"""
54f9ee45 2322 return _misc_.FileType_GetPrintCommand(*args, **kwargs)
e811c8ce
RD
2323
2324 def GetAllCommands(*args, **kwargs):
a95a7133 2325 """GetAllCommands(self, String filename, String mimetype=EmptyString) -> PyObject"""
54f9ee45 2326 return _misc_.FileType_GetAllCommands(*args, **kwargs)
e811c8ce
RD
2327
2328 def SetCommand(*args, **kwargs):
a95a7133 2329 """SetCommand(self, String cmd, String verb, bool overwriteprompt=True) -> bool"""
54f9ee45 2330 return _misc_.FileType_SetCommand(*args, **kwargs)
e811c8ce
RD
2331
2332 def SetDefaultIcon(*args, **kwargs):
a95a7133 2333 """SetDefaultIcon(self, String cmd=EmptyString, int index=0) -> bool"""
54f9ee45 2334 return _misc_.FileType_SetDefaultIcon(*args, **kwargs)
e811c8ce
RD
2335
2336 def Unassociate(*args, **kwargs):
a95a7133 2337 """Unassociate(self) -> bool"""
54f9ee45 2338 return _misc_.FileType_Unassociate(*args, **kwargs)
e811c8ce
RD
2339
2340 def ExpandCommand(*args, **kwargs):
66c033b4 2341 """ExpandCommand(String command, String filename, String mimetype=EmptyString) -> String"""
54f9ee45 2342 return _misc_.FileType_ExpandCommand(*args, **kwargs)
e811c8ce
RD
2343
2344 ExpandCommand = staticmethod(ExpandCommand)
c368d904 2345
d14a1e28
RD
2346class FileTypePtr(FileType):
2347 def __init__(self, this):
2348 self.this = this
2349 if not hasattr(self,"thisown"): self.thisown = 0
2350 self.__class__ = FileType
54f9ee45 2351_misc_.FileType_swigregister(FileTypePtr)
12d1116b 2352
e811c8ce 2353def FileType_ExpandCommand(*args, **kwargs):
196addbf 2354 """FileType_ExpandCommand(String command, String filename, String mimetype=EmptyString) -> String"""
54f9ee45 2355 return _misc_.FileType_ExpandCommand(*args, **kwargs)
d24a34bb 2356
d14a1e28 2357class MimeTypesManager(object):
093d3ff1 2358 """Proxy of C++ MimeTypesManager class"""
e811c8ce
RD
2359 def __repr__(self):
2360 return "<%s.%s; proxy of C++ wxMimeTypesManager instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2361 def IsOfType(*args, **kwargs):
66c033b4 2362 """IsOfType(String mimeType, String wildcard) -> bool"""
54f9ee45 2363 return _misc_.MimeTypesManager_IsOfType(*args, **kwargs)
e811c8ce
RD
2364
2365 IsOfType = staticmethod(IsOfType)
d14a1e28 2366 def __init__(self, *args, **kwargs):
a95a7133 2367 """__init__(self) -> MimeTypesManager"""
54f9ee45 2368 newobj = _misc_.new_MimeTypesManager(*args, **kwargs)
d14a1e28
RD
2369 self.this = newobj.this
2370 self.thisown = 1
2371 del newobj.thisown
e811c8ce 2372 def Initialize(*args, **kwargs):
a95a7133 2373 """Initialize(self, int mailcapStyle=MAILCAP_ALL, String extraDir=EmptyString)"""
54f9ee45 2374 return _misc_.MimeTypesManager_Initialize(*args, **kwargs)
e811c8ce
RD
2375
2376 def ClearData(*args, **kwargs):
a95a7133 2377 """ClearData(self)"""
54f9ee45 2378 return _misc_.MimeTypesManager_ClearData(*args, **kwargs)
e811c8ce
RD
2379
2380 def GetFileTypeFromExtension(*args, **kwargs):
a95a7133 2381 """GetFileTypeFromExtension(self, String ext) -> FileType"""
54f9ee45 2382 return _misc_.MimeTypesManager_GetFileTypeFromExtension(*args, **kwargs)
e811c8ce
RD
2383
2384 def GetFileTypeFromMimeType(*args, **kwargs):
a95a7133 2385 """GetFileTypeFromMimeType(self, String mimeType) -> FileType"""
54f9ee45 2386 return _misc_.MimeTypesManager_GetFileTypeFromMimeType(*args, **kwargs)
e811c8ce
RD
2387
2388 def ReadMailcap(*args, **kwargs):
a95a7133 2389 """ReadMailcap(self, String filename, bool fallback=False) -> bool"""
54f9ee45 2390 return _misc_.MimeTypesManager_ReadMailcap(*args, **kwargs)
e811c8ce
RD
2391
2392 def ReadMimeTypes(*args, **kwargs):
a95a7133 2393 """ReadMimeTypes(self, String filename) -> bool"""
54f9ee45 2394 return _misc_.MimeTypesManager_ReadMimeTypes(*args, **kwargs)
e811c8ce
RD
2395
2396 def EnumAllFileTypes(*args, **kwargs):
a95a7133 2397 """EnumAllFileTypes(self) -> PyObject"""
54f9ee45 2398 return _misc_.MimeTypesManager_EnumAllFileTypes(*args, **kwargs)
e811c8ce
RD
2399
2400 def AddFallback(*args, **kwargs):
a95a7133 2401 """AddFallback(self, FileTypeInfo ft)"""
54f9ee45 2402 return _misc_.MimeTypesManager_AddFallback(*args, **kwargs)
e811c8ce
RD
2403
2404 def Associate(*args, **kwargs):
a95a7133 2405 """Associate(self, FileTypeInfo ftInfo) -> FileType"""
54f9ee45 2406 return _misc_.MimeTypesManager_Associate(*args, **kwargs)
e811c8ce
RD
2407
2408 def Unassociate(*args, **kwargs):
a95a7133 2409 """Unassociate(self, FileType ft) -> bool"""
54f9ee45 2410 return _misc_.MimeTypesManager_Unassociate(*args, **kwargs)
e811c8ce 2411
54f9ee45 2412 def __del__(self, destroy=_misc_.delete_MimeTypesManager):
a95a7133 2413 """__del__(self)"""
d14a1e28
RD
2414 try:
2415 if self.thisown: destroy(self)
2416 except: pass
e811c8ce 2417
70551f47 2418
d14a1e28
RD
2419class MimeTypesManagerPtr(MimeTypesManager):
2420 def __init__(self, this):
2421 self.this = this
2422 if not hasattr(self,"thisown"): self.thisown = 0
2423 self.__class__ = MimeTypesManager
54f9ee45 2424_misc_.MimeTypesManager_swigregister(MimeTypesManagerPtr)
d14a1e28 2425TheMimeTypesManager = cvar.TheMimeTypesManager
ab9bc19b 2426
e811c8ce 2427def MimeTypesManager_IsOfType(*args, **kwargs):
196addbf 2428 """MimeTypesManager_IsOfType(String mimeType, String wildcard) -> bool"""
54f9ee45 2429 return _misc_.MimeTypesManager_IsOfType(*args, **kwargs)
5e40f9dd 2430
d14a1e28 2431#---------------------------------------------------------------------------
d24a34bb 2432
d14a1e28 2433class ArtProvider(object):
66c033b4
RD
2434 """
2435 The wx.ArtProvider class is used to customize the look of wxWidgets
2436 application. When wxWidgets needs to display an icon or a bitmap (e.g.
2437 in the standard file dialog), it does not use hard-coded resource but
2438 asks wx.ArtProvider for it instead. This way the users can plug in
2439 their own wx.ArtProvider class and easily replace standard art with
2440 his/her own version. It is easy thing to do: all that is needed is
2441 to derive a class from wx.ArtProvider, override it's CreateBitmap
2442 method and register the provider with wx.ArtProvider.PushProvider::
2443
2444 class MyArtProvider(wx.ArtProvider):
2445 def __init__(self):
2446 wx.ArtProvider.__init__(self)
2447
2448 def CreateBitmap(self, artid, client, size):
2449 ...
2450 return bmp
2451
66c033b4 2452 """
e811c8ce
RD
2453 def __repr__(self):
2454 return "<%s.%s; proxy of C++ wxPyArtProvider instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2455 def __init__(self, *args, **kwargs):
66c033b4
RD
2456 """
2457 __init__(self) -> ArtProvider
2458
2459 The wx.ArtProvider class is used to customize the look of wxWidgets
2460 application. When wxWidgets needs to display an icon or a bitmap (e.g.
2461 in the standard file dialog), it does not use hard-coded resource but
2462 asks wx.ArtProvider for it instead. This way the users can plug in
2463 their own wx.ArtProvider class and easily replace standard art with
2464 his/her own version. It is easy thing to do: all that is needed is
2465 to derive a class from wx.ArtProvider, override it's CreateBitmap
2466 method and register the provider with wx.ArtProvider.PushProvider::
2467
2468 class MyArtProvider(wx.ArtProvider):
2469 def __init__(self):
2470 wx.ArtProvider.__init__(self)
2471
2472 def CreateBitmap(self, artid, client, size):
2473 ...
2474 return bmp
2475
66c033b4 2476 """
54f9ee45 2477 newobj = _misc_.new_ArtProvider(*args, **kwargs)
d14a1e28
RD
2478 self.this = newobj.this
2479 self.thisown = 1
2480 del newobj.thisown
2481 self._setCallbackInfo(self, ArtProvider)
e811c8ce 2482
e811c8ce 2483 def _setCallbackInfo(*args, **kwargs):
a95a7133 2484 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
54f9ee45 2485 return _misc_.ArtProvider__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
2486
2487 def PushProvider(*args, **kwargs):
0df68c9f 2488 """
66c033b4 2489 PushProvider(ArtProvider provider)
1e0c8722 2490
0df68c9f
RD
2491 Add new provider to the top of providers stack.
2492 """
54f9ee45 2493 return _misc_.ArtProvider_PushProvider(*args, **kwargs)
e811c8ce
RD
2494
2495 PushProvider = staticmethod(PushProvider)
2496 def PopProvider(*args, **kwargs):
0df68c9f 2497 """
66c033b4 2498 PopProvider() -> bool
1e0c8722 2499
0df68c9f
RD
2500 Remove latest added provider and delete it.
2501 """
54f9ee45 2502 return _misc_.ArtProvider_PopProvider(*args, **kwargs)
e811c8ce
RD
2503
2504 PopProvider = staticmethod(PopProvider)
2505 def RemoveProvider(*args, **kwargs):
0df68c9f 2506 """
66c033b4 2507 RemoveProvider(ArtProvider provider) -> bool
1e0c8722 2508
66c033b4
RD
2509 Remove provider. The provider must have been added previously! The
2510 provider is _not_ deleted.
0df68c9f 2511 """
54f9ee45 2512 return _misc_.ArtProvider_RemoveProvider(*args, **kwargs)
e811c8ce
RD
2513
2514 RemoveProvider = staticmethod(RemoveProvider)
2515 def GetBitmap(*args, **kwargs):
0df68c9f 2516 """
66c033b4 2517 GetBitmap(String id, String client=ART_OTHER, Size size=DefaultSize) -> Bitmap
1e0c8722 2518
0df68c9f
RD
2519 Query the providers for bitmap with given ID and return it. Return
2520 wx.NullBitmap if no provider provides it.
2521 """
54f9ee45 2522 return _misc_.ArtProvider_GetBitmap(*args, **kwargs)
e811c8ce
RD
2523
2524 GetBitmap = staticmethod(GetBitmap)
2525 def GetIcon(*args, **kwargs):
0df68c9f 2526 """
66c033b4 2527 GetIcon(String id, String client=ART_OTHER, Size size=DefaultSize) -> Icon
1e0c8722 2528
66c033b4 2529 Query the providers for icon with given ID and return it. Return
0df68c9f
RD
2530 wx.NullIcon if no provider provides it.
2531 """
54f9ee45 2532 return _misc_.ArtProvider_GetIcon(*args, **kwargs)
e811c8ce
RD
2533
2534 GetIcon = staticmethod(GetIcon)
1e0c8722 2535 def Destroy(*args, **kwargs):
a95a7133 2536 """Destroy(self)"""
54f9ee45 2537 return _misc_.ArtProvider_Destroy(*args, **kwargs)
1e0c8722 2538
d29aba2f 2539
d14a1e28
RD
2540class ArtProviderPtr(ArtProvider):
2541 def __init__(self, this):
2542 self.this = this
2543 if not hasattr(self,"thisown"): self.thisown = 0
2544 self.__class__ = ArtProvider
54f9ee45 2545_misc_.ArtProvider_swigregister(ArtProviderPtr)
d14a1e28
RD
2546ART_TOOLBAR = cvar.ART_TOOLBAR
2547ART_MENU = cvar.ART_MENU
2548ART_FRAME_ICON = cvar.ART_FRAME_ICON
2549ART_CMN_DIALOG = cvar.ART_CMN_DIALOG
2550ART_HELP_BROWSER = cvar.ART_HELP_BROWSER
2551ART_MESSAGE_BOX = cvar.ART_MESSAGE_BOX
4cf4100f 2552ART_BUTTON = cvar.ART_BUTTON
d14a1e28
RD
2553ART_OTHER = cvar.ART_OTHER
2554ART_ADD_BOOKMARK = cvar.ART_ADD_BOOKMARK
2555ART_DEL_BOOKMARK = cvar.ART_DEL_BOOKMARK
2556ART_HELP_SIDE_PANEL = cvar.ART_HELP_SIDE_PANEL
2557ART_HELP_SETTINGS = cvar.ART_HELP_SETTINGS
2558ART_HELP_BOOK = cvar.ART_HELP_BOOK
2559ART_HELP_FOLDER = cvar.ART_HELP_FOLDER
2560ART_HELP_PAGE = cvar.ART_HELP_PAGE
2561ART_GO_BACK = cvar.ART_GO_BACK
2562ART_GO_FORWARD = cvar.ART_GO_FORWARD
2563ART_GO_UP = cvar.ART_GO_UP
2564ART_GO_DOWN = cvar.ART_GO_DOWN
2565ART_GO_TO_PARENT = cvar.ART_GO_TO_PARENT
2566ART_GO_HOME = cvar.ART_GO_HOME
2567ART_FILE_OPEN = cvar.ART_FILE_OPEN
2568ART_PRINT = cvar.ART_PRINT
2569ART_HELP = cvar.ART_HELP
2570ART_TIP = cvar.ART_TIP
2571ART_REPORT_VIEW = cvar.ART_REPORT_VIEW
2572ART_LIST_VIEW = cvar.ART_LIST_VIEW
2573ART_NEW_DIR = cvar.ART_NEW_DIR
f78cc896
RD
2574ART_HARDDISK = cvar.ART_HARDDISK
2575ART_FLOPPY = cvar.ART_FLOPPY
2576ART_CDROM = cvar.ART_CDROM
2577ART_REMOVABLE = cvar.ART_REMOVABLE
d14a1e28 2578ART_FOLDER = cvar.ART_FOLDER
f78cc896 2579ART_FOLDER_OPEN = cvar.ART_FOLDER_OPEN
d14a1e28
RD
2580ART_GO_DIR_UP = cvar.ART_GO_DIR_UP
2581ART_EXECUTABLE_FILE = cvar.ART_EXECUTABLE_FILE
2582ART_NORMAL_FILE = cvar.ART_NORMAL_FILE
2583ART_TICK_MARK = cvar.ART_TICK_MARK
2584ART_CROSS_MARK = cvar.ART_CROSS_MARK
2585ART_ERROR = cvar.ART_ERROR
2586ART_QUESTION = cvar.ART_QUESTION
2587ART_WARNING = cvar.ART_WARNING
2588ART_INFORMATION = cvar.ART_INFORMATION
2589ART_MISSING_IMAGE = cvar.ART_MISSING_IMAGE
2590
e811c8ce 2591def ArtProvider_PushProvider(*args, **kwargs):
0df68c9f
RD
2592 """
2593 ArtProvider_PushProvider(ArtProvider provider)
1e0c8722 2594
0df68c9f
RD
2595 Add new provider to the top of providers stack.
2596 """
54f9ee45 2597 return _misc_.ArtProvider_PushProvider(*args, **kwargs)
d14a1e28 2598
e811c8ce 2599def ArtProvider_PopProvider(*args, **kwargs):
0df68c9f
RD
2600 """
2601 ArtProvider_PopProvider() -> bool
1e0c8722 2602
0df68c9f
RD
2603 Remove latest added provider and delete it.
2604 """
54f9ee45 2605 return _misc_.ArtProvider_PopProvider(*args, **kwargs)
d14a1e28 2606
e811c8ce 2607def ArtProvider_RemoveProvider(*args, **kwargs):
0df68c9f
RD
2608 """
2609 ArtProvider_RemoveProvider(ArtProvider provider) -> bool
1e0c8722 2610
66c033b4
RD
2611 Remove provider. The provider must have been added previously! The
2612 provider is _not_ deleted.
0df68c9f 2613 """
54f9ee45 2614 return _misc_.ArtProvider_RemoveProvider(*args, **kwargs)
d14a1e28 2615
e811c8ce 2616def ArtProvider_GetBitmap(*args, **kwargs):
0df68c9f 2617 """
196addbf 2618 ArtProvider_GetBitmap(String id, String client=ART_OTHER, Size size=DefaultSize) -> Bitmap
1e0c8722 2619
0df68c9f
RD
2620 Query the providers for bitmap with given ID and return it. Return
2621 wx.NullBitmap if no provider provides it.
2622 """
54f9ee45 2623 return _misc_.ArtProvider_GetBitmap(*args, **kwargs)
d14a1e28 2624
e811c8ce 2625def ArtProvider_GetIcon(*args, **kwargs):
0df68c9f 2626 """
b2dc1044 2627 ArtProvider_GetIcon(String id, String client=ART_OTHER, Size size=DefaultSize) -> Icon
1e0c8722 2628
66c033b4 2629 Query the providers for icon with given ID and return it. Return
0df68c9f
RD
2630 wx.NullIcon if no provider provides it.
2631 """
54f9ee45 2632 return _misc_.ArtProvider_GetIcon(*args, **kwargs)
d14a1e28
RD
2633
2634#---------------------------------------------------------------------------
2635
54f9ee45
RD
2636CONFIG_USE_LOCAL_FILE = _misc_.CONFIG_USE_LOCAL_FILE
2637CONFIG_USE_GLOBAL_FILE = _misc_.CONFIG_USE_GLOBAL_FILE
2638CONFIG_USE_RELATIVE_PATH = _misc_.CONFIG_USE_RELATIVE_PATH
2639CONFIG_USE_NO_ESCAPE_CHARACTERS = _misc_.CONFIG_USE_NO_ESCAPE_CHARACTERS
d14a1e28 2640class ConfigBase(object):
b88bce5f
RD
2641 """
2642 wx.ConfigBase class defines the basic interface of all config
41e2b43e
RD
2643 classes. It can not be used by itself (it is an abstract base class)
2644 and you will always use one of its derivations: wx.Config or
2645 wx.FileConfig.
2646
2647 wx.ConfigBase organizes the items in a tree-like structure, modeled
2648 after the Unix/Dos filesystem. There are groups that act like
2649 directories and entries, key/value pairs that act like files. There
2650 is always one current group given by the current path. As in the file
2651 system case, to specify a key in the config class you must use a path
2652 to it. Config classes also support the notion of the current group,
2653 which makes it possible to use relative paths.
b88bce5f 2654
4276dc52
RD
2655 Keys are pairs "key_name = value" where value may be of string,
2656 integer floating point or boolean, you can not store binary data
41e2b43e
RD
2657 without first encoding it as a string. For performance reasons items
2658 should be kept small, no more than a couple kilobytes.
b88bce5f
RD
2659
2660 """
e811c8ce
RD
2661 def __init__(self): raise RuntimeError, "No constructor defined"
2662 def __repr__(self):
2663 return "<%s.%s; proxy of C++ wxConfigBase instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45 2664 def __del__(self, destroy=_misc_.delete_ConfigBase):
a95a7133 2665 """__del__(self)"""
d14a1e28
RD
2666 try:
2667 if self.thisown: destroy(self)
2668 except: pass
e811c8ce 2669
54f9ee45
RD
2670 Type_Unknown = _misc_.ConfigBase_Type_Unknown
2671 Type_String = _misc_.ConfigBase_Type_String
2672 Type_Boolean = _misc_.ConfigBase_Type_Boolean
2673 Type_Integer = _misc_.ConfigBase_Type_Integer
2674 Type_Float = _misc_.ConfigBase_Type_Float
e811c8ce 2675 def Set(*args, **kwargs):
b88bce5f 2676 """
66c033b4 2677 Set(ConfigBase config) -> ConfigBase
b88bce5f 2678
41e2b43e
RD
2679 Sets the global config object (the one returned by Get) and returns a
2680 reference to the previous global config object.
b88bce5f 2681 """
54f9ee45 2682 return _misc_.ConfigBase_Set(*args, **kwargs)
e811c8ce
RD
2683
2684 Set = staticmethod(Set)
2685 def Get(*args, **kwargs):
b88bce5f 2686 """
66c033b4 2687 Get(bool createOnDemand=True) -> ConfigBase
b88bce5f
RD
2688
2689 Returns the current global config object, creating one if neccessary.
2690 """
54f9ee45 2691 return _misc_.ConfigBase_Get(*args, **kwargs)
e811c8ce
RD
2692
2693 Get = staticmethod(Get)
2694 def Create(*args, **kwargs):
b88bce5f 2695 """
66c033b4 2696 Create() -> ConfigBase
b88bce5f
RD
2697
2698 Create and return a new global config object. This function will
2699 create the "best" implementation of wx.Config available for the
2700 current platform.
2701 """
54f9ee45 2702 return _misc_.ConfigBase_Create(*args, **kwargs)
e811c8ce
RD
2703
2704 Create = staticmethod(Create)
2705 def DontCreateOnDemand(*args, **kwargs):
b88bce5f 2706 """
66c033b4 2707 DontCreateOnDemand()
b88bce5f 2708
41e2b43e
RD
2709 Should Get() try to create a new log object if there isn't a current
2710 one?
b88bce5f 2711 """
54f9ee45 2712 return _misc_.ConfigBase_DontCreateOnDemand(*args, **kwargs)
e811c8ce
RD
2713
2714 DontCreateOnDemand = staticmethod(DontCreateOnDemand)
2715 def SetPath(*args, **kwargs):
b88bce5f 2716 """
a95a7133 2717 SetPath(self, String path)
b88bce5f 2718
41e2b43e
RD
2719 Set current path: if the first character is '/', it's the absolute
2720 path, otherwise it's a relative path. '..' is supported. If the
2721 strPath doesn't exist it is created.
b88bce5f 2722 """
54f9ee45 2723 return _misc_.ConfigBase_SetPath(*args, **kwargs)
e811c8ce
RD
2724
2725 def GetPath(*args, **kwargs):
b88bce5f 2726 """
a95a7133 2727 GetPath(self) -> String
b88bce5f
RD
2728
2729 Retrieve the current path (always as absolute path)
2730 """
54f9ee45 2731 return _misc_.ConfigBase_GetPath(*args, **kwargs)
e811c8ce
RD
2732
2733 def GetFirstGroup(*args, **kwargs):
b88bce5f
RD
2734 """
2735 GetFirstGroup() -> (more, value, index)
2736
41e2b43e
RD
2737 Allows enumerating the subgroups in a config object. Returns a tuple
2738 containing a flag indicating there are more items, the name of the
2739 current item, and an index to pass to GetNextGroup to fetch the next
2740 item.
b88bce5f 2741 """
54f9ee45 2742 return _misc_.ConfigBase_GetFirstGroup(*args, **kwargs)
e811c8ce
RD
2743
2744 def GetNextGroup(*args, **kwargs):
b88bce5f
RD
2745 """
2746 GetNextGroup(long index) -> (more, value, index)
2747
41e2b43e
RD
2748 Allows enumerating the subgroups in a config object. Returns a tuple
2749 containing a flag indicating there are more items, the name of the
2750 current item, and an index to pass to GetNextGroup to fetch the next
2751 item.
b88bce5f 2752 """
54f9ee45 2753 return _misc_.ConfigBase_GetNextGroup(*args, **kwargs)
e811c8ce
RD
2754
2755 def GetFirstEntry(*args, **kwargs):
b88bce5f
RD
2756 """
2757 GetFirstEntry() -> (more, value, index)
2758
2759 Allows enumerating the entries in the current group in a config
41e2b43e
RD
2760 object. Returns a tuple containing a flag indicating there are more
2761 items, the name of the current item, and an index to pass to
b88bce5f
RD
2762 GetNextGroup to fetch the next item.
2763 """
54f9ee45 2764 return _misc_.ConfigBase_GetFirstEntry(*args, **kwargs)
e811c8ce
RD
2765
2766 def GetNextEntry(*args, **kwargs):
b88bce5f
RD
2767 """
2768 GetNextEntry(long index) -> (more, value, index)
2769
2770 Allows enumerating the entries in the current group in a config
41e2b43e
RD
2771 object. Returns a tuple containing a flag indicating there are more
2772 items, the name of the current item, and an index to pass to
b88bce5f
RD
2773 GetNextGroup to fetch the next item.
2774 """
54f9ee45 2775 return _misc_.ConfigBase_GetNextEntry(*args, **kwargs)
e811c8ce
RD
2776
2777 def GetNumberOfEntries(*args, **kwargs):
b88bce5f 2778 """
a95a7133 2779 GetNumberOfEntries(self, bool recursive=False) -> size_t
b88bce5f 2780
41e2b43e
RD
2781 Get the number of entries in the current group, with or without its
2782 subgroups.
b88bce5f 2783 """
54f9ee45 2784 return _misc_.ConfigBase_GetNumberOfEntries(*args, **kwargs)
e811c8ce
RD
2785
2786 def GetNumberOfGroups(*args, **kwargs):
b88bce5f 2787 """
a95a7133 2788 GetNumberOfGroups(self, bool recursive=False) -> size_t
b88bce5f 2789
41e2b43e
RD
2790 Get the number of subgroups in the current group, with or without its
2791 subgroups.
b88bce5f 2792 """
54f9ee45 2793 return _misc_.ConfigBase_GetNumberOfGroups(*args, **kwargs)
e811c8ce
RD
2794
2795 def HasGroup(*args, **kwargs):
b88bce5f 2796 """
a95a7133 2797 HasGroup(self, String name) -> bool
b88bce5f
RD
2798
2799 Returns True if the group by this name exists
2800 """
54f9ee45 2801 return _misc_.ConfigBase_HasGroup(*args, **kwargs)
e811c8ce
RD
2802
2803 def HasEntry(*args, **kwargs):
b88bce5f 2804 """
a95a7133 2805 HasEntry(self, String name) -> bool
b88bce5f
RD
2806
2807 Returns True if the entry by this name exists
2808 """
54f9ee45 2809 return _misc_.ConfigBase_HasEntry(*args, **kwargs)
e811c8ce
RD
2810
2811 def Exists(*args, **kwargs):
b88bce5f 2812 """
a95a7133 2813 Exists(self, String name) -> bool
b88bce5f
RD
2814
2815 Returns True if either a group or an entry with a given name exists
2816 """
54f9ee45 2817 return _misc_.ConfigBase_Exists(*args, **kwargs)
e811c8ce
RD
2818
2819 def GetEntryType(*args, **kwargs):
b88bce5f 2820 """
a95a7133 2821 GetEntryType(self, String name) -> int
b88bce5f
RD
2822
2823 Get the type of the entry. Returns one of the wx.Config.Type_XXX values.
2824 """
54f9ee45 2825 return _misc_.ConfigBase_GetEntryType(*args, **kwargs)
e811c8ce
RD
2826
2827 def Read(*args, **kwargs):
b88bce5f 2828 """
a95a7133 2829 Read(self, String key, String defaultVal=EmptyString) -> String
b88bce5f
RD
2830
2831 Returns the value of key if it exists, defaultVal otherwise.
2832 """
54f9ee45 2833 return _misc_.ConfigBase_Read(*args, **kwargs)
e811c8ce
RD
2834
2835 def ReadInt(*args, **kwargs):
b88bce5f 2836 """
a95a7133 2837 ReadInt(self, String key, long defaultVal=0) -> long
b88bce5f
RD
2838
2839 Returns the value of key if it exists, defaultVal otherwise.
2840 """
54f9ee45 2841 return _misc_.ConfigBase_ReadInt(*args, **kwargs)
e811c8ce
RD
2842
2843 def ReadFloat(*args, **kwargs):
b88bce5f 2844 """
a95a7133 2845 ReadFloat(self, String key, double defaultVal=0.0) -> double
b88bce5f
RD
2846
2847 Returns the value of key if it exists, defaultVal otherwise.
2848 """
54f9ee45 2849 return _misc_.ConfigBase_ReadFloat(*args, **kwargs)
e811c8ce
RD
2850
2851 def ReadBool(*args, **kwargs):
b88bce5f 2852 """
a95a7133 2853 ReadBool(self, String key, bool defaultVal=False) -> bool
b88bce5f
RD
2854
2855 Returns the value of key if it exists, defaultVal otherwise.
2856 """
54f9ee45 2857 return _misc_.ConfigBase_ReadBool(*args, **kwargs)
e811c8ce
RD
2858
2859 def Write(*args, **kwargs):
b88bce5f 2860 """
a95a7133 2861 Write(self, String key, String value) -> bool
b88bce5f
RD
2862
2863 write the value (return True on success)
2864 """
54f9ee45 2865 return _misc_.ConfigBase_Write(*args, **kwargs)
e811c8ce
RD
2866
2867 def WriteInt(*args, **kwargs):
b88bce5f 2868 """
a95a7133 2869 WriteInt(self, String key, long value) -> bool
b88bce5f
RD
2870
2871 write the value (return True on success)
2872 """
54f9ee45 2873 return _misc_.ConfigBase_WriteInt(*args, **kwargs)
e811c8ce
RD
2874
2875 def WriteFloat(*args, **kwargs):
b88bce5f 2876 """
a95a7133 2877 WriteFloat(self, String key, double value) -> bool
b88bce5f
RD
2878
2879 write the value (return True on success)
2880 """
54f9ee45 2881 return _misc_.ConfigBase_WriteFloat(*args, **kwargs)
e811c8ce
RD
2882
2883 def WriteBool(*args, **kwargs):
b88bce5f 2884 """
a95a7133 2885 WriteBool(self, String key, bool value) -> bool
b88bce5f
RD
2886
2887 write the value (return True on success)
2888 """
54f9ee45 2889 return _misc_.ConfigBase_WriteBool(*args, **kwargs)
e811c8ce
RD
2890
2891 def Flush(*args, **kwargs):
b88bce5f 2892 """
a95a7133 2893 Flush(self, bool currentOnly=False) -> bool
b88bce5f
RD
2894
2895 permanently writes all changes
2896 """
54f9ee45 2897 return _misc_.ConfigBase_Flush(*args, **kwargs)
e811c8ce
RD
2898
2899 def RenameEntry(*args, **kwargs):
b88bce5f 2900 """
a95a7133 2901 RenameEntry(self, String oldName, String newName) -> bool
b88bce5f
RD
2902
2903 Rename an entry. Returns False on failure (probably because the new
2904 name is already taken by an existing entry)
2905 """
54f9ee45 2906 return _misc_.ConfigBase_RenameEntry(*args, **kwargs)
e811c8ce
RD
2907
2908 def RenameGroup(*args, **kwargs):
b88bce5f 2909 """
a95a7133 2910 RenameGroup(self, String oldName, String newName) -> bool
b88bce5f 2911
41e2b43e 2912 Rename a group. Returns False on failure (probably because the new
b88bce5f
RD
2913 name is already taken by an existing entry)
2914 """
54f9ee45 2915 return _misc_.ConfigBase_RenameGroup(*args, **kwargs)
e811c8ce
RD
2916
2917 def DeleteEntry(*args, **kwargs):
b88bce5f 2918 """
a95a7133 2919 DeleteEntry(self, String key, bool deleteGroupIfEmpty=True) -> bool
b88bce5f 2920
41e2b43e
RD
2921 Deletes the specified entry and the group it belongs to if it was the
2922 last key in it and the second parameter is True
b88bce5f 2923 """
54f9ee45 2924 return _misc_.ConfigBase_DeleteEntry(*args, **kwargs)
e811c8ce
RD
2925
2926 def DeleteGroup(*args, **kwargs):
b88bce5f 2927 """
a95a7133 2928 DeleteGroup(self, String key) -> bool
b88bce5f
RD
2929
2930 Delete the group (with all subgroups)
2931 """
54f9ee45 2932 return _misc_.ConfigBase_DeleteGroup(*args, **kwargs)
e811c8ce
RD
2933
2934 def DeleteAll(*args, **kwargs):
b88bce5f 2935 """
a95a7133 2936 DeleteAll(self) -> bool
e811c8ce 2937
b88bce5f 2938 Delete the whole underlying object (disk file, registry key, ...)
66c033b4 2939 primarly intended for use by deinstallation routine.
b88bce5f 2940 """
54f9ee45 2941 return _misc_.ConfigBase_DeleteAll(*args, **kwargs)
e811c8ce
RD
2942
2943 def SetExpandEnvVars(*args, **kwargs):
b88bce5f 2944 """
a95a7133 2945 SetExpandEnvVars(self, bool doIt=True)
b88bce5f 2946
41e2b43e
RD
2947 We can automatically expand environment variables in the config
2948 entries this option is on by default, you can turn it on/off at any
2949 time)
b88bce5f 2950 """
54f9ee45 2951 return _misc_.ConfigBase_SetExpandEnvVars(*args, **kwargs)
e811c8ce 2952
b88bce5f
RD
2953 def IsExpandingEnvVars(*args, **kwargs):
2954 """
a95a7133 2955 IsExpandingEnvVars(self) -> bool
b88bce5f
RD
2956
2957 Are we currently expanding environment variables?
2958 """
54f9ee45 2959 return _misc_.ConfigBase_IsExpandingEnvVars(*args, **kwargs)
b88bce5f 2960
e811c8ce 2961 def SetRecordDefaults(*args, **kwargs):
b88bce5f 2962 """
a95a7133 2963 SetRecordDefaults(self, bool doIt=True)
b88bce5f
RD
2964
2965 Set whether the config objec should record default values.
2966 """
54f9ee45 2967 return _misc_.ConfigBase_SetRecordDefaults(*args, **kwargs)
e811c8ce
RD
2968
2969 def IsRecordingDefaults(*args, **kwargs):
b88bce5f 2970 """
a95a7133 2971 IsRecordingDefaults(self) -> bool
b88bce5f
RD
2972
2973 Are we currently recording default values?
2974 """
54f9ee45 2975 return _misc_.ConfigBase_IsRecordingDefaults(*args, **kwargs)
e811c8ce
RD
2976
2977 def ExpandEnvVars(*args, **kwargs):
b88bce5f 2978 """
a95a7133 2979 ExpandEnvVars(self, String str) -> String
b88bce5f
RD
2980
2981 Expand any environment variables in str and return the result
2982 """
54f9ee45 2983 return _misc_.ConfigBase_ExpandEnvVars(*args, **kwargs)
e811c8ce
RD
2984
2985 def GetAppName(*args, **kwargs):
a95a7133 2986 """GetAppName(self) -> String"""
54f9ee45 2987 return _misc_.ConfigBase_GetAppName(*args, **kwargs)
e811c8ce
RD
2988
2989 def GetVendorName(*args, **kwargs):
a95a7133 2990 """GetVendorName(self) -> String"""
54f9ee45 2991 return _misc_.ConfigBase_GetVendorName(*args, **kwargs)
e811c8ce
RD
2992
2993 def SetAppName(*args, **kwargs):
a95a7133 2994 """SetAppName(self, String appName)"""
54f9ee45 2995 return _misc_.ConfigBase_SetAppName(*args, **kwargs)
e811c8ce
RD
2996
2997 def SetVendorName(*args, **kwargs):
a95a7133 2998 """SetVendorName(self, String vendorName)"""
54f9ee45 2999 return _misc_.ConfigBase_SetVendorName(*args, **kwargs)
e811c8ce
RD
3000
3001 def SetStyle(*args, **kwargs):
a95a7133 3002 """SetStyle(self, long style)"""
54f9ee45 3003 return _misc_.ConfigBase_SetStyle(*args, **kwargs)
e811c8ce
RD
3004
3005 def GetStyle(*args, **kwargs):
a95a7133 3006 """GetStyle(self) -> long"""
54f9ee45 3007 return _misc_.ConfigBase_GetStyle(*args, **kwargs)
e811c8ce 3008
c368d904 3009
d14a1e28
RD
3010class ConfigBasePtr(ConfigBase):
3011 def __init__(self, this):
3012 self.this = this
3013 if not hasattr(self,"thisown"): self.thisown = 0
3014 self.__class__ = ConfigBase
54f9ee45 3015_misc_.ConfigBase_swigregister(ConfigBasePtr)
c368d904 3016
e811c8ce 3017def ConfigBase_Set(*args, **kwargs):
b88bce5f
RD
3018 """
3019 ConfigBase_Set(ConfigBase config) -> ConfigBase
3020
41e2b43e
RD
3021 Sets the global config object (the one returned by Get) and returns a
3022 reference to the previous global config object.
b88bce5f 3023 """
54f9ee45 3024 return _misc_.ConfigBase_Set(*args, **kwargs)
c368d904 3025
e811c8ce 3026def ConfigBase_Get(*args, **kwargs):
b88bce5f
RD
3027 """
3028 ConfigBase_Get(bool createOnDemand=True) -> ConfigBase
3029
3030 Returns the current global config object, creating one if neccessary.
3031 """
54f9ee45 3032 return _misc_.ConfigBase_Get(*args, **kwargs)
c368d904 3033
e811c8ce 3034def ConfigBase_Create(*args, **kwargs):
b88bce5f
RD
3035 """
3036 ConfigBase_Create() -> ConfigBase
3037
3038 Create and return a new global config object. This function will
3039 create the "best" implementation of wx.Config available for the
3040 current platform.
3041 """
54f9ee45 3042 return _misc_.ConfigBase_Create(*args, **kwargs)
c368d904 3043
e811c8ce 3044def ConfigBase_DontCreateOnDemand(*args, **kwargs):
b88bce5f
RD
3045 """
3046 ConfigBase_DontCreateOnDemand()
5d413391 3047
41e2b43e
RD
3048 Should Get() try to create a new log object if there isn't a current
3049 one?
b88bce5f 3050 """
54f9ee45 3051 return _misc_.ConfigBase_DontCreateOnDemand(*args, **kwargs)
d14a1e28
RD
3052
3053class Config(ConfigBase):
b88bce5f
RD
3054 """
3055 This ConfigBase-derived class will use the registry on Windows,
3056 and will be a wx.FileConfig on other platforms.
3057 """
e811c8ce
RD
3058 def __repr__(self):
3059 return "<%s.%s; proxy of C++ wxConfig instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3060 def __init__(self, *args, **kwargs):
0df68c9f 3061 """
a95a7133 3062 __init__(self, String appName=EmptyString, String vendorName=EmptyString,
196addbf 3063 String localFilename=EmptyString, String globalFilename=EmptyString,
4f89f6a3 3064 long style=wxCONFIG_USE_LOCAL_FILE|wxCONFIG_USE_GLOBAL_FILE) -> Config
0df68c9f 3065 """
54f9ee45 3066 newobj = _misc_.new_Config(*args, **kwargs)
d14a1e28
RD
3067 self.this = newobj.this
3068 self.thisown = 1
3069 del newobj.thisown
54f9ee45 3070 def __del__(self, destroy=_misc_.delete_Config):
a95a7133 3071 """__del__(self)"""
d14a1e28
RD
3072 try:
3073 if self.thisown: destroy(self)
3074 except: pass
e811c8ce 3075
8f8b0a8d 3076
d14a1e28
RD
3077class ConfigPtr(Config):
3078 def __init__(self, this):
3079 self.this = this
3080 if not hasattr(self,"thisown"): self.thisown = 0
3081 self.__class__ = Config
54f9ee45 3082_misc_.Config_swigregister(ConfigPtr)
d14a1e28
RD
3083
3084class FileConfig(ConfigBase):
b88bce5f 3085 """This config class will use a file for storage on all platforms."""
e811c8ce
RD
3086 def __repr__(self):
3087 return "<%s.%s; proxy of C++ wxFileConfig instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3088 def __init__(self, *args, **kwargs):
0df68c9f 3089 """
a95a7133 3090 __init__(self, String appName=EmptyString, String vendorName=EmptyString,
196addbf 3091 String localFilename=EmptyString, String globalFilename=EmptyString,
4276dc52 3092 long style=wxCONFIG_USE_LOCAL_FILE|wxCONFIG_USE_GLOBAL_FILE) -> FileConfig
0df68c9f 3093 """
54f9ee45 3094 newobj = _misc_.new_FileConfig(*args, **kwargs)
d14a1e28
RD
3095 self.this = newobj.this
3096 self.thisown = 1
3097 del newobj.thisown
54f9ee45 3098 def __del__(self, destroy=_misc_.delete_FileConfig):
a95a7133 3099 """__del__(self)"""
d14a1e28
RD
3100 try:
3101 if self.thisown: destroy(self)
3102 except: pass
e811c8ce 3103
3628e088 3104
d14a1e28
RD
3105class FileConfigPtr(FileConfig):
3106 def __init__(self, this):
3107 self.this = this
3108 if not hasattr(self,"thisown"): self.thisown = 0
3109 self.__class__ = FileConfig
54f9ee45 3110_misc_.FileConfig_swigregister(FileConfigPtr)
d14a1e28 3111
b88bce5f
RD
3112class ConfigPathChanger(object):
3113 """
41e2b43e
RD
3114 A handy little class which changes current path to the path of given
3115 entry and restores it in the destructoir: so if you declare a local
3116 variable of this type, you work in the entry directory and the path is
3117 automatically restored when the function returns.
b88bce5f
RD
3118 """
3119 def __repr__(self):
3120 return "<%s.%s; proxy of C++ wxConfigPathChanger instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3121 def __init__(self, *args, **kwargs):
a95a7133 3122 """__init__(self, ConfigBase config, String entry) -> ConfigPathChanger"""
54f9ee45 3123 newobj = _misc_.new_ConfigPathChanger(*args, **kwargs)
b88bce5f
RD
3124 self.this = newobj.this
3125 self.thisown = 1
3126 del newobj.thisown
54f9ee45 3127 def __del__(self, destroy=_misc_.delete_ConfigPathChanger):
a95a7133 3128 """__del__(self)"""
b88bce5f
RD
3129 try:
3130 if self.thisown: destroy(self)
3131 except: pass
3132
3133 def Name(*args, **kwargs):
3134 """
a95a7133 3135 Name(self) -> String
b88bce5f
RD
3136
3137 Get the key name
3138 """
54f9ee45 3139 return _misc_.ConfigPathChanger_Name(*args, **kwargs)
b88bce5f
RD
3140
3141
3142class ConfigPathChangerPtr(ConfigPathChanger):
3143 def __init__(self, this):
3144 self.this = this
3145 if not hasattr(self,"thisown"): self.thisown = 0
3146 self.__class__ = ConfigPathChanger
54f9ee45 3147_misc_.ConfigPathChanger_swigregister(ConfigPathChangerPtr)
b88bce5f 3148
d14a1e28 3149
e811c8ce 3150def ExpandEnvVars(*args, **kwargs):
b88bce5f
RD
3151 """
3152 ExpandEnvVars(String sz) -> String
3153
3154 Replace environment variables ($SOMETHING) with their values. The
41e2b43e
RD
3155 format is $VARNAME or ${VARNAME} where VARNAME contains alphanumeric
3156 characters and '_' only. '$' must be escaped ('\$') in order to be
3157 taken literally.
b88bce5f 3158 """
54f9ee45 3159 return _misc_.ExpandEnvVars(*args, **kwargs)
d14a1e28
RD
3160#---------------------------------------------------------------------------
3161
3162class DateTime(object):
093d3ff1 3163 """Proxy of C++ DateTime class"""
e811c8ce
RD
3164 def __repr__(self):
3165 return "<%s.%s; proxy of C++ wxDateTime instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
3166 Local = _misc_.DateTime_Local
3167 GMT_12 = _misc_.DateTime_GMT_12
3168 GMT_11 = _misc_.DateTime_GMT_11
3169 GMT_10 = _misc_.DateTime_GMT_10
3170 GMT_9 = _misc_.DateTime_GMT_9
3171 GMT_8 = _misc_.DateTime_GMT_8
3172 GMT_7 = _misc_.DateTime_GMT_7
3173 GMT_6 = _misc_.DateTime_GMT_6
3174 GMT_5 = _misc_.DateTime_GMT_5
3175 GMT_4 = _misc_.DateTime_GMT_4
3176 GMT_3 = _misc_.DateTime_GMT_3
3177 GMT_2 = _misc_.DateTime_GMT_2
3178 GMT_1 = _misc_.DateTime_GMT_1
3179 GMT0 = _misc_.DateTime_GMT0
3180 GMT1 = _misc_.DateTime_GMT1
3181 GMT2 = _misc_.DateTime_GMT2
3182 GMT3 = _misc_.DateTime_GMT3
3183 GMT4 = _misc_.DateTime_GMT4
3184 GMT5 = _misc_.DateTime_GMT5
3185 GMT6 = _misc_.DateTime_GMT6
3186 GMT7 = _misc_.DateTime_GMT7
3187 GMT8 = _misc_.DateTime_GMT8
3188 GMT9 = _misc_.DateTime_GMT9
3189 GMT10 = _misc_.DateTime_GMT10
3190 GMT11 = _misc_.DateTime_GMT11
3191 GMT12 = _misc_.DateTime_GMT12
3192 WET = _misc_.DateTime_WET
3193 WEST = _misc_.DateTime_WEST
3194 CET = _misc_.DateTime_CET
3195 CEST = _misc_.DateTime_CEST
3196 EET = _misc_.DateTime_EET
3197 EEST = _misc_.DateTime_EEST
3198 MSK = _misc_.DateTime_MSK
3199 MSD = _misc_.DateTime_MSD
3200 AST = _misc_.DateTime_AST
3201 ADT = _misc_.DateTime_ADT
3202 EST = _misc_.DateTime_EST
3203 EDT = _misc_.DateTime_EDT
3204 CST = _misc_.DateTime_CST
3205 CDT = _misc_.DateTime_CDT
3206 MST = _misc_.DateTime_MST
3207 MDT = _misc_.DateTime_MDT
3208 PST = _misc_.DateTime_PST
3209 PDT = _misc_.DateTime_PDT
3210 HST = _misc_.DateTime_HST
3211 AKST = _misc_.DateTime_AKST
3212 AKDT = _misc_.DateTime_AKDT
3213 A_WST = _misc_.DateTime_A_WST
3214 A_CST = _misc_.DateTime_A_CST
3215 A_EST = _misc_.DateTime_A_EST
3216 A_ESST = _misc_.DateTime_A_ESST
3217 UTC = _misc_.DateTime_UTC
3218 Gregorian = _misc_.DateTime_Gregorian
3219 Julian = _misc_.DateTime_Julian
3220 Gr_Unknown = _misc_.DateTime_Gr_Unknown
3221 Gr_Standard = _misc_.DateTime_Gr_Standard
3222 Gr_Alaska = _misc_.DateTime_Gr_Alaska
3223 Gr_Albania = _misc_.DateTime_Gr_Albania
3224 Gr_Austria = _misc_.DateTime_Gr_Austria
3225 Gr_Austria_Brixen = _misc_.DateTime_Gr_Austria_Brixen
3226 Gr_Austria_Salzburg = _misc_.DateTime_Gr_Austria_Salzburg
3227 Gr_Austria_Tyrol = _misc_.DateTime_Gr_Austria_Tyrol
3228 Gr_Austria_Carinthia = _misc_.DateTime_Gr_Austria_Carinthia
3229 Gr_Austria_Styria = _misc_.DateTime_Gr_Austria_Styria
3230 Gr_Belgium = _misc_.DateTime_Gr_Belgium
3231 Gr_Bulgaria = _misc_.DateTime_Gr_Bulgaria
3232 Gr_Bulgaria_1 = _misc_.DateTime_Gr_Bulgaria_1
3233 Gr_Bulgaria_2 = _misc_.DateTime_Gr_Bulgaria_2
3234 Gr_Bulgaria_3 = _misc_.DateTime_Gr_Bulgaria_3
3235 Gr_Canada = _misc_.DateTime_Gr_Canada
3236 Gr_China = _misc_.DateTime_Gr_China
3237 Gr_China_1 = _misc_.DateTime_Gr_China_1
3238 Gr_China_2 = _misc_.DateTime_Gr_China_2
3239 Gr_Czechoslovakia = _misc_.DateTime_Gr_Czechoslovakia
3240 Gr_Denmark = _misc_.DateTime_Gr_Denmark
3241 Gr_Egypt = _misc_.DateTime_Gr_Egypt
3242 Gr_Estonia = _misc_.DateTime_Gr_Estonia
3243 Gr_Finland = _misc_.DateTime_Gr_Finland
3244 Gr_France = _misc_.DateTime_Gr_France
3245 Gr_France_Alsace = _misc_.DateTime_Gr_France_Alsace
3246 Gr_France_Lorraine = _misc_.DateTime_Gr_France_Lorraine
3247 Gr_France_Strasbourg = _misc_.DateTime_Gr_France_Strasbourg
3248 Gr_Germany = _misc_.DateTime_Gr_Germany
3249 Gr_Germany_Catholic = _misc_.DateTime_Gr_Germany_Catholic
3250 Gr_Germany_Prussia = _misc_.DateTime_Gr_Germany_Prussia
3251 Gr_Germany_Protestant = _misc_.DateTime_Gr_Germany_Protestant
3252 Gr_GreatBritain = _misc_.DateTime_Gr_GreatBritain
3253 Gr_Greece = _misc_.DateTime_Gr_Greece
3254 Gr_Hungary = _misc_.DateTime_Gr_Hungary
3255 Gr_Ireland = _misc_.DateTime_Gr_Ireland
3256 Gr_Italy = _misc_.DateTime_Gr_Italy
3257 Gr_Japan = _misc_.DateTime_Gr_Japan
3258 Gr_Japan_1 = _misc_.DateTime_Gr_Japan_1
3259 Gr_Japan_2 = _misc_.DateTime_Gr_Japan_2
3260 Gr_Japan_3 = _misc_.DateTime_Gr_Japan_3
3261 Gr_Latvia = _misc_.DateTime_Gr_Latvia
3262 Gr_Lithuania = _misc_.DateTime_Gr_Lithuania
3263 Gr_Luxemburg = _misc_.DateTime_Gr_Luxemburg
3264 Gr_Netherlands = _misc_.DateTime_Gr_Netherlands
3265 Gr_Netherlands_Groningen = _misc_.DateTime_Gr_Netherlands_Groningen
3266 Gr_Netherlands_Gelderland = _misc_.DateTime_Gr_Netherlands_Gelderland
3267 Gr_Netherlands_Utrecht = _misc_.DateTime_Gr_Netherlands_Utrecht
3268 Gr_Netherlands_Friesland = _misc_.DateTime_Gr_Netherlands_Friesland
3269 Gr_Norway = _misc_.DateTime_Gr_Norway
3270 Gr_Poland = _misc_.DateTime_Gr_Poland
3271 Gr_Portugal = _misc_.DateTime_Gr_Portugal
3272 Gr_Romania = _misc_.DateTime_Gr_Romania
3273 Gr_Russia = _misc_.DateTime_Gr_Russia
3274 Gr_Scotland = _misc_.DateTime_Gr_Scotland
3275 Gr_Spain = _misc_.DateTime_Gr_Spain
3276 Gr_Sweden = _misc_.DateTime_Gr_Sweden
3277 Gr_Switzerland = _misc_.DateTime_Gr_Switzerland
3278 Gr_Switzerland_Catholic = _misc_.DateTime_Gr_Switzerland_Catholic
3279 Gr_Switzerland_Protestant = _misc_.DateTime_Gr_Switzerland_Protestant
3280 Gr_Turkey = _misc_.DateTime_Gr_Turkey
3281 Gr_USA = _misc_.DateTime_Gr_USA
3282 Gr_Wales = _misc_.DateTime_Gr_Wales
3283 Gr_Yugoslavia = _misc_.DateTime_Gr_Yugoslavia
3284 Country_Unknown = _misc_.DateTime_Country_Unknown
3285 Country_Default = _misc_.DateTime_Country_Default
3286 Country_WesternEurope_Start = _misc_.DateTime_Country_WesternEurope_Start
3287 Country_EEC = _misc_.DateTime_Country_EEC
3288 France = _misc_.DateTime_France
3289 Germany = _misc_.DateTime_Germany
3290 UK = _misc_.DateTime_UK
3291 Country_WesternEurope_End = _misc_.DateTime_Country_WesternEurope_End
3292 Russia = _misc_.DateTime_Russia
3293 USA = _misc_.DateTime_USA
3294 Jan = _misc_.DateTime_Jan
3295 Feb = _misc_.DateTime_Feb
3296 Mar = _misc_.DateTime_Mar
3297 Apr = _misc_.DateTime_Apr
3298 May = _misc_.DateTime_May
3299 Jun = _misc_.DateTime_Jun
3300 Jul = _misc_.DateTime_Jul
3301 Aug = _misc_.DateTime_Aug
3302 Sep = _misc_.DateTime_Sep
3303 Oct = _misc_.DateTime_Oct
3304 Nov = _misc_.DateTime_Nov
3305 Dec = _misc_.DateTime_Dec
3306 Inv_Month = _misc_.DateTime_Inv_Month
3307 Sun = _misc_.DateTime_Sun
3308 Mon = _misc_.DateTime_Mon
3309 Tue = _misc_.DateTime_Tue
3310 Wed = _misc_.DateTime_Wed
3311 Thu = _misc_.DateTime_Thu
3312 Fri = _misc_.DateTime_Fri
3313 Sat = _misc_.DateTime_Sat
3314 Inv_WeekDay = _misc_.DateTime_Inv_WeekDay
3315 Inv_Year = _misc_.DateTime_Inv_Year
3316 Name_Full = _misc_.DateTime_Name_Full
3317 Name_Abbr = _misc_.DateTime_Name_Abbr
3318 Default_First = _misc_.DateTime_Default_First
3319 Monday_First = _misc_.DateTime_Monday_First
3320 Sunday_First = _misc_.DateTime_Sunday_First
e811c8ce 3321 def SetCountry(*args, **kwargs):
66c033b4 3322 """SetCountry(int country)"""
54f9ee45 3323 return _misc_.DateTime_SetCountry(*args, **kwargs)
e811c8ce
RD
3324
3325 SetCountry = staticmethod(SetCountry)
3326 def GetCountry(*args, **kwargs):
66c033b4 3327 """GetCountry() -> int"""
54f9ee45 3328 return _misc_.DateTime_GetCountry(*args, **kwargs)
e811c8ce
RD
3329
3330 GetCountry = staticmethod(GetCountry)
3331 def IsWestEuropeanCountry(*args, **kwargs):
66c033b4 3332 """IsWestEuropeanCountry(int country=Country_Default) -> bool"""
54f9ee45 3333 return _misc_.DateTime_IsWestEuropeanCountry(*args, **kwargs)
e811c8ce
RD
3334
3335 IsWestEuropeanCountry = staticmethod(IsWestEuropeanCountry)
3336 def GetCurrentYear(*args, **kwargs):
66c033b4 3337 """GetCurrentYear(int cal=Gregorian) -> int"""
54f9ee45 3338 return _misc_.DateTime_GetCurrentYear(*args, **kwargs)
e811c8ce
RD
3339
3340 GetCurrentYear = staticmethod(GetCurrentYear)
3341 def ConvertYearToBC(*args, **kwargs):
66c033b4 3342 """ConvertYearToBC(int year) -> int"""
54f9ee45 3343 return _misc_.DateTime_ConvertYearToBC(*args, **kwargs)
e811c8ce
RD
3344
3345 ConvertYearToBC = staticmethod(ConvertYearToBC)
3346 def GetCurrentMonth(*args, **kwargs):
66c033b4 3347 """GetCurrentMonth(int cal=Gregorian) -> int"""
54f9ee45 3348 return _misc_.DateTime_GetCurrentMonth(*args, **kwargs)
e811c8ce
RD
3349
3350 GetCurrentMonth = staticmethod(GetCurrentMonth)
3351 def IsLeapYear(*args, **kwargs):
66c033b4 3352 """IsLeapYear(int year=Inv_Year, int cal=Gregorian) -> bool"""
54f9ee45 3353 return _misc_.DateTime_IsLeapYear(*args, **kwargs)
e811c8ce
RD
3354
3355 IsLeapYear = staticmethod(IsLeapYear)
3356 def GetCentury(*args, **kwargs):
66c033b4 3357 """GetCentury(int year=Inv_Year) -> int"""
54f9ee45 3358 return _misc_.DateTime_GetCentury(*args, **kwargs)
e811c8ce
RD
3359
3360 GetCentury = staticmethod(GetCentury)
3361 def GetNumberOfDaysinYear(*args, **kwargs):
66c033b4 3362 """GetNumberOfDaysinYear(int year, int cal=Gregorian) -> int"""
54f9ee45 3363 return _misc_.DateTime_GetNumberOfDaysinYear(*args, **kwargs)
e811c8ce
RD
3364
3365 GetNumberOfDaysinYear = staticmethod(GetNumberOfDaysinYear)
3366 def GetNumberOfDaysInMonth(*args, **kwargs):
66c033b4 3367 """GetNumberOfDaysInMonth(int month, int year=Inv_Year, int cal=Gregorian) -> int"""
54f9ee45 3368 return _misc_.DateTime_GetNumberOfDaysInMonth(*args, **kwargs)
e811c8ce
RD
3369
3370 GetNumberOfDaysInMonth = staticmethod(GetNumberOfDaysInMonth)
3371 def GetMonthName(*args, **kwargs):
66c033b4 3372 """GetMonthName(int month, int flags=Name_Full) -> String"""
54f9ee45 3373 return _misc_.DateTime_GetMonthName(*args, **kwargs)
e811c8ce
RD
3374
3375 GetMonthName = staticmethod(GetMonthName)
3376 def GetWeekDayName(*args, **kwargs):
66c033b4 3377 """GetWeekDayName(int weekday, int flags=Name_Full) -> String"""
54f9ee45 3378 return _misc_.DateTime_GetWeekDayName(*args, **kwargs)
e811c8ce
RD
3379
3380 GetWeekDayName = staticmethod(GetWeekDayName)
3381 def GetAmPmStrings(*args, **kwargs):
fd2dc343
RD
3382 """
3383 GetAmPmStrings() -> (am, pm)
3384
3385 Get the AM and PM strings in the current locale (may be empty)
3386 """
54f9ee45 3387 return _misc_.DateTime_GetAmPmStrings(*args, **kwargs)
e811c8ce
RD
3388
3389 GetAmPmStrings = staticmethod(GetAmPmStrings)
3390 def IsDSTApplicable(*args, **kwargs):
66c033b4 3391 """IsDSTApplicable(int year=Inv_Year, int country=Country_Default) -> bool"""
54f9ee45 3392 return _misc_.DateTime_IsDSTApplicable(*args, **kwargs)
e811c8ce
RD
3393
3394 IsDSTApplicable = staticmethod(IsDSTApplicable)
3395 def GetBeginDST(*args, **kwargs):
66c033b4 3396 """GetBeginDST(int year=Inv_Year, int country=Country_Default) -> DateTime"""
54f9ee45 3397 return _misc_.DateTime_GetBeginDST(*args, **kwargs)
e811c8ce
RD
3398
3399 GetBeginDST = staticmethod(GetBeginDST)
3400 def GetEndDST(*args, **kwargs):
66c033b4 3401 """GetEndDST(int year=Inv_Year, int country=Country_Default) -> DateTime"""
54f9ee45 3402 return _misc_.DateTime_GetEndDST(*args, **kwargs)
e811c8ce
RD
3403
3404 GetEndDST = staticmethod(GetEndDST)
3405 def Now(*args, **kwargs):
66c033b4 3406 """Now() -> DateTime"""
54f9ee45 3407 return _misc_.DateTime_Now(*args, **kwargs)
e811c8ce
RD
3408
3409 Now = staticmethod(Now)
3410 def UNow(*args, **kwargs):
66c033b4 3411 """UNow() -> DateTime"""
54f9ee45 3412 return _misc_.DateTime_UNow(*args, **kwargs)
e811c8ce
RD
3413
3414 UNow = staticmethod(UNow)
3415 def Today(*args, **kwargs):
66c033b4 3416 """Today() -> DateTime"""
54f9ee45 3417 return _misc_.DateTime_Today(*args, **kwargs)
e811c8ce
RD
3418
3419 Today = staticmethod(Today)
d14a1e28 3420 def __init__(self, *args, **kwargs):
a95a7133 3421 """__init__(self) -> DateTime"""
54f9ee45 3422 newobj = _misc_.new_DateTime(*args, **kwargs)
d14a1e28
RD
3423 self.this = newobj.this
3424 self.thisown = 1
3425 del newobj.thisown
54f9ee45 3426 def __del__(self, destroy=_misc_.delete_DateTime):
a95a7133 3427 """__del__(self)"""
d14a1e28
RD
3428 try:
3429 if self.thisown: destroy(self)
3430 except: pass
e811c8ce
RD
3431
3432 def SetToCurrent(*args, **kwargs):
a95a7133 3433 """SetToCurrent(self) -> DateTime"""
54f9ee45 3434 return _misc_.DateTime_SetToCurrent(*args, **kwargs)
e811c8ce
RD
3435
3436 def SetTimeT(*args, **kwargs):
a95a7133 3437 """SetTimeT(self, time_t timet) -> DateTime"""
54f9ee45 3438 return _misc_.DateTime_SetTimeT(*args, **kwargs)
e811c8ce
RD
3439
3440 def SetJDN(*args, **kwargs):
a95a7133 3441 """SetJDN(self, double jdn) -> DateTime"""
54f9ee45 3442 return _misc_.DateTime_SetJDN(*args, **kwargs)
e811c8ce
RD
3443
3444 def SetHMS(*args, **kwargs):
a95a7133 3445 """SetHMS(self, int hour, int minute=0, int second=0, int millisec=0) -> DateTime"""
54f9ee45 3446 return _misc_.DateTime_SetHMS(*args, **kwargs)
e811c8ce
RD
3447
3448 def Set(*args, **kwargs):
0df68c9f 3449 """
a95a7133 3450 Set(self, int day, int month=Inv_Month, int year=Inv_Year, int hour=0,
196addbf 3451 int minute=0, int second=0, int millisec=0) -> DateTime
0df68c9f 3452 """
54f9ee45 3453 return _misc_.DateTime_Set(*args, **kwargs)
e811c8ce
RD
3454
3455 def ResetTime(*args, **kwargs):
a95a7133 3456 """ResetTime(self) -> DateTime"""
54f9ee45 3457 return _misc_.DateTime_ResetTime(*args, **kwargs)
e811c8ce
RD
3458
3459 def SetYear(*args, **kwargs):
a95a7133 3460 """SetYear(self, int year) -> DateTime"""
54f9ee45 3461 return _misc_.DateTime_SetYear(*args, **kwargs)
e811c8ce
RD
3462
3463 def SetMonth(*args, **kwargs):
a95a7133 3464 """SetMonth(self, int month) -> DateTime"""
54f9ee45 3465 return _misc_.DateTime_SetMonth(*args, **kwargs)
e811c8ce
RD
3466
3467 def SetDay(*args, **kwargs):
a95a7133 3468 """SetDay(self, int day) -> DateTime"""
54f9ee45 3469 return _misc_.DateTime_SetDay(*args, **kwargs)
e811c8ce
RD
3470
3471 def SetHour(*args, **kwargs):
a95a7133 3472 """SetHour(self, int hour) -> DateTime"""
54f9ee45 3473 return _misc_.DateTime_SetHour(*args, **kwargs)
e811c8ce
RD
3474
3475 def SetMinute(*args, **kwargs):
a95a7133 3476 """SetMinute(self, int minute) -> DateTime"""
54f9ee45 3477 return _misc_.DateTime_SetMinute(*args, **kwargs)
e811c8ce
RD
3478
3479 def SetSecond(*args, **kwargs):
a95a7133 3480 """SetSecond(self, int second) -> DateTime"""
54f9ee45 3481 return _misc_.DateTime_SetSecond(*args, **kwargs)
e811c8ce
RD
3482
3483 def SetMillisecond(*args, **kwargs):
a95a7133 3484 """SetMillisecond(self, int millisecond) -> DateTime"""
54f9ee45 3485 return _misc_.DateTime_SetMillisecond(*args, **kwargs)
e811c8ce
RD
3486
3487 def SetToWeekDayInSameWeek(*args, **kwargs):
a95a7133 3488 """SetToWeekDayInSameWeek(self, int weekday, int flags=Monday_First) -> DateTime"""
54f9ee45 3489 return _misc_.DateTime_SetToWeekDayInSameWeek(*args, **kwargs)
e811c8ce
RD
3490
3491 def GetWeekDayInSameWeek(*args, **kwargs):
a95a7133 3492 """GetWeekDayInSameWeek(self, int weekday, int flags=Monday_First) -> DateTime"""
54f9ee45 3493 return _misc_.DateTime_GetWeekDayInSameWeek(*args, **kwargs)
e811c8ce
RD
3494
3495 def SetToNextWeekDay(*args, **kwargs):
a95a7133 3496 """SetToNextWeekDay(self, int weekday) -> DateTime"""
54f9ee45 3497 return _misc_.DateTime_SetToNextWeekDay(*args, **kwargs)
e811c8ce
RD
3498
3499 def GetNextWeekDay(*args, **kwargs):
a95a7133 3500 """GetNextWeekDay(self, int weekday) -> DateTime"""
54f9ee45 3501 return _misc_.DateTime_GetNextWeekDay(*args, **kwargs)
e811c8ce
RD
3502
3503 def SetToPrevWeekDay(*args, **kwargs):
a95a7133 3504 """SetToPrevWeekDay(self, int weekday) -> DateTime"""
54f9ee45 3505 return _misc_.DateTime_SetToPrevWeekDay(*args, **kwargs)
e811c8ce
RD
3506
3507 def GetPrevWeekDay(*args, **kwargs):
a95a7133 3508 """GetPrevWeekDay(self, int weekday) -> DateTime"""
54f9ee45 3509 return _misc_.DateTime_GetPrevWeekDay(*args, **kwargs)
e811c8ce
RD
3510
3511 def SetToWeekDay(*args, **kwargs):
a95a7133 3512 """SetToWeekDay(self, int weekday, int n=1, int month=Inv_Month, int year=Inv_Year) -> bool"""
54f9ee45 3513 return _misc_.DateTime_SetToWeekDay(*args, **kwargs)
e811c8ce
RD
3514
3515 def SetToLastWeekDay(*args, **kwargs):
a95a7133 3516 """SetToLastWeekDay(self, int weekday, int month=Inv_Month, int year=Inv_Year) -> bool"""
54f9ee45 3517 return _misc_.DateTime_SetToLastWeekDay(*args, **kwargs)
e811c8ce
RD
3518
3519 def GetLastWeekDay(*args, **kwargs):
a95a7133 3520 """GetLastWeekDay(self, int weekday, int month=Inv_Month, int year=Inv_Year) -> DateTime"""
54f9ee45 3521 return _misc_.DateTime_GetLastWeekDay(*args, **kwargs)
e811c8ce
RD
3522
3523 def SetToTheWeek(*args, **kwargs):
a95a7133 3524 """SetToTheWeek(self, int numWeek, int weekday=Mon, int flags=Monday_First) -> bool"""
54f9ee45 3525 return _misc_.DateTime_SetToTheWeek(*args, **kwargs)
e811c8ce
RD
3526
3527 def GetWeek(*args, **kwargs):
a95a7133 3528 """GetWeek(self, int numWeek, int weekday=Mon, int flags=Monday_First) -> DateTime"""
54f9ee45 3529 return _misc_.DateTime_GetWeek(*args, **kwargs)
e811c8ce 3530
7e63a440
RD
3531 SetToTheWeek = wx._deprecated(SetToTheWeek, "SetToTheWeek is deprecated, use (static) SetToWeekOfYear instead")
3532 GetWeek = wx._deprecated(GetWeek, "GetWeek is deprecated, use GetWeekOfYear instead")
3533
3534 def SetToWeekOfYear(*args, **kwargs):
3535 """SetToWeekOfYear(int year, int numWeek, int weekday=Mon) -> DateTime"""
3536 return _misc_.DateTime_SetToWeekOfYear(*args, **kwargs)
3537
3538 SetToWeekOfYear = staticmethod(SetToWeekOfYear)
e811c8ce 3539 def SetToLastMonthDay(*args, **kwargs):
a95a7133 3540 """SetToLastMonthDay(self, int month=Inv_Month, int year=Inv_Year) -> DateTime"""
54f9ee45 3541 return _misc_.DateTime_SetToLastMonthDay(*args, **kwargs)
e811c8ce
RD
3542
3543 def GetLastMonthDay(*args, **kwargs):
a95a7133 3544 """GetLastMonthDay(self, int month=Inv_Month, int year=Inv_Year) -> DateTime"""
54f9ee45 3545 return _misc_.DateTime_GetLastMonthDay(*args, **kwargs)
e811c8ce
RD
3546
3547 def SetToYearDay(*args, **kwargs):
a95a7133 3548 """SetToYearDay(self, int yday) -> DateTime"""
54f9ee45 3549 return _misc_.DateTime_SetToYearDay(*args, **kwargs)
e811c8ce
RD
3550
3551 def GetYearDay(*args, **kwargs):
a95a7133 3552 """GetYearDay(self, int yday) -> DateTime"""
54f9ee45 3553 return _misc_.DateTime_GetYearDay(*args, **kwargs)
e811c8ce
RD
3554
3555 def GetJulianDayNumber(*args, **kwargs):
a95a7133 3556 """GetJulianDayNumber(self) -> double"""
54f9ee45 3557 return _misc_.DateTime_GetJulianDayNumber(*args, **kwargs)
e811c8ce
RD
3558
3559 def GetJDN(*args, **kwargs):
a95a7133 3560 """GetJDN(self) -> double"""
54f9ee45 3561 return _misc_.DateTime_GetJDN(*args, **kwargs)
e811c8ce
RD
3562
3563 def GetModifiedJulianDayNumber(*args, **kwargs):
a95a7133 3564 """GetModifiedJulianDayNumber(self) -> double"""
54f9ee45 3565 return _misc_.DateTime_GetModifiedJulianDayNumber(*args, **kwargs)
e811c8ce
RD
3566
3567 def GetMJD(*args, **kwargs):
a95a7133 3568 """GetMJD(self) -> double"""
54f9ee45 3569 return _misc_.DateTime_GetMJD(*args, **kwargs)
e811c8ce
RD
3570
3571 def GetRataDie(*args, **kwargs):
a95a7133 3572 """GetRataDie(self) -> double"""
54f9ee45 3573 return _misc_.DateTime_GetRataDie(*args, **kwargs)
e811c8ce
RD
3574
3575 def ToTimezone(*args, **kwargs):
a95a7133 3576 """ToTimezone(self, wxDateTime::TimeZone tz, bool noDST=False) -> DateTime"""
54f9ee45 3577 return _misc_.DateTime_ToTimezone(*args, **kwargs)
e811c8ce
RD
3578
3579 def MakeTimezone(*args, **kwargs):
a95a7133 3580 """MakeTimezone(self, wxDateTime::TimeZone tz, bool noDST=False) -> DateTime"""
54f9ee45 3581 return _misc_.DateTime_MakeTimezone(*args, **kwargs)
e811c8ce
RD
3582
3583 def ToGMT(*args, **kwargs):
a95a7133 3584 """ToGMT(self, bool noDST=False) -> DateTime"""
54f9ee45 3585 return _misc_.DateTime_ToGMT(*args, **kwargs)
e811c8ce
RD
3586
3587 def MakeGMT(*args, **kwargs):
a95a7133 3588 """MakeGMT(self, bool noDST=False) -> DateTime"""
54f9ee45 3589 return _misc_.DateTime_MakeGMT(*args, **kwargs)
e811c8ce
RD
3590
3591 def IsDST(*args, **kwargs):
a95a7133 3592 """IsDST(self, int country=Country_Default) -> int"""
54f9ee45 3593 return _misc_.DateTime_IsDST(*args, **kwargs)
e811c8ce
RD
3594
3595 def IsValid(*args, **kwargs):
a95a7133 3596 """IsValid(self) -> bool"""
54f9ee45 3597 return _misc_.DateTime_IsValid(*args, **kwargs)
e811c8ce 3598
98e665d3
RD
3599 Ok = IsValid
3600 def __nonzero__(self): return self.Ok()
e811c8ce 3601 def GetTicks(*args, **kwargs):
a95a7133 3602 """GetTicks(self) -> time_t"""
54f9ee45 3603 return _misc_.DateTime_GetTicks(*args, **kwargs)
e811c8ce
RD
3604
3605 def GetYear(*args, **kwargs):
a95a7133 3606 """GetYear(self, wxDateTime::TimeZone tz=LOCAL_TZ) -> int"""
54f9ee45 3607 return _misc_.DateTime_GetYear(*args, **kwargs)
e811c8ce
RD
3608
3609 def GetMonth(*args, **kwargs):
a95a7133 3610 """GetMonth(self, wxDateTime::TimeZone tz=LOCAL_TZ) -> int"""
54f9ee45 3611 return _misc_.DateTime_GetMonth(*args, **kwargs)
e811c8ce
RD
3612
3613 def GetDay(*args, **kwargs):
a95a7133 3614 """GetDay(self, wxDateTime::TimeZone tz=LOCAL_TZ) -> int"""
54f9ee45 3615 return _misc_.DateTime_GetDay(*args, **kwargs)
e811c8ce
RD
3616
3617 def GetWeekDay(*args, **kwargs):
a95a7133 3618 """GetWeekDay(self, wxDateTime::TimeZone tz=LOCAL_TZ) -> int"""
54f9ee45 3619 return _misc_.DateTime_GetWeekDay(*args, **kwargs)
e811c8ce
RD
3620
3621 def GetHour(*args, **kwargs):
a95a7133 3622 """GetHour(self, wxDateTime::TimeZone tz=LOCAL_TZ) -> int"""
54f9ee45 3623 return _misc_.DateTime_GetHour(*args, **kwargs)
e811c8ce
RD
3624
3625 def GetMinute(*args, **kwargs):
a95a7133 3626 """GetMinute(self, wxDateTime::TimeZone tz=LOCAL_TZ) -> int"""
54f9ee45 3627 return _misc_.DateTime_GetMinute(*args, **kwargs)
e811c8ce
RD
3628
3629 def GetSecond(*args, **kwargs):
a95a7133 3630 """GetSecond(self, wxDateTime::TimeZone tz=LOCAL_TZ) -> int"""
54f9ee45 3631 return _misc_.DateTime_GetSecond(*args, **kwargs)
e811c8ce
RD
3632
3633 def GetMillisecond(*args, **kwargs):
a95a7133 3634 """GetMillisecond(self, wxDateTime::TimeZone tz=LOCAL_TZ) -> int"""
54f9ee45 3635 return _misc_.DateTime_GetMillisecond(*args, **kwargs)
e811c8ce
RD
3636
3637 def GetDayOfYear(*args, **kwargs):
a95a7133 3638 """GetDayOfYear(self, wxDateTime::TimeZone tz=LOCAL_TZ) -> int"""
54f9ee45 3639 return _misc_.DateTime_GetDayOfYear(*args, **kwargs)
e811c8ce
RD
3640
3641 def GetWeekOfYear(*args, **kwargs):
a95a7133 3642 """GetWeekOfYear(self, int flags=Monday_First, wxDateTime::TimeZone tz=LOCAL_TZ) -> int"""
54f9ee45 3643 return _misc_.DateTime_GetWeekOfYear(*args, **kwargs)
e811c8ce
RD
3644
3645 def GetWeekOfMonth(*args, **kwargs):
a95a7133 3646 """GetWeekOfMonth(self, int flags=Monday_First, wxDateTime::TimeZone tz=LOCAL_TZ) -> int"""
54f9ee45 3647 return _misc_.DateTime_GetWeekOfMonth(*args, **kwargs)
e811c8ce
RD
3648
3649 def IsWorkDay(*args, **kwargs):
a95a7133 3650 """IsWorkDay(self, int country=Country_Default) -> bool"""
54f9ee45 3651 return _misc_.DateTime_IsWorkDay(*args, **kwargs)
e811c8ce
RD
3652
3653 def IsEqualTo(*args, **kwargs):
a95a7133 3654 """IsEqualTo(self, DateTime datetime) -> bool"""
54f9ee45 3655 return _misc_.DateTime_IsEqualTo(*args, **kwargs)
e811c8ce
RD
3656
3657 def IsEarlierThan(*args, **kwargs):
a95a7133 3658 """IsEarlierThan(self, DateTime datetime) -> bool"""
54f9ee45 3659 return _misc_.DateTime_IsEarlierThan(*args, **kwargs)
e811c8ce
RD
3660
3661 def IsLaterThan(*args, **kwargs):
a95a7133 3662 """IsLaterThan(self, DateTime datetime) -> bool"""
54f9ee45 3663 return _misc_.DateTime_IsLaterThan(*args, **kwargs)
e811c8ce
RD
3664
3665 def IsStrictlyBetween(*args, **kwargs):
a95a7133 3666 """IsStrictlyBetween(self, DateTime t1, DateTime t2) -> bool"""
54f9ee45 3667 return _misc_.DateTime_IsStrictlyBetween(*args, **kwargs)
e811c8ce
RD
3668
3669 def IsBetween(*args, **kwargs):
a95a7133 3670 """IsBetween(self, DateTime t1, DateTime t2) -> bool"""
54f9ee45 3671 return _misc_.DateTime_IsBetween(*args, **kwargs)
e811c8ce
RD
3672
3673 def IsSameDate(*args, **kwargs):
a95a7133 3674 """IsSameDate(self, DateTime dt) -> bool"""
54f9ee45 3675 return _misc_.DateTime_IsSameDate(*args, **kwargs)
e811c8ce
RD
3676
3677 def IsSameTime(*args, **kwargs):
a95a7133 3678 """IsSameTime(self, DateTime dt) -> bool"""
54f9ee45 3679 return _misc_.DateTime_IsSameTime(*args, **kwargs)
e811c8ce
RD
3680
3681 def IsEqualUpTo(*args, **kwargs):
a95a7133 3682 """IsEqualUpTo(self, DateTime dt, TimeSpan ts) -> bool"""
54f9ee45 3683 return _misc_.DateTime_IsEqualUpTo(*args, **kwargs)
e811c8ce
RD
3684
3685 def AddTS(*args, **kwargs):
a95a7133 3686 """AddTS(self, TimeSpan diff) -> DateTime"""
54f9ee45 3687 return _misc_.DateTime_AddTS(*args, **kwargs)
e811c8ce
RD
3688
3689 def AddDS(*args, **kwargs):
a95a7133 3690 """AddDS(self, DateSpan diff) -> DateTime"""
54f9ee45 3691 return _misc_.DateTime_AddDS(*args, **kwargs)
e811c8ce
RD
3692
3693 def SubtractTS(*args, **kwargs):
a95a7133 3694 """SubtractTS(self, TimeSpan diff) -> DateTime"""
54f9ee45 3695 return _misc_.DateTime_SubtractTS(*args, **kwargs)
e811c8ce
RD
3696
3697 def SubtractDS(*args, **kwargs):
a95a7133 3698 """SubtractDS(self, DateSpan diff) -> DateTime"""
54f9ee45 3699 return _misc_.DateTime_SubtractDS(*args, **kwargs)
e811c8ce
RD
3700
3701 def Subtract(*args, **kwargs):
a95a7133 3702 """Subtract(self, DateTime dt) -> TimeSpan"""
54f9ee45 3703 return _misc_.DateTime_Subtract(*args, **kwargs)
e811c8ce
RD
3704
3705 def __iadd__(*args):
0df68c9f 3706 """
a95a7133
RD
3707 __iadd__(self, TimeSpan diff) -> DateTime
3708 __iadd__(self, DateSpan diff) -> DateTime
0df68c9f 3709 """
54f9ee45 3710 return _misc_.DateTime___iadd__(*args)
e811c8ce
RD
3711
3712 def __isub__(*args):
0df68c9f 3713 """
a95a7133
RD
3714 __isub__(self, TimeSpan diff) -> DateTime
3715 __isub__(self, DateSpan diff) -> DateTime
0df68c9f 3716 """
54f9ee45 3717 return _misc_.DateTime___isub__(*args)
e811c8ce
RD
3718
3719 def __add__(*args):
0df68c9f 3720 """
a95a7133
RD
3721 __add__(self, TimeSpan other) -> DateTime
3722 __add__(self, DateSpan other) -> DateTime
0df68c9f 3723 """
54f9ee45 3724 return _misc_.DateTime___add__(*args)
e811c8ce
RD
3725
3726 def __sub__(*args):
0df68c9f 3727 """
a95a7133
RD
3728 __sub__(self, DateTime other) -> TimeSpan
3729 __sub__(self, TimeSpan other) -> DateTime
3730 __sub__(self, DateSpan other) -> DateTime
0df68c9f 3731 """
54f9ee45 3732 return _misc_.DateTime___sub__(*args)
e811c8ce 3733
fef4c27a 3734 def __lt__(*args, **kwargs):
a95a7133 3735 """__lt__(self, DateTime other) -> bool"""
fef4c27a 3736 return _misc_.DateTime___lt__(*args, **kwargs)
e811c8ce 3737
fef4c27a 3738 def __le__(*args, **kwargs):
a95a7133 3739 """__le__(self, DateTime other) -> bool"""
fef4c27a 3740 return _misc_.DateTime___le__(*args, **kwargs)
e811c8ce 3741
fef4c27a 3742 def __gt__(*args, **kwargs):
a95a7133 3743 """__gt__(self, DateTime other) -> bool"""
fef4c27a 3744 return _misc_.DateTime___gt__(*args, **kwargs)
e811c8ce 3745
fef4c27a 3746 def __ge__(*args, **kwargs):
a95a7133 3747 """__ge__(self, DateTime other) -> bool"""
fef4c27a 3748 return _misc_.DateTime___ge__(*args, **kwargs)
e811c8ce 3749
fef4c27a 3750 def __eq__(*args, **kwargs):
a95a7133 3751 """__eq__(self, DateTime other) -> bool"""
fef4c27a 3752 return _misc_.DateTime___eq__(*args, **kwargs)
e811c8ce 3753
fef4c27a 3754 def __ne__(*args, **kwargs):
a95a7133 3755 """__ne__(self, DateTime other) -> bool"""
fef4c27a 3756 return _misc_.DateTime___ne__(*args, **kwargs)
e811c8ce
RD
3757
3758 def ParseRfc822Date(*args, **kwargs):
a95a7133 3759 """ParseRfc822Date(self, String date) -> int"""
54f9ee45 3760 return _misc_.DateTime_ParseRfc822Date(*args, **kwargs)
e811c8ce
RD
3761
3762 def ParseFormat(*args, **kwargs):
7557b9b5 3763 """ParseFormat(self, String date, String format=DefaultDateTimeFormat, DateTime dateDef=DefaultDateTime) -> int"""
54f9ee45 3764 return _misc_.DateTime_ParseFormat(*args, **kwargs)
e811c8ce
RD
3765
3766 def ParseDateTime(*args, **kwargs):
a95a7133 3767 """ParseDateTime(self, String datetime) -> int"""
54f9ee45 3768 return _misc_.DateTime_ParseDateTime(*args, **kwargs)
e811c8ce
RD
3769
3770 def ParseDate(*args, **kwargs):
a95a7133 3771 """ParseDate(self, String date) -> int"""
54f9ee45 3772 return _misc_.DateTime_ParseDate(*args, **kwargs)
e811c8ce
RD
3773
3774 def ParseTime(*args, **kwargs):
a95a7133 3775 """ParseTime(self, String time) -> int"""
54f9ee45 3776 return _misc_.DateTime_ParseTime(*args, **kwargs)
e811c8ce
RD
3777
3778 def Format(*args, **kwargs):
7557b9b5 3779 """Format(self, String format=DefaultDateTimeFormat, wxDateTime::TimeZone tz=LOCAL_TZ) -> String"""
54f9ee45 3780 return _misc_.DateTime_Format(*args, **kwargs)
e811c8ce
RD
3781
3782 def FormatDate(*args, **kwargs):
a95a7133 3783 """FormatDate(self) -> String"""
54f9ee45 3784 return _misc_.DateTime_FormatDate(*args, **kwargs)
e811c8ce
RD
3785
3786 def FormatTime(*args, **kwargs):
a95a7133 3787 """FormatTime(self) -> String"""
54f9ee45 3788 return _misc_.DateTime_FormatTime(*args, **kwargs)
e811c8ce
RD
3789
3790 def FormatISODate(*args, **kwargs):
a95a7133 3791 """FormatISODate(self) -> String"""
54f9ee45 3792 return _misc_.DateTime_FormatISODate(*args, **kwargs)
e811c8ce
RD
3793
3794 def FormatISOTime(*args, **kwargs):
a95a7133 3795 """FormatISOTime(self) -> String"""
54f9ee45 3796 return _misc_.DateTime_FormatISOTime(*args, **kwargs)
e811c8ce 3797
d14a1e28 3798 def __repr__(self):
a95a7133
RD
3799 if self.IsValid():
3800 return '<wx.DateTime: \"%s\" at %s>' % ( self.Format(), self.this)
3801 else:
3802 return '<wx.DateTime: \"INVALID\" at %s>' % self.this
d14a1e28 3803 def __str__(self):
a95a7133
RD
3804 if self.IsValid():
3805 return self.Format()
3806 else:
3807 return "INVALID DateTime"
d14a1e28
RD
3808
3809
3810class DateTimePtr(DateTime):
3811 def __init__(self, this):
3812 self.this = this
3813 if not hasattr(self,"thisown"): self.thisown = 0
3814 self.__class__ = DateTime
54f9ee45 3815_misc_.DateTime_swigregister(DateTimePtr)
7557b9b5
RD
3816DefaultDateTimeFormat = cvar.DefaultDateTimeFormat
3817DefaultTimeSpanFormat = cvar.DefaultTimeSpanFormat
d14a1e28 3818
e811c8ce 3819def DateTime_SetCountry(*args, **kwargs):
196addbf 3820 """DateTime_SetCountry(int country)"""
54f9ee45 3821 return _misc_.DateTime_SetCountry(*args, **kwargs)
d14a1e28 3822
e811c8ce 3823def DateTime_GetCountry(*args, **kwargs):
196addbf 3824 """DateTime_GetCountry() -> int"""
54f9ee45 3825 return _misc_.DateTime_GetCountry(*args, **kwargs)
d14a1e28 3826
e811c8ce 3827def DateTime_IsWestEuropeanCountry(*args, **kwargs):
196addbf 3828 """DateTime_IsWestEuropeanCountry(int country=Country_Default) -> bool"""
54f9ee45 3829 return _misc_.DateTime_IsWestEuropeanCountry(*args, **kwargs)
d14a1e28 3830
e811c8ce 3831def DateTime_GetCurrentYear(*args, **kwargs):
196addbf 3832 """DateTime_GetCurrentYear(int cal=Gregorian) -> int"""
54f9ee45 3833 return _misc_.DateTime_GetCurrentYear(*args, **kwargs)
d14a1e28 3834
e811c8ce
RD
3835def DateTime_ConvertYearToBC(*args, **kwargs):
3836 """DateTime_ConvertYearToBC(int year) -> int"""
54f9ee45 3837 return _misc_.DateTime_ConvertYearToBC(*args, **kwargs)
d14a1e28 3838
e811c8ce 3839def DateTime_GetCurrentMonth(*args, **kwargs):
196addbf 3840 """DateTime_GetCurrentMonth(int cal=Gregorian) -> int"""
54f9ee45 3841 return _misc_.DateTime_GetCurrentMonth(*args, **kwargs)
d14a1e28 3842
e811c8ce 3843def DateTime_IsLeapYear(*args, **kwargs):
196addbf 3844 """DateTime_IsLeapYear(int year=Inv_Year, int cal=Gregorian) -> bool"""
54f9ee45 3845 return _misc_.DateTime_IsLeapYear(*args, **kwargs)
d14a1e28 3846
e811c8ce
RD
3847def DateTime_GetCentury(*args, **kwargs):
3848 """DateTime_GetCentury(int year=Inv_Year) -> int"""
54f9ee45 3849 return _misc_.DateTime_GetCentury(*args, **kwargs)
d14a1e28 3850
e811c8ce 3851def DateTime_GetNumberOfDaysinYear(*args, **kwargs):
196addbf 3852 """DateTime_GetNumberOfDaysinYear(int year, int cal=Gregorian) -> int"""
54f9ee45 3853 return _misc_.DateTime_GetNumberOfDaysinYear(*args, **kwargs)
d14a1e28 3854
e811c8ce 3855def DateTime_GetNumberOfDaysInMonth(*args, **kwargs):
196addbf 3856 """DateTime_GetNumberOfDaysInMonth(int month, int year=Inv_Year, int cal=Gregorian) -> int"""
54f9ee45 3857 return _misc_.DateTime_GetNumberOfDaysInMonth(*args, **kwargs)
d14a1e28 3858
e811c8ce 3859def DateTime_GetMonthName(*args, **kwargs):
196addbf 3860 """DateTime_GetMonthName(int month, int flags=Name_Full) -> String"""
54f9ee45 3861 return _misc_.DateTime_GetMonthName(*args, **kwargs)
d14a1e28 3862
e811c8ce 3863def DateTime_GetWeekDayName(*args, **kwargs):
196addbf 3864 """DateTime_GetWeekDayName(int weekday, int flags=Name_Full) -> String"""
54f9ee45 3865 return _misc_.DateTime_GetWeekDayName(*args, **kwargs)
d14a1e28 3866
e811c8ce 3867def DateTime_GetAmPmStrings(*args, **kwargs):
fd2dc343
RD
3868 """
3869 GetAmPmStrings() -> (am, pm)
3870
3871 Get the AM and PM strings in the current locale (may be empty)
3872 """
54f9ee45 3873 return _misc_.DateTime_GetAmPmStrings(*args, **kwargs)
d14a1e28 3874
e811c8ce 3875def DateTime_IsDSTApplicable(*args, **kwargs):
196addbf 3876 """DateTime_IsDSTApplicable(int year=Inv_Year, int country=Country_Default) -> bool"""
54f9ee45 3877 return _misc_.DateTime_IsDSTApplicable(*args, **kwargs)
d14a1e28 3878
e811c8ce 3879def DateTime_GetBeginDST(*args, **kwargs):
196addbf 3880 """DateTime_GetBeginDST(int year=Inv_Year, int country=Country_Default) -> DateTime"""
54f9ee45 3881 return _misc_.DateTime_GetBeginDST(*args, **kwargs)
d14a1e28 3882
e811c8ce 3883def DateTime_GetEndDST(*args, **kwargs):
196addbf 3884 """DateTime_GetEndDST(int year=Inv_Year, int country=Country_Default) -> DateTime"""
54f9ee45 3885 return _misc_.DateTime_GetEndDST(*args, **kwargs)
d14a1e28 3886
e811c8ce
RD
3887def DateTime_Now(*args, **kwargs):
3888 """DateTime_Now() -> DateTime"""
54f9ee45 3889 return _misc_.DateTime_Now(*args, **kwargs)
d14a1e28 3890
e811c8ce
RD
3891def DateTime_UNow(*args, **kwargs):
3892 """DateTime_UNow() -> DateTime"""
54f9ee45 3893 return _misc_.DateTime_UNow(*args, **kwargs)
d14a1e28 3894
e811c8ce
RD
3895def DateTime_Today(*args, **kwargs):
3896 """DateTime_Today() -> DateTime"""
54f9ee45 3897 return _misc_.DateTime_Today(*args, **kwargs)
d14a1e28
RD
3898
3899def DateTimeFromTimeT(*args, **kwargs):
e811c8ce 3900 """DateTimeFromTimeT(time_t timet) -> DateTime"""
54f9ee45 3901 val = _misc_.new_DateTimeFromTimeT(*args, **kwargs)
d14a1e28 3902 val.thisown = 1
c368d904
RD
3903 return val
3904
d14a1e28 3905def DateTimeFromJDN(*args, **kwargs):
e811c8ce 3906 """DateTimeFromJDN(double jdn) -> DateTime"""
54f9ee45 3907 val = _misc_.new_DateTimeFromJDN(*args, **kwargs)
d14a1e28
RD
3908 val.thisown = 1
3909 return val
3910
3911def DateTimeFromHMS(*args, **kwargs):
322913ce 3912 """DateTimeFromHMS(int hour, int minute=0, int second=0, int millisec=0) -> DateTime"""
54f9ee45 3913 val = _misc_.new_DateTimeFromHMS(*args, **kwargs)
d14a1e28
RD
3914 val.thisown = 1
3915 return val
3916
3917def DateTimeFromDMY(*args, **kwargs):
0df68c9f 3918 """
196addbf
RD
3919 DateTimeFromDMY(int day, int month=Inv_Month, int year=Inv_Year, int hour=0,
3920 int minute=0, int second=0, int millisec=0) -> DateTime
0df68c9f 3921 """
54f9ee45 3922 val = _misc_.new_DateTimeFromDMY(*args, **kwargs)
d14a1e28
RD
3923 val.thisown = 1
3924 return val
3925
7e63a440
RD
3926def DateTime_SetToWeekOfYear(*args, **kwargs):
3927 """DateTime_SetToWeekOfYear(int year, int numWeek, int weekday=Mon) -> DateTime"""
3928 return _misc_.DateTime_SetToWeekOfYear(*args, **kwargs)
3929
d14a1e28 3930class TimeSpan(object):
093d3ff1 3931 """Proxy of C++ TimeSpan class"""
e811c8ce
RD
3932 def __repr__(self):
3933 return "<%s.%s; proxy of C++ wxTimeSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3934 def Seconds(*args, **kwargs):
66c033b4 3935 """Seconds(long sec) -> TimeSpan"""
54f9ee45 3936 return _misc_.TimeSpan_Seconds(*args, **kwargs)
e811c8ce
RD
3937
3938 Seconds = staticmethod(Seconds)
3939 def Second(*args, **kwargs):
66c033b4 3940 """Second() -> TimeSpan"""
54f9ee45 3941 return _misc_.TimeSpan_Second(*args, **kwargs)
e811c8ce
RD
3942
3943 Second = staticmethod(Second)
3944 def Minutes(*args, **kwargs):
66c033b4 3945 """Minutes(long min) -> TimeSpan"""
54f9ee45 3946 return _misc_.TimeSpan_Minutes(*args, **kwargs)
e811c8ce
RD
3947
3948 Minutes = staticmethod(Minutes)
3949 def Minute(*args, **kwargs):
66c033b4 3950 """Minute() -> TimeSpan"""
54f9ee45 3951 return _misc_.TimeSpan_Minute(*args, **kwargs)
e811c8ce
RD
3952
3953 Minute = staticmethod(Minute)
3954 def Hours(*args, **kwargs):
66c033b4 3955 """Hours(long hours) -> TimeSpan"""
54f9ee45 3956 return _misc_.TimeSpan_Hours(*args, **kwargs)
e811c8ce
RD
3957
3958 Hours = staticmethod(Hours)
3959 def Hour(*args, **kwargs):
66c033b4 3960 """Hour() -> TimeSpan"""
54f9ee45 3961 return _misc_.TimeSpan_Hour(*args, **kwargs)
e811c8ce
RD
3962
3963 Hour = staticmethod(Hour)
3964 def Days(*args, **kwargs):
66c033b4 3965 """Days(long days) -> TimeSpan"""
54f9ee45 3966 return _misc_.TimeSpan_Days(*args, **kwargs)
e811c8ce
RD
3967
3968 Days = staticmethod(Days)
3969 def Day(*args, **kwargs):
66c033b4 3970 """Day() -> TimeSpan"""
54f9ee45 3971 return _misc_.TimeSpan_Day(*args, **kwargs)
e811c8ce
RD
3972
3973 Day = staticmethod(Day)
3974 def Weeks(*args, **kwargs):
66c033b4 3975 """Weeks(long days) -> TimeSpan"""
54f9ee45 3976 return _misc_.TimeSpan_Weeks(*args, **kwargs)
e811c8ce
RD
3977
3978 Weeks = staticmethod(Weeks)
3979 def Week(*args, **kwargs):
66c033b4 3980 """Week() -> TimeSpan"""
54f9ee45 3981 return _misc_.TimeSpan_Week(*args, **kwargs)
e811c8ce
RD
3982
3983 Week = staticmethod(Week)
d14a1e28 3984 def __init__(self, *args, **kwargs):
a95a7133 3985 """__init__(self, long hours=0, long minutes=0, long seconds=0, long milliseconds=0) -> TimeSpan"""
54f9ee45 3986 newobj = _misc_.new_TimeSpan(*args, **kwargs)
d14a1e28
RD
3987 self.this = newobj.this
3988 self.thisown = 1
3989 del newobj.thisown
54f9ee45 3990 def __del__(self, destroy=_misc_.delete_TimeSpan):
a95a7133 3991 """__del__(self)"""
d14a1e28
RD
3992 try:
3993 if self.thisown: destroy(self)
3994 except: pass
e811c8ce
RD
3995
3996 def Add(*args, **kwargs):
a95a7133 3997 """Add(self, TimeSpan diff) -> TimeSpan"""
54f9ee45 3998 return _misc_.TimeSpan_Add(*args, **kwargs)
e811c8ce
RD
3999
4000 def Subtract(*args, **kwargs):
a95a7133 4001 """Subtract(self, TimeSpan diff) -> TimeSpan"""
54f9ee45 4002 return _misc_.TimeSpan_Subtract(*args, **kwargs)
e811c8ce
RD
4003
4004 def Multiply(*args, **kwargs):
a95a7133 4005 """Multiply(self, int n) -> TimeSpan"""
54f9ee45 4006 return _misc_.TimeSpan_Multiply(*args, **kwargs)
e811c8ce
RD
4007
4008 def Neg(*args, **kwargs):
a95a7133 4009 """Neg(self) -> TimeSpan"""
54f9ee45 4010 return _misc_.TimeSpan_Neg(*args, **kwargs)
e811c8ce
RD
4011
4012 def Abs(*args, **kwargs):
a95a7133 4013 """Abs(self) -> TimeSpan"""
54f9ee45 4014 return _misc_.TimeSpan_Abs(*args, **kwargs)
e811c8ce
RD
4015
4016 def __iadd__(*args, **kwargs):
a95a7133 4017 """__iadd__(self, TimeSpan diff) -> TimeSpan"""
54f9ee45 4018 return _misc_.TimeSpan___iadd__(*args, **kwargs)
e811c8ce
RD
4019
4020 def __isub__(*args, **kwargs):
a95a7133 4021 """__isub__(self, TimeSpan diff) -> TimeSpan"""
54f9ee45 4022 return _misc_.TimeSpan___isub__(*args, **kwargs)
e811c8ce
RD
4023
4024 def __imul__(*args, **kwargs):
a95a7133 4025 """__imul__(self, int n) -> TimeSpan"""
54f9ee45 4026 return _misc_.TimeSpan___imul__(*args, **kwargs)
e811c8ce
RD
4027
4028 def __neg__(*args, **kwargs):
a95a7133 4029 """__neg__(self) -> TimeSpan"""
54f9ee45 4030 return _misc_.TimeSpan___neg__(*args, **kwargs)
e811c8ce
RD
4031
4032 def __add__(*args, **kwargs):
a95a7133 4033 """__add__(self, TimeSpan other) -> TimeSpan"""
54f9ee45 4034 return _misc_.TimeSpan___add__(*args, **kwargs)
e811c8ce
RD
4035
4036 def __sub__(*args, **kwargs):
a95a7133 4037 """__sub__(self, TimeSpan other) -> TimeSpan"""
54f9ee45 4038 return _misc_.TimeSpan___sub__(*args, **kwargs)
e811c8ce
RD
4039
4040 def __mul__(*args, **kwargs):
a95a7133 4041 """__mul__(self, int n) -> TimeSpan"""
54f9ee45 4042 return _misc_.TimeSpan___mul__(*args, **kwargs)
e811c8ce
RD
4043
4044 def __rmul__(*args, **kwargs):
a95a7133 4045 """__rmul__(self, int n) -> TimeSpan"""
54f9ee45 4046 return _misc_.TimeSpan___rmul__(*args, **kwargs)
e811c8ce
RD
4047
4048 def __lt__(*args, **kwargs):
a95a7133 4049 """__lt__(self, TimeSpan other) -> bool"""
54f9ee45 4050 return _misc_.TimeSpan___lt__(*args, **kwargs)
e811c8ce
RD
4051
4052 def __le__(*args, **kwargs):
a95a7133 4053 """__le__(self, TimeSpan other) -> bool"""
54f9ee45 4054 return _misc_.TimeSpan___le__(*args, **kwargs)
e811c8ce
RD
4055
4056 def __gt__(*args, **kwargs):
a95a7133 4057 """__gt__(self, TimeSpan other) -> bool"""
54f9ee45 4058 return _misc_.TimeSpan___gt__(*args, **kwargs)
e811c8ce
RD
4059
4060 def __ge__(*args, **kwargs):
a95a7133 4061 """__ge__(self, TimeSpan other) -> bool"""
54f9ee45 4062 return _misc_.TimeSpan___ge__(*args, **kwargs)
e811c8ce
RD
4063
4064 def __eq__(*args, **kwargs):
a95a7133 4065 """__eq__(self, TimeSpan other) -> bool"""
54f9ee45 4066 return _misc_.TimeSpan___eq__(*args, **kwargs)
e811c8ce
RD
4067
4068 def __ne__(*args, **kwargs):
a95a7133 4069 """__ne__(self, TimeSpan other) -> bool"""
54f9ee45 4070 return _misc_.TimeSpan___ne__(*args, **kwargs)
e811c8ce
RD
4071
4072 def IsNull(*args, **kwargs):
a95a7133 4073 """IsNull(self) -> bool"""
54f9ee45 4074 return _misc_.TimeSpan_IsNull(*args, **kwargs)
e811c8ce
RD
4075
4076 def IsPositive(*args, **kwargs):
a95a7133 4077 """IsPositive(self) -> bool"""
54f9ee45 4078 return _misc_.TimeSpan_IsPositive(*args, **kwargs)
e811c8ce
RD
4079
4080 def IsNegative(*args, **kwargs):
a95a7133 4081 """IsNegative(self) -> bool"""
54f9ee45 4082 return _misc_.TimeSpan_IsNegative(*args, **kwargs)
e811c8ce
RD
4083
4084 def IsEqualTo(*args, **kwargs):
a95a7133 4085 """IsEqualTo(self, TimeSpan ts) -> bool"""
54f9ee45 4086 return _misc_.TimeSpan_IsEqualTo(*args, **kwargs)
e811c8ce
RD
4087
4088 def IsLongerThan(*args, **kwargs):
a95a7133 4089 """IsLongerThan(self, TimeSpan ts) -> bool"""
54f9ee45 4090 return _misc_.TimeSpan_IsLongerThan(*args, **kwargs)
e811c8ce
RD
4091
4092 def IsShorterThan(*args, **kwargs):
a95a7133 4093 """IsShorterThan(self, TimeSpan t) -> bool"""
54f9ee45 4094 return _misc_.TimeSpan_IsShorterThan(*args, **kwargs)
e811c8ce
RD
4095
4096 def GetWeeks(*args, **kwargs):
a95a7133 4097 """GetWeeks(self) -> int"""
54f9ee45 4098 return _misc_.TimeSpan_GetWeeks(*args, **kwargs)
e811c8ce
RD
4099
4100 def GetDays(*args, **kwargs):
a95a7133 4101 """GetDays(self) -> int"""
54f9ee45 4102 return _misc_.TimeSpan_GetDays(*args, **kwargs)
e811c8ce
RD
4103
4104 def GetHours(*args, **kwargs):
a95a7133 4105 """GetHours(self) -> int"""
54f9ee45 4106 return _misc_.TimeSpan_GetHours(*args, **kwargs)
e811c8ce
RD
4107
4108 def GetMinutes(*args, **kwargs):
a95a7133 4109 """GetMinutes(self) -> int"""
54f9ee45 4110 return _misc_.TimeSpan_GetMinutes(*args, **kwargs)
e811c8ce
RD
4111
4112 def GetSeconds(*args, **kwargs):
a95a7133 4113 """GetSeconds(self) -> wxLongLong"""
54f9ee45 4114 return _misc_.TimeSpan_GetSeconds(*args, **kwargs)
e811c8ce
RD
4115
4116 def GetMilliseconds(*args, **kwargs):
a95a7133 4117 """GetMilliseconds(self) -> wxLongLong"""
54f9ee45 4118 return _misc_.TimeSpan_GetMilliseconds(*args, **kwargs)
e811c8ce
RD
4119
4120 def Format(*args, **kwargs):
7557b9b5 4121 """Format(self, String format=DefaultTimeSpanFormat) -> String"""
54f9ee45 4122 return _misc_.TimeSpan_Format(*args, **kwargs)
e811c8ce 4123
d14a1e28 4124 def __repr__(self):
a95a7133 4125 return '<wx.TimeSpan: \"%s\" at %s>' % ( self.Format(), self.this)
d14a1e28
RD
4126 def __str__(self):
4127 return self.Format()
4128
4129
4130class TimeSpanPtr(TimeSpan):
4131 def __init__(self, this):
4132 self.this = this
4133 if not hasattr(self,"thisown"): self.thisown = 0
4134 self.__class__ = TimeSpan
54f9ee45 4135_misc_.TimeSpan_swigregister(TimeSpanPtr)
d14a1e28 4136
e811c8ce
RD
4137def TimeSpan_Seconds(*args, **kwargs):
4138 """TimeSpan_Seconds(long sec) -> TimeSpan"""
54f9ee45 4139 return _misc_.TimeSpan_Seconds(*args, **kwargs)
d14a1e28 4140
e811c8ce
RD
4141def TimeSpan_Second(*args, **kwargs):
4142 """TimeSpan_Second() -> TimeSpan"""
54f9ee45 4143 return _misc_.TimeSpan_Second(*args, **kwargs)
d14a1e28 4144
e811c8ce
RD
4145def TimeSpan_Minutes(*args, **kwargs):
4146 """TimeSpan_Minutes(long min) -> TimeSpan"""
54f9ee45 4147 return _misc_.TimeSpan_Minutes(*args, **kwargs)
d14a1e28 4148
e811c8ce
RD
4149def TimeSpan_Minute(*args, **kwargs):
4150 """TimeSpan_Minute() -> TimeSpan"""
54f9ee45 4151 return _misc_.TimeSpan_Minute(*args, **kwargs)
d14a1e28 4152
e811c8ce
RD
4153def TimeSpan_Hours(*args, **kwargs):
4154 """TimeSpan_Hours(long hours) -> TimeSpan"""
54f9ee45 4155 return _misc_.TimeSpan_Hours(*args, **kwargs)
d14a1e28 4156
e811c8ce
RD
4157def TimeSpan_Hour(*args, **kwargs):
4158 """TimeSpan_Hour() -> TimeSpan"""
54f9ee45 4159 return _misc_.TimeSpan_Hour(*args, **kwargs)
d14a1e28 4160
e811c8ce
RD
4161def TimeSpan_Days(*args, **kwargs):
4162 """TimeSpan_Days(long days) -> TimeSpan"""
54f9ee45 4163 return _misc_.TimeSpan_Days(*args, **kwargs)
d14a1e28 4164
e811c8ce
RD
4165def TimeSpan_Day(*args, **kwargs):
4166 """TimeSpan_Day() -> TimeSpan"""
54f9ee45 4167 return _misc_.TimeSpan_Day(*args, **kwargs)
d14a1e28 4168
e811c8ce
RD
4169def TimeSpan_Weeks(*args, **kwargs):
4170 """TimeSpan_Weeks(long days) -> TimeSpan"""
54f9ee45 4171 return _misc_.TimeSpan_Weeks(*args, **kwargs)
d14a1e28 4172
e811c8ce
RD
4173def TimeSpan_Week(*args, **kwargs):
4174 """TimeSpan_Week() -> TimeSpan"""
54f9ee45 4175 return _misc_.TimeSpan_Week(*args, **kwargs)
d14a1e28
RD
4176
4177class DateSpan(object):
093d3ff1 4178 """Proxy of C++ DateSpan class"""
e811c8ce
RD
4179 def __repr__(self):
4180 return "<%s.%s; proxy of C++ wxDateSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4181 def __init__(self, *args, **kwargs):
a95a7133 4182 """__init__(self, int years=0, int months=0, int weeks=0, int days=0) -> DateSpan"""
54f9ee45 4183 newobj = _misc_.new_DateSpan(*args, **kwargs)
d14a1e28
RD
4184 self.this = newobj.this
4185 self.thisown = 1
4186 del newobj.thisown
54f9ee45 4187 def __del__(self, destroy=_misc_.delete_DateSpan):
a95a7133 4188 """__del__(self)"""
d14a1e28
RD
4189 try:
4190 if self.thisown: destroy(self)
4191 except: pass
e811c8ce
RD
4192
4193 def Days(*args, **kwargs):
66c033b4 4194 """Days(int days) -> DateSpan"""
54f9ee45 4195 return _misc_.DateSpan_Days(*args, **kwargs)
e811c8ce
RD
4196
4197 Days = staticmethod(Days)
4198 def Day(*args, **kwargs):
66c033b4 4199 """Day() -> DateSpan"""
54f9ee45 4200 return _misc_.DateSpan_Day(*args, **kwargs)
e811c8ce
RD
4201
4202 Day = staticmethod(Day)
4203 def Weeks(*args, **kwargs):
66c033b4 4204 """Weeks(int weeks) -> DateSpan"""
54f9ee45 4205 return _misc_.DateSpan_Weeks(*args, **kwargs)
e811c8ce
RD
4206
4207 Weeks = staticmethod(Weeks)
4208 def Week(*args, **kwargs):
66c033b4 4209 """Week() -> DateSpan"""
54f9ee45 4210 return _misc_.DateSpan_Week(*args, **kwargs)
e811c8ce
RD
4211
4212 Week = staticmethod(Week)
4213 def Months(*args, **kwargs):
66c033b4 4214 """Months(int mon) -> DateSpan"""
54f9ee45 4215 return _misc_.DateSpan_Months(*args, **kwargs)
e811c8ce
RD
4216
4217 Months = staticmethod(Months)
4218 def Month(*args, **kwargs):
66c033b4 4219 """Month() -> DateSpan"""
54f9ee45 4220 return _misc_.DateSpan_Month(*args, **kwargs)
e811c8ce
RD
4221
4222 Month = staticmethod(Month)
4223 def Years(*args, **kwargs):
66c033b4 4224 """Years(int years) -> DateSpan"""
54f9ee45 4225 return _misc_.DateSpan_Years(*args, **kwargs)
e811c8ce
RD
4226
4227 Years = staticmethod(Years)
4228 def Year(*args, **kwargs):
66c033b4 4229 """Year() -> DateSpan"""
54f9ee45 4230 return _misc_.DateSpan_Year(*args, **kwargs)
e811c8ce
RD
4231
4232 Year = staticmethod(Year)
4233 def SetYears(*args, **kwargs):
a95a7133 4234 """SetYears(self, int n) -> DateSpan"""
54f9ee45 4235 return _misc_.DateSpan_SetYears(*args, **kwargs)
e811c8ce
RD
4236
4237 def SetMonths(*args, **kwargs):
a95a7133 4238 """SetMonths(self, int n) -> DateSpan"""
54f9ee45 4239 return _misc_.DateSpan_SetMonths(*args, **kwargs)
e811c8ce
RD
4240
4241 def SetWeeks(*args, **kwargs):
a95a7133 4242 """SetWeeks(self, int n) -> DateSpan"""
54f9ee45 4243 return _misc_.DateSpan_SetWeeks(*args, **kwargs)
e811c8ce
RD
4244
4245 def SetDays(*args, **kwargs):
a95a7133 4246 """SetDays(self, int n) -> DateSpan"""
54f9ee45 4247 return _misc_.DateSpan_SetDays(*args, **kwargs)
e811c8ce
RD
4248
4249 def GetYears(*args, **kwargs):
a95a7133 4250 """GetYears(self) -> int"""
54f9ee45 4251 return _misc_.DateSpan_GetYears(*args, **kwargs)
e811c8ce
RD
4252
4253 def GetMonths(*args, **kwargs):
a95a7133 4254 """GetMonths(self) -> int"""
54f9ee45 4255 return _misc_.DateSpan_GetMonths(*args, **kwargs)
e811c8ce
RD
4256
4257 def GetWeeks(*args, **kwargs):
a95a7133 4258 """GetWeeks(self) -> int"""
54f9ee45 4259 return _misc_.DateSpan_GetWeeks(*args, **kwargs)
e811c8ce
RD
4260
4261 def GetDays(*args, **kwargs):
a95a7133 4262 """GetDays(self) -> int"""
54f9ee45 4263 return _misc_.DateSpan_GetDays(*args, **kwargs)
e811c8ce
RD
4264
4265 def GetTotalDays(*args, **kwargs):
a95a7133 4266 """GetTotalDays(self) -> int"""
54f9ee45 4267 return _misc_.DateSpan_GetTotalDays(*args, **kwargs)
e811c8ce
RD
4268
4269 def Add(*args, **kwargs):
a95a7133 4270 """Add(self, DateSpan other) -> DateSpan"""
54f9ee45 4271 return _misc_.DateSpan_Add(*args, **kwargs)
e811c8ce
RD
4272
4273 def Subtract(*args, **kwargs):
a95a7133 4274 """Subtract(self, DateSpan other) -> DateSpan"""
54f9ee45 4275 return _misc_.DateSpan_Subtract(*args, **kwargs)
e811c8ce
RD
4276
4277 def Neg(*args, **kwargs):
a95a7133 4278 """Neg(self) -> DateSpan"""
54f9ee45 4279 return _misc_.DateSpan_Neg(*args, **kwargs)
e811c8ce
RD
4280
4281 def Multiply(*args, **kwargs):
a95a7133 4282 """Multiply(self, int factor) -> DateSpan"""
54f9ee45 4283 return _misc_.DateSpan_Multiply(*args, **kwargs)
e811c8ce
RD
4284
4285 def __iadd__(*args, **kwargs):
a95a7133 4286 """__iadd__(self, DateSpan other) -> DateSpan"""
54f9ee45 4287 return _misc_.DateSpan___iadd__(*args, **kwargs)
e811c8ce
RD
4288
4289 def __isub__(*args, **kwargs):
a95a7133 4290 """__isub__(self, DateSpan other) -> DateSpan"""
54f9ee45 4291 return _misc_.DateSpan___isub__(*args, **kwargs)
e811c8ce
RD
4292
4293 def __neg__(*args, **kwargs):
a95a7133 4294 """__neg__(self) -> DateSpan"""
54f9ee45 4295 return _misc_.DateSpan___neg__(*args, **kwargs)
e811c8ce
RD
4296
4297 def __imul__(*args, **kwargs):
a95a7133 4298 """__imul__(self, int factor) -> DateSpan"""
54f9ee45 4299 return _misc_.DateSpan___imul__(*args, **kwargs)
e811c8ce
RD
4300
4301 def __add__(*args, **kwargs):
a95a7133 4302 """__add__(self, DateSpan other) -> DateSpan"""
54f9ee45 4303 return _misc_.DateSpan___add__(*args, **kwargs)
e811c8ce
RD
4304
4305 def __sub__(*args, **kwargs):
a95a7133 4306 """__sub__(self, DateSpan other) -> DateSpan"""
54f9ee45 4307 return _misc_.DateSpan___sub__(*args, **kwargs)
e811c8ce
RD
4308
4309 def __mul__(*args, **kwargs):
a95a7133 4310 """__mul__(self, int n) -> DateSpan"""
54f9ee45 4311 return _misc_.DateSpan___mul__(*args, **kwargs)
e811c8ce
RD
4312
4313 def __rmul__(*args, **kwargs):
a95a7133 4314 """__rmul__(self, int n) -> DateSpan"""
54f9ee45 4315 return _misc_.DateSpan___rmul__(*args, **kwargs)
e811c8ce
RD
4316
4317 def __eq__(*args, **kwargs):
a95a7133 4318 """__eq__(self, DateSpan other) -> bool"""
54f9ee45 4319 return _misc_.DateSpan___eq__(*args, **kwargs)
e811c8ce
RD
4320
4321 def __ne__(*args, **kwargs):
a95a7133 4322 """__ne__(self, DateSpan other) -> bool"""
54f9ee45 4323 return _misc_.DateSpan___ne__(*args, **kwargs)
e811c8ce 4324
d14a1e28
RD
4325
4326class DateSpanPtr(DateSpan):
4327 def __init__(self, this):
4328 self.this = this
4329 if not hasattr(self,"thisown"): self.thisown = 0
4330 self.__class__ = DateSpan
54f9ee45 4331_misc_.DateSpan_swigregister(DateSpanPtr)
d14a1e28 4332
e811c8ce
RD
4333def DateSpan_Days(*args, **kwargs):
4334 """DateSpan_Days(int days) -> DateSpan"""
54f9ee45 4335 return _misc_.DateSpan_Days(*args, **kwargs)
d14a1e28 4336
e811c8ce
RD
4337def DateSpan_Day(*args, **kwargs):
4338 """DateSpan_Day() -> DateSpan"""
54f9ee45 4339 return _misc_.DateSpan_Day(*args, **kwargs)
d14a1e28 4340
e811c8ce
RD
4341def DateSpan_Weeks(*args, **kwargs):
4342 """DateSpan_Weeks(int weeks) -> DateSpan"""
54f9ee45 4343 return _misc_.DateSpan_Weeks(*args, **kwargs)
d14a1e28 4344
e811c8ce
RD
4345def DateSpan_Week(*args, **kwargs):
4346 """DateSpan_Week() -> DateSpan"""
54f9ee45 4347 return _misc_.DateSpan_Week(*args, **kwargs)
d14a1e28 4348
e811c8ce
RD
4349def DateSpan_Months(*args, **kwargs):
4350 """DateSpan_Months(int mon) -> DateSpan"""
54f9ee45 4351 return _misc_.DateSpan_Months(*args, **kwargs)
d14a1e28 4352
e811c8ce
RD
4353def DateSpan_Month(*args, **kwargs):
4354 """DateSpan_Month() -> DateSpan"""
54f9ee45 4355 return _misc_.DateSpan_Month(*args, **kwargs)
d14a1e28 4356
e811c8ce
RD
4357def DateSpan_Years(*args, **kwargs):
4358 """DateSpan_Years(int years) -> DateSpan"""
54f9ee45 4359 return _misc_.DateSpan_Years(*args, **kwargs)
d14a1e28 4360
e811c8ce
RD
4361def DateSpan_Year(*args, **kwargs):
4362 """DateSpan_Year() -> DateSpan"""
54f9ee45 4363 return _misc_.DateSpan_Year(*args, **kwargs)
d14a1e28
RD
4364
4365
e811c8ce
RD
4366def GetLocalTime(*args, **kwargs):
4367 """GetLocalTime() -> long"""
54f9ee45 4368 return _misc_.GetLocalTime(*args, **kwargs)
d14a1e28 4369
e811c8ce
RD
4370def GetUTCTime(*args, **kwargs):
4371 """GetUTCTime() -> long"""
54f9ee45 4372 return _misc_.GetUTCTime(*args, **kwargs)
d14a1e28 4373
e811c8ce
RD
4374def GetCurrentTime(*args, **kwargs):
4375 """GetCurrentTime() -> long"""
54f9ee45 4376 return _misc_.GetCurrentTime(*args, **kwargs)
d14a1e28 4377
e811c8ce
RD
4378def GetLocalTimeMillis(*args, **kwargs):
4379 """GetLocalTimeMillis() -> wxLongLong"""
54f9ee45 4380 return _misc_.GetLocalTimeMillis(*args, **kwargs)
d14a1e28
RD
4381#---------------------------------------------------------------------------
4382
54f9ee45
RD
4383DF_INVALID = _misc_.DF_INVALID
4384DF_TEXT = _misc_.DF_TEXT
4385DF_BITMAP = _misc_.DF_BITMAP
4386DF_METAFILE = _misc_.DF_METAFILE
4387DF_SYLK = _misc_.DF_SYLK
4388DF_DIF = _misc_.DF_DIF
4389DF_TIFF = _misc_.DF_TIFF
4390DF_OEMTEXT = _misc_.DF_OEMTEXT
4391DF_DIB = _misc_.DF_DIB
4392DF_PALETTE = _misc_.DF_PALETTE
4393DF_PENDATA = _misc_.DF_PENDATA
4394DF_RIFF = _misc_.DF_RIFF
4395DF_WAVE = _misc_.DF_WAVE
4396DF_UNICODETEXT = _misc_.DF_UNICODETEXT
4397DF_ENHMETAFILE = _misc_.DF_ENHMETAFILE
4398DF_FILENAME = _misc_.DF_FILENAME
4399DF_LOCALE = _misc_.DF_LOCALE
4400DF_PRIVATE = _misc_.DF_PRIVATE
4401DF_HTML = _misc_.DF_HTML
4402DF_MAX = _misc_.DF_MAX
d14a1e28 4403class DataFormat(object):
15afbcd0
RD
4404 """
4405 A wx.DataFormat is an encapsulation of a platform-specific format
41e2b43e
RD
4406 handle which is used by the system for the clipboard and drag and drop
4407 operations. The applications are usually only interested in, for
4408 example, pasting data from the clipboard only if the data is in a
4409 format the program understands. A data format is is used to uniquely
4410 identify this format.
15afbcd0 4411 """
e811c8ce
RD
4412 def __repr__(self):
4413 return "<%s.%s; proxy of C++ wxDataFormat instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4414 def __init__(self, *args, **kwargs):
15afbcd0 4415 """
a95a7133 4416 __init__(self, int type) -> DataFormat
15afbcd0 4417
41e2b43e
RD
4418 Constructs a data format object for one of the standard data formats
4419 or an empty data object (use SetType or SetId later in this case)
15afbcd0 4420 """
54f9ee45 4421 newobj = _misc_.new_DataFormat(*args, **kwargs)
d14a1e28
RD
4422 self.this = newobj.this
4423 self.thisown = 1
4424 del newobj.thisown
54f9ee45 4425 def __del__(self, destroy=_misc_.delete_DataFormat):
a95a7133 4426 """__del__(self)"""
d14a1e28
RD
4427 try:
4428 if self.thisown: destroy(self)
4429 except: pass
e811c8ce
RD
4430
4431 def __eq__(*args):
0df68c9f 4432 """
a95a7133
RD
4433 __eq__(self, int format) -> bool
4434 __eq__(self, DataFormat format) -> bool
0df68c9f 4435 """
54f9ee45 4436 return _misc_.DataFormat___eq__(*args)
e811c8ce
RD
4437
4438 def __ne__(*args):
0df68c9f 4439 """
a95a7133
RD
4440 __ne__(self, int format) -> bool
4441 __ne__(self, DataFormat format) -> bool
0df68c9f 4442 """
54f9ee45 4443 return _misc_.DataFormat___ne__(*args)
e811c8ce
RD
4444
4445 def SetType(*args, **kwargs):
15afbcd0 4446 """
a95a7133 4447 SetType(self, int format)
15afbcd0 4448
41e2b43e
RD
4449 Sets the format to the given value, which should be one of wx.DF_XXX
4450 constants.
15afbcd0 4451 """
54f9ee45 4452 return _misc_.DataFormat_SetType(*args, **kwargs)
e811c8ce
RD
4453
4454 def GetType(*args, **kwargs):
15afbcd0 4455 """
a95a7133 4456 GetType(self) -> int
15afbcd0
RD
4457
4458 Returns the platform-specific number identifying the format.
4459 """
54f9ee45 4460 return _misc_.DataFormat_GetType(*args, **kwargs)
e811c8ce
RD
4461
4462 def GetId(*args, **kwargs):
15afbcd0 4463 """
a95a7133 4464 GetId(self) -> String
15afbcd0 4465
41e2b43e
RD
4466 Returns the name of a custom format (this function will fail for a
4467 standard format).
15afbcd0 4468 """
54f9ee45 4469 return _misc_.DataFormat_GetId(*args, **kwargs)
e811c8ce
RD
4470
4471 def SetId(*args, **kwargs):
15afbcd0 4472 """
a95a7133 4473 SetId(self, String format)
15afbcd0
RD
4474
4475 Sets the format to be the custom format identified by the given name.
4476 """
54f9ee45 4477 return _misc_.DataFormat_SetId(*args, **kwargs)
e811c8ce 4478
d14a1e28
RD
4479
4480class DataFormatPtr(DataFormat):
4481 def __init__(self, this):
4482 self.this = this
4483 if not hasattr(self,"thisown"): self.thisown = 0
4484 self.__class__ = DataFormat
54f9ee45 4485_misc_.DataFormat_swigregister(DataFormatPtr)
98e665d3 4486DefaultDateTime = cvar.DefaultDateTime
d14a1e28
RD
4487
4488def CustomDataFormat(*args, **kwargs):
15afbcd0
RD
4489 """
4490 CustomDataFormat(String format) -> DataFormat
4491
41e2b43e
RD
4492 Constructs a data format object for a custom format identified by its
4493 name.
15afbcd0 4494 """
54f9ee45 4495 val = _misc_.new_CustomDataFormat(*args, **kwargs)
d14a1e28
RD
4496 val.thisown = 1
4497 return val
4498
4499class DataObject(object):
db3e571a 4500 """
1a10c483 4501 A wx.DataObject represents data that can be copied to or from the
db3e571a 4502 clipboard, or dragged and dropped. The important thing about
1a10c483 4503 wx.DataObject is that this is a 'smart' piece of data unlike usual
db3e571a
RD
4504 'dumb' data containers such as memory buffers or files. Being 'smart'
4505 here means that the data object itself should know what data formats
4506 it supports and how to render itself in each of supported formats.
4507
1a10c483
RD
4508 **NOTE**: This class is an abstract base class and can not be used
4509 directly from Python. If you need a custom type of data object then
4510 you should instead derive from `wx.PyDataObjectSimple` or use
4511 `wx.CustomDataObject`.
db3e571a
RD
4512
4513 """
e811c8ce
RD
4514 def __init__(self): raise RuntimeError, "No constructor defined"
4515 def __repr__(self):
4516 return "<%s.%s; proxy of C++ wxDataObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
4517 Get = _misc_.DataObject_Get
4518 Set = _misc_.DataObject_Set
4519 Both = _misc_.DataObject_Both
4520 def __del__(self, destroy=_misc_.delete_DataObject):
a95a7133 4521 """__del__(self)"""
d14a1e28
RD
4522 try:
4523 if self.thisown: destroy(self)
4524 except: pass
e811c8ce
RD
4525
4526 def GetPreferredFormat(*args, **kwargs):
1a10c483
RD
4527 """
4528 GetPreferredFormat(self, int dir=Get) -> DataFormat
4529
4530 Returns the preferred format for either rendering the data (if dir is
4531 Get, its default value) or for setting it. Usually this will be the
4532 native format of the wx.DataObject.
4533 """
54f9ee45 4534 return _misc_.DataObject_GetPreferredFormat(*args, **kwargs)
e811c8ce
RD
4535
4536 def GetFormatCount(*args, **kwargs):
1a10c483
RD
4537 """
4538 GetFormatCount(self, int dir=Get) -> size_t
4539
4540 Returns the number of available formats for rendering or setting the
4541 data.
4542 """
54f9ee45 4543 return _misc_.DataObject_GetFormatCount(*args, **kwargs)
e811c8ce
RD
4544
4545 def IsSupported(*args, **kwargs):
1a10c483
RD
4546 """
4547 IsSupported(self, DataFormat format, int dir=Get) -> bool
4548
4549 Returns True if this format is supported.
4550 """
54f9ee45 4551 return _misc_.DataObject_IsSupported(*args, **kwargs)
e811c8ce
RD
4552
4553 def GetDataSize(*args, **kwargs):
1a10c483
RD
4554 """
4555 GetDataSize(self, DataFormat format) -> size_t
4556
4557 Get the (total) size of data for the given format
4558 """
54f9ee45 4559 return _misc_.DataObject_GetDataSize(*args, **kwargs)
e811c8ce
RD
4560
4561 def GetAllFormats(*args, **kwargs):
1a10c483
RD
4562 """
4563 GetAllFormats(self, int dir=Get) -> [formats]
4564
4565 Returns a list of all the wx.DataFormats that this dataobject supports
4566 in the given direction.
4567 """
54f9ee45 4568 return _misc_.DataObject_GetAllFormats(*args, **kwargs)
e811c8ce
RD
4569
4570 def GetDataHere(*args, **kwargs):
1a10c483
RD
4571 """
4572 GetDataHere(self, DataFormat format) -> String
4573
4574 Get the data bytes in the specified format, returns None on failure.
4575
4576 """
54f9ee45 4577 return _misc_.DataObject_GetDataHere(*args, **kwargs)
e811c8ce
RD
4578
4579 def SetData(*args, **kwargs):
1a10c483
RD
4580 """
4581 SetData(self, DataFormat format, String data) -> bool
4582
4583 Set the data in the specified format from the bytes in the the data string.
4584
4585 """
54f9ee45 4586 return _misc_.DataObject_SetData(*args, **kwargs)
e811c8ce 4587
d14a1e28
RD
4588
4589class DataObjectPtr(DataObject):
4590 def __init__(self, this):
4591 self.this = this
4592 if not hasattr(self,"thisown"): self.thisown = 0
4593 self.__class__ = DataObject
54f9ee45 4594_misc_.DataObject_swigregister(DataObjectPtr)
d14a1e28
RD
4595FormatInvalid = cvar.FormatInvalid
4596
4597class DataObjectSimple(DataObject):
1a10c483
RD
4598 """
4599 wx.DataObjectSimple is a `wx.DataObject` which only supports one
4600 format. This is the simplest possible `wx.DataObject` implementation.
4601
4602 This is still an "abstract base class" meaning that you can't use it
4603 directly. You either need to use one of the predefined base classes,
4604 or derive your own class from `wx.PyDataObjectSimple`.
4605
4606 """
e811c8ce
RD
4607 def __repr__(self):
4608 return "<%s.%s; proxy of C++ wxDataObjectSimple instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4609 def __init__(self, *args, **kwargs):
1a10c483
RD
4610 """
4611 __init__(self, DataFormat format=FormatInvalid) -> DataObjectSimple
4612
4613 Constructor accepts the supported format (none by default) which may
4614 also be set later with `SetFormat`.
4615 """
54f9ee45 4616 newobj = _misc_.new_DataObjectSimple(*args, **kwargs)
d14a1e28
RD
4617 self.this = newobj.this
4618 self.thisown = 1
4619 del newobj.thisown
e811c8ce 4620 def GetFormat(*args, **kwargs):
1a10c483
RD
4621 """
4622 GetFormat(self) -> DataFormat
4623
4624 Returns the (one and only one) format supported by this object. It is
4625 assumed that the format is supported in both directions.
4626 """
54f9ee45 4627 return _misc_.DataObjectSimple_GetFormat(*args, **kwargs)
e811c8ce
RD
4628
4629 def SetFormat(*args, **kwargs):
1a10c483
RD
4630 """
4631 SetFormat(self, DataFormat format)
4632
4633 Sets the supported format.
4634 """
54f9ee45 4635 return _misc_.DataObjectSimple_SetFormat(*args, **kwargs)
e811c8ce 4636
1a10c483
RD
4637 def GetDataSize(*args, **kwargs):
4638 """
4639 GetDataSize(self) -> size_t
4640
4641 Get the size of our data.
4642 """
4643 return _misc_.DataObjectSimple_GetDataSize(*args, **kwargs)
4644
4645 def GetDataHere(*args, **kwargs):
4646 """
4647 GetDataHere(self) -> String
4648
4649 Returns the data bytes from the data object as a string, returns None
4650 on failure. Must be implemented in the derived class if the object
4651 supports rendering its data.
4652 """
4653 return _misc_.DataObjectSimple_GetDataHere(*args, **kwargs)
4654
4655 def SetData(*args, **kwargs):
4656 """
4657 SetData(self, String data) -> bool
4658
4659 Copy the data value to the data object. Must be implemented in the
4660 derived class if the object supports setting its data.
4661
4662 """
4663 return _misc_.DataObjectSimple_SetData(*args, **kwargs)
4664
d14a1e28
RD
4665
4666class DataObjectSimplePtr(DataObjectSimple):
4667 def __init__(self, this):
4668 self.this = this
4669 if not hasattr(self,"thisown"): self.thisown = 0
4670 self.__class__ = DataObjectSimple
54f9ee45 4671_misc_.DataObjectSimple_swigregister(DataObjectSimplePtr)
d14a1e28
RD
4672
4673class PyDataObjectSimple(DataObjectSimple):
1a10c483
RD
4674 """
4675 wx.PyDataObjectSimple is a version of `wx.DataObjectSimple` that is
4676 Python-aware and knows how to reflect calls to its C++ virtual methods
4677 to methods in the Python derived class. You should derive from this
4678 class and overload `GetDataSize`, `GetDataHere` and `SetData` when you
4679 need to create your own simple single-format type of `wx.DataObject`.
4680
4681 """
e811c8ce
RD
4682 def __repr__(self):
4683 return "<%s.%s; proxy of C++ wxPyDataObjectSimple instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4684 def __init__(self, *args, **kwargs):
1a10c483
RD
4685 """
4686 __init__(self, DataFormat format=FormatInvalid) -> PyDataObjectSimple
4687
4688 wx.PyDataObjectSimple is a version of `wx.DataObjectSimple` that is
4689 Python-aware and knows how to reflect calls to its C++ virtual methods
4690 to methods in the Python derived class. You should derive from this
4691 class and overload `GetDataSize`, `GetDataHere` and `SetData` when you
4692 need to create your own simple single-format type of `wx.DataObject`.
4693
4694 """
54f9ee45 4695 newobj = _misc_.new_PyDataObjectSimple(*args, **kwargs)
d14a1e28
RD
4696 self.this = newobj.this
4697 self.thisown = 1
4698 del newobj.thisown
4699 self._setCallbackInfo(self, PyDataObjectSimple)
e811c8ce
RD
4700
4701 def _setCallbackInfo(*args, **kwargs):
a95a7133 4702 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
54f9ee45 4703 return _misc_.PyDataObjectSimple__setCallbackInfo(*args, **kwargs)
e811c8ce 4704
d14a1e28
RD
4705
4706class PyDataObjectSimplePtr(PyDataObjectSimple):
4707 def __init__(self, this):
4708 self.this = this
4709 if not hasattr(self,"thisown"): self.thisown = 0
4710 self.__class__ = PyDataObjectSimple
54f9ee45 4711_misc_.PyDataObjectSimple_swigregister(PyDataObjectSimplePtr)
d14a1e28
RD
4712
4713class DataObjectComposite(DataObject):
1a10c483
RD
4714 """
4715 wx.DataObjectComposite is the simplest `wx.DataObject` derivation
4716 which may be sued to support multiple formats. It contains several
4717 'wx.DataObjectSimple` objects and supports any format supported by at
4718 least one of them. Only one of these data objects is *preferred* (the
4719 first one if not explicitly changed by using the second parameter of
4720 `Add`) and its format determines the preferred format of the composite
4721 data object as well.
4722
4723 See `wx.DataObject` documentation for the reasons why you might prefer
4724 to use wx.DataObject directly instead of wx.DataObjectComposite for
4725 efficiency reasons.
4726
4727 """
e811c8ce
RD
4728 def __repr__(self):
4729 return "<%s.%s; proxy of C++ wxDataObjectComposite instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4730 def __init__(self, *args, **kwargs):
1a10c483
RD
4731 """
4732 __init__(self) -> DataObjectComposite
4733
4734 wx.DataObjectComposite is the simplest `wx.DataObject` derivation
4735 which may be sued to support multiple formats. It contains several
4736 'wx.DataObjectSimple` objects and supports any format supported by at
4737 least one of them. Only one of these data objects is *preferred* (the
4738 first one if not explicitly changed by using the second parameter of
4739 `Add`) and its format determines the preferred format of the composite
4740 data object as well.
4741
4742 See `wx.DataObject` documentation for the reasons why you might prefer
4743 to use wx.DataObject directly instead of wx.DataObjectComposite for
4744 efficiency reasons.
4745
4746 """
54f9ee45 4747 newobj = _misc_.new_DataObjectComposite(*args, **kwargs)
d14a1e28
RD
4748 self.this = newobj.this
4749 self.thisown = 1
4750 del newobj.thisown
e811c8ce 4751 def Add(*args, **kwargs):
1a10c483
RD
4752 """
4753 Add(self, DataObjectSimple dataObject, bool preferred=False)
4754
4755 Adds the dataObject to the list of supported objects and it becomes
4756 the preferred object if preferred is True.
4757 """
54f9ee45 4758 return _misc_.DataObjectComposite_Add(*args, **kwargs)
e811c8ce 4759
d14a1e28
RD
4760
4761class DataObjectCompositePtr(DataObjectComposite):
4762 def __init__(self, this):
4763 self.this = this
4764 if not hasattr(self,"thisown"): self.thisown = 0
4765 self.__class__ = DataObjectComposite
54f9ee45 4766_misc_.DataObjectComposite_swigregister(DataObjectCompositePtr)
d14a1e28
RD
4767
4768class TextDataObject(DataObjectSimple):
1a10c483
RD
4769 """
4770 wx.TextDataObject is a specialization of `wx.DataObject` for text
4771 data. It can be used without change to paste data into the `wx.Clipboard`
4772 or a `wx.DropSource`.
4773
4774 Alternativly, you may wish to derive a new class from the
4775 `wx.PyTextDataObject` class for providing text on-demand in order to
4776 minimize memory consumption when offering data in several formats,
4777 such as plain text and RTF, because by default the text is stored in a
4778 string in this class, but it might as well be generated on demand when
4779 requested. For this, `GetTextLength` and `GetText` will have to be
4780 overridden.
4781 """
e811c8ce
RD
4782 def __repr__(self):
4783 return "<%s.%s; proxy of C++ wxTextDataObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4784 def __init__(self, *args, **kwargs):
1a10c483
RD
4785 """
4786 __init__(self, String text=EmptyString) -> TextDataObject
4787
4788 Constructor, may be used to initialise the text (otherwise `SetText`
4789 should be used later).
4790 """
54f9ee45 4791 newobj = _misc_.new_TextDataObject(*args, **kwargs)
d14a1e28
RD
4792 self.this = newobj.this
4793 self.thisown = 1
4794 del newobj.thisown
e811c8ce 4795 def GetTextLength(*args, **kwargs):
1a10c483
RD
4796 """
4797 GetTextLength(self) -> size_t
4798
4799 Returns the data size. By default, returns the size of the text data
4800 set in the constructor or using `SetText`. This can be overridden (via
4801 `wx.PyTextDataObject`) to provide text size data on-demand. It is
4802 recommended to return the text length plus 1 for a trailing zero, but
4803 this is not strictly required.
4804 """
54f9ee45 4805 return _misc_.TextDataObject_GetTextLength(*args, **kwargs)
e811c8ce
RD
4806
4807 def GetText(*args, **kwargs):
1a10c483
RD
4808 """
4809 GetText(self) -> String
4810
4811 Returns the text associated with the data object.
4812 """
54f9ee45 4813 return _misc_.TextDataObject_GetText(*args, **kwargs)
e811c8ce
RD
4814
4815 def SetText(*args, **kwargs):
1a10c483
RD
4816 """
4817 SetText(self, String text)
4818
4819 Sets the text associated with the data object. This method is called
4820 when the data object receives the data and, by default, copies the
4821 text into the member variable. If you want to process the text on the
4822 fly you may wish to override this function (via
4823 `wx.PyTextDataObject`.)
4824 """
54f9ee45 4825 return _misc_.TextDataObject_SetText(*args, **kwargs)
e811c8ce 4826
d14a1e28
RD
4827
4828class TextDataObjectPtr(TextDataObject):
4829 def __init__(self, this):
4830 self.this = this
4831 if not hasattr(self,"thisown"): self.thisown = 0
4832 self.__class__ = TextDataObject
54f9ee45 4833_misc_.TextDataObject_swigregister(TextDataObjectPtr)
d14a1e28
RD
4834
4835class PyTextDataObject(TextDataObject):
1a10c483
RD
4836 """
4837 wx.PyTextDataObject is a version of `wx.TextDataObject` that is
4838 Python-aware and knows how to reflect calls to its C++ virtual methods
4839 to methods in the Python derived class. You should derive from this
4840 class and overload `GetTextLength`, `GetText`, and `SetText` when you
4841 want to be able to provide text on demand instead of preloading it
4842 into the data object.
4843 """
e811c8ce
RD
4844 def __repr__(self):
4845 return "<%s.%s; proxy of C++ wxPyTextDataObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4846 def __init__(self, *args, **kwargs):
1a10c483
RD
4847 """
4848 __init__(self, String text=EmptyString) -> PyTextDataObject
4849
4850 wx.PyTextDataObject is a version of `wx.TextDataObject` that is
4851 Python-aware and knows how to reflect calls to its C++ virtual methods
4852 to methods in the Python derived class. You should derive from this
4853 class and overload `GetTextLength`, `GetText`, and `SetText` when you
4854 want to be able to provide text on demand instead of preloading it
4855 into the data object.
4856 """
54f9ee45 4857 newobj = _misc_.new_PyTextDataObject(*args, **kwargs)
d14a1e28
RD
4858 self.this = newobj.this
4859 self.thisown = 1
4860 del newobj.thisown
4861 self._setCallbackInfo(self, PyTextDataObject)
e811c8ce
RD
4862
4863 def _setCallbackInfo(*args, **kwargs):
a95a7133 4864 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
54f9ee45 4865 return _misc_.PyTextDataObject__setCallbackInfo(*args, **kwargs)
e811c8ce 4866
d14a1e28
RD
4867
4868class PyTextDataObjectPtr(PyTextDataObject):
4869 def __init__(self, this):
4870 self.this = this
4871 if not hasattr(self,"thisown"): self.thisown = 0
4872 self.__class__ = PyTextDataObject
54f9ee45 4873_misc_.PyTextDataObject_swigregister(PyTextDataObjectPtr)
d14a1e28
RD
4874
4875class BitmapDataObject(DataObjectSimple):
1a10c483
RD
4876 """
4877 wx.BitmapDataObject is a specialization of wxDataObject for bitmap
4878 data. It can be used without change to paste data into the `wx.Clipboard`
4879 or a `wx.DropSource`.
4880
4881 """
e811c8ce
RD
4882 def __repr__(self):
4883 return "<%s.%s; proxy of C++ wxBitmapDataObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4884 def __init__(self, *args, **kwargs):
1a10c483
RD
4885 """
4886 __init__(self, Bitmap bitmap=wxNullBitmap) -> BitmapDataObject
4887
4888 Constructor, optionally passing a bitmap (otherwise use `SetBitmap`
4889 later).
4890 """
54f9ee45 4891 newobj = _misc_.new_BitmapDataObject(*args, **kwargs)
d14a1e28
RD
4892 self.this = newobj.this
4893 self.thisown = 1
4894 del newobj.thisown
e811c8ce 4895 def GetBitmap(*args, **kwargs):
1a10c483
RD
4896 """
4897 GetBitmap(self) -> Bitmap
4898
4899 Returns the bitmap associated with the data object. You may wish to
4900 override this method (by deriving from `wx.PyBitmapDataObject`) when
4901 offering data on-demand, but this is not required by wxWidgets'
4902 internals. Use this method to get data in bitmap form from the
4903 `wx.Clipboard`.
4904 """
54f9ee45 4905 return _misc_.BitmapDataObject_GetBitmap(*args, **kwargs)
e811c8ce
RD
4906
4907 def SetBitmap(*args, **kwargs):
1a10c483
RD
4908 """
4909 SetBitmap(self, Bitmap bitmap)
4910
4911 Sets the bitmap associated with the data object. This method is called
4912 when the data object receives data. Usually there will be no reason to
4913 override this function.
4914 """
54f9ee45 4915 return _misc_.BitmapDataObject_SetBitmap(*args, **kwargs)
e811c8ce 4916
d14a1e28
RD
4917
4918class BitmapDataObjectPtr(BitmapDataObject):
4919 def __init__(self, this):
4920 self.this = this
4921 if not hasattr(self,"thisown"): self.thisown = 0
4922 self.__class__ = BitmapDataObject
54f9ee45 4923_misc_.BitmapDataObject_swigregister(BitmapDataObjectPtr)
d14a1e28
RD
4924
4925class PyBitmapDataObject(BitmapDataObject):
1a10c483
RD
4926 """
4927 wx.PyBitmapDataObject is a version of `wx.BitmapDataObject` that is
4928 Python-aware and knows how to reflect calls to its C++ virtual methods
4929 to methods in the Python derived class. To be able to provide bitmap
4930 data on demand derive from this class and overload `GetBitmap`.
4931 """
e811c8ce
RD
4932 def __repr__(self):
4933 return "<%s.%s; proxy of C++ wxPyBitmapDataObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4934 def __init__(self, *args, **kwargs):
1a10c483
RD
4935 """
4936 __init__(self, Bitmap bitmap=wxNullBitmap) -> PyBitmapDataObject
4937
4938 wx.PyBitmapDataObject is a version of `wx.BitmapDataObject` that is
4939 Python-aware and knows how to reflect calls to its C++ virtual methods
4940 to methods in the Python derived class. To be able to provide bitmap
4941 data on demand derive from this class and overload `GetBitmap`.
4942 """
54f9ee45 4943 newobj = _misc_.new_PyBitmapDataObject(*args, **kwargs)
d14a1e28
RD
4944 self.this = newobj.this
4945 self.thisown = 1
4946 del newobj.thisown
4947 self._setCallbackInfo(self, PyBitmapDataObject)
e811c8ce
RD
4948
4949 def _setCallbackInfo(*args, **kwargs):
a95a7133 4950 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
54f9ee45 4951 return _misc_.PyBitmapDataObject__setCallbackInfo(*args, **kwargs)
e811c8ce 4952
d14a1e28
RD
4953
4954class PyBitmapDataObjectPtr(PyBitmapDataObject):
4955 def __init__(self, this):
4956 self.this = this
4957 if not hasattr(self,"thisown"): self.thisown = 0
4958 self.__class__ = PyBitmapDataObject
54f9ee45 4959_misc_.PyBitmapDataObject_swigregister(PyBitmapDataObjectPtr)
d14a1e28
RD
4960
4961class FileDataObject(DataObjectSimple):
1a10c483
RD
4962 """
4963 wx.FileDataObject is a specialization of `wx.DataObjectSimple` for
4964 file names. The program works with it just as if it were a list of
4965 absolute file names, but internally it uses the same format as
4966 Explorer and other compatible programs under Windows or GNOME/KDE
4967 filemanager under Unix which makes it possible to receive files from
4968 them using this class.
1a10c483 4969 """
e811c8ce
RD
4970 def __repr__(self):
4971 return "<%s.%s; proxy of C++ wxFileDataObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4972 def __init__(self, *args, **kwargs):
a95a7133 4973 """__init__(self) -> FileDataObject"""
54f9ee45 4974 newobj = _misc_.new_FileDataObject(*args, **kwargs)
d14a1e28
RD
4975 self.this = newobj.this
4976 self.thisown = 1
4977 del newobj.thisown
e811c8ce 4978 def GetFilenames(*args, **kwargs):
fd2dc343
RD
4979 """
4980 GetFilenames(self) -> [names]
4981
4982 Returns a list of file names.
4983 """
54f9ee45 4984 return _misc_.FileDataObject_GetFilenames(*args, **kwargs)
e811c8ce 4985
15afbcd0 4986 def AddFile(*args, **kwargs):
1a10c483
RD
4987 """
4988 AddFile(self, String filename)
4989
4990 Adds a file to the list of files represented by this data object.
4991 """
54f9ee45 4992 return _misc_.FileDataObject_AddFile(*args, **kwargs)
15afbcd0 4993
d14a1e28
RD
4994
4995class FileDataObjectPtr(FileDataObject):
4996 def __init__(self, this):
4997 self.this = this
4998 if not hasattr(self,"thisown"): self.thisown = 0
4999 self.__class__ = FileDataObject
54f9ee45 5000_misc_.FileDataObject_swigregister(FileDataObjectPtr)
d14a1e28
RD
5001
5002class CustomDataObject(DataObjectSimple):
1a10c483
RD
5003 """
5004 wx.CustomDataObject is a specialization of `wx.DataObjectSimple` for
5005 some application-specific data in arbitrary format. Python strings
5006 are used for getting and setting data, but any picklable object can
5007 easily be transfered via strings. A copy of the data is stored in the
5008 data object.
5009 """
e811c8ce
RD
5010 def __repr__(self):
5011 return "<%s.%s; proxy of C++ wxCustomDataObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
7557b9b5 5012 def __init__(self, *args):
1a10c483 5013 """
7557b9b5
RD
5014 __init__(self, DataFormat format) -> CustomDataObject
5015 __init__(self, String formatName) -> CustomDataObject
5016 __init__(self) -> CustomDataObject
1a10c483
RD
5017
5018 wx.CustomDataObject is a specialization of `wx.DataObjectSimple` for
5019 some application-specific data in arbitrary format. Python strings
5020 are used for getting and setting data, but any picklable object can
5021 easily be transfered via strings. A copy of the data is stored in the
5022 data object.
5023 """
7557b9b5 5024 newobj = _misc_.new_CustomDataObject(*args)
d14a1e28
RD
5025 self.this = newobj.this
5026 self.thisown = 1
5027 del newobj.thisown
e811c8ce 5028 def SetData(*args, **kwargs):
1a10c483
RD
5029 """
5030 SetData(self, String data) -> bool
5031
5032 Copy the data value to the data object.
5033 """
54f9ee45 5034 return _misc_.CustomDataObject_SetData(*args, **kwargs)
e811c8ce 5035
1a10c483 5036 TakeData = SetData
e811c8ce 5037 def GetSize(*args, **kwargs):
1a10c483
RD
5038 """
5039 GetSize(self) -> size_t
5040
5041 Get the size of the data.
5042 """
54f9ee45 5043 return _misc_.CustomDataObject_GetSize(*args, **kwargs)
e811c8ce
RD
5044
5045 def GetData(*args, **kwargs):
1a10c483
RD
5046 """
5047 GetData(self) -> String
5048
5049 Returns the data bytes from the data object as a string.
5050 """
54f9ee45 5051 return _misc_.CustomDataObject_GetData(*args, **kwargs)
e811c8ce 5052
d14a1e28
RD
5053
5054class CustomDataObjectPtr(CustomDataObject):
5055 def __init__(self, this):
5056 self.this = this
5057 if not hasattr(self,"thisown"): self.thisown = 0
5058 self.__class__ = CustomDataObject
54f9ee45 5059_misc_.CustomDataObject_swigregister(CustomDataObjectPtr)
d14a1e28
RD
5060
5061class URLDataObject(DataObjectComposite):
1a10c483
RD
5062 """
5063 This data object holds a URL in a format that is compatible with some
5064 browsers such that it is able to be dragged to or from them.
5065 """
e811c8ce
RD
5066 def __repr__(self):
5067 return "<%s.%s; proxy of C++ wxURLDataObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5068 def __init__(self, *args, **kwargs):
1a10c483
RD
5069 """
5070 __init__(self) -> URLDataObject
5071
5072 This data object holds a URL in a format that is compatible with some
5073 browsers such that it is able to be dragged to or from them.
5074 """
54f9ee45 5075 newobj = _misc_.new_URLDataObject(*args, **kwargs)
d14a1e28
RD
5076 self.this = newobj.this
5077 self.thisown = 1
5078 del newobj.thisown
e811c8ce 5079 def GetURL(*args, **kwargs):
1a10c483
RD
5080 """
5081 GetURL(self) -> String
5082
5083 Returns a string containing the current URL.
5084 """
54f9ee45 5085 return _misc_.URLDataObject_GetURL(*args, **kwargs)
e811c8ce
RD
5086
5087 def SetURL(*args, **kwargs):
1a10c483
RD
5088 """
5089 SetURL(self, String url)
5090
5091 Set the URL.
5092 """
54f9ee45 5093 return _misc_.URLDataObject_SetURL(*args, **kwargs)
e811c8ce 5094
d14a1e28
RD
5095
5096class URLDataObjectPtr(URLDataObject):
5097 def __init__(self, this):
5098 self.this = this
5099 if not hasattr(self,"thisown"): self.thisown = 0
5100 self.__class__ = URLDataObject
54f9ee45 5101_misc_.URLDataObject_swigregister(URLDataObjectPtr)
d14a1e28
RD
5102
5103class MetafileDataObject(DataObjectSimple):
093d3ff1 5104 """Proxy of C++ MetafileDataObject class"""
e811c8ce
RD
5105 def __repr__(self):
5106 return "<%s.%s; proxy of C++ wxMetafileDataObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5107 def __init__(self, *args, **kwargs):
a95a7133 5108 """__init__(self) -> MetafileDataObject"""
54f9ee45 5109 newobj = _misc_.new_MetafileDataObject(*args, **kwargs)
d14a1e28
RD
5110 self.this = newobj.this
5111 self.thisown = 1
5112 del newobj.thisown
d14a1e28
RD
5113
5114class MetafileDataObjectPtr(MetafileDataObject):
5115 def __init__(self, this):
5116 self.this = this
5117 if not hasattr(self,"thisown"): self.thisown = 0
5118 self.__class__ = MetafileDataObject
54f9ee45 5119_misc_.MetafileDataObject_swigregister(MetafileDataObjectPtr)
d14a1e28
RD
5120
5121#---------------------------------------------------------------------------
5122
54f9ee45
RD
5123Drag_CopyOnly = _misc_.Drag_CopyOnly
5124Drag_AllowMove = _misc_.Drag_AllowMove
5125Drag_DefaultMove = _misc_.Drag_DefaultMove
5126DragError = _misc_.DragError
5127DragNone = _misc_.DragNone
5128DragCopy = _misc_.DragCopy
5129DragMove = _misc_.DragMove
5130DragLink = _misc_.DragLink
5131DragCancel = _misc_.DragCancel
d14a1e28 5132
e811c8ce 5133def IsDragResultOk(*args, **kwargs):
196addbf 5134 """IsDragResultOk(int res) -> bool"""
54f9ee45 5135 return _misc_.IsDragResultOk(*args, **kwargs)
d14a1e28 5136class DropSource(object):
093d3ff1 5137 """Proxy of C++ DropSource class"""
e811c8ce
RD
5138 def __repr__(self):
5139 return "<%s.%s; proxy of C++ wxPyDropSource instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5140 def __init__(self, *args, **kwargs):
0df68c9f 5141 """
a95a7133 5142 __init__(self, Window win, Icon copy=wxNullIcon, Icon move=wxNullIcon,
b2dc1044 5143 Icon none=wxNullIcon) -> DropSource
0df68c9f 5144 """
54f9ee45 5145 newobj = _misc_.new_DropSource(*args, **kwargs)
d14a1e28
RD
5146 self.this = newobj.this
5147 self.thisown = 1
5148 del newobj.thisown
e058867b
RD
5149 self._setCallbackInfo(self, DropSource, 0)
5150
e811c8ce 5151 def _setCallbackInfo(*args, **kwargs):
a95a7133 5152 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref)"""
54f9ee45 5153 return _misc_.DropSource__setCallbackInfo(*args, **kwargs)
e811c8ce 5154
54f9ee45 5155 def __del__(self, destroy=_misc_.delete_DropSource):
a95a7133 5156 """__del__(self)"""
d14a1e28
RD
5157 try:
5158 if self.thisown: destroy(self)
5159 except: pass
e811c8ce
RD
5160
5161 def SetData(*args, **kwargs):
a95a7133 5162 """SetData(self, DataObject data)"""
54f9ee45 5163 return _misc_.DropSource_SetData(*args, **kwargs)
e811c8ce
RD
5164
5165 def GetDataObject(*args, **kwargs):
a95a7133 5166 """GetDataObject(self) -> DataObject"""
54f9ee45 5167 return _misc_.DropSource_GetDataObject(*args, **kwargs)
e811c8ce
RD
5168
5169 def SetCursor(*args, **kwargs):
a95a7133 5170 """SetCursor(self, int res, Cursor cursor)"""
54f9ee45 5171 return _misc_.DropSource_SetCursor(*args, **kwargs)
e811c8ce
RD
5172
5173 def DoDragDrop(*args, **kwargs):
a95a7133 5174 """DoDragDrop(self, int flags=Drag_CopyOnly) -> int"""
54f9ee45 5175 return _misc_.DropSource_DoDragDrop(*args, **kwargs)
e811c8ce
RD
5176
5177 def base_GiveFeedback(*args, **kwargs):
a95a7133 5178 """base_GiveFeedback(self, int effect) -> bool"""
54f9ee45 5179 return _misc_.DropSource_base_GiveFeedback(*args, **kwargs)
e811c8ce 5180
d14a1e28
RD
5181
5182class DropSourcePtr(DropSource):
5183 def __init__(self, this):
5184 self.this = this
5185 if not hasattr(self,"thisown"): self.thisown = 0
5186 self.__class__ = DropSource
54f9ee45 5187_misc_.DropSource_swigregister(DropSourcePtr)
d14a1e28
RD
5188
5189class DropTarget(object):
093d3ff1 5190 """Proxy of C++ DropTarget class"""
e811c8ce
RD
5191 def __repr__(self):
5192 return "<%s.%s; proxy of C++ wxPyDropTarget instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5193 def __init__(self, *args, **kwargs):
a95a7133 5194 """__init__(self, DataObject dataObject=None) -> DropTarget"""
54f9ee45 5195 newobj = _misc_.new_DropTarget(*args, **kwargs)
d14a1e28
RD
5196 self.this = newobj.this
5197 self.thisown = 1
5198 del newobj.thisown
fd3f2efe 5199 self._setCallbackInfo(self, DropTarget)
e811c8ce
RD
5200
5201 def _setCallbackInfo(*args, **kwargs):
a95a7133 5202 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
54f9ee45 5203 return _misc_.DropTarget__setCallbackInfo(*args, **kwargs)
e811c8ce 5204
54f9ee45 5205 def __del__(self, destroy=_misc_.delete_DropTarget):
a95a7133 5206 """__del__(self)"""
d14a1e28
RD
5207 try:
5208 if self.thisown: destroy(self)
5209 except: pass
e811c8ce
RD
5210
5211 def GetDataObject(*args, **kwargs):
a95a7133 5212 """GetDataObject(self) -> DataObject"""
54f9ee45 5213 return _misc_.DropTarget_GetDataObject(*args, **kwargs)
e811c8ce
RD
5214
5215 def SetDataObject(*args, **kwargs):
a95a7133 5216 """SetDataObject(self, DataObject dataObject)"""
54f9ee45 5217 return _misc_.DropTarget_SetDataObject(*args, **kwargs)
e811c8ce
RD
5218
5219 def base_OnEnter(*args, **kwargs):
a95a7133 5220 """base_OnEnter(self, int x, int y, int def) -> int"""
54f9ee45 5221 return _misc_.DropTarget_base_OnEnter(*args, **kwargs)
e811c8ce
RD
5222
5223 def base_OnDragOver(*args, **kwargs):
a95a7133 5224 """base_OnDragOver(self, int x, int y, int def) -> int"""
54f9ee45 5225 return _misc_.DropTarget_base_OnDragOver(*args, **kwargs)
e811c8ce
RD
5226
5227 def base_OnLeave(*args, **kwargs):
a95a7133 5228 """base_OnLeave(self)"""
54f9ee45 5229 return _misc_.DropTarget_base_OnLeave(*args, **kwargs)
e811c8ce
RD
5230
5231 def base_OnDrop(*args, **kwargs):
a95a7133 5232 """base_OnDrop(self, int x, int y) -> bool"""
54f9ee45 5233 return _misc_.DropTarget_base_OnDrop(*args, **kwargs)
e811c8ce
RD
5234
5235 def GetData(*args, **kwargs):
a95a7133 5236 """GetData(self) -> bool"""
54f9ee45 5237 return _misc_.DropTarget_GetData(*args, **kwargs)
e811c8ce 5238
d14a1e28
RD
5239
5240class DropTargetPtr(DropTarget):
5241 def __init__(self, this):
5242 self.this = this
5243 if not hasattr(self,"thisown"): self.thisown = 0
5244 self.__class__ = DropTarget
54f9ee45 5245_misc_.DropTarget_swigregister(DropTargetPtr)
d14a1e28
RD
5246
5247PyDropTarget = DropTarget
5248class TextDropTarget(DropTarget):
093d3ff1 5249 """Proxy of C++ TextDropTarget class"""
e811c8ce
RD
5250 def __repr__(self):
5251 return "<%s.%s; proxy of C++ wxPyTextDropTarget instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5252 def __init__(self, *args, **kwargs):
a95a7133 5253 """__init__(self) -> TextDropTarget"""
54f9ee45 5254 newobj = _misc_.new_TextDropTarget(*args, **kwargs)
d14a1e28
RD
5255 self.this = newobj.this
5256 self.thisown = 1
5257 del newobj.thisown
5258 self._setCallbackInfo(self, TextDropTarget)
e811c8ce
RD
5259
5260 def _setCallbackInfo(*args, **kwargs):
a95a7133 5261 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
54f9ee45 5262 return _misc_.TextDropTarget__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
5263
5264 def base_OnEnter(*args, **kwargs):
a95a7133 5265 """base_OnEnter(self, int x, int y, int def) -> int"""
54f9ee45 5266 return _misc_.TextDropTarget_base_OnEnter(*args, **kwargs)
e811c8ce
RD
5267
5268 def base_OnDragOver(*args, **kwargs):
a95a7133 5269 """base_OnDragOver(self, int x, int y, int def) -> int"""
54f9ee45 5270 return _misc_.TextDropTarget_base_OnDragOver(*args, **kwargs)
e811c8ce
RD
5271
5272 def base_OnLeave(*args, **kwargs):
a95a7133 5273 """base_OnLeave(self)"""
54f9ee45 5274 return _misc_.TextDropTarget_base_OnLeave(*args, **kwargs)
e811c8ce
RD
5275
5276 def base_OnDrop(*args, **kwargs):
a95a7133 5277 """base_OnDrop(self, int x, int y) -> bool"""
54f9ee45 5278 return _misc_.TextDropTarget_base_OnDrop(*args, **kwargs)
e811c8ce
RD
5279
5280 def base_OnData(*args, **kwargs):
a95a7133 5281 """base_OnData(self, int x, int y, int def) -> int"""
54f9ee45 5282 return _misc_.TextDropTarget_base_OnData(*args, **kwargs)
e811c8ce 5283
d14a1e28
RD
5284
5285class TextDropTargetPtr(TextDropTarget):
5286 def __init__(self, this):
5287 self.this = this
5288 if not hasattr(self,"thisown"): self.thisown = 0
5289 self.__class__ = TextDropTarget
54f9ee45 5290_misc_.TextDropTarget_swigregister(TextDropTargetPtr)
d14a1e28
RD
5291
5292class FileDropTarget(DropTarget):
093d3ff1 5293 """Proxy of C++ FileDropTarget class"""
e811c8ce
RD
5294 def __repr__(self):
5295 return "<%s.%s; proxy of C++ wxPyFileDropTarget instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5296 def __init__(self, *args, **kwargs):
a95a7133 5297 """__init__(self) -> FileDropTarget"""
54f9ee45 5298 newobj = _misc_.new_FileDropTarget(*args, **kwargs)
d14a1e28
RD
5299 self.this = newobj.this
5300 self.thisown = 1
5301 del newobj.thisown
5302 self._setCallbackInfo(self, FileDropTarget)
e811c8ce
RD
5303
5304 def _setCallbackInfo(*args, **kwargs):
a95a7133 5305 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
54f9ee45 5306 return _misc_.FileDropTarget__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
5307
5308 def base_OnEnter(*args, **kwargs):
a95a7133 5309 """base_OnEnter(self, int x, int y, int def) -> int"""
54f9ee45 5310 return _misc_.FileDropTarget_base_OnEnter(*args, **kwargs)
e811c8ce
RD
5311
5312 def base_OnDragOver(*args, **kwargs):
a95a7133 5313 """base_OnDragOver(self, int x, int y, int def) -> int"""
54f9ee45 5314 return _misc_.FileDropTarget_base_OnDragOver(*args, **kwargs)
e811c8ce
RD
5315
5316 def base_OnLeave(*args, **kwargs):
a95a7133 5317 """base_OnLeave(self)"""
54f9ee45 5318 return _misc_.FileDropTarget_base_OnLeave(*args, **kwargs)
e811c8ce
RD
5319
5320 def base_OnDrop(*args, **kwargs):
a95a7133 5321 """base_OnDrop(self, int x, int y) -> bool"""
54f9ee45 5322 return _misc_.FileDropTarget_base_OnDrop(*args, **kwargs)
e811c8ce
RD
5323
5324 def base_OnData(*args, **kwargs):
a95a7133 5325 """base_OnData(self, int x, int y, int def) -> int"""
54f9ee45 5326 return _misc_.FileDropTarget_base_OnData(*args, **kwargs)
e811c8ce 5327
d14a1e28
RD
5328
5329class FileDropTargetPtr(FileDropTarget):
5330 def __init__(self, this):
5331 self.this = this
5332 if not hasattr(self,"thisown"): self.thisown = 0
5333 self.__class__ = FileDropTarget
54f9ee45 5334_misc_.FileDropTarget_swigregister(FileDropTargetPtr)
d14a1e28
RD
5335
5336#---------------------------------------------------------------------------
5337
54f9ee45 5338class Clipboard(_core.Object):
fcafa8a9 5339 """
66c033b4
RD
5340 wx.Clipboard represents the system clipboard and provides methods to
5341 copy data to it or paste data from it. Normally, you should only use
5342 ``wx.TheClipboard`` which is a reference to a global wx.Clipboard
5343 instance.
5344
5345 Call ``wx.TheClipboard``'s `Open` method to get ownership of the
5346 clipboard. If this operation returns True, you now own the
5347 clipboard. Call `SetData` to put data on the clipboard, or `GetData`
5348 to retrieve data from the clipboard. Call `Close` to close the
5349 clipboard and relinquish ownership. You should keep the clipboard open
5350 only momentarily.
fcafa8a9 5351
66c033b4 5352 :see: `wx.DataObject`
fcafa8a9
RD
5353
5354 """
e811c8ce
RD
5355 def __repr__(self):
5356 return "<%s.%s; proxy of C++ wxClipboard instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5357 def __init__(self, *args, **kwargs):
a95a7133 5358 """__init__(self) -> Clipboard"""
54f9ee45 5359 newobj = _misc_.new_Clipboard(*args, **kwargs)
d14a1e28
RD
5360 self.this = newobj.this
5361 self.thisown = 1
5362 del newobj.thisown
54f9ee45 5363 def __del__(self, destroy=_misc_.delete_Clipboard):
a95a7133 5364 """__del__(self)"""
d14a1e28
RD
5365 try:
5366 if self.thisown: destroy(self)
5367 except: pass
e811c8ce
RD
5368
5369 def Open(*args, **kwargs):
fcafa8a9 5370 """
a95a7133 5371 Open(self) -> bool
fcafa8a9 5372
66c033b4
RD
5373 Call this function to open the clipboard before calling SetData and
5374 GetData. Call Close when you have finished with the clipboard. You
5375 should keep the clipboard open for only a very short time. Returns
5376 True on success.
fcafa8a9 5377 """
54f9ee45 5378 return _misc_.Clipboard_Open(*args, **kwargs)
e811c8ce
RD
5379
5380 def Close(*args, **kwargs):
fcafa8a9 5381 """
a95a7133 5382 Close(self)
fcafa8a9
RD
5383
5384 Closes the clipboard.
5385 """
54f9ee45 5386 return _misc_.Clipboard_Close(*args, **kwargs)
e811c8ce
RD
5387
5388 def IsOpened(*args, **kwargs):
fcafa8a9 5389 """
a95a7133 5390 IsOpened(self) -> bool
fcafa8a9
RD
5391
5392 Query whether the clipboard is opened
5393 """
54f9ee45 5394 return _misc_.Clipboard_IsOpened(*args, **kwargs)
e811c8ce
RD
5395
5396 def AddData(*args, **kwargs):
fcafa8a9 5397 """
a95a7133 5398 AddData(self, DataObject data) -> bool
fcafa8a9 5399
66c033b4
RD
5400 Call this function to add the data object to the clipboard. You may
5401 call this function repeatedly after having cleared the clipboard.
fcafa8a9
RD
5402 After this function has been called, the clipboard owns the data, so
5403 do not delete the data explicitly.
66c033b4
RD
5404
5405 :see: `wx.DataObject`
fcafa8a9 5406 """
54f9ee45 5407 return _misc_.Clipboard_AddData(*args, **kwargs)
e811c8ce
RD
5408
5409 def SetData(*args, **kwargs):
fcafa8a9 5410 """
a95a7133 5411 SetData(self, DataObject data) -> bool
fcafa8a9 5412
66c033b4
RD
5413 Set the clipboard data, this is the same as `Clear` followed by
5414 `AddData`.
5415
5416 :see: `wx.DataObject`
fcafa8a9 5417 """
54f9ee45 5418 return _misc_.Clipboard_SetData(*args, **kwargs)
e811c8ce
RD
5419
5420 def IsSupported(*args, **kwargs):
fcafa8a9 5421 """
a95a7133 5422 IsSupported(self, DataFormat format) -> bool
fcafa8a9
RD
5423
5424 Returns True if the given format is available in the data object(s) on
5425 the clipboard.
5426 """
54f9ee45 5427 return _misc_.Clipboard_IsSupported(*args, **kwargs)
e811c8ce
RD
5428
5429 def GetData(*args, **kwargs):
fcafa8a9 5430 """
a95a7133 5431 GetData(self, DataObject data) -> bool
fcafa8a9 5432
66c033b4
RD
5433 Call this function to fill data with data on the clipboard, if
5434 available in the required format. Returns true on success.
fcafa8a9 5435 """
54f9ee45 5436 return _misc_.Clipboard_GetData(*args, **kwargs)
e811c8ce
RD
5437
5438 def Clear(*args, **kwargs):
fcafa8a9 5439 """
a95a7133 5440 Clear(self)
fcafa8a9 5441
66c033b4 5442 Clears data from the clipboard object and also the system's clipboard
fcafa8a9
RD
5443 if possible.
5444 """
54f9ee45 5445 return _misc_.Clipboard_Clear(*args, **kwargs)
e811c8ce
RD
5446
5447 def Flush(*args, **kwargs):
fcafa8a9 5448 """
a95a7133 5449 Flush(self) -> bool
fcafa8a9
RD
5450
5451 Flushes the clipboard: this means that the data which is currently on
66c033b4
RD
5452 clipboard will stay available even after the application exits,
5453 possibly eating memory, otherwise the clipboard will be emptied on
5454 exit. Returns False if the operation is unsuccesful for any reason.
fcafa8a9 5455 """
54f9ee45 5456 return _misc_.Clipboard_Flush(*args, **kwargs)
e811c8ce
RD
5457
5458 def UsePrimarySelection(*args, **kwargs):
fcafa8a9 5459 """
a95a7133 5460 UsePrimarySelection(self, bool primary=True)
fcafa8a9 5461
66c033b4
RD
5462 On platforms supporting it (the X11 based platforms), selects the
5463 so called PRIMARY SELECTION as the clipboard as opposed to the
5464 normal clipboard, if primary is True.
fcafa8a9 5465 """
54f9ee45 5466 return _misc_.Clipboard_UsePrimarySelection(*args, **kwargs)
e811c8ce 5467
dfbb5885
RD
5468 def Get(*args, **kwargs):
5469 """
5470 Get() -> Clipboard
5471
5472 Returns global instance (wxTheClipboard) of the object.
5473 """
5474 return _misc_.Clipboard_Get(*args, **kwargs)
5475
5476 Get = staticmethod(Get)
d14a1e28
RD
5477
5478class ClipboardPtr(Clipboard):
5479 def __init__(self, this):
5480 self.this = this
5481 if not hasattr(self,"thisown"): self.thisown = 0
5482 self.__class__ = Clipboard
54f9ee45 5483_misc_.Clipboard_swigregister(ClipboardPtr)
d14a1e28 5484
dfbb5885
RD
5485def Clipboard_Get(*args, **kwargs):
5486 """
5487 Clipboard_Get() -> Clipboard
5488
5489 Returns global instance (wxTheClipboard) of the object.
5490 """
5491 return _misc_.Clipboard_Get(*args, **kwargs)
5492
5493class _wxPyDelayedInitWrapper(object):
5494 def __init__(self, initfunc, *args, **kwargs):
5495 self._initfunc = initfunc
5496 self._args = args
5497 self._kwargs = kwargs
5498 self._instance = None
5499 def _checkInstance(self):
5500 if self._instance is None:
5501 self._instance = self._initfunc(*self._args, **self._kwargs)
5502 def __getattr__(self, name):
5503 self._checkInstance()
5504 return getattr(self._instance, name)
5505 def __repr__(self):
5506 self._checkInstance()
5507 return repr(self._instance)
5508TheClipboard = _wxPyDelayedInitWrapper(Clipboard.Get)
5509
d14a1e28 5510class ClipboardLocker(object):
fcafa8a9 5511 """
66c033b4
RD
5512 A helpful class for opening the clipboard and automatically
5513 closing it when the locker is destroyed.
fcafa8a9 5514 """
e811c8ce
RD
5515 def __repr__(self):
5516 return "<%s.%s; proxy of C++ wxClipboardLocker instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5517 def __init__(self, *args, **kwargs):
fcafa8a9 5518 """
a95a7133 5519 __init__(self, Clipboard clipboard=None) -> ClipboardLocker
fcafa8a9 5520
66c033b4
RD
5521 A helpful class for opening the clipboard and automatically
5522 closing it when the locker is destroyed.
fcafa8a9 5523 """
54f9ee45 5524 newobj = _misc_.new_ClipboardLocker(*args, **kwargs)
d14a1e28
RD
5525 self.this = newobj.this
5526 self.thisown = 1
5527 del newobj.thisown
54f9ee45 5528 def __del__(self, destroy=_misc_.delete_ClipboardLocker):
a95a7133 5529 """__del__(self)"""
d14a1e28
RD
5530 try:
5531 if self.thisown: destroy(self)
5532 except: pass
e811c8ce
RD
5533
5534 def __nonzero__(*args, **kwargs):
fcafa8a9 5535 """
a95a7133 5536 __nonzero__(self) -> bool
fcafa8a9
RD
5537
5538 A ClipboardLocker instance evaluates to True if the clipboard was
5539 successfully opened.
5540 """
54f9ee45 5541 return _misc_.ClipboardLocker___nonzero__(*args, **kwargs)
e811c8ce 5542
d14a1e28
RD
5543
5544class ClipboardLockerPtr(ClipboardLocker):
5545 def __init__(self, this):
5546 self.this = this
5547 if not hasattr(self,"thisown"): self.thisown = 0
5548 self.__class__ = ClipboardLocker
54f9ee45 5549_misc_.ClipboardLocker_swigregister(ClipboardLockerPtr)
70551f47 5550
4276dc52
RD
5551#---------------------------------------------------------------------------
5552
5553class VideoMode(object):
5554 """A simple struct containing video mode parameters for a display"""
5555 def __repr__(self):
5556 return "<%s.%s; proxy of C++ wxVideoMode instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5557 def __init__(self, *args, **kwargs):
5558 """
a95a7133 5559 __init__(self, int width=0, int height=0, int depth=0, int freq=0) -> VideoMode
4276dc52
RD
5560
5561 A simple struct containing video mode parameters for a display
5562 """
54f9ee45 5563 newobj = _misc_.new_VideoMode(*args, **kwargs)
4276dc52
RD
5564 self.this = newobj.this
5565 self.thisown = 1
5566 del newobj.thisown
54f9ee45 5567 def __del__(self, destroy=_misc_.delete_VideoMode):
a95a7133 5568 """__del__(self)"""
4276dc52
RD
5569 try:
5570 if self.thisown: destroy(self)
5571 except: pass
5572
5573 def Matches(*args, **kwargs):
5574 """
a95a7133 5575 Matches(self, VideoMode other) -> bool
4276dc52 5576
41e2b43e
RD
5577 Returns true if this mode matches the other one in the sense that all
5578 non zero fields of the other mode have the same value in this
4276dc52
RD
5579 one (except for refresh which is allowed to have a greater value)
5580 """
54f9ee45 5581 return _misc_.VideoMode_Matches(*args, **kwargs)
4276dc52
RD
5582
5583 def GetWidth(*args, **kwargs):
5584 """
a95a7133 5585 GetWidth(self) -> int
4276dc52 5586
41e2b43e 5587 Returns the screen width in pixels (e.g. 640*480), 0 means unspecified
4276dc52 5588 """
54f9ee45 5589 return _misc_.VideoMode_GetWidth(*args, **kwargs)
4276dc52
RD
5590
5591 def GetHeight(*args, **kwargs):
5592 """
a95a7133 5593 GetHeight(self) -> int
4276dc52
RD
5594
5595 Returns the screen width in pixels (e.g. 640*480), 0 means
5596 unspecified
5597 """
54f9ee45 5598 return _misc_.VideoMode_GetHeight(*args, **kwargs)
4276dc52
RD
5599
5600 def GetDepth(*args, **kwargs):
5601 """
a95a7133 5602 GetDepth(self) -> int
4276dc52 5603
41e2b43e
RD
5604 Returns the screen's bits per pixel (e.g. 32), 1 is monochrome and 0
5605 means unspecified/known
4276dc52 5606 """
54f9ee45 5607 return _misc_.VideoMode_GetDepth(*args, **kwargs)
4276dc52
RD
5608
5609 def IsOk(*args, **kwargs):
5610 """
a95a7133 5611 IsOk(self) -> bool
4276dc52
RD
5612
5613 returns true if the object has been initialized
5614 """
54f9ee45 5615 return _misc_.VideoMode_IsOk(*args, **kwargs)
4276dc52
RD
5616
5617 def __nonzero__(self): return self.IsOk()
5618 def __eq__(*args, **kwargs):
a95a7133 5619 """__eq__(self, VideoMode other) -> bool"""
54f9ee45 5620 return _misc_.VideoMode___eq__(*args, **kwargs)
4276dc52
RD
5621
5622 def __ne__(*args, **kwargs):
a95a7133 5623 """__ne__(self, VideoMode other) -> bool"""
54f9ee45 5624 return _misc_.VideoMode___ne__(*args, **kwargs)
4276dc52 5625
54f9ee45
RD
5626 w = property(_misc_.VideoMode_w_get, _misc_.VideoMode_w_set)
5627 h = property(_misc_.VideoMode_h_get, _misc_.VideoMode_h_set)
5628 bpp = property(_misc_.VideoMode_bpp_get, _misc_.VideoMode_bpp_set)
5629 refresh = property(_misc_.VideoMode_refresh_get, _misc_.VideoMode_refresh_set)
4276dc52
RD
5630
5631class VideoModePtr(VideoMode):
5632 def __init__(self, this):
5633 self.this = this
5634 if not hasattr(self,"thisown"): self.thisown = 0
5635 self.__class__ = VideoMode
54f9ee45 5636_misc_.VideoMode_swigregister(VideoModePtr)
4276dc52
RD
5637
5638class Display(object):
5639 """Represents a display/monitor attached to the system"""
5640 def __repr__(self):
5641 return "<%s.%s; proxy of C++ wxDisplay instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5642 def __init__(self, *args, **kwargs):
5643 """
a95a7133 5644 __init__(self, size_t index=0) -> Display
4276dc52 5645
41e2b43e
RD
5646 Set up a Display instance with the specified display. The displays
5647 are numbered from 0 to GetCount() - 1, 0 is always the primary display
5648 and the only one which is always supported
4276dc52 5649 """
54f9ee45 5650 newobj = _misc_.new_Display(*args, **kwargs)
4276dc52
RD
5651 self.this = newobj.this
5652 self.thisown = 1
5653 del newobj.thisown
54f9ee45 5654 def __del__(self, destroy=_misc_.delete_Display):
a95a7133 5655 """__del__(self)"""
4276dc52
RD
5656 try:
5657 if self.thisown: destroy(self)
5658 except: pass
5659
5660 def GetCount(*args, **kwargs):
5661 """
66c033b4 5662 GetCount() -> size_t
4276dc52
RD
5663
5664 Return the number of available displays.
5665 """
54f9ee45 5666 return _misc_.Display_GetCount(*args, **kwargs)
4276dc52
RD
5667
5668 GetCount = staticmethod(GetCount)
5669 def GetFromPoint(*args, **kwargs):
5670 """
66c033b4 5671 GetFromPoint(Point pt) -> int
4276dc52 5672
41e2b43e
RD
5673 Find the display where the given point lies, return wx.NOT_FOUND if it
5674 doesn't belong to any display
4276dc52 5675 """
54f9ee45 5676 return _misc_.Display_GetFromPoint(*args, **kwargs)
4276dc52
RD
5677
5678 GetFromPoint = staticmethod(GetFromPoint)
5679 def GetFromWindow(*args, **kwargs):
5680 """
66c033b4 5681 GetFromWindow(Window window) -> int
4276dc52 5682
41e2b43e
RD
5683 Find the display where the given window lies, return wx.NOT_FOUND if
5684 it is not shown at all.
4276dc52 5685 """
54f9ee45 5686 return _misc_.Display_GetFromWindow(*args, **kwargs)
4276dc52
RD
5687
5688 GetFromWindow = staticmethod(GetFromWindow)
5689 def IsOk(*args, **kwargs):
5690 """
a95a7133 5691 IsOk(self) -> bool
4276dc52
RD
5692
5693 Return true if the object was initialized successfully
5694 """
54f9ee45 5695 return _misc_.Display_IsOk(*args, **kwargs)
4276dc52
RD
5696
5697 def __nonzero__(self): return self.IsOk()
5698 def GetGeometry(*args, **kwargs):
5699 """
a95a7133 5700 GetGeometry(self) -> Rect
4276dc52 5701
41e2b43e
RD
5702 Returns the bounding rectangle of the display whose index was passed
5703 to the constructor.
4276dc52 5704 """
54f9ee45 5705 return _misc_.Display_GetGeometry(*args, **kwargs)
4276dc52
RD
5706
5707 def GetName(*args, **kwargs):
5708 """
a95a7133 5709 GetName(self) -> String
4276dc52
RD
5710
5711 Returns the display's name. A name is not available on all platforms.
5712 """
54f9ee45 5713 return _misc_.Display_GetName(*args, **kwargs)
4276dc52
RD
5714
5715 def IsPrimary(*args, **kwargs):
5716 """
a95a7133 5717 IsPrimary(self) -> bool
4276dc52
RD
5718
5719 Returns true if the display is the primary display. The primary
5720 display is the one whose index is 0.
5721 """
54f9ee45 5722 return _misc_.Display_IsPrimary(*args, **kwargs)
4276dc52
RD
5723
5724 def GetModes(*args, **kwargs):
5725 """
5726 GetModes(VideoMode mode=DefaultVideoMode) -> [videoMode...]
5727
41e2b43e
RD
5728 Enumerate all video modes supported by this display matching the given
5729 one (in the sense of VideoMode.Match()).
4276dc52 5730
41e2b43e
RD
5731 As any mode matches the default value of the argument and there is
5732 always at least one video mode supported by display, the returned
5733 array is only empty for the default value of the argument if this
5734 function is not supported at all on this platform.
4276dc52 5735 """
54f9ee45 5736 return _misc_.Display_GetModes(*args, **kwargs)
4276dc52
RD
5737
5738 def GetCurrentMode(*args, **kwargs):
5739 """
a95a7133 5740 GetCurrentMode(self) -> VideoMode
4276dc52
RD
5741
5742 Get the current video mode.
5743 """
54f9ee45 5744 return _misc_.Display_GetCurrentMode(*args, **kwargs)
4276dc52
RD
5745
5746 def ChangeMode(*args, **kwargs):
5747 """
a95a7133 5748 ChangeMode(self, VideoMode mode=DefaultVideoMode) -> bool
4276dc52 5749
f16ab95d
RD
5750 Changes the video mode of this display to the mode specified in the
5751 mode parameter.
5752
5753 If wx.DefaultVideoMode is passed in as the mode parameter, the defined
5754 behaviour is that wx.Display will reset the video mode to the default
5755 mode used by the display. On Windows, the behavior is normal.
5756 However, there are differences on other platforms. On Unix variations
5757 using X11 extensions it should behave as defined, but some
5758 irregularities may occur.
5759
5760 On wxMac passing in wx.DefaultVideoMode as the mode parameter does
5761 nothing. This happens because Carbon no longer has access to
5762 DMUseScreenPrefs, an undocumented function that changed the video mode
5763 to the system default by using the system's 'scrn' resource.
5764
5765 Returns True if succeeded, False otherwise
4276dc52 5766 """
54f9ee45 5767 return _misc_.Display_ChangeMode(*args, **kwargs)
4276dc52
RD
5768
5769 def ResetMode(*args, **kwargs):
5770 """
a95a7133 5771 ResetMode(self)
4276dc52
RD
5772
5773 Restore the default video mode (just a more readable synonym)
5774 """
54f9ee45 5775 return _misc_.Display_ResetMode(*args, **kwargs)
4276dc52
RD
5776
5777
5778class DisplayPtr(Display):
5779 def __init__(self, this):
5780 self.this = this
5781 if not hasattr(self,"thisown"): self.thisown = 0
5782 self.__class__ = Display
54f9ee45 5783_misc_.Display_swigregister(DisplayPtr)
4276dc52
RD
5784DefaultVideoMode = cvar.DefaultVideoMode
5785
5786def Display_GetCount(*args, **kwargs):
5787 """
5788 Display_GetCount() -> size_t
5789
5790 Return the number of available displays.
5791 """
54f9ee45 5792 return _misc_.Display_GetCount(*args, **kwargs)
4276dc52
RD
5793
5794def Display_GetFromPoint(*args, **kwargs):
5795 """
5796 Display_GetFromPoint(Point pt) -> int
5797
41e2b43e
RD
5798 Find the display where the given point lies, return wx.NOT_FOUND if it
5799 doesn't belong to any display
4276dc52 5800 """
54f9ee45 5801 return _misc_.Display_GetFromPoint(*args, **kwargs)
4276dc52
RD
5802
5803def Display_GetFromWindow(*args, **kwargs):
5804 """
5805 Display_GetFromWindow(Window window) -> int
5806
41e2b43e
RD
5807 Find the display where the given window lies, return wx.NOT_FOUND if
5808 it is not shown at all.
4276dc52 5809 """
54f9ee45 5810 return _misc_.Display_GetFromWindow(*args, **kwargs)
4276dc52 5811
d3b6e4ff
RD
5812#---------------------------------------------------------------------------
5813
5814class StandardPaths(object):
5815 """
5816 wx.StandardPaths returns the standard locations in the file system and
5817 should be used by the programs to find their data files in a portable
5818 way.
5819
5820 In the description of the methods below, the example return values are
5821 given for the Unix, Windows and Mac OS X systems, however please note
5822 that these are just the examples and the actual values may differ. For
5823 example, under Windows: the system administrator may change the
5824 standard directories locations, i.e. the Windows directory may be
5825 named W:\Win2003 instead of the default C:\Windows.
5826
5827 The strings appname and username should be replaced with the value
5828 returned by `wx.App.GetAppName` and the name of the currently logged
5829 in user, respectively. The string prefix is only used under Unix and
5830 is /usr/local by default but may be changed using `SetInstallPrefix`.
5831
5832 The directories returned by the methods of this class may or may not
5833 exist. If they don't exist, it's up to the caller to create them,
5834 wxStandardPaths doesn't do it.
5835
5836 Finally note that these functions only work with standardly packaged
5837 applications. I.e. under Unix you should follow the standard
5838 installation conventions and under Mac you should create your
5839 application bundle according to the Apple guidelines. Again, this
5840 class doesn't help you to do it.
5841 """
5842 def __init__(self): raise RuntimeError, "No constructor defined"
5843 def __repr__(self):
5844 return "<%s.%s; proxy of C++ wxStandardPaths instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5845 def Get(*args, **kwargs):
5846 """
5847 Get() -> StandardPaths
5848
8fb0e70a 5849 Return the global standard paths singleton
d3b6e4ff
RD
5850 """
5851 return _misc_.StandardPaths_Get(*args, **kwargs)
5852
5853 Get = staticmethod(Get)
5854 def GetConfigDir(*args, **kwargs):
5855 """
5856 GetConfigDir(self) -> String
5857
5858 Return the directory with system config files: /etc under Unix,
8fb0e70a 5859 'c:\Documents and Settings\All Users\Application Data' under Windows,
d3b6e4ff
RD
5860 /Library/Preferences for Mac
5861 """
5862 return _misc_.StandardPaths_GetConfigDir(*args, **kwargs)
5863
5864 def GetUserConfigDir(*args, **kwargs):
5865 """
5866 GetUserConfigDir(self) -> String
5867
5868 Return the directory for the user config files: $HOME under Unix,
8fb0e70a 5869 'c:\Documents and Settings\username' under Windows, and
d3b6e4ff
RD
5870 ~/Library/Preferences under Mac
5871
5872 Only use this if you have a single file to put there, otherwise
5873 `GetUserDataDir` is more appropriate
5874 """
5875 return _misc_.StandardPaths_GetUserConfigDir(*args, **kwargs)
5876
5877 def GetDataDir(*args, **kwargs):
5878 """
5879 GetDataDir(self) -> String
5880
5881 Return the location of the application's global, (i.e. not
5882 user-specific,) data files: prefix/share/appname under Unix,
8fb0e70a 5883 'c:\Program Files\appname' under Windows,
d3b6e4ff
RD
5884 appname.app/Contents/SharedSupport app bundle directory under Mac.
5885 """
5886 return _misc_.StandardPaths_GetDataDir(*args, **kwargs)
5887
5888 def GetLocalDataDir(*args, **kwargs):
5889 """
5890 GetLocalDataDir(self) -> String
5891
5892 Return the location for application data files which are
5893 host-specific. Same as `GetDataDir` except under Unix where it is
5894 /etc/appname
5895 """
5896 return _misc_.StandardPaths_GetLocalDataDir(*args, **kwargs)
5897
5898 def GetUserDataDir(*args, **kwargs):
5899 """
5900 GetUserDataDir(self) -> String
5901
5902 Return the directory for the user-dependent application data files:
5903 $HOME/.appname under Unix, c:\Documents and
8fb0e70a 5904 Settings\username\Application Data\appname under Windows and
d3b6e4ff
RD
5905 ~/Library/Application Support/appname under Mac
5906 """
5907 return _misc_.StandardPaths_GetUserDataDir(*args, **kwargs)
5908
5909 def GetUserLocalDataDir(*args, **kwargs):
5910 """
5911 GetUserLocalDataDir(self) -> String
5912
5913 Return the directory for user data files which shouldn't be shared
5914 with the other machines
5915
5916 Same as `GetUserDataDir` for all platforms except Windows where it is
8fb0e70a 5917 the 'Local Settings\Application Data\appname' directory.
d3b6e4ff
RD
5918 """
5919 return _misc_.StandardPaths_GetUserLocalDataDir(*args, **kwargs)
5920
5921 def GetPluginsDir(*args, **kwargs):
5922 """
5923 GetPluginsDir(self) -> String
5924
5925 Return the directory where the loadable modules (plugins) live:
5926 prefix/lib/appname under Unix, program directory under Windows and
5927 Contents/Plugins app bundle subdirectory under Mac
5928 """
5929 return _misc_.StandardPaths_GetPluginsDir(*args, **kwargs)
5930
5931 def SetInstallPrefix(*args, **kwargs):
5932 """
5933 SetInstallPrefix(self, String prefix)
5934
5935 Set the program installation directory which is /usr/local by default.
5936 This value will be used by other methods such as `GetDataDir` and
8fb0e70a
RD
5937 `GetPluginsDir` as the prefix for what they return. (This function
5938 only has meaning on Unix systems.)
d3b6e4ff
RD
5939 """
5940 return _misc_.StandardPaths_SetInstallPrefix(*args, **kwargs)
5941
5942 def GetInstallPrefix(*args, **kwargs):
5943 """
5944 GetInstallPrefix(self) -> String
5945
8fb0e70a
RD
5946 Get the program installation prefix. The default is the prefix where
5947 Python is installed. (This function only has meaning on Unix systems.)
d3b6e4ff
RD
5948 """
5949 return _misc_.StandardPaths_GetInstallPrefix(*args, **kwargs)
5950
5951
5952class StandardPathsPtr(StandardPaths):
5953 def __init__(self, this):
5954 self.this = this
5955 if not hasattr(self,"thisown"): self.thisown = 0
5956 self.__class__ = StandardPaths
5957_misc_.StandardPaths_swigregister(StandardPathsPtr)
5958
5959def StandardPaths_Get(*args, **kwargs):
5960 """
5961 StandardPaths_Get() -> StandardPaths
5962
8fb0e70a 5963 Return the global standard paths singleton
d3b6e4ff
RD
5964 """
5965 return _misc_.StandardPaths_Get(*args, **kwargs)
5966
70551f47 5967