]>
Commit | Line | Data |
---|---|---|
d56cebe7 | 1 | # This file was created automatically by SWIG. |
d14a1e28 RD |
2 | # Don't modify this file, modify the SWIG interface instead. |
3 | ||
a5ee0656 RD |
4 | """ |
5 | The `XmlResource` class allows program resources defining menus, layout of | |
68e533f8 | 6 | controls on a panel, etc. to be loaded from an XML file. |
a5ee0656 RD |
7 | """ |
8 | ||
d14a1e28 RD |
9 | import _xrc |
10 | ||
d55e5bfc RD |
11 | import _core |
12 | wx = _core | |
d6c14a4c | 13 | __docfilter__ = wx.__DocFilter(globals()) |
d14a1e28 RD |
14 | #--------------------------------------------------------------------------- |
15 | ||
16 | WX_XMLRES_CURRENT_VERSION_MAJOR = _xrc.WX_XMLRES_CURRENT_VERSION_MAJOR | |
17 | WX_XMLRES_CURRENT_VERSION_MINOR = _xrc.WX_XMLRES_CURRENT_VERSION_MINOR | |
18 | WX_XMLRES_CURRENT_VERSION_RELEASE = _xrc.WX_XMLRES_CURRENT_VERSION_RELEASE | |
19 | WX_XMLRES_CURRENT_VERSION_REVISION = _xrc.WX_XMLRES_CURRENT_VERSION_REVISION | |
20 | XRC_USE_LOCALE = _xrc.XRC_USE_LOCALE | |
21 | XRC_NO_SUBCLASSING = _xrc.XRC_NO_SUBCLASSING | |
d55e5bfc | 22 | class XmlResource(_core.Object): |
e811c8ce RD |
23 | def __repr__(self): |
24 | return "<%s.%s; proxy of C++ wxXmlResource instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 25 | def __init__(self, *args, **kwargs): |
a95a7133 | 26 | """__init__(self, String filemask, int flags=XRC_USE_LOCALE) -> XmlResource""" |
d14a1e28 RD |
27 | newobj = _xrc.new_XmlResource(*args, **kwargs) |
28 | self.this = newobj.this | |
29 | self.thisown = 1 | |
30 | del newobj.thisown | |
31 | self.InitAllHandlers() | |
e811c8ce | 32 | |
d14a1e28 | 33 | def __del__(self, destroy=_xrc.delete_XmlResource): |
a95a7133 | 34 | """__del__(self)""" |
d14a1e28 RD |
35 | try: |
36 | if self.thisown: destroy(self) | |
37 | except: pass | |
e811c8ce RD |
38 | |
39 | def Load(*args, **kwargs): | |
a95a7133 | 40 | """Load(self, String filemask) -> bool""" |
e811c8ce RD |
41 | return _xrc.XmlResource_Load(*args, **kwargs) |
42 | ||
43 | def LoadFromString(*args, **kwargs): | |
a95a7133 | 44 | """LoadFromString(self, String data) -> bool""" |
e811c8ce RD |
45 | return _xrc.XmlResource_LoadFromString(*args, **kwargs) |
46 | ||
47 | def InitAllHandlers(*args, **kwargs): | |
a95a7133 | 48 | """InitAllHandlers(self)""" |
e811c8ce RD |
49 | return _xrc.XmlResource_InitAllHandlers(*args, **kwargs) |
50 | ||
51 | def AddHandler(*args, **kwargs): | |
a95a7133 | 52 | """AddHandler(self, XmlResourceHandler handler)""" |
e811c8ce RD |
53 | return _xrc.XmlResource_AddHandler(*args, **kwargs) |
54 | ||
55 | def InsertHandler(*args, **kwargs): | |
a95a7133 | 56 | """InsertHandler(self, XmlResourceHandler handler)""" |
e811c8ce RD |
57 | return _xrc.XmlResource_InsertHandler(*args, **kwargs) |
58 | ||
59 | def ClearHandlers(*args, **kwargs): | |
a95a7133 | 60 | """ClearHandlers(self)""" |
e811c8ce RD |
61 | return _xrc.XmlResource_ClearHandlers(*args, **kwargs) |
62 | ||
63 | def AddSubclassFactory(*args, **kwargs): | |
d6c14a4c | 64 | """AddSubclassFactory(XmlSubclassFactory factory)""" |
e811c8ce RD |
65 | return _xrc.XmlResource_AddSubclassFactory(*args, **kwargs) |
66 | ||
67 | AddSubclassFactory = staticmethod(AddSubclassFactory) | |
68 | def LoadMenu(*args, **kwargs): | |
a95a7133 | 69 | """LoadMenu(self, String name) -> Menu""" |
e811c8ce RD |
70 | return _xrc.XmlResource_LoadMenu(*args, **kwargs) |
71 | ||
72 | def LoadMenuBar(*args, **kwargs): | |
a95a7133 | 73 | """LoadMenuBar(self, String name) -> MenuBar""" |
e811c8ce RD |
74 | return _xrc.XmlResource_LoadMenuBar(*args, **kwargs) |
75 | ||
76 | def LoadMenuBarOnFrame(*args, **kwargs): | |
a95a7133 | 77 | """LoadMenuBarOnFrame(self, Window parent, String name) -> MenuBar""" |
e811c8ce RD |
78 | return _xrc.XmlResource_LoadMenuBarOnFrame(*args, **kwargs) |
79 | ||
80 | def LoadToolBar(*args, **kwargs): | |
a95a7133 | 81 | """LoadToolBar(self, Window parent, String name) -> wxToolBar""" |
e811c8ce RD |
82 | return _xrc.XmlResource_LoadToolBar(*args, **kwargs) |
83 | ||
84 | def LoadDialog(*args, **kwargs): | |
a95a7133 | 85 | """LoadDialog(self, Window parent, String name) -> wxDialog""" |
e811c8ce RD |
86 | return _xrc.XmlResource_LoadDialog(*args, **kwargs) |
87 | ||
88 | def LoadOnDialog(*args, **kwargs): | |
a95a7133 | 89 | """LoadOnDialog(self, wxDialog dlg, Window parent, String name) -> bool""" |
e811c8ce RD |
90 | return _xrc.XmlResource_LoadOnDialog(*args, **kwargs) |
91 | ||
92 | def LoadPanel(*args, **kwargs): | |
a95a7133 | 93 | """LoadPanel(self, Window parent, String name) -> wxPanel""" |
e811c8ce RD |
94 | return _xrc.XmlResource_LoadPanel(*args, **kwargs) |
95 | ||
96 | def LoadOnPanel(*args, **kwargs): | |
a95a7133 | 97 | """LoadOnPanel(self, wxPanel panel, Window parent, String name) -> bool""" |
e811c8ce RD |
98 | return _xrc.XmlResource_LoadOnPanel(*args, **kwargs) |
99 | ||
100 | def LoadFrame(*args, **kwargs): | |
a95a7133 | 101 | """LoadFrame(self, Window parent, String name) -> wxFrame""" |
e811c8ce RD |
102 | return _xrc.XmlResource_LoadFrame(*args, **kwargs) |
103 | ||
104 | def LoadOnFrame(*args, **kwargs): | |
a95a7133 | 105 | """LoadOnFrame(self, wxFrame frame, Window parent, String name) -> bool""" |
e811c8ce RD |
106 | return _xrc.XmlResource_LoadOnFrame(*args, **kwargs) |
107 | ||
108 | def LoadObject(*args, **kwargs): | |
a95a7133 | 109 | """LoadObject(self, Window parent, String name, String classname) -> Object""" |
e811c8ce RD |
110 | return _xrc.XmlResource_LoadObject(*args, **kwargs) |
111 | ||
112 | def LoadOnObject(*args, **kwargs): | |
a95a7133 | 113 | """LoadOnObject(self, Object instance, Window parent, String name, String classname) -> bool""" |
e811c8ce RD |
114 | return _xrc.XmlResource_LoadOnObject(*args, **kwargs) |
115 | ||
116 | def LoadBitmap(*args, **kwargs): | |
a95a7133 | 117 | """LoadBitmap(self, String name) -> Bitmap""" |
e811c8ce RD |
118 | return _xrc.XmlResource_LoadBitmap(*args, **kwargs) |
119 | ||
120 | def LoadIcon(*args, **kwargs): | |
a95a7133 | 121 | """LoadIcon(self, String name) -> Icon""" |
e811c8ce RD |
122 | return _xrc.XmlResource_LoadIcon(*args, **kwargs) |
123 | ||
124 | def AttachUnknownControl(*args, **kwargs): | |
a95a7133 | 125 | """AttachUnknownControl(self, String name, Window control, Window parent=None) -> bool""" |
e811c8ce RD |
126 | return _xrc.XmlResource_AttachUnknownControl(*args, **kwargs) |
127 | ||
128 | def GetXRCID(*args, **kwargs): | |
d6c14a4c | 129 | """GetXRCID(String str_id) -> int""" |
e811c8ce RD |
130 | return _xrc.XmlResource_GetXRCID(*args, **kwargs) |
131 | ||
132 | GetXRCID = staticmethod(GetXRCID) | |
133 | def GetVersion(*args, **kwargs): | |
a95a7133 | 134 | """GetVersion(self) -> long""" |
e811c8ce RD |
135 | return _xrc.XmlResource_GetVersion(*args, **kwargs) |
136 | ||
137 | def CompareVersion(*args, **kwargs): | |
a95a7133 | 138 | """CompareVersion(self, int major, int minor, int release, int revision) -> int""" |
e811c8ce RD |
139 | return _xrc.XmlResource_CompareVersion(*args, **kwargs) |
140 | ||
141 | def Get(*args, **kwargs): | |
d6c14a4c | 142 | """Get() -> XmlResource""" |
e811c8ce RD |
143 | return _xrc.XmlResource_Get(*args, **kwargs) |
144 | ||
145 | Get = staticmethod(Get) | |
146 | def Set(*args, **kwargs): | |
d6c14a4c | 147 | """Set(XmlResource res) -> XmlResource""" |
e811c8ce RD |
148 | return _xrc.XmlResource_Set(*args, **kwargs) |
149 | ||
150 | Set = staticmethod(Set) | |
151 | def GetFlags(*args, **kwargs): | |
a95a7133 | 152 | """GetFlags(self) -> int""" |
e811c8ce RD |
153 | return _xrc.XmlResource_GetFlags(*args, **kwargs) |
154 | ||
155 | def SetFlags(*args, **kwargs): | |
a95a7133 | 156 | """SetFlags(self, int flags)""" |
e811c8ce RD |
157 | return _xrc.XmlResource_SetFlags(*args, **kwargs) |
158 | ||
d56cebe7 | 159 | |
d14a1e28 RD |
160 | class XmlResourcePtr(XmlResource): |
161 | def __init__(self, this): | |
162 | self.this = this | |
163 | if not hasattr(self,"thisown"): self.thisown = 0 | |
164 | self.__class__ = XmlResource | |
165 | _xrc.XmlResource_swigregister(XmlResourcePtr) | |
b2dc1044 RD |
166 | cvar = _xrc.cvar |
167 | UTF8String = cvar.UTF8String | |
168 | StyleString = cvar.StyleString | |
169 | SizeString = cvar.SizeString | |
170 | PosString = cvar.PosString | |
171 | BitmapString = cvar.BitmapString | |
172 | IconString = cvar.IconString | |
173 | FontString = cvar.FontString | |
d56cebe7 | 174 | |
d14a1e28 | 175 | def EmptyXmlResource(*args, **kwargs): |
e811c8ce | 176 | """EmptyXmlResource(int flags=XRC_USE_LOCALE) -> XmlResource""" |
d14a1e28 RD |
177 | val = _xrc.new_EmptyXmlResource(*args, **kwargs) |
178 | val.thisown = 1 | |
179 | val.InitAllHandlers() | |
180 | return val | |
d56cebe7 | 181 | |
e811c8ce RD |
182 | def XmlResource_AddSubclassFactory(*args, **kwargs): |
183 | """XmlResource_AddSubclassFactory(XmlSubclassFactory factory)""" | |
184 | return _xrc.XmlResource_AddSubclassFactory(*args, **kwargs) | |
d56cebe7 | 185 | |
e811c8ce | 186 | def XmlResource_GetXRCID(*args, **kwargs): |
196addbf | 187 | """XmlResource_GetXRCID(String str_id) -> int""" |
e811c8ce | 188 | return _xrc.XmlResource_GetXRCID(*args, **kwargs) |
d56cebe7 | 189 | |
e811c8ce RD |
190 | def XmlResource_Get(*args, **kwargs): |
191 | """XmlResource_Get() -> XmlResource""" | |
192 | return _xrc.XmlResource_Get(*args, **kwargs) | |
d56cebe7 | 193 | |
e811c8ce RD |
194 | def XmlResource_Set(*args, **kwargs): |
195 | """XmlResource_Set(XmlResource res) -> XmlResource""" | |
196 | return _xrc.XmlResource_Set(*args, **kwargs) | |
d56cebe7 | 197 | |
c6c593e8 | 198 | def XRCID(str_id): |
e811c8ce | 199 | return XmlResource_GetXRCID(str_id) |
d56cebe7 | 200 | |
c6c593e8 RD |
201 | def XRCCTRL(window, str_id, *ignoreargs): |
202 | return window.FindWindowById(XRCID(str_id)) | |
d56cebe7 | 203 | |
d14a1e28 | 204 | #--------------------------------------------------------------------------- |
d56cebe7 | 205 | |
d14a1e28 | 206 | class XmlSubclassFactory(object): |
e811c8ce RD |
207 | def __repr__(self): |
208 | return "<%s.%s; proxy of C++ wxPyXmlSubclassFactory instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 209 | def __init__(self, *args, **kwargs): |
a95a7133 | 210 | """__init__(self) -> XmlSubclassFactory""" |
d14a1e28 RD |
211 | newobj = _xrc.new_XmlSubclassFactory(*args, **kwargs) |
212 | self.this = newobj.this | |
d56cebe7 | 213 | self.thisown = 1 |
d14a1e28 RD |
214 | del newobj.thisown |
215 | self._setCallbackInfo(self, XmlSubclassFactory) | |
e811c8ce RD |
216 | |
217 | def _setCallbackInfo(*args, **kwargs): | |
a95a7133 | 218 | """_setCallbackInfo(self, PyObject self, PyObject _class)""" |
e811c8ce RD |
219 | return _xrc.XmlSubclassFactory__setCallbackInfo(*args, **kwargs) |
220 | ||
1e4a197e | 221 | |
d14a1e28 RD |
222 | class XmlSubclassFactoryPtr(XmlSubclassFactory): |
223 | def __init__(self, this): | |
628c7f79 | 224 | self.this = this |
d14a1e28 RD |
225 | if not hasattr(self,"thisown"): self.thisown = 0 |
226 | self.__class__ = XmlSubclassFactory | |
227 | _xrc.XmlSubclassFactory_swigregister(XmlSubclassFactoryPtr) | |
228 | ||
229 | #--------------------------------------------------------------------------- | |
230 | ||
231 | XML_ELEMENT_NODE = _xrc.XML_ELEMENT_NODE | |
232 | XML_ATTRIBUTE_NODE = _xrc.XML_ATTRIBUTE_NODE | |
233 | XML_TEXT_NODE = _xrc.XML_TEXT_NODE | |
234 | XML_CDATA_SECTION_NODE = _xrc.XML_CDATA_SECTION_NODE | |
235 | XML_ENTITY_REF_NODE = _xrc.XML_ENTITY_REF_NODE | |
236 | XML_ENTITY_NODE = _xrc.XML_ENTITY_NODE | |
237 | XML_PI_NODE = _xrc.XML_PI_NODE | |
238 | XML_COMMENT_NODE = _xrc.XML_COMMENT_NODE | |
239 | XML_DOCUMENT_NODE = _xrc.XML_DOCUMENT_NODE | |
240 | XML_DOCUMENT_TYPE_NODE = _xrc.XML_DOCUMENT_TYPE_NODE | |
241 | XML_DOCUMENT_FRAG_NODE = _xrc.XML_DOCUMENT_FRAG_NODE | |
242 | XML_NOTATION_NODE = _xrc.XML_NOTATION_NODE | |
243 | XML_HTML_DOCUMENT_NODE = _xrc.XML_HTML_DOCUMENT_NODE | |
244 | class XmlProperty(object): | |
e811c8ce RD |
245 | def __repr__(self): |
246 | return "<%s.%s; proxy of C++ wxXmlProperty instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 247 | def __init__(self, *args, **kwargs): |
0df68c9f | 248 | """ |
a95a7133 | 249 | __init__(self, String name=EmptyString, String value=EmptyString, |
0df68c9f RD |
250 | XmlProperty next=None) -> XmlProperty |
251 | """ | |
d14a1e28 RD |
252 | newobj = _xrc.new_XmlProperty(*args, **kwargs) |
253 | self.this = newobj.this | |
628c7f79 | 254 | self.thisown = 1 |
d14a1e28 | 255 | del newobj.thisown |
e811c8ce | 256 | def GetName(*args, **kwargs): |
a95a7133 | 257 | """GetName(self) -> String""" |
e811c8ce RD |
258 | return _xrc.XmlProperty_GetName(*args, **kwargs) |
259 | ||
260 | def GetValue(*args, **kwargs): | |
a95a7133 | 261 | """GetValue(self) -> String""" |
e811c8ce RD |
262 | return _xrc.XmlProperty_GetValue(*args, **kwargs) |
263 | ||
264 | def GetNext(*args, **kwargs): | |
a95a7133 | 265 | """GetNext(self) -> XmlProperty""" |
e811c8ce RD |
266 | return _xrc.XmlProperty_GetNext(*args, **kwargs) |
267 | ||
268 | def SetName(*args, **kwargs): | |
a95a7133 | 269 | """SetName(self, String name)""" |
e811c8ce RD |
270 | return _xrc.XmlProperty_SetName(*args, **kwargs) |
271 | ||
272 | def SetValue(*args, **kwargs): | |
a95a7133 | 273 | """SetValue(self, String value)""" |
e811c8ce RD |
274 | return _xrc.XmlProperty_SetValue(*args, **kwargs) |
275 | ||
276 | def SetNext(*args, **kwargs): | |
a95a7133 | 277 | """SetNext(self, XmlProperty next)""" |
e811c8ce RD |
278 | return _xrc.XmlProperty_SetNext(*args, **kwargs) |
279 | ||
628c7f79 | 280 | |
d14a1e28 RD |
281 | class XmlPropertyPtr(XmlProperty): |
282 | def __init__(self, this): | |
628c7f79 | 283 | self.this = this |
d14a1e28 RD |
284 | if not hasattr(self,"thisown"): self.thisown = 0 |
285 | self.__class__ = XmlProperty | |
286 | _xrc.XmlProperty_swigregister(XmlPropertyPtr) | |
287 | ||
288 | class XmlNode(object): | |
e811c8ce RD |
289 | def __repr__(self): |
290 | return "<%s.%s; proxy of C++ wxXmlNode instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 291 | def __init__(self, *args, **kwargs): |
0df68c9f | 292 | """ |
a95a7133 | 293 | __init__(self, XmlNode parent=None, int type=0, String name=EmptyString, |
196addbf RD |
294 | String content=EmptyString, XmlProperty props=None, |
295 | XmlNode next=None) -> XmlNode | |
0df68c9f | 296 | """ |
d14a1e28 RD |
297 | newobj = _xrc.new_XmlNode(*args, **kwargs) |
298 | self.this = newobj.this | |
628c7f79 | 299 | self.thisown = 1 |
d14a1e28 RD |
300 | del newobj.thisown |
301 | def __del__(self, destroy=_xrc.delete_XmlNode): | |
a95a7133 | 302 | """__del__(self)""" |
d14a1e28 RD |
303 | try: |
304 | if self.thisown: destroy(self) | |
305 | except: pass | |
e811c8ce RD |
306 | |
307 | def AddChild(*args, **kwargs): | |
a95a7133 | 308 | """AddChild(self, XmlNode child)""" |
e811c8ce RD |
309 | return _xrc.XmlNode_AddChild(*args, **kwargs) |
310 | ||
311 | def InsertChild(*args, **kwargs): | |
a95a7133 | 312 | """InsertChild(self, XmlNode child, XmlNode before_node)""" |
e811c8ce RD |
313 | return _xrc.XmlNode_InsertChild(*args, **kwargs) |
314 | ||
315 | def RemoveChild(*args, **kwargs): | |
a95a7133 | 316 | """RemoveChild(self, XmlNode child) -> bool""" |
e811c8ce RD |
317 | return _xrc.XmlNode_RemoveChild(*args, **kwargs) |
318 | ||
319 | def AddProperty(*args, **kwargs): | |
a95a7133 | 320 | """AddProperty(self, XmlProperty prop)""" |
e811c8ce RD |
321 | return _xrc.XmlNode_AddProperty(*args, **kwargs) |
322 | ||
323 | def AddPropertyName(*args, **kwargs): | |
a95a7133 | 324 | """AddPropertyName(self, String name, String value)""" |
e811c8ce RD |
325 | return _xrc.XmlNode_AddPropertyName(*args, **kwargs) |
326 | ||
327 | def DeleteProperty(*args, **kwargs): | |
a95a7133 | 328 | """DeleteProperty(self, String name) -> bool""" |
e811c8ce RD |
329 | return _xrc.XmlNode_DeleteProperty(*args, **kwargs) |
330 | ||
331 | def GetType(*args, **kwargs): | |
a95a7133 | 332 | """GetType(self) -> int""" |
e811c8ce RD |
333 | return _xrc.XmlNode_GetType(*args, **kwargs) |
334 | ||
335 | def GetName(*args, **kwargs): | |
a95a7133 | 336 | """GetName(self) -> String""" |
e811c8ce RD |
337 | return _xrc.XmlNode_GetName(*args, **kwargs) |
338 | ||
339 | def GetContent(*args, **kwargs): | |
a95a7133 | 340 | """GetContent(self) -> String""" |
e811c8ce RD |
341 | return _xrc.XmlNode_GetContent(*args, **kwargs) |
342 | ||
343 | def GetParent(*args, **kwargs): | |
a95a7133 | 344 | """GetParent(self) -> XmlNode""" |
e811c8ce RD |
345 | return _xrc.XmlNode_GetParent(*args, **kwargs) |
346 | ||
347 | def GetNext(*args, **kwargs): | |
a95a7133 | 348 | """GetNext(self) -> XmlNode""" |
e811c8ce RD |
349 | return _xrc.XmlNode_GetNext(*args, **kwargs) |
350 | ||
351 | def GetChildren(*args, **kwargs): | |
a95a7133 | 352 | """GetChildren(self) -> XmlNode""" |
e811c8ce RD |
353 | return _xrc.XmlNode_GetChildren(*args, **kwargs) |
354 | ||
355 | def GetProperties(*args, **kwargs): | |
a95a7133 | 356 | """GetProperties(self) -> XmlProperty""" |
e811c8ce RD |
357 | return _xrc.XmlNode_GetProperties(*args, **kwargs) |
358 | ||
359 | def GetPropVal(*args, **kwargs): | |
a95a7133 | 360 | """GetPropVal(self, String propName, String defaultVal) -> String""" |
e811c8ce RD |
361 | return _xrc.XmlNode_GetPropVal(*args, **kwargs) |
362 | ||
363 | def HasProp(*args, **kwargs): | |
a95a7133 | 364 | """HasProp(self, String propName) -> bool""" |
e811c8ce RD |
365 | return _xrc.XmlNode_HasProp(*args, **kwargs) |
366 | ||
367 | def SetType(*args, **kwargs): | |
a95a7133 | 368 | """SetType(self, int type)""" |
e811c8ce RD |
369 | return _xrc.XmlNode_SetType(*args, **kwargs) |
370 | ||
371 | def SetName(*args, **kwargs): | |
a95a7133 | 372 | """SetName(self, String name)""" |
e811c8ce RD |
373 | return _xrc.XmlNode_SetName(*args, **kwargs) |
374 | ||
375 | def SetContent(*args, **kwargs): | |
a95a7133 | 376 | """SetContent(self, String con)""" |
e811c8ce RD |
377 | return _xrc.XmlNode_SetContent(*args, **kwargs) |
378 | ||
379 | def SetParent(*args, **kwargs): | |
a95a7133 | 380 | """SetParent(self, XmlNode parent)""" |
e811c8ce RD |
381 | return _xrc.XmlNode_SetParent(*args, **kwargs) |
382 | ||
383 | def SetNext(*args, **kwargs): | |
a95a7133 | 384 | """SetNext(self, XmlNode next)""" |
e811c8ce RD |
385 | return _xrc.XmlNode_SetNext(*args, **kwargs) |
386 | ||
387 | def SetChildren(*args, **kwargs): | |
a95a7133 | 388 | """SetChildren(self, XmlNode child)""" |
e811c8ce RD |
389 | return _xrc.XmlNode_SetChildren(*args, **kwargs) |
390 | ||
391 | def SetProperties(*args, **kwargs): | |
a95a7133 | 392 | """SetProperties(self, XmlProperty prop)""" |
e811c8ce RD |
393 | return _xrc.XmlNode_SetProperties(*args, **kwargs) |
394 | ||
628c7f79 | 395 | |
d14a1e28 RD |
396 | class XmlNodePtr(XmlNode): |
397 | def __init__(self, this): | |
398 | self.this = this | |
399 | if not hasattr(self,"thisown"): self.thisown = 0 | |
400 | self.__class__ = XmlNode | |
401 | _xrc.XmlNode_swigregister(XmlNodePtr) | |
628c7f79 | 402 | |
d14a1e28 | 403 | def XmlNodeEasy(*args, **kwargs): |
196addbf | 404 | """XmlNodeEasy(int type, String name, String content=EmptyString) -> XmlNode""" |
d14a1e28 | 405 | val = _xrc.new_XmlNodeEasy(*args, **kwargs) |
628c7f79 RD |
406 | val.thisown = 1 |
407 | return val | |
408 | ||
d55e5bfc | 409 | class XmlDocument(_core.Object): |
e811c8ce RD |
410 | def __repr__(self): |
411 | return "<%s.%s; proxy of C++ wxXmlDocument instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 412 | def __init__(self, *args, **kwargs): |
a95a7133 | 413 | """__init__(self, String filename, String encoding=UTF8String) -> XmlDocument""" |
d14a1e28 RD |
414 | newobj = _xrc.new_XmlDocument(*args, **kwargs) |
415 | self.this = newobj.this | |
628c7f79 | 416 | self.thisown = 1 |
d14a1e28 RD |
417 | del newobj.thisown |
418 | def __del__(self, destroy=_xrc.delete_XmlDocument): | |
a95a7133 | 419 | """__del__(self)""" |
d14a1e28 RD |
420 | try: |
421 | if self.thisown: destroy(self) | |
422 | except: pass | |
e811c8ce RD |
423 | |
424 | def Load(*args, **kwargs): | |
a95a7133 | 425 | """Load(self, String filename, String encoding=UTF8String) -> bool""" |
e811c8ce RD |
426 | return _xrc.XmlDocument_Load(*args, **kwargs) |
427 | ||
428 | def LoadFromStream(*args, **kwargs): | |
a95a7133 | 429 | """LoadFromStream(self, InputStream stream, String encoding=UTF8String) -> bool""" |
e811c8ce RD |
430 | return _xrc.XmlDocument_LoadFromStream(*args, **kwargs) |
431 | ||
432 | def Save(*args, **kwargs): | |
a95a7133 | 433 | """Save(self, String filename) -> bool""" |
e811c8ce RD |
434 | return _xrc.XmlDocument_Save(*args, **kwargs) |
435 | ||
436 | def SaveToStream(*args, **kwargs): | |
a95a7133 | 437 | """SaveToStream(self, OutputStream stream) -> bool""" |
e811c8ce RD |
438 | return _xrc.XmlDocument_SaveToStream(*args, **kwargs) |
439 | ||
440 | def IsOk(*args, **kwargs): | |
a95a7133 | 441 | """IsOk(self) -> bool""" |
e811c8ce RD |
442 | return _xrc.XmlDocument_IsOk(*args, **kwargs) |
443 | ||
444 | def GetRoot(*args, **kwargs): | |
a95a7133 | 445 | """GetRoot(self) -> XmlNode""" |
e811c8ce RD |
446 | return _xrc.XmlDocument_GetRoot(*args, **kwargs) |
447 | ||
448 | def GetVersion(*args, **kwargs): | |
a95a7133 | 449 | """GetVersion(self) -> String""" |
e811c8ce RD |
450 | return _xrc.XmlDocument_GetVersion(*args, **kwargs) |
451 | ||
452 | def GetFileEncoding(*args, **kwargs): | |
a95a7133 | 453 | """GetFileEncoding(self) -> String""" |
e811c8ce RD |
454 | return _xrc.XmlDocument_GetFileEncoding(*args, **kwargs) |
455 | ||
456 | def SetRoot(*args, **kwargs): | |
a95a7133 | 457 | """SetRoot(self, XmlNode node)""" |
e811c8ce RD |
458 | return _xrc.XmlDocument_SetRoot(*args, **kwargs) |
459 | ||
460 | def SetVersion(*args, **kwargs): | |
a95a7133 | 461 | """SetVersion(self, String version)""" |
e811c8ce RD |
462 | return _xrc.XmlDocument_SetVersion(*args, **kwargs) |
463 | ||
464 | def SetFileEncoding(*args, **kwargs): | |
a95a7133 | 465 | """SetFileEncoding(self, String encoding)""" |
e811c8ce RD |
466 | return _xrc.XmlDocument_SetFileEncoding(*args, **kwargs) |
467 | ||
628c7f79 | 468 | |
d14a1e28 RD |
469 | class XmlDocumentPtr(XmlDocument): |
470 | def __init__(self, this): | |
471 | self.this = this | |
472 | if not hasattr(self,"thisown"): self.thisown = 0 | |
473 | self.__class__ = XmlDocument | |
474 | _xrc.XmlDocument_swigregister(XmlDocumentPtr) | |
628c7f79 | 475 | |
d14a1e28 | 476 | def XmlDocumentFromStream(*args, **kwargs): |
b2dc1044 | 477 | """XmlDocumentFromStream(InputStream stream, String encoding=UTF8String) -> XmlDocument""" |
d14a1e28 | 478 | val = _xrc.new_XmlDocumentFromStream(*args, **kwargs) |
628c7f79 RD |
479 | val.thisown = 1 |
480 | return val | |
481 | ||
d14a1e28 | 482 | def EmptyXmlDocument(*args, **kwargs): |
e811c8ce | 483 | """EmptyXmlDocument() -> XmlDocument""" |
d14a1e28 | 484 | val = _xrc.new_EmptyXmlDocument(*args, **kwargs) |
628c7f79 RD |
485 | val.thisown = 1 |
486 | return val | |
487 | ||
d14a1e28 | 488 | #--------------------------------------------------------------------------- |
628c7f79 | 489 | |
d55e5bfc | 490 | class XmlResourceHandler(_core.Object): |
e811c8ce RD |
491 | def __repr__(self): |
492 | return "<%s.%s; proxy of C++ wxPyXmlResourceHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 493 | def __init__(self, *args, **kwargs): |
a95a7133 | 494 | """__init__(self) -> XmlResourceHandler""" |
d14a1e28 RD |
495 | newobj = _xrc.new_XmlResourceHandler(*args, **kwargs) |
496 | self.this = newobj.this | |
628c7f79 | 497 | self.thisown = 1 |
d14a1e28 RD |
498 | del newobj.thisown |
499 | self._setCallbackInfo(self, XmlResourceHandler) | |
e811c8ce RD |
500 | |
501 | def _setCallbackInfo(*args, **kwargs): | |
a95a7133 | 502 | """_setCallbackInfo(self, PyObject self, PyObject _class)""" |
e811c8ce RD |
503 | return _xrc.XmlResourceHandler__setCallbackInfo(*args, **kwargs) |
504 | ||
505 | def CreateResource(*args, **kwargs): | |
a95a7133 | 506 | """CreateResource(self, XmlNode node, Object parent, Object instance) -> Object""" |
e811c8ce RD |
507 | return _xrc.XmlResourceHandler_CreateResource(*args, **kwargs) |
508 | ||
509 | def SetParentResource(*args, **kwargs): | |
a95a7133 | 510 | """SetParentResource(self, XmlResource res)""" |
e811c8ce RD |
511 | return _xrc.XmlResourceHandler_SetParentResource(*args, **kwargs) |
512 | ||
513 | def GetResource(*args, **kwargs): | |
a95a7133 | 514 | """GetResource(self) -> XmlResource""" |
e811c8ce RD |
515 | return _xrc.XmlResourceHandler_GetResource(*args, **kwargs) |
516 | ||
517 | def GetNode(*args, **kwargs): | |
a95a7133 | 518 | """GetNode(self) -> XmlNode""" |
e811c8ce RD |
519 | return _xrc.XmlResourceHandler_GetNode(*args, **kwargs) |
520 | ||
521 | def GetClass(*args, **kwargs): | |
a95a7133 | 522 | """GetClass(self) -> String""" |
e811c8ce RD |
523 | return _xrc.XmlResourceHandler_GetClass(*args, **kwargs) |
524 | ||
525 | def GetParent(*args, **kwargs): | |
a95a7133 | 526 | """GetParent(self) -> Object""" |
e811c8ce RD |
527 | return _xrc.XmlResourceHandler_GetParent(*args, **kwargs) |
528 | ||
529 | def GetInstance(*args, **kwargs): | |
a95a7133 | 530 | """GetInstance(self) -> Object""" |
e811c8ce RD |
531 | return _xrc.XmlResourceHandler_GetInstance(*args, **kwargs) |
532 | ||
533 | def GetParentAsWindow(*args, **kwargs): | |
a95a7133 | 534 | """GetParentAsWindow(self) -> Window""" |
e811c8ce RD |
535 | return _xrc.XmlResourceHandler_GetParentAsWindow(*args, **kwargs) |
536 | ||
537 | def GetInstanceAsWindow(*args, **kwargs): | |
a95a7133 | 538 | """GetInstanceAsWindow(self) -> Window""" |
e811c8ce RD |
539 | return _xrc.XmlResourceHandler_GetInstanceAsWindow(*args, **kwargs) |
540 | ||
541 | def IsOfClass(*args, **kwargs): | |
a95a7133 | 542 | """IsOfClass(self, XmlNode node, String classname) -> bool""" |
e811c8ce RD |
543 | return _xrc.XmlResourceHandler_IsOfClass(*args, **kwargs) |
544 | ||
545 | def GetNodeContent(*args, **kwargs): | |
a95a7133 | 546 | """GetNodeContent(self, XmlNode node) -> String""" |
e811c8ce RD |
547 | return _xrc.XmlResourceHandler_GetNodeContent(*args, **kwargs) |
548 | ||
549 | def HasParam(*args, **kwargs): | |
a95a7133 | 550 | """HasParam(self, String param) -> bool""" |
e811c8ce RD |
551 | return _xrc.XmlResourceHandler_HasParam(*args, **kwargs) |
552 | ||
553 | def GetParamNode(*args, **kwargs): | |
a95a7133 | 554 | """GetParamNode(self, String param) -> XmlNode""" |
e811c8ce RD |
555 | return _xrc.XmlResourceHandler_GetParamNode(*args, **kwargs) |
556 | ||
557 | def GetParamValue(*args, **kwargs): | |
a95a7133 | 558 | """GetParamValue(self, String param) -> String""" |
e811c8ce RD |
559 | return _xrc.XmlResourceHandler_GetParamValue(*args, **kwargs) |
560 | ||
561 | def AddStyle(*args, **kwargs): | |
a95a7133 | 562 | """AddStyle(self, String name, int value)""" |
e811c8ce RD |
563 | return _xrc.XmlResourceHandler_AddStyle(*args, **kwargs) |
564 | ||
565 | def AddWindowStyles(*args, **kwargs): | |
a95a7133 | 566 | """AddWindowStyles(self)""" |
e811c8ce RD |
567 | return _xrc.XmlResourceHandler_AddWindowStyles(*args, **kwargs) |
568 | ||
569 | def GetStyle(*args, **kwargs): | |
a95a7133 | 570 | """GetStyle(self, String param=StyleString, int defaults=0) -> int""" |
e811c8ce RD |
571 | return _xrc.XmlResourceHandler_GetStyle(*args, **kwargs) |
572 | ||
573 | def GetText(*args, **kwargs): | |
a95a7133 | 574 | """GetText(self, String param, bool translate=True) -> String""" |
e811c8ce RD |
575 | return _xrc.XmlResourceHandler_GetText(*args, **kwargs) |
576 | ||
577 | def GetID(*args, **kwargs): | |
a95a7133 | 578 | """GetID(self) -> int""" |
e811c8ce RD |
579 | return _xrc.XmlResourceHandler_GetID(*args, **kwargs) |
580 | ||
581 | def GetName(*args, **kwargs): | |
a95a7133 | 582 | """GetName(self) -> String""" |
e811c8ce RD |
583 | return _xrc.XmlResourceHandler_GetName(*args, **kwargs) |
584 | ||
585 | def GetBool(*args, **kwargs): | |
a95a7133 | 586 | """GetBool(self, String param, bool defaultv=False) -> bool""" |
e811c8ce RD |
587 | return _xrc.XmlResourceHandler_GetBool(*args, **kwargs) |
588 | ||
589 | def GetLong(*args, **kwargs): | |
a95a7133 | 590 | """GetLong(self, String param, long defaultv=0) -> long""" |
e811c8ce RD |
591 | return _xrc.XmlResourceHandler_GetLong(*args, **kwargs) |
592 | ||
593 | def GetColour(*args, **kwargs): | |
a95a7133 | 594 | """GetColour(self, String param) -> Colour""" |
e811c8ce RD |
595 | return _xrc.XmlResourceHandler_GetColour(*args, **kwargs) |
596 | ||
597 | def GetSize(*args, **kwargs): | |
a95a7133 | 598 | """GetSize(self, String param=SizeString) -> Size""" |
e811c8ce RD |
599 | return _xrc.XmlResourceHandler_GetSize(*args, **kwargs) |
600 | ||
601 | def GetPosition(*args, **kwargs): | |
a95a7133 | 602 | """GetPosition(self, String param=PosString) -> Point""" |
e811c8ce RD |
603 | return _xrc.XmlResourceHandler_GetPosition(*args, **kwargs) |
604 | ||
605 | def GetDimension(*args, **kwargs): | |
a95a7133 | 606 | """GetDimension(self, String param, int defaultv=0) -> int""" |
e811c8ce RD |
607 | return _xrc.XmlResourceHandler_GetDimension(*args, **kwargs) |
608 | ||
609 | def GetBitmap(*args, **kwargs): | |
0df68c9f | 610 | """ |
a95a7133 | 611 | GetBitmap(self, String param=BitmapString, wxArtClient defaultArtClient=wxART_OTHER, |
196addbf | 612 | Size size=DefaultSize) -> Bitmap |
0df68c9f | 613 | """ |
e811c8ce RD |
614 | return _xrc.XmlResourceHandler_GetBitmap(*args, **kwargs) |
615 | ||
616 | def GetIcon(*args, **kwargs): | |
0df68c9f | 617 | """ |
a95a7133 | 618 | GetIcon(self, String param=IconString, wxArtClient defaultArtClient=wxART_OTHER, |
b2dc1044 | 619 | Size size=DefaultSize) -> Icon |
0df68c9f | 620 | """ |
e811c8ce RD |
621 | return _xrc.XmlResourceHandler_GetIcon(*args, **kwargs) |
622 | ||
623 | def GetFont(*args, **kwargs): | |
a95a7133 | 624 | """GetFont(self, String param=FontString) -> Font""" |
e811c8ce RD |
625 | return _xrc.XmlResourceHandler_GetFont(*args, **kwargs) |
626 | ||
627 | def SetupWindow(*args, **kwargs): | |
a95a7133 | 628 | """SetupWindow(self, Window wnd)""" |
e811c8ce RD |
629 | return _xrc.XmlResourceHandler_SetupWindow(*args, **kwargs) |
630 | ||
631 | def CreateChildren(*args, **kwargs): | |
a95a7133 | 632 | """CreateChildren(self, Object parent, bool this_hnd_only=False)""" |
e811c8ce RD |
633 | return _xrc.XmlResourceHandler_CreateChildren(*args, **kwargs) |
634 | ||
635 | def CreateChildrenPrivately(*args, **kwargs): | |
a95a7133 | 636 | """CreateChildrenPrivately(self, Object parent, XmlNode rootnode=None)""" |
e811c8ce RD |
637 | return _xrc.XmlResourceHandler_CreateChildrenPrivately(*args, **kwargs) |
638 | ||
639 | def CreateResFromNode(*args, **kwargs): | |
a95a7133 | 640 | """CreateResFromNode(self, XmlNode node, Object parent, Object instance=None) -> Object""" |
e811c8ce RD |
641 | return _xrc.XmlResourceHandler_CreateResFromNode(*args, **kwargs) |
642 | ||
643 | def GetCurFileSystem(*args, **kwargs): | |
a95a7133 | 644 | """GetCurFileSystem(self) -> FileSystem""" |
e811c8ce RD |
645 | return _xrc.XmlResourceHandler_GetCurFileSystem(*args, **kwargs) |
646 | ||
ce914f73 | 647 | |
d14a1e28 RD |
648 | class XmlResourceHandlerPtr(XmlResourceHandler): |
649 | def __init__(self, this): | |
650 | self.this = this | |
651 | if not hasattr(self,"thisown"): self.thisown = 0 | |
652 | self.__class__ = XmlResourceHandler | |
653 | _xrc.XmlResourceHandler_swigregister(XmlResourceHandlerPtr) | |
ce914f73 | 654 | |
d14a1e28 | 655 | #---------------------------------------------------------------------------- |
ce914f73 RD |
656 | # The global was removed in favor of static accessor functions. This is for |
657 | # backwards compatibility: | |
628c7f79 | 658 | |
d14a1e28 | 659 | TheXmlResource = XmlResource_Get() |
1e4a197e RD |
660 | |
661 | ||
d14a1e28 | 662 | #---------------------------------------------------------------------------- |
1e4a197e RD |
663 | # Create a factory for handling the subclass property of the object tag. |
664 | ||
665 | ||
666 | def _my_import(name): | |
667 | mod = __import__(name) | |
668 | components = name.split('.') | |
669 | for comp in components[1:]: | |
670 | mod = getattr(mod, comp) | |
671 | return mod | |
672 | ||
673 | ||
d14a1e28 | 674 | class XmlSubclassFactory_Python(XmlSubclassFactory): |
1e4a197e | 675 | def __init__(self): |
d14a1e28 | 676 | XmlSubclassFactory.__init__(self) |
1e4a197e RD |
677 | |
678 | def Create(self, className): | |
679 | assert className.find('.') != -1, "Module name must be specified!" | |
680 | mname = className[:className.rfind('.')] | |
681 | cname = className[className.rfind('.')+1:] | |
682 | module = _my_import(mname) | |
683 | klass = getattr(module, cname) | |
684 | inst = klass() | |
685 | return inst | |
686 | ||
687 | ||
d14a1e28 RD |
688 | XmlResource_AddSubclassFactory(XmlSubclassFactory_Python()) |
689 | ||
690 | #---------------------------------------------------------------------------- | |
691 | ||
1e4a197e | 692 |