wxRuby Documentation Home

Wx::RichTextXMLHandler

A handler for loading and saving content in an XML format specific
to 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:

RICHTEXT_HANDLER_INCLUDE_STYLESHEET Include the style sheet in loading and saving operations.

Derived from

RichTextFileHandler

Data structures

Methods

RichTextXMLHandler.new

RichTextXMLHandler.new(%(arg-type)String% name = T(“XML”), String ext = T(“xml”), Integer type = RICHTEXT_TYPE_XML)

Constructor.

RichTextXMLHandler#can_load

Boolean can_load()

Returns .

RichTextXMLHandler#can_save

Boolean can_save()

Returns .

RichTextXMLHandler#create_style

String create_style(%(arg-type)RichTextAttr% attr, Boolean isPara = false)

Creates XML code for a given character or paragraph style.

RichTextXMLHandler#do_load_file

Boolean do_load_file(%(arg-type)RichTextBuffer% buffer, InputStream stream)

Loads buffer context from the given stream.

RichTextXMLHandler#do_save_file

Boolean do_save_file(%(arg-type)RichTextBuffer% buffer, OutputStream stream)

Saves buffer context to the given stream.

RichTextXMLHandler#export_xml

Boolean export_xml(%(arg-type)OutputStream% stream, MBConv convMem, MBConv convFile, RichTextObject obj, Integer level)

Recursively exports an object to the stream.

RichTextXMLHandler#get_node_content

String get_node_content(%(arg-type)XmlNode% node)

Helper function: gets node context.

RichTextXMLHandler#get_param_node

XmlNode get_param_node(%(arg-type)XmlNode% node, String param)

Helper function: gets a named parameter from the XML node.

RichTextXMLHandler#get_param_value

String get_param_value(%(arg-type)XmlNode% node, String param)

Helper function: gets a named parameter from the XML node.

RichTextXMLHandler#get_style

Boolean get_style(%(arg-type)TextAttrEx% attr, XmlNode node, Boolean isPara = false)

Helper function: gets style parameters from the given XML node.

RichTextXMLHandler#get_text

String get_text(%(arg-type)XmlNode% node, String param = ’’, Boolean translate = false)

Helper function: gets text from the node.

RichTextXMLHandler#has_param

Boolean has_param(%(arg-type)XmlNode% node, String param)

Helper function: returns if the node has the given parameter.

RichTextXMLHandler#import_xml

Boolean import_xml(%(arg-type)RichTextBuffer% buffer, XmlNode node)

Recursively imports an object.

[This page automatically generated from the Textile source at 2023-06-03 08:07:36 +0000]