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(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(RichTextAttr attr, 
                    Boolean isPara = false)

Creates XML code for a given character or paragraph style.

RichTextXMLHandler#do_load_file

Boolean do_load_file(RichTextBuffer buffer, 
                     InputStream stream)

Loads buffer context from the given stream.

RichTextXMLHandler#do_save_file

Boolean do_save_file(RichTextBuffer buffer, 
                     OutputStream stream)

Saves buffer context to the given stream.

RichTextXMLHandler#export_xml

Boolean export_xml(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(XmlNode node)

Helper function: gets node context.

RichTextXMLHandler#get_param_node

XmlNode get_param_node(XmlNode node, 
                         String param)

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

RichTextXMLHandler#get_param_value

String get_param_value(XmlNode node,  String param)

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

RichTextXMLHandler#get_style

Boolean get_style(TextAttrEx attr, 
                  XmlNode node, 
                  Boolean isPara = false)

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

RichTextXMLHandler#get_text

String get_text(XmlNode node,  String param = '', 
                Boolean translate = false)

Helper function: gets text from the node.

RichTextXMLHandler#has_param

Boolean has_param(XmlNode node,  String param)

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

RichTextXMLHandler#import_xml

Boolean import_xml(RichTextBuffer buffer, 
                   XmlNode node)

Recursively imports an object.

[This page automatically generated from the Textile source at Wed Sep 09 02:21:22 +0100 2009]