A handler for loading and saving content in an XML
format specific to wx.richtext.RichTextBuffer.
You can either add the handler to the buffer and load and save through the buffer or control API, or you can create an instance of the handler on the stack and call its functions directly.
The following flags can be used with this handler, via the handler’s SetFlags
function or the buffer or control’s SetHandlerFlags() function:
wx.richtext.RICHTEXT_HANDLER_INCLUDE_STYLESHEET
Include the style sheet in loading and saving operations.__init__ |
Constructor. |
CanLoad |
Returns True . |
CanSave |
Returns True . |
ClearNodeToClassMap |
Cleans up the mapping between node name and C++ class. |
ExportXML |
Recursively exports an object to the stream. |
ImportXML |
Recursively imports an object. |
RegisterNodeName |
Call with XML node name, C++ class name so that RTC can read in the node. |
wx.richtext.
RichTextXMLHandler
(RichTextFileHandler)¶Possible constructors:
RichTextXMLHandler(name="XML", ext="xml", type=RICHTEXT_TYPE_XML)
A handler for loading and saving content in an XML
format specific to
RichTextBuffer.
__init__
(self, name="XML", ext="xml", type=RICHTEXT_TYPE_XML)¶Constructor.
Parameters: |
|
---|
CanLoad
(self)¶Returns True
.
Return type: | bool |
---|
CanSave
(self)¶Returns True
.
Return type: | bool |
---|
ClearNodeToClassMap
()¶Cleans up the mapping between node name and C++ class.
ExportXML
(self, stream, obj, level)¶Recursively exports an object to the stream.
Parameters: |
|
---|---|
Return type: | bool |
ImportXML
(self, buffer, obj, node)¶Recursively imports an object.
Parameters: |
|
---|---|
Return type: | bool |
RegisterNodeName
(nodeName, className)¶Call with XML
node name, C++ class name so that RTC
can read in the node.
If you add a custom object, call this.
Parameters: |
|
---|