X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0004982c831f56c65c390fb617711ff52595c2f3..691a62116306876d6a6efd8e0fd059a5389e1db9:/interface/wx/richtext/richtextxml.h diff --git a/interface/wx/richtext/richtextxml.h b/interface/wx/richtext/richtextxml.h index 309a5e0142..8f4b262f7d 100644 --- a/interface/wx/richtext/richtextxml.h +++ b/interface/wx/richtext/richtextxml.h @@ -3,7 +3,7 @@ // Purpose: interface of wxRichTextXMLHandler // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** @@ -35,8 +35,8 @@ public: /** Constructor. */ - wxRichTextXMLHandler(const wxString& name = wxT("XML"), - const wxString& ext = wxT("xml"), + wxRichTextXMLHandler(const wxString& name = "XML", + const wxString& ext = "xml", int type = wxRICHTEXT_TYPE_XML); /** @@ -49,29 +49,11 @@ public: */ virtual bool CanSave() const; - /** - Creates XML code for a given character or paragraph style. - */ - wxString CreateStyle(const wxTextAttr& attr, bool isPara = false); - - /** - Loads buffer context from the given stream. - */ - virtual bool DoLoadFile(wxRichTextBuffer* buffer, wxInputStream& stream); - - /** - Saves buffer context to the given stream. - */ - virtual bool DoSaveFile(wxRichTextBuffer* buffer, wxOutputStream& stream); - /** Recursively exports an object to the stream. */ - bool ExportXML(wxOutputStream& stream, wxMBConv* convMem, - wxMBConv* convFile, - wxRichTextObject& obj, - int level); - + bool ExportXML(wxOutputStream& stream, wxRichTextObject& obj, int level); + /** Helper function: gets node context. */ @@ -87,12 +69,6 @@ public: */ wxString GetParamValue(wxXmlNode* node, const wxString& param); - /** - Helper function: gets style parameters from the given XML node. - */ - bool GetStyle(wxTextAttr& attr, wxXmlNode* node, - bool isPara = false); - /** Helper function: gets text from the node. */ @@ -108,6 +84,18 @@ public: /** Recursively imports an object. */ - bool ImportXML(wxRichTextBuffer* buffer, wxXmlNode* node); + bool ImportXML(wxRichTextBuffer* buffer, wxRichTextObject* obj, wxXmlNode* node); + +protected: + + /** + Loads buffer context from the given stream. + */ + virtual bool DoLoadFile(wxRichTextBuffer* buffer, wxInputStream& stream); + + /** + Saves buffer context to the given stream. + */ + virtual bool DoSaveFile(wxRichTextBuffer* buffer, wxOutputStream& stream); };