wx.richtext.RichTextXMLHandler¶
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.
Handler flags¶
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.
Class Hierarchy¶
Methods Summary¶
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 |
Class API¶
- class wx.richtext.RichTextXMLHandler(RichTextFileHandler)¶
Possible constructors:
RichTextXMLHandler(name="XML", ext="xml", type=RICHTEXT_TYPE_XML) -> None
A handler for loading and saving content in an
XML
format specific to RichTextBuffer.
Methods¶
- __init__(self, name='XML', ext='xml', type=RICHTEXT_TYPE_XML)¶
Constructor.
- Parameters:
name (string)
ext (string)
type (int)
- Return type:
None
- CanLoad(self)¶
Returns
True
.- Return type:
bool
- CanSave(self)¶
Returns
True
.- Return type:
bool
- static ClearNodeToClassMap()¶
Cleans up the mapping between node name and C++ class.
- Return type:
None
- ExportXML(self, stream, obj, level)¶
Recursively exports an object to the stream.
- Parameters:
stream (wx.OutputStream)
level (int)
- Return type:
bool
- ImportXML(self, buffer, obj, node)¶
Recursively imports an object.
- Parameters:
buffer (wx.richtext.RichTextBuffer)
node (wx.xml.XmlNode)
- Return type:
bool
- static RegisterNodeName(nodeName, className)¶
Call with
XML
node name, C++ class name so thatRTC
can read in the node.If you add a custom object, call this.
- Parameters:
nodeName (string)
className (string)
- Return type:
None