phoenix_title 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.

phoenix_title 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 Class Hierarchy

Inheritance diagram for class RichTextXMLHandler:

method_summary Methods Summary

__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.


api Class API

class 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.


Methods

__init__(self, name="XML", ext="xml", type=RICHTEXT_TYPE_XML)

Constructor.

Parameters:
  • name (string) –

  • ext (string) –

  • type (int) –



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.



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



static 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:
  • nodeName (string) –

  • className (string) –