2001-06-15 17:43:26 -04:00
|
|
|
# This file was created automatically by SWIG.
|
2003-11-12 16:34:20 -05:00
|
|
|
# Don't modify this file, modify the SWIG interface instead.
|
|
|
|
|
|
|
|
import _xrc
|
|
|
|
|
|
|
|
import core
|
|
|
|
wx = core
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
WX_XMLRES_CURRENT_VERSION_MAJOR = _xrc.WX_XMLRES_CURRENT_VERSION_MAJOR
|
|
|
|
WX_XMLRES_CURRENT_VERSION_MINOR = _xrc.WX_XMLRES_CURRENT_VERSION_MINOR
|
|
|
|
WX_XMLRES_CURRENT_VERSION_RELEASE = _xrc.WX_XMLRES_CURRENT_VERSION_RELEASE
|
|
|
|
WX_XMLRES_CURRENT_VERSION_REVISION = _xrc.WX_XMLRES_CURRENT_VERSION_REVISION
|
|
|
|
XRC_USE_LOCALE = _xrc.XRC_USE_LOCALE
|
|
|
|
XRC_NO_SUBCLASSING = _xrc.XRC_NO_SUBCLASSING
|
|
|
|
class XmlResource(core.Object):
|
2003-11-19 01:36:16 -05:00
|
|
|
def __repr__(self):
|
|
|
|
return "<%s.%s; proxy of C++ wxXmlResource instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
|
2003-11-12 16:34:20 -05:00
|
|
|
def __init__(self, *args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""__init__(String filemask, int flags=XRC_USE_LOCALE) -> XmlResource"""
|
2003-11-12 16:34:20 -05:00
|
|
|
newobj = _xrc.new_XmlResource(*args, **kwargs)
|
|
|
|
self.this = newobj.this
|
|
|
|
self.thisown = 1
|
|
|
|
del newobj.thisown
|
|
|
|
self.InitAllHandlers()
|
2003-11-19 01:36:16 -05:00
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
def __del__(self, destroy=_xrc.delete_XmlResource):
|
2003-11-19 01:36:16 -05:00
|
|
|
"""__del__()"""
|
2003-11-12 16:34:20 -05:00
|
|
|
try:
|
|
|
|
if self.thisown: destroy(self)
|
|
|
|
except: pass
|
2003-11-19 01:36:16 -05:00
|
|
|
|
|
|
|
def Load(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""Load(String filemask) -> bool"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResource_Load(*args, **kwargs)
|
|
|
|
|
|
|
|
def LoadFromString(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""LoadFromString(String data) -> bool"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResource_LoadFromString(*args, **kwargs)
|
|
|
|
|
|
|
|
def InitAllHandlers(*args, **kwargs):
|
|
|
|
"""InitAllHandlers()"""
|
|
|
|
return _xrc.XmlResource_InitAllHandlers(*args, **kwargs)
|
|
|
|
|
|
|
|
def AddHandler(*args, **kwargs):
|
|
|
|
"""AddHandler(XmlResourceHandler handler)"""
|
|
|
|
return _xrc.XmlResource_AddHandler(*args, **kwargs)
|
|
|
|
|
|
|
|
def InsertHandler(*args, **kwargs):
|
|
|
|
"""InsertHandler(XmlResourceHandler handler)"""
|
|
|
|
return _xrc.XmlResource_InsertHandler(*args, **kwargs)
|
|
|
|
|
|
|
|
def ClearHandlers(*args, **kwargs):
|
|
|
|
"""ClearHandlers()"""
|
|
|
|
return _xrc.XmlResource_ClearHandlers(*args, **kwargs)
|
|
|
|
|
|
|
|
def AddSubclassFactory(*args, **kwargs):
|
2004-01-23 16:58:14 -05:00
|
|
|
"""AddSubclassFactory(XmlSubclassFactory factory)"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResource_AddSubclassFactory(*args, **kwargs)
|
|
|
|
|
|
|
|
AddSubclassFactory = staticmethod(AddSubclassFactory)
|
|
|
|
def LoadMenu(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""LoadMenu(String name) -> Menu"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResource_LoadMenu(*args, **kwargs)
|
|
|
|
|
|
|
|
def LoadMenuBar(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""LoadMenuBar(String name) -> MenuBar"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResource_LoadMenuBar(*args, **kwargs)
|
|
|
|
|
|
|
|
def LoadMenuBarOnFrame(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""LoadMenuBarOnFrame(Window parent, String name) -> MenuBar"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResource_LoadMenuBarOnFrame(*args, **kwargs)
|
|
|
|
|
|
|
|
def LoadToolBar(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""LoadToolBar(Window parent, String name) -> wxToolBar"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResource_LoadToolBar(*args, **kwargs)
|
|
|
|
|
|
|
|
def LoadDialog(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""LoadDialog(Window parent, String name) -> wxDialog"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResource_LoadDialog(*args, **kwargs)
|
|
|
|
|
|
|
|
def LoadOnDialog(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""LoadOnDialog(wxDialog dlg, Window parent, String name) -> bool"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResource_LoadOnDialog(*args, **kwargs)
|
|
|
|
|
|
|
|
def LoadPanel(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""LoadPanel(Window parent, String name) -> wxPanel"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResource_LoadPanel(*args, **kwargs)
|
|
|
|
|
|
|
|
def LoadOnPanel(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""LoadOnPanel(wxPanel panel, Window parent, String name) -> bool"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResource_LoadOnPanel(*args, **kwargs)
|
|
|
|
|
|
|
|
def LoadFrame(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""LoadFrame(Window parent, String name) -> wxFrame"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResource_LoadFrame(*args, **kwargs)
|
|
|
|
|
|
|
|
def LoadOnFrame(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""LoadOnFrame(wxFrame frame, Window parent, String name) -> bool"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResource_LoadOnFrame(*args, **kwargs)
|
|
|
|
|
|
|
|
def LoadObject(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""LoadObject(Window parent, String name, String classname) -> Object"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResource_LoadObject(*args, **kwargs)
|
|
|
|
|
|
|
|
def LoadOnObject(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""LoadOnObject(Object instance, Window parent, String name, String classname) -> bool"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResource_LoadOnObject(*args, **kwargs)
|
|
|
|
|
|
|
|
def LoadBitmap(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""LoadBitmap(String name) -> Bitmap"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResource_LoadBitmap(*args, **kwargs)
|
|
|
|
|
|
|
|
def LoadIcon(*args, **kwargs):
|
2003-12-19 20:01:49 -05:00
|
|
|
"""LoadIcon(String name) -> Icon"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResource_LoadIcon(*args, **kwargs)
|
|
|
|
|
|
|
|
def AttachUnknownControl(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""AttachUnknownControl(String name, Window control, Window parent=None) -> bool"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResource_AttachUnknownControl(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetXRCID(*args, **kwargs):
|
2004-01-23 16:58:14 -05:00
|
|
|
"""GetXRCID(String str_id) -> int"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResource_GetXRCID(*args, **kwargs)
|
|
|
|
|
|
|
|
GetXRCID = staticmethod(GetXRCID)
|
|
|
|
def GetVersion(*args, **kwargs):
|
|
|
|
"""GetVersion() -> long"""
|
|
|
|
return _xrc.XmlResource_GetVersion(*args, **kwargs)
|
|
|
|
|
|
|
|
def CompareVersion(*args, **kwargs):
|
|
|
|
"""CompareVersion(int major, int minor, int release, int revision) -> int"""
|
|
|
|
return _xrc.XmlResource_CompareVersion(*args, **kwargs)
|
|
|
|
|
|
|
|
def Get(*args, **kwargs):
|
2004-01-23 16:58:14 -05:00
|
|
|
"""Get() -> XmlResource"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResource_Get(*args, **kwargs)
|
|
|
|
|
|
|
|
Get = staticmethod(Get)
|
|
|
|
def Set(*args, **kwargs):
|
2004-01-23 16:58:14 -05:00
|
|
|
"""Set(XmlResource res) -> XmlResource"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResource_Set(*args, **kwargs)
|
|
|
|
|
|
|
|
Set = staticmethod(Set)
|
|
|
|
def GetFlags(*args, **kwargs):
|
|
|
|
"""GetFlags() -> int"""
|
|
|
|
return _xrc.XmlResource_GetFlags(*args, **kwargs)
|
|
|
|
|
|
|
|
def SetFlags(*args, **kwargs):
|
|
|
|
"""SetFlags(int flags)"""
|
|
|
|
return _xrc.XmlResource_SetFlags(*args, **kwargs)
|
|
|
|
|
2001-06-15 17:43:26 -04:00
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
class XmlResourcePtr(XmlResource):
|
|
|
|
def __init__(self, this):
|
|
|
|
self.this = this
|
|
|
|
if not hasattr(self,"thisown"): self.thisown = 0
|
|
|
|
self.__class__ = XmlResource
|
|
|
|
_xrc.XmlResource_swigregister(XmlResourcePtr)
|
2003-12-19 20:01:49 -05:00
|
|
|
cvar = _xrc.cvar
|
|
|
|
UTF8String = cvar.UTF8String
|
|
|
|
StyleString = cvar.StyleString
|
|
|
|
SizeString = cvar.SizeString
|
|
|
|
PosString = cvar.PosString
|
|
|
|
BitmapString = cvar.BitmapString
|
|
|
|
IconString = cvar.IconString
|
|
|
|
FontString = cvar.FontString
|
2001-06-15 17:43:26 -04:00
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
def EmptyXmlResource(*args, **kwargs):
|
2003-11-19 01:36:16 -05:00
|
|
|
"""EmptyXmlResource(int flags=XRC_USE_LOCALE) -> XmlResource"""
|
2003-11-12 16:34:20 -05:00
|
|
|
val = _xrc.new_EmptyXmlResource(*args, **kwargs)
|
|
|
|
val.thisown = 1
|
|
|
|
val.InitAllHandlers()
|
|
|
|
return val
|
2001-06-15 17:43:26 -04:00
|
|
|
|
2003-11-19 01:36:16 -05:00
|
|
|
def XmlResource_AddSubclassFactory(*args, **kwargs):
|
|
|
|
"""XmlResource_AddSubclassFactory(XmlSubclassFactory factory)"""
|
|
|
|
return _xrc.XmlResource_AddSubclassFactory(*args, **kwargs)
|
2001-06-15 17:43:26 -04:00
|
|
|
|
2003-11-19 01:36:16 -05:00
|
|
|
def XmlResource_GetXRCID(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""XmlResource_GetXRCID(String str_id) -> int"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResource_GetXRCID(*args, **kwargs)
|
2001-06-15 17:43:26 -04:00
|
|
|
|
2003-11-19 01:36:16 -05:00
|
|
|
def XmlResource_Get(*args, **kwargs):
|
|
|
|
"""XmlResource_Get() -> XmlResource"""
|
|
|
|
return _xrc.XmlResource_Get(*args, **kwargs)
|
2001-06-15 17:43:26 -04:00
|
|
|
|
2003-11-19 01:36:16 -05:00
|
|
|
def XmlResource_Set(*args, **kwargs):
|
|
|
|
"""XmlResource_Set(XmlResource res) -> XmlResource"""
|
|
|
|
return _xrc.XmlResource_Set(*args, **kwargs)
|
2001-06-15 17:43:26 -04:00
|
|
|
|
2002-01-28 19:11:38 -05:00
|
|
|
def XRCID(str_id):
|
2003-11-19 01:36:16 -05:00
|
|
|
return XmlResource_GetXRCID(str_id)
|
2001-06-15 17:43:26 -04:00
|
|
|
|
2002-01-28 19:11:38 -05:00
|
|
|
def XRCCTRL(window, str_id, *ignoreargs):
|
|
|
|
return window.FindWindowById(XRCID(str_id))
|
2001-06-15 17:43:26 -04:00
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
#---------------------------------------------------------------------------
|
2001-06-15 17:43:26 -04:00
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
class XmlSubclassFactory(object):
|
2003-11-19 01:36:16 -05:00
|
|
|
def __repr__(self):
|
|
|
|
return "<%s.%s; proxy of C++ wxPyXmlSubclassFactory instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
|
2003-11-12 16:34:20 -05:00
|
|
|
def __init__(self, *args, **kwargs):
|
2003-11-19 01:36:16 -05:00
|
|
|
"""__init__() -> XmlSubclassFactory"""
|
2003-11-12 16:34:20 -05:00
|
|
|
newobj = _xrc.new_XmlSubclassFactory(*args, **kwargs)
|
|
|
|
self.this = newobj.this
|
2001-06-15 17:43:26 -04:00
|
|
|
self.thisown = 1
|
2003-11-12 16:34:20 -05:00
|
|
|
del newobj.thisown
|
|
|
|
self._setCallbackInfo(self, XmlSubclassFactory)
|
2003-11-19 01:36:16 -05:00
|
|
|
|
|
|
|
def _setCallbackInfo(*args, **kwargs):
|
|
|
|
"""_setCallbackInfo(PyObject self, PyObject _class)"""
|
|
|
|
return _xrc.XmlSubclassFactory__setCallbackInfo(*args, **kwargs)
|
|
|
|
|
2003-03-25 01:35:27 -05:00
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
class XmlSubclassFactoryPtr(XmlSubclassFactory):
|
|
|
|
def __init__(self, this):
|
2002-08-23 22:29:34 -04:00
|
|
|
self.this = this
|
2003-11-12 16:34:20 -05:00
|
|
|
if not hasattr(self,"thisown"): self.thisown = 0
|
|
|
|
self.__class__ = XmlSubclassFactory
|
|
|
|
_xrc.XmlSubclassFactory_swigregister(XmlSubclassFactoryPtr)
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
XML_ELEMENT_NODE = _xrc.XML_ELEMENT_NODE
|
|
|
|
XML_ATTRIBUTE_NODE = _xrc.XML_ATTRIBUTE_NODE
|
|
|
|
XML_TEXT_NODE = _xrc.XML_TEXT_NODE
|
|
|
|
XML_CDATA_SECTION_NODE = _xrc.XML_CDATA_SECTION_NODE
|
|
|
|
XML_ENTITY_REF_NODE = _xrc.XML_ENTITY_REF_NODE
|
|
|
|
XML_ENTITY_NODE = _xrc.XML_ENTITY_NODE
|
|
|
|
XML_PI_NODE = _xrc.XML_PI_NODE
|
|
|
|
XML_COMMENT_NODE = _xrc.XML_COMMENT_NODE
|
|
|
|
XML_DOCUMENT_NODE = _xrc.XML_DOCUMENT_NODE
|
|
|
|
XML_DOCUMENT_TYPE_NODE = _xrc.XML_DOCUMENT_TYPE_NODE
|
|
|
|
XML_DOCUMENT_FRAG_NODE = _xrc.XML_DOCUMENT_FRAG_NODE
|
|
|
|
XML_NOTATION_NODE = _xrc.XML_NOTATION_NODE
|
|
|
|
XML_HTML_DOCUMENT_NODE = _xrc.XML_HTML_DOCUMENT_NODE
|
|
|
|
class XmlProperty(object):
|
2003-11-19 01:36:16 -05:00
|
|
|
def __repr__(self):
|
|
|
|
return "<%s.%s; proxy of C++ wxXmlProperty instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
|
2003-11-12 16:34:20 -05:00
|
|
|
def __init__(self, *args, **kwargs):
|
2003-11-26 20:06:51 -05:00
|
|
|
"""
|
2003-12-18 23:47:55 -05:00
|
|
|
__init__(String name=EmptyString, String value=EmptyString,
|
2003-11-26 20:06:51 -05:00
|
|
|
XmlProperty next=None) -> XmlProperty
|
|
|
|
"""
|
2003-11-12 16:34:20 -05:00
|
|
|
newobj = _xrc.new_XmlProperty(*args, **kwargs)
|
|
|
|
self.this = newobj.this
|
2002-08-23 22:29:34 -04:00
|
|
|
self.thisown = 1
|
2003-11-12 16:34:20 -05:00
|
|
|
del newobj.thisown
|
2003-11-19 01:36:16 -05:00
|
|
|
def GetName(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""GetName() -> String"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlProperty_GetName(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetValue(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""GetValue() -> String"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlProperty_GetValue(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetNext(*args, **kwargs):
|
|
|
|
"""GetNext() -> XmlProperty"""
|
|
|
|
return _xrc.XmlProperty_GetNext(*args, **kwargs)
|
|
|
|
|
|
|
|
def SetName(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""SetName(String name)"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlProperty_SetName(*args, **kwargs)
|
|
|
|
|
|
|
|
def SetValue(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""SetValue(String value)"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlProperty_SetValue(*args, **kwargs)
|
|
|
|
|
|
|
|
def SetNext(*args, **kwargs):
|
|
|
|
"""SetNext(XmlProperty next)"""
|
|
|
|
return _xrc.XmlProperty_SetNext(*args, **kwargs)
|
|
|
|
|
2002-08-23 22:29:34 -04:00
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
class XmlPropertyPtr(XmlProperty):
|
|
|
|
def __init__(self, this):
|
2002-08-23 22:29:34 -04:00
|
|
|
self.this = this
|
2003-11-12 16:34:20 -05:00
|
|
|
if not hasattr(self,"thisown"): self.thisown = 0
|
|
|
|
self.__class__ = XmlProperty
|
|
|
|
_xrc.XmlProperty_swigregister(XmlPropertyPtr)
|
|
|
|
|
|
|
|
class XmlNode(object):
|
2003-11-19 01:36:16 -05:00
|
|
|
def __repr__(self):
|
|
|
|
return "<%s.%s; proxy of C++ wxXmlNode instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
|
2003-11-12 16:34:20 -05:00
|
|
|
def __init__(self, *args, **kwargs):
|
2003-11-26 20:06:51 -05:00
|
|
|
"""
|
2003-12-18 23:47:55 -05:00
|
|
|
__init__(XmlNode parent=None, int type=0, String name=EmptyString,
|
|
|
|
String content=EmptyString, XmlProperty props=None,
|
|
|
|
XmlNode next=None) -> XmlNode
|
2003-11-26 20:06:51 -05:00
|
|
|
"""
|
2003-11-12 16:34:20 -05:00
|
|
|
newobj = _xrc.new_XmlNode(*args, **kwargs)
|
|
|
|
self.this = newobj.this
|
2002-08-23 22:29:34 -04:00
|
|
|
self.thisown = 1
|
2003-11-12 16:34:20 -05:00
|
|
|
del newobj.thisown
|
|
|
|
def __del__(self, destroy=_xrc.delete_XmlNode):
|
2003-11-19 01:36:16 -05:00
|
|
|
"""__del__()"""
|
2003-11-12 16:34:20 -05:00
|
|
|
try:
|
|
|
|
if self.thisown: destroy(self)
|
|
|
|
except: pass
|
2003-11-19 01:36:16 -05:00
|
|
|
|
|
|
|
def AddChild(*args, **kwargs):
|
|
|
|
"""AddChild(XmlNode child)"""
|
|
|
|
return _xrc.XmlNode_AddChild(*args, **kwargs)
|
|
|
|
|
|
|
|
def InsertChild(*args, **kwargs):
|
|
|
|
"""InsertChild(XmlNode child, XmlNode before_node)"""
|
|
|
|
return _xrc.XmlNode_InsertChild(*args, **kwargs)
|
|
|
|
|
|
|
|
def RemoveChild(*args, **kwargs):
|
|
|
|
"""RemoveChild(XmlNode child) -> bool"""
|
|
|
|
return _xrc.XmlNode_RemoveChild(*args, **kwargs)
|
|
|
|
|
|
|
|
def AddProperty(*args, **kwargs):
|
|
|
|
"""AddProperty(XmlProperty prop)"""
|
|
|
|
return _xrc.XmlNode_AddProperty(*args, **kwargs)
|
|
|
|
|
|
|
|
def AddPropertyName(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""AddPropertyName(String name, String value)"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlNode_AddPropertyName(*args, **kwargs)
|
|
|
|
|
|
|
|
def DeleteProperty(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""DeleteProperty(String name) -> bool"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlNode_DeleteProperty(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetType(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""GetType() -> int"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlNode_GetType(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetName(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""GetName() -> String"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlNode_GetName(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetContent(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""GetContent() -> String"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlNode_GetContent(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetParent(*args, **kwargs):
|
|
|
|
"""GetParent() -> XmlNode"""
|
|
|
|
return _xrc.XmlNode_GetParent(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetNext(*args, **kwargs):
|
|
|
|
"""GetNext() -> XmlNode"""
|
|
|
|
return _xrc.XmlNode_GetNext(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetChildren(*args, **kwargs):
|
|
|
|
"""GetChildren() -> XmlNode"""
|
|
|
|
return _xrc.XmlNode_GetChildren(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetProperties(*args, **kwargs):
|
|
|
|
"""GetProperties() -> XmlProperty"""
|
|
|
|
return _xrc.XmlNode_GetProperties(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetPropVal(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""GetPropVal(String propName, String defaultVal) -> String"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlNode_GetPropVal(*args, **kwargs)
|
|
|
|
|
|
|
|
def HasProp(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""HasProp(String propName) -> bool"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlNode_HasProp(*args, **kwargs)
|
|
|
|
|
|
|
|
def SetType(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""SetType(int type)"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlNode_SetType(*args, **kwargs)
|
|
|
|
|
|
|
|
def SetName(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""SetName(String name)"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlNode_SetName(*args, **kwargs)
|
|
|
|
|
|
|
|
def SetContent(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""SetContent(String con)"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlNode_SetContent(*args, **kwargs)
|
|
|
|
|
|
|
|
def SetParent(*args, **kwargs):
|
|
|
|
"""SetParent(XmlNode parent)"""
|
|
|
|
return _xrc.XmlNode_SetParent(*args, **kwargs)
|
|
|
|
|
|
|
|
def SetNext(*args, **kwargs):
|
|
|
|
"""SetNext(XmlNode next)"""
|
|
|
|
return _xrc.XmlNode_SetNext(*args, **kwargs)
|
|
|
|
|
|
|
|
def SetChildren(*args, **kwargs):
|
|
|
|
"""SetChildren(XmlNode child)"""
|
|
|
|
return _xrc.XmlNode_SetChildren(*args, **kwargs)
|
|
|
|
|
|
|
|
def SetProperties(*args, **kwargs):
|
|
|
|
"""SetProperties(XmlProperty prop)"""
|
|
|
|
return _xrc.XmlNode_SetProperties(*args, **kwargs)
|
|
|
|
|
2002-08-23 22:29:34 -04:00
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
class XmlNodePtr(XmlNode):
|
|
|
|
def __init__(self, this):
|
|
|
|
self.this = this
|
|
|
|
if not hasattr(self,"thisown"): self.thisown = 0
|
|
|
|
self.__class__ = XmlNode
|
|
|
|
_xrc.XmlNode_swigregister(XmlNodePtr)
|
2002-08-23 22:29:34 -04:00
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
def XmlNodeEasy(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""XmlNodeEasy(int type, String name, String content=EmptyString) -> XmlNode"""
|
2003-11-12 16:34:20 -05:00
|
|
|
val = _xrc.new_XmlNodeEasy(*args, **kwargs)
|
2002-08-23 22:29:34 -04:00
|
|
|
val.thisown = 1
|
|
|
|
return val
|
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
class XmlDocument(core.Object):
|
2003-11-19 01:36:16 -05:00
|
|
|
def __repr__(self):
|
|
|
|
return "<%s.%s; proxy of C++ wxXmlDocument instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
|
2003-11-12 16:34:20 -05:00
|
|
|
def __init__(self, *args, **kwargs):
|
2003-12-19 20:01:49 -05:00
|
|
|
"""__init__(String filename, String encoding=UTF8String) -> XmlDocument"""
|
2003-11-12 16:34:20 -05:00
|
|
|
newobj = _xrc.new_XmlDocument(*args, **kwargs)
|
|
|
|
self.this = newobj.this
|
2002-08-23 22:29:34 -04:00
|
|
|
self.thisown = 1
|
2003-11-12 16:34:20 -05:00
|
|
|
del newobj.thisown
|
|
|
|
def __del__(self, destroy=_xrc.delete_XmlDocument):
|
2003-11-19 01:36:16 -05:00
|
|
|
"""__del__()"""
|
2003-11-12 16:34:20 -05:00
|
|
|
try:
|
|
|
|
if self.thisown: destroy(self)
|
|
|
|
except: pass
|
2003-11-19 01:36:16 -05:00
|
|
|
|
|
|
|
def Load(*args, **kwargs):
|
2003-12-19 20:01:49 -05:00
|
|
|
"""Load(String filename, String encoding=UTF8String) -> bool"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlDocument_Load(*args, **kwargs)
|
|
|
|
|
|
|
|
def LoadFromStream(*args, **kwargs):
|
2003-12-19 20:01:49 -05:00
|
|
|
"""LoadFromStream(InputStream stream, String encoding=UTF8String) -> bool"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlDocument_LoadFromStream(*args, **kwargs)
|
|
|
|
|
|
|
|
def Save(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""Save(String filename) -> bool"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlDocument_Save(*args, **kwargs)
|
|
|
|
|
|
|
|
def SaveToStream(*args, **kwargs):
|
|
|
|
"""SaveToStream(OutputStream stream) -> bool"""
|
|
|
|
return _xrc.XmlDocument_SaveToStream(*args, **kwargs)
|
|
|
|
|
|
|
|
def IsOk(*args, **kwargs):
|
|
|
|
"""IsOk() -> bool"""
|
|
|
|
return _xrc.XmlDocument_IsOk(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetRoot(*args, **kwargs):
|
|
|
|
"""GetRoot() -> XmlNode"""
|
|
|
|
return _xrc.XmlDocument_GetRoot(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetVersion(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""GetVersion() -> String"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlDocument_GetVersion(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetFileEncoding(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""GetFileEncoding() -> String"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlDocument_GetFileEncoding(*args, **kwargs)
|
|
|
|
|
|
|
|
def SetRoot(*args, **kwargs):
|
|
|
|
"""SetRoot(XmlNode node)"""
|
|
|
|
return _xrc.XmlDocument_SetRoot(*args, **kwargs)
|
|
|
|
|
|
|
|
def SetVersion(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""SetVersion(String version)"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlDocument_SetVersion(*args, **kwargs)
|
|
|
|
|
|
|
|
def SetFileEncoding(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""SetFileEncoding(String encoding)"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlDocument_SetFileEncoding(*args, **kwargs)
|
|
|
|
|
2002-08-23 22:29:34 -04:00
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
class XmlDocumentPtr(XmlDocument):
|
|
|
|
def __init__(self, this):
|
|
|
|
self.this = this
|
|
|
|
if not hasattr(self,"thisown"): self.thisown = 0
|
|
|
|
self.__class__ = XmlDocument
|
|
|
|
_xrc.XmlDocument_swigregister(XmlDocumentPtr)
|
2002-08-23 22:29:34 -04:00
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
def XmlDocumentFromStream(*args, **kwargs):
|
2003-12-19 20:01:49 -05:00
|
|
|
"""XmlDocumentFromStream(InputStream stream, String encoding=UTF8String) -> XmlDocument"""
|
2003-11-12 16:34:20 -05:00
|
|
|
val = _xrc.new_XmlDocumentFromStream(*args, **kwargs)
|
2002-08-23 22:29:34 -04:00
|
|
|
val.thisown = 1
|
|
|
|
return val
|
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
def EmptyXmlDocument(*args, **kwargs):
|
2003-11-19 01:36:16 -05:00
|
|
|
"""EmptyXmlDocument() -> XmlDocument"""
|
2003-11-12 16:34:20 -05:00
|
|
|
val = _xrc.new_EmptyXmlDocument(*args, **kwargs)
|
2002-08-23 22:29:34 -04:00
|
|
|
val.thisown = 1
|
|
|
|
return val
|
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
#---------------------------------------------------------------------------
|
2002-08-23 22:29:34 -04:00
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
class XmlResourceHandler(core.Object):
|
2003-11-19 01:36:16 -05:00
|
|
|
def __repr__(self):
|
|
|
|
return "<%s.%s; proxy of C++ wxPyXmlResourceHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
|
2003-11-12 16:34:20 -05:00
|
|
|
def __init__(self, *args, **kwargs):
|
2003-11-19 01:36:16 -05:00
|
|
|
"""__init__() -> XmlResourceHandler"""
|
2003-11-12 16:34:20 -05:00
|
|
|
newobj = _xrc.new_XmlResourceHandler(*args, **kwargs)
|
|
|
|
self.this = newobj.this
|
2002-08-23 22:29:34 -04:00
|
|
|
self.thisown = 1
|
2003-11-12 16:34:20 -05:00
|
|
|
del newobj.thisown
|
|
|
|
self._setCallbackInfo(self, XmlResourceHandler)
|
2003-11-19 01:36:16 -05:00
|
|
|
|
|
|
|
def _setCallbackInfo(*args, **kwargs):
|
|
|
|
"""_setCallbackInfo(PyObject self, PyObject _class)"""
|
|
|
|
return _xrc.XmlResourceHandler__setCallbackInfo(*args, **kwargs)
|
|
|
|
|
|
|
|
def CreateResource(*args, **kwargs):
|
|
|
|
"""CreateResource(XmlNode node, Object parent, Object instance) -> Object"""
|
|
|
|
return _xrc.XmlResourceHandler_CreateResource(*args, **kwargs)
|
|
|
|
|
|
|
|
def SetParentResource(*args, **kwargs):
|
|
|
|
"""SetParentResource(XmlResource res)"""
|
|
|
|
return _xrc.XmlResourceHandler_SetParentResource(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetResource(*args, **kwargs):
|
|
|
|
"""GetResource() -> XmlResource"""
|
|
|
|
return _xrc.XmlResourceHandler_GetResource(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetNode(*args, **kwargs):
|
|
|
|
"""GetNode() -> XmlNode"""
|
|
|
|
return _xrc.XmlResourceHandler_GetNode(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetClass(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""GetClass() -> String"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResourceHandler_GetClass(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetParent(*args, **kwargs):
|
|
|
|
"""GetParent() -> Object"""
|
|
|
|
return _xrc.XmlResourceHandler_GetParent(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetInstance(*args, **kwargs):
|
|
|
|
"""GetInstance() -> Object"""
|
|
|
|
return _xrc.XmlResourceHandler_GetInstance(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetParentAsWindow(*args, **kwargs):
|
|
|
|
"""GetParentAsWindow() -> Window"""
|
|
|
|
return _xrc.XmlResourceHandler_GetParentAsWindow(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetInstanceAsWindow(*args, **kwargs):
|
|
|
|
"""GetInstanceAsWindow() -> Window"""
|
|
|
|
return _xrc.XmlResourceHandler_GetInstanceAsWindow(*args, **kwargs)
|
|
|
|
|
|
|
|
def IsOfClass(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""IsOfClass(XmlNode node, String classname) -> bool"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResourceHandler_IsOfClass(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetNodeContent(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""GetNodeContent(XmlNode node) -> String"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResourceHandler_GetNodeContent(*args, **kwargs)
|
|
|
|
|
|
|
|
def HasParam(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""HasParam(String param) -> bool"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResourceHandler_HasParam(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetParamNode(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""GetParamNode(String param) -> XmlNode"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResourceHandler_GetParamNode(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetParamValue(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""GetParamValue(String param) -> String"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResourceHandler_GetParamValue(*args, **kwargs)
|
|
|
|
|
|
|
|
def AddStyle(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""AddStyle(String name, int value)"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResourceHandler_AddStyle(*args, **kwargs)
|
|
|
|
|
|
|
|
def AddWindowStyles(*args, **kwargs):
|
|
|
|
"""AddWindowStyles()"""
|
|
|
|
return _xrc.XmlResourceHandler_AddWindowStyles(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetStyle(*args, **kwargs):
|
2003-12-19 20:01:49 -05:00
|
|
|
"""GetStyle(String param=StyleString, int defaults=0) -> int"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResourceHandler_GetStyle(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetText(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""GetText(String param, bool translate=True) -> String"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResourceHandler_GetText(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetID(*args, **kwargs):
|
|
|
|
"""GetID() -> int"""
|
|
|
|
return _xrc.XmlResourceHandler_GetID(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetName(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""GetName() -> String"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResourceHandler_GetName(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetBool(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""GetBool(String param, bool defaultv=False) -> bool"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResourceHandler_GetBool(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetLong(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""GetLong(String param, long defaultv=0) -> long"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResourceHandler_GetLong(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetColour(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""GetColour(String param) -> Colour"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResourceHandler_GetColour(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetSize(*args, **kwargs):
|
2003-12-19 20:01:49 -05:00
|
|
|
"""GetSize(String param=SizeString) -> Size"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResourceHandler_GetSize(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetPosition(*args, **kwargs):
|
2003-12-19 20:01:49 -05:00
|
|
|
"""GetPosition(String param=PosString) -> Point"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResourceHandler_GetPosition(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetDimension(*args, **kwargs):
|
2003-12-18 23:47:55 -05:00
|
|
|
"""GetDimension(String param, int defaultv=0) -> int"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResourceHandler_GetDimension(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetBitmap(*args, **kwargs):
|
2003-11-26 20:06:51 -05:00
|
|
|
"""
|
2003-12-19 20:01:49 -05:00
|
|
|
GetBitmap(String param=BitmapString, wxArtClient defaultArtClient=wxART_OTHER,
|
2003-12-18 23:47:55 -05:00
|
|
|
Size size=DefaultSize) -> Bitmap
|
2003-11-26 20:06:51 -05:00
|
|
|
"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResourceHandler_GetBitmap(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetIcon(*args, **kwargs):
|
2003-11-26 20:06:51 -05:00
|
|
|
"""
|
2003-12-19 20:01:49 -05:00
|
|
|
GetIcon(String param=IconString, wxArtClient defaultArtClient=wxART_OTHER,
|
|
|
|
Size size=DefaultSize) -> Icon
|
2003-11-26 20:06:51 -05:00
|
|
|
"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResourceHandler_GetIcon(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetFont(*args, **kwargs):
|
2003-12-19 20:01:49 -05:00
|
|
|
"""GetFont(String param=FontString) -> Font"""
|
2003-11-19 01:36:16 -05:00
|
|
|
return _xrc.XmlResourceHandler_GetFont(*args, **kwargs)
|
|
|
|
|
|
|
|
def SetupWindow(*args, **kwargs):
|
|
|
|
"""SetupWindow(Window wnd)"""
|
|
|
|
return _xrc.XmlResourceHandler_SetupWindow(*args, **kwargs)
|
|
|
|
|
|
|
|
def CreateChildren(*args, **kwargs):
|
|
|
|
"""CreateChildren(Object parent, bool this_hnd_only=False)"""
|
|
|
|
return _xrc.XmlResourceHandler_CreateChildren(*args, **kwargs)
|
|
|
|
|
|
|
|
def CreateChildrenPrivately(*args, **kwargs):
|
|
|
|
"""CreateChildrenPrivately(Object parent, XmlNode rootnode=None)"""
|
|
|
|
return _xrc.XmlResourceHandler_CreateChildrenPrivately(*args, **kwargs)
|
|
|
|
|
|
|
|
def CreateResFromNode(*args, **kwargs):
|
|
|
|
"""CreateResFromNode(XmlNode node, Object parent, Object instance=None) -> Object"""
|
|
|
|
return _xrc.XmlResourceHandler_CreateResFromNode(*args, **kwargs)
|
|
|
|
|
|
|
|
def GetCurFileSystem(*args, **kwargs):
|
|
|
|
"""GetCurFileSystem() -> FileSystem"""
|
|
|
|
return _xrc.XmlResourceHandler_GetCurFileSystem(*args, **kwargs)
|
|
|
|
|
2002-01-21 22:22:03 -05:00
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
class XmlResourceHandlerPtr(XmlResourceHandler):
|
|
|
|
def __init__(self, this):
|
|
|
|
self.this = this
|
|
|
|
if not hasattr(self,"thisown"): self.thisown = 0
|
|
|
|
self.__class__ = XmlResourceHandler
|
|
|
|
_xrc.XmlResourceHandler_swigregister(XmlResourceHandlerPtr)
|
2002-01-21 22:22:03 -05:00
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
#----------------------------------------------------------------------------
|
2002-01-21 22:22:03 -05:00
|
|
|
# The global was removed in favor of static accessor functions. This is for
|
|
|
|
# backwards compatibility:
|
2002-08-23 22:29:34 -04:00
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
TheXmlResource = XmlResource_Get()
|
2003-03-25 01:35:27 -05:00
|
|
|
|
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
#----------------------------------------------------------------------------
|
2003-03-25 01:35:27 -05:00
|
|
|
# Create a factory for handling the subclass property of the object tag.
|
|
|
|
|
|
|
|
|
|
|
|
def _my_import(name):
|
|
|
|
mod = __import__(name)
|
|
|
|
components = name.split('.')
|
|
|
|
for comp in components[1:]:
|
|
|
|
mod = getattr(mod, comp)
|
|
|
|
return mod
|
|
|
|
|
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
class XmlSubclassFactory_Python(XmlSubclassFactory):
|
2003-03-25 01:35:27 -05:00
|
|
|
def __init__(self):
|
2003-11-12 16:34:20 -05:00
|
|
|
XmlSubclassFactory.__init__(self)
|
2003-03-25 01:35:27 -05:00
|
|
|
|
|
|
|
def Create(self, className):
|
|
|
|
assert className.find('.') != -1, "Module name must be specified!"
|
|
|
|
mname = className[:className.rfind('.')]
|
|
|
|
cname = className[className.rfind('.')+1:]
|
|
|
|
module = _my_import(mname)
|
|
|
|
klass = getattr(module, cname)
|
|
|
|
inst = klass()
|
|
|
|
return inst
|
|
|
|
|
|
|
|
|
2003-11-12 16:34:20 -05:00
|
|
|
XmlResource_AddSubclassFactory(XmlSubclassFactory_Python())
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
2003-03-25 01:35:27 -05:00
|
|
|
|