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