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