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