#include <wx/richtext/richtextxml.h>

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.
Public Member Functions | |
| wxRichTextXMLHandler (const wxString &name=wxT("XML"), const wxString &ext=wxT("xml"), int type=wxRICHTEXT_TYPE_XML) | |
| virtual bool | CanLoad () const |
| virtual bool | CanSave () const |
| wxString | CreateStyle (const wxTextAttr &attr, bool isPara=false) |
| bool | ExportXML (wxOutputStream &stream, wxMBConv *convMem, wxMBConv *convFile, wxRichTextObject &obj, int level) |
| wxString | GetNodeContent (wxXmlNode *node) |
| wxXmlNode * | GetParamNode (wxXmlNode *node, const wxString ¶m) |
| wxString | GetParamValue (wxXmlNode *node, const wxString ¶m) |
| bool | GetStyle (wxTextAttr &attr, wxXmlNode *node, bool isPara=false) |
| wxString | GetText (wxXmlNode *node, const wxString ¶m=wxEmptyString, bool translate=false) |
| bool | HasParam (wxXmlNode *node, const wxString ¶m) |
| bool | ImportXML (wxRichTextBuffer *buffer, wxXmlNode *node) |
Protected Member Functions | |
| virtual bool | DoLoadFile (wxRichTextBuffer *buffer, wxInputStream &stream) |
| virtual bool | DoSaveFile (wxRichTextBuffer *buffer, wxOutputStream &stream) |
| wxRichTextXMLHandler::wxRichTextXMLHandler | ( | const wxString & | name = wxT("XML"), |
|
| const wxString & | ext = wxT("xml"), |
|||
| int | type = wxRICHTEXT_TYPE_XML | |||
| ) |
Constructor.
| virtual bool wxRichTextXMLHandler::CanLoad | ( | ) | const [virtual] |
Returns true.
Reimplemented from wxRichTextFileHandler.
| virtual bool wxRichTextXMLHandler::CanSave | ( | ) | const [virtual] |
Returns true.
Reimplemented from wxRichTextFileHandler.
| wxString wxRichTextXMLHandler::CreateStyle | ( | const wxTextAttr & | attr, | |
| bool | isPara = false | |||
| ) |
Creates XML code for a given character or paragraph style.
| bool wxRichTextXMLHandler::ExportXML | ( | wxOutputStream & | stream, | |
| wxMBConv * | convMem, | |||
| wxMBConv * | convFile, | |||
| wxRichTextObject & | obj, | |||
| int | level | |||
| ) |
Recursively exports an object to the stream.
Helper function: gets node context.
Helper function: gets a named parameter from the XML node.
Helper function: gets a named parameter from the XML node.
| bool wxRichTextXMLHandler::GetStyle | ( | wxTextAttr & | attr, | |
| wxXmlNode * | node, | |||
| bool | isPara = false | |||
| ) |
Helper function: gets style parameters from the given XML node.
| wxString wxRichTextXMLHandler::GetText | ( | wxXmlNode * | node, | |
| const wxString & | param = wxEmptyString, |
|||
| bool | translate = false | |||
| ) |
Helper function: gets text from the node.
Helper function: returns true if the node has the given parameter.
| bool wxRichTextXMLHandler::ImportXML | ( | wxRichTextBuffer * | buffer, | |
| wxXmlNode * | node | |||
| ) |
Recursively imports an object.
| virtual bool wxRichTextXMLHandler::DoLoadFile | ( | wxRichTextBuffer * | buffer, | |
| wxInputStream & | stream | |||
| ) | [protected, virtual] |
Loads buffer context from the given stream.
Implements wxRichTextFileHandler.
| virtual bool wxRichTextXMLHandler::DoSaveFile | ( | wxRichTextBuffer * | buffer, | |
| wxOutputStream & | stream | |||
| ) | [protected, virtual] |
Saves buffer context to the given stream.
Implements wxRichTextFileHandler.
|
[ top ] |