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