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.
Constructor. |
|
Returns |
|
Returns |
|
Cleans up the mapping between node name and C++ class. |
|
Recursively exports an object to the stream. |
|
Recursively imports an object. |
|
Call with |
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.
name (string) –
ext (string) –
type (int) –
CanLoad
(self)¶Returns True
.
bool
CanSave
(self)¶Returns True
.
bool
ClearNodeToClassMap
()¶Cleans up the mapping between node name and C++ class.
ExportXML
(self, stream, obj, level)¶Recursively exports an object to the stream.
stream (wx.OutputStream) –
obj (wx.richtext.RichTextObject) –
level (int) –
bool
ImportXML
(self, buffer, obj, node)¶Recursively imports an object.
buffer (wx.richtext.RichTextBuffer) –
obj (wx.richtext.RichTextObject) –
node (wx.xml.XmlNode) –
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.
nodeName (string) –
className (string) –