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