]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/gtk/xrc.py
reSWIGged
[wxWidgets.git] / wxPython / src / gtk / xrc.py
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 AnimationString = cvar.AnimationString
227
228 def EmptyXmlResource(*args, **kwargs):
229 """EmptyXmlResource(int flags=XRC_USE_LOCALE, String domain=wxEmptyString) -> XmlResource"""
230 val = _xrc.new_EmptyXmlResource(*args, **kwargs)
231 val.InitAllHandlers()
232 return val
233
234 def XmlResource_AddSubclassFactory(*args, **kwargs):
235 """XmlResource_AddSubclassFactory(XmlSubclassFactory factory)"""
236 return _xrc.XmlResource_AddSubclassFactory(*args, **kwargs)
237
238 def XmlResource_GetXRCID(*args, **kwargs):
239 """XmlResource_GetXRCID(String str_id, int value_if_not_found=ID_NONE) -> int"""
240 return _xrc.XmlResource_GetXRCID(*args, **kwargs)
241
242 def XmlResource_Get(*args):
243 """XmlResource_Get() -> XmlResource"""
244 return _xrc.XmlResource_Get(*args)
245
246 def XmlResource_Set(*args, **kwargs):
247 """XmlResource_Set(XmlResource res) -> XmlResource"""
248 return _xrc.XmlResource_Set(*args, **kwargs)
249
250 def XRCID(str_id, value_if_not_found = wx.ID_NONE):
251 return XmlResource_GetXRCID(str_id, value_if_not_found)
252
253 def XRCCTRL(window, str_id, *ignoreargs):
254 return window.FindWindowById(XRCID(str_id))
255
256 #---------------------------------------------------------------------------
257
258 class XmlSubclassFactory(object):
259 """Proxy of C++ XmlSubclassFactory class"""
260 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
261 __repr__ = _swig_repr
262 def __init__(self, *args, **kwargs):
263 """__init__(self) -> XmlSubclassFactory"""
264 _xrc.XmlSubclassFactory_swiginit(self,_xrc.new_XmlSubclassFactory(*args, **kwargs))
265 XmlSubclassFactory._setCallbackInfo(self, self, XmlSubclassFactory)
266
267 def _setCallbackInfo(*args, **kwargs):
268 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
269 return _xrc.XmlSubclassFactory__setCallbackInfo(*args, **kwargs)
270
271 _xrc.XmlSubclassFactory_swigregister(XmlSubclassFactory)
272
273 #---------------------------------------------------------------------------
274
275 XML_ELEMENT_NODE = _xrc.XML_ELEMENT_NODE
276 XML_ATTRIBUTE_NODE = _xrc.XML_ATTRIBUTE_NODE
277 XML_TEXT_NODE = _xrc.XML_TEXT_NODE
278 XML_CDATA_SECTION_NODE = _xrc.XML_CDATA_SECTION_NODE
279 XML_ENTITY_REF_NODE = _xrc.XML_ENTITY_REF_NODE
280 XML_ENTITY_NODE = _xrc.XML_ENTITY_NODE
281 XML_PI_NODE = _xrc.XML_PI_NODE
282 XML_COMMENT_NODE = _xrc.XML_COMMENT_NODE
283 XML_DOCUMENT_NODE = _xrc.XML_DOCUMENT_NODE
284 XML_DOCUMENT_TYPE_NODE = _xrc.XML_DOCUMENT_TYPE_NODE
285 XML_DOCUMENT_FRAG_NODE = _xrc.XML_DOCUMENT_FRAG_NODE
286 XML_NOTATION_NODE = _xrc.XML_NOTATION_NODE
287 XML_HTML_DOCUMENT_NODE = _xrc.XML_HTML_DOCUMENT_NODE
288 class XmlProperty(object):
289 """Proxy of C++ XmlProperty class"""
290 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
291 __repr__ = _swig_repr
292 def __init__(self, *args, **kwargs):
293 """
294 __init__(self, String name=EmptyString, String value=EmptyString,
295 XmlProperty next=None) -> XmlProperty
296 """
297 _xrc.XmlProperty_swiginit(self,_xrc.new_XmlProperty(*args, **kwargs))
298 def GetName(*args, **kwargs):
299 """GetName(self) -> String"""
300 return _xrc.XmlProperty_GetName(*args, **kwargs)
301
302 def GetValue(*args, **kwargs):
303 """GetValue(self) -> String"""
304 return _xrc.XmlProperty_GetValue(*args, **kwargs)
305
306 def GetNext(*args, **kwargs):
307 """GetNext(self) -> XmlProperty"""
308 return _xrc.XmlProperty_GetNext(*args, **kwargs)
309
310 def SetName(*args, **kwargs):
311 """SetName(self, String name)"""
312 return _xrc.XmlProperty_SetName(*args, **kwargs)
313
314 def SetValue(*args, **kwargs):
315 """SetValue(self, String value)"""
316 return _xrc.XmlProperty_SetValue(*args, **kwargs)
317
318 def SetNext(*args, **kwargs):
319 """SetNext(self, XmlProperty next)"""
320 return _xrc.XmlProperty_SetNext(*args, **kwargs)
321
322 Name = property(GetName,SetName,doc="See `GetName` and `SetName`")
323 Next = property(GetNext,SetNext,doc="See `GetNext` and `SetNext`")
324 Value = property(GetValue,SetValue,doc="See `GetValue` and `SetValue`")
325 _xrc.XmlProperty_swigregister(XmlProperty)
326
327 class XmlNode(object):
328 """Proxy of C++ XmlNode class"""
329 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
330 __repr__ = _swig_repr
331 def __init__(self, *args, **kwargs):
332 """
333 __init__(self, XmlNode parent=None, int type=0, String name=EmptyString,
334 String content=EmptyString, XmlProperty props=None,
335 XmlNode next=None) -> XmlNode
336 """
337 _xrc.XmlNode_swiginit(self,_xrc.new_XmlNode(*args, **kwargs))
338 __swig_destroy__ = _xrc.delete_XmlNode
339 __del__ = lambda self : None;
340 def AddChild(*args, **kwargs):
341 """AddChild(self, XmlNode child)"""
342 return _xrc.XmlNode_AddChild(*args, **kwargs)
343
344 def InsertChild(*args, **kwargs):
345 """InsertChild(self, XmlNode child, XmlNode before_node) -> bool"""
346 return _xrc.XmlNode_InsertChild(*args, **kwargs)
347
348 def RemoveChild(*args, **kwargs):
349 """RemoveChild(self, XmlNode child) -> bool"""
350 return _xrc.XmlNode_RemoveChild(*args, **kwargs)
351
352 def AddProperty(*args, **kwargs):
353 """AddProperty(self, XmlProperty prop)"""
354 return _xrc.XmlNode_AddProperty(*args, **kwargs)
355
356 def AddPropertyName(*args, **kwargs):
357 """AddPropertyName(self, String name, String value)"""
358 return _xrc.XmlNode_AddPropertyName(*args, **kwargs)
359
360 def DeleteProperty(*args, **kwargs):
361 """DeleteProperty(self, String name) -> bool"""
362 return _xrc.XmlNode_DeleteProperty(*args, **kwargs)
363
364 def GetType(*args, **kwargs):
365 """GetType(self) -> int"""
366 return _xrc.XmlNode_GetType(*args, **kwargs)
367
368 def GetName(*args, **kwargs):
369 """GetName(self) -> String"""
370 return _xrc.XmlNode_GetName(*args, **kwargs)
371
372 def GetContent(*args, **kwargs):
373 """GetContent(self) -> String"""
374 return _xrc.XmlNode_GetContent(*args, **kwargs)
375
376 def IsWhitespaceOnly(*args, **kwargs):
377 """IsWhitespaceOnly(self) -> bool"""
378 return _xrc.XmlNode_IsWhitespaceOnly(*args, **kwargs)
379
380 def GetDepth(*args, **kwargs):
381 """GetDepth(self, XmlNode grandparent=None) -> int"""
382 return _xrc.XmlNode_GetDepth(*args, **kwargs)
383
384 def GetNodeContent(*args, **kwargs):
385 """GetNodeContent(self) -> String"""
386 return _xrc.XmlNode_GetNodeContent(*args, **kwargs)
387
388 def GetParent(*args, **kwargs):
389 """GetParent(self) -> XmlNode"""
390 return _xrc.XmlNode_GetParent(*args, **kwargs)
391
392 def GetNext(*args, **kwargs):
393 """GetNext(self) -> XmlNode"""
394 return _xrc.XmlNode_GetNext(*args, **kwargs)
395
396 def GetChildren(*args, **kwargs):
397 """GetChildren(self) -> XmlNode"""
398 return _xrc.XmlNode_GetChildren(*args, **kwargs)
399
400 def GetProperties(*args, **kwargs):
401 """GetProperties(self) -> XmlProperty"""
402 return _xrc.XmlNode_GetProperties(*args, **kwargs)
403
404 def GetPropVal(*args, **kwargs):
405 """GetPropVal(self, String propName, String defaultVal) -> String"""
406 return _xrc.XmlNode_GetPropVal(*args, **kwargs)
407
408 def HasProp(*args, **kwargs):
409 """HasProp(self, String propName) -> bool"""
410 return _xrc.XmlNode_HasProp(*args, **kwargs)
411
412 def SetType(*args, **kwargs):
413 """SetType(self, int type)"""
414 return _xrc.XmlNode_SetType(*args, **kwargs)
415
416 def SetName(*args, **kwargs):
417 """SetName(self, String name)"""
418 return _xrc.XmlNode_SetName(*args, **kwargs)
419
420 def SetContent(*args, **kwargs):
421 """SetContent(self, String con)"""
422 return _xrc.XmlNode_SetContent(*args, **kwargs)
423
424 def SetParent(*args, **kwargs):
425 """SetParent(self, XmlNode parent)"""
426 return _xrc.XmlNode_SetParent(*args, **kwargs)
427
428 def SetNext(*args, **kwargs):
429 """SetNext(self, XmlNode next)"""
430 return _xrc.XmlNode_SetNext(*args, **kwargs)
431
432 def SetChildren(*args, **kwargs):
433 """SetChildren(self, XmlNode child)"""
434 return _xrc.XmlNode_SetChildren(*args, **kwargs)
435
436 def SetProperties(*args, **kwargs):
437 """SetProperties(self, XmlProperty prop)"""
438 return _xrc.XmlNode_SetProperties(*args, **kwargs)
439
440 Children = property(GetChildren,SetChildren,doc="See `GetChildren` and `SetChildren`")
441 Content = property(GetContent,SetContent,doc="See `GetContent` and `SetContent`")
442 Name = property(GetName,SetName,doc="See `GetName` and `SetName`")
443 Next = property(GetNext,SetNext,doc="See `GetNext` and `SetNext`")
444 Parent = property(GetParent,SetParent,doc="See `GetParent` and `SetParent`")
445 Properties = property(GetProperties,SetProperties,doc="See `GetProperties` and `SetProperties`")
446 Type = property(GetType,SetType,doc="See `GetType` and `SetType`")
447 _xrc.XmlNode_swigregister(XmlNode)
448
449 def XmlNodeEasy(*args, **kwargs):
450 """XmlNodeEasy(int type, String name, String content=EmptyString) -> XmlNode"""
451 val = _xrc.new_XmlNodeEasy(*args, **kwargs)
452 return val
453
454 XML_NO_INDENTATION = _xrc.XML_NO_INDENTATION
455 XMLDOC_NONE = _xrc.XMLDOC_NONE
456 XMLDOC_KEEP_WHITESPACE_NODES = _xrc.XMLDOC_KEEP_WHITESPACE_NODES
457 class XmlDocument(_core.Object):
458 """Proxy of C++ XmlDocument class"""
459 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
460 __repr__ = _swig_repr
461 def __init__(self, *args, **kwargs):
462 """__init__(self, String filename, String encoding=UTF8String) -> XmlDocument"""
463 _xrc.XmlDocument_swiginit(self,_xrc.new_XmlDocument(*args, **kwargs))
464 __swig_destroy__ = _xrc.delete_XmlDocument
465 __del__ = lambda self : None;
466 def Load(*args, **kwargs):
467 """Load(self, String filename, String encoding=UTF8String, int flags=XMLDOC_NONE) -> bool"""
468 return _xrc.XmlDocument_Load(*args, **kwargs)
469
470 def LoadFromStream(*args, **kwargs):
471 """LoadFromStream(self, InputStream stream, String encoding=UTF8String, int flags=XMLDOC_NONE) -> bool"""
472 return _xrc.XmlDocument_LoadFromStream(*args, **kwargs)
473
474 def Save(*args, **kwargs):
475 """Save(self, String filename, int indentstep=1) -> bool"""
476 return _xrc.XmlDocument_Save(*args, **kwargs)
477
478 def SaveToStream(*args, **kwargs):
479 """SaveToStream(self, OutputStream stream, int indentstep=1) -> bool"""
480 return _xrc.XmlDocument_SaveToStream(*args, **kwargs)
481
482 def IsOk(*args, **kwargs):
483 """IsOk(self) -> bool"""
484 return _xrc.XmlDocument_IsOk(*args, **kwargs)
485
486 def GetRoot(*args, **kwargs):
487 """GetRoot(self) -> XmlNode"""
488 return _xrc.XmlDocument_GetRoot(*args, **kwargs)
489
490 def GetVersion(*args, **kwargs):
491 """GetVersion(self) -> String"""
492 return _xrc.XmlDocument_GetVersion(*args, **kwargs)
493
494 def GetFileEncoding(*args, **kwargs):
495 """GetFileEncoding(self) -> String"""
496 return _xrc.XmlDocument_GetFileEncoding(*args, **kwargs)
497
498 def DetachRoot(*args, **kwargs):
499 """DetachRoot(self) -> XmlNode"""
500 return _xrc.XmlDocument_DetachRoot(*args, **kwargs)
501
502 def SetRoot(*args, **kwargs):
503 """SetRoot(self, XmlNode node)"""
504 return _xrc.XmlDocument_SetRoot(*args, **kwargs)
505
506 def SetVersion(*args, **kwargs):
507 """SetVersion(self, String version)"""
508 return _xrc.XmlDocument_SetVersion(*args, **kwargs)
509
510 def SetFileEncoding(*args, **kwargs):
511 """SetFileEncoding(self, String encoding)"""
512 return _xrc.XmlDocument_SetFileEncoding(*args, **kwargs)
513
514 FileEncoding = property(GetFileEncoding,SetFileEncoding,doc="See `GetFileEncoding` and `SetFileEncoding`")
515 Root = property(GetRoot,SetRoot,doc="See `GetRoot` and `SetRoot`")
516 Version = property(GetVersion,SetVersion,doc="See `GetVersion` and `SetVersion`")
517 _xrc.XmlDocument_swigregister(XmlDocument)
518
519 def XmlDocumentFromStream(*args, **kwargs):
520 """XmlDocumentFromStream(InputStream stream, String encoding=UTF8String) -> XmlDocument"""
521 val = _xrc.new_XmlDocumentFromStream(*args, **kwargs)
522 return val
523
524 def EmptyXmlDocument(*args, **kwargs):
525 """EmptyXmlDocument() -> XmlDocument"""
526 val = _xrc.new_EmptyXmlDocument(*args, **kwargs)
527 return val
528
529 #---------------------------------------------------------------------------
530
531 class XmlResourceHandler(_core.Object):
532 """Proxy of C++ XmlResourceHandler class"""
533 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
534 __repr__ = _swig_repr
535 def __init__(self, *args, **kwargs):
536 """__init__(self) -> XmlResourceHandler"""
537 _xrc.XmlResourceHandler_swiginit(self,_xrc.new_XmlResourceHandler(*args, **kwargs))
538 XmlResourceHandler._setCallbackInfo(self, self, XmlResourceHandler)
539
540 __swig_destroy__ = _xrc.delete_XmlResourceHandler
541 __del__ = lambda self : None;
542 def _setCallbackInfo(*args, **kwargs):
543 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
544 return _xrc.XmlResourceHandler__setCallbackInfo(*args, **kwargs)
545
546 def CreateResource(*args, **kwargs):
547 """CreateResource(self, XmlNode node, Object parent, Object instance) -> Object"""
548 return _xrc.XmlResourceHandler_CreateResource(*args, **kwargs)
549
550 def SetParentResource(*args, **kwargs):
551 """SetParentResource(self, XmlResource res)"""
552 return _xrc.XmlResourceHandler_SetParentResource(*args, **kwargs)
553
554 def GetResource(*args, **kwargs):
555 """GetResource(self) -> XmlResource"""
556 return _xrc.XmlResourceHandler_GetResource(*args, **kwargs)
557
558 def GetNode(*args, **kwargs):
559 """GetNode(self) -> XmlNode"""
560 return _xrc.XmlResourceHandler_GetNode(*args, **kwargs)
561
562 def GetClass(*args, **kwargs):
563 """GetClass(self) -> String"""
564 return _xrc.XmlResourceHandler_GetClass(*args, **kwargs)
565
566 def GetParent(*args, **kwargs):
567 """GetParent(self) -> Object"""
568 return _xrc.XmlResourceHandler_GetParent(*args, **kwargs)
569
570 def GetInstance(*args, **kwargs):
571 """GetInstance(self) -> Object"""
572 return _xrc.XmlResourceHandler_GetInstance(*args, **kwargs)
573
574 def GetParentAsWindow(*args, **kwargs):
575 """GetParentAsWindow(self) -> Window"""
576 return _xrc.XmlResourceHandler_GetParentAsWindow(*args, **kwargs)
577
578 def IsOfClass(*args, **kwargs):
579 """IsOfClass(self, XmlNode node, String classname) -> bool"""
580 return _xrc.XmlResourceHandler_IsOfClass(*args, **kwargs)
581
582 def GetNodeContent(*args, **kwargs):
583 """GetNodeContent(self, XmlNode node) -> String"""
584 return _xrc.XmlResourceHandler_GetNodeContent(*args, **kwargs)
585
586 def HasParam(*args, **kwargs):
587 """HasParam(self, String param) -> bool"""
588 return _xrc.XmlResourceHandler_HasParam(*args, **kwargs)
589
590 def GetParamNode(*args, **kwargs):
591 """GetParamNode(self, String param) -> XmlNode"""
592 return _xrc.XmlResourceHandler_GetParamNode(*args, **kwargs)
593
594 def GetParamValue(*args, **kwargs):
595 """GetParamValue(self, String param) -> String"""
596 return _xrc.XmlResourceHandler_GetParamValue(*args, **kwargs)
597
598 def AddStyle(*args, **kwargs):
599 """AddStyle(self, String name, int value)"""
600 return _xrc.XmlResourceHandler_AddStyle(*args, **kwargs)
601
602 def AddWindowStyles(*args, **kwargs):
603 """AddWindowStyles(self)"""
604 return _xrc.XmlResourceHandler_AddWindowStyles(*args, **kwargs)
605
606 def GetStyle(*args, **kwargs):
607 """GetStyle(self, String param=StyleString, int defaults=0) -> int"""
608 return _xrc.XmlResourceHandler_GetStyle(*args, **kwargs)
609
610 def GetText(*args, **kwargs):
611 """GetText(self, String param, bool translate=True) -> String"""
612 return _xrc.XmlResourceHandler_GetText(*args, **kwargs)
613
614 def GetID(*args, **kwargs):
615 """GetID(self) -> int"""
616 return _xrc.XmlResourceHandler_GetID(*args, **kwargs)
617
618 def GetName(*args, **kwargs):
619 """GetName(self) -> String"""
620 return _xrc.XmlResourceHandler_GetName(*args, **kwargs)
621
622 def GetBool(*args, **kwargs):
623 """GetBool(self, String param, bool defaultv=False) -> bool"""
624 return _xrc.XmlResourceHandler_GetBool(*args, **kwargs)
625
626 def GetLong(*args, **kwargs):
627 """GetLong(self, String param, long defaultv=0) -> long"""
628 return _xrc.XmlResourceHandler_GetLong(*args, **kwargs)
629
630 def GetColour(*args, **kwargs):
631 """GetColour(self, String param) -> Colour"""
632 return _xrc.XmlResourceHandler_GetColour(*args, **kwargs)
633
634 def GetSize(*args, **kwargs):
635 """GetSize(self, String param=SizeString) -> Size"""
636 return _xrc.XmlResourceHandler_GetSize(*args, **kwargs)
637
638 def GetPosition(*args, **kwargs):
639 """GetPosition(self, String param=PosString) -> Point"""
640 return _xrc.XmlResourceHandler_GetPosition(*args, **kwargs)
641
642 def GetDimension(*args, **kwargs):
643 """GetDimension(self, String param, int defaultv=0) -> int"""
644 return _xrc.XmlResourceHandler_GetDimension(*args, **kwargs)
645
646 def GetBitmap(*args, **kwargs):
647 """
648 GetBitmap(self, String param=BitmapString, wxArtClient defaultArtClient=wxART_OTHER,
649 Size size=DefaultSize) -> Bitmap
650 """
651 return _xrc.XmlResourceHandler_GetBitmap(*args, **kwargs)
652
653 def GetIcon(*args, **kwargs):
654 """
655 GetIcon(self, String param=IconString, wxArtClient defaultArtClient=wxART_OTHER,
656 Size size=DefaultSize) -> Icon
657 """
658 return _xrc.XmlResourceHandler_GetIcon(*args, **kwargs)
659
660 def GetFont(*args, **kwargs):
661 """GetFont(self, String param=FontString) -> Font"""
662 return _xrc.XmlResourceHandler_GetFont(*args, **kwargs)
663
664 def GetAnimation(*args, **kwargs):
665 """GetAnimation(self, String param=AnimationString) -> wxAnimation"""
666 return _xrc.XmlResourceHandler_GetAnimation(*args, **kwargs)
667
668 def SetupWindow(*args, **kwargs):
669 """SetupWindow(self, Window wnd)"""
670 return _xrc.XmlResourceHandler_SetupWindow(*args, **kwargs)
671
672 def CreateChildren(*args, **kwargs):
673 """CreateChildren(self, Object parent, bool this_hnd_only=False)"""
674 return _xrc.XmlResourceHandler_CreateChildren(*args, **kwargs)
675
676 def CreateChildrenPrivately(*args, **kwargs):
677 """CreateChildrenPrivately(self, Object parent, XmlNode rootnode=None)"""
678 return _xrc.XmlResourceHandler_CreateChildrenPrivately(*args, **kwargs)
679
680 def CreateResFromNode(*args, **kwargs):
681 """CreateResFromNode(self, XmlNode node, Object parent, Object instance=None) -> Object"""
682 return _xrc.XmlResourceHandler_CreateResFromNode(*args, **kwargs)
683
684 def GetCurFileSystem(*args, **kwargs):
685 """GetCurFileSystem(self) -> FileSystem"""
686 return _xrc.XmlResourceHandler_GetCurFileSystem(*args, **kwargs)
687
688 Class = property(GetClass,doc="See `GetClass`")
689 CurFileSystem = property(GetCurFileSystem,doc="See `GetCurFileSystem`")
690 ID = property(GetID,doc="See `GetID`")
691 Instance = property(GetInstance,doc="See `GetInstance`")
692 Name = property(GetName,doc="See `GetName`")
693 Node = property(GetNode,doc="See `GetNode`")
694 Parent = property(GetParent,doc="See `GetParent`")
695 ParentAsWindow = property(GetParentAsWindow,doc="See `GetParentAsWindow`")
696 Resource = property(GetResource,doc="See `GetResource`")
697 _xrc.XmlResourceHandler_swigregister(XmlResourceHandler)
698
699 #----------------------------------------------------------------------------
700 # The global was removed in favor of static accessor functions. This is for
701 # backwards compatibility:
702
703 TheXmlResource = XmlResource_Get()
704
705
706 #----------------------------------------------------------------------------
707 # Create a factory for handling the subclass property of the object tag.
708
709
710 def _my_import(name):
711 try:
712 mod = __import__(name)
713 except ImportError:
714 import traceback
715 print traceback.format_exc()
716 raise
717 components = name.split('.')
718 for comp in components[1:]:
719 mod = getattr(mod, comp)
720 return mod
721
722
723 class XmlSubclassFactory_Python(XmlSubclassFactory):
724 def __init__(self):
725 XmlSubclassFactory.__init__(self)
726
727 def Create(self, className):
728 assert className.find('.') != -1, "Module name must be specified!"
729 mname = className[:className.rfind('.')]
730 cname = className[className.rfind('.')+1:]
731 module = _my_import(mname)
732 klass = getattr(module, cname)
733 inst = klass()
734 return inst
735
736
737 XmlResource_AddSubclassFactory(XmlSubclassFactory_Python())
738
739 #----------------------------------------------------------------------------
740
741
742