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