1 \section{\class{wxRichTextXMLHandler
}}\label{wxrichtextxmlhandler
}
3 A handler for loading and saving content in an XML format specific
4 to wxRichTextBuffer. You can either add the handler to the buffer
5 and load and save through the buffer or control API, or you can
6 create an instance of the handler on the stack and call its
9 \wxheading{Handler flags
}
11 The following flags can be used with this handler, via
12 the handler's SetFlags function or the buffer or control's
13 SetHandlerFlags function:
16 \begin{twocollist
}\itemsep=
0pt
17 \twocolitem{\windowstyle{wxRICHTEXT
\_HANDLER\_INCLUDE\_STYLESHEET}}{Include the style sheet in loading and saving operations.
}
20 \wxheading{Derived from
}
22 \helpref{wxRichTextFileHandler
}{wxrichtextfilehandler
}\\
23 \helpref{wxObject
}{wxobject
}
25 \wxheading{Include files
}
27 <wx/richtext/richtextxml.h>
31 \helpref{wxRichtext
}{librarieslist
}
33 \wxheading{Data structures
}
35 \latexignore{\rtfignore{\wxheading{Members
}}}
37 \membersection{wxRichTextXMLHandler::wxRichTextXMLHandler
}\label{wxrichtextxmlhandlerwxrichtextxmlhandler
}
39 \func{}{wxRichTextXMLHandler
}{\param{const wxString\&
}{name = wxT("XML")
},
\param{const wxString\&
}{ext = wxT("xml")
},
\param{int
}{type = wxRICHTEXT
\_TYPE\_XML}}
43 \membersection{wxRichTextXMLHandler::CanLoad
}\label{wxrichtextxmlhandlercanload
}
45 \constfunc{bool
}{CanLoad
}{\void}
49 \membersection{wxRichTextXMLHandler::CanSave
}\label{wxrichtextxmlhandlercansave
}
51 \constfunc{bool
}{CanSave
}{\void}
55 \membersection{wxRichTextXMLHandler::CreateStyle
}\label{wxrichtextxmlhandlercreatestyle
}
57 \func{wxString
}{CreateStyle
}{\param{const wxTextAttr\&
}{attr
},
\param{bool
}{isPara = false
}}
59 Creates XML code for a given character or paragraph style.
61 \membersection{wxRichTextXMLHandler::DoLoadFile
}\label{wxrichtextxmlhandlerdoloadfile
}
63 \func{bool
}{DoLoadFile
}{\param{wxRichTextBuffer*
}{buffer
},
\param{wxInputStream\&
}{stream
}}
65 Loads buffer context from the given stream.
67 \membersection{wxRichTextXMLHandler::DoSaveFile
}\label{wxrichtextxmlhandlerdosavefile
}
69 \func{bool
}{DoSaveFile
}{\param{wxRichTextBuffer*
}{buffer
},
\param{wxOutputStream\&
}{stream
}}
71 Saves buffer context to the given stream.
73 \membersection{wxRichTextXMLHandler::ExportXML
}\label{wxrichtextxmlhandlerexportxml
}
75 \func{bool
}{ExportXML
}{\param{wxOutputStream\&
}{stream
},
\param{wxMBConv*
}{convMem
},
\param{wxMBConv*
}{convFile
},
\param{wxRichTextObject\&
}{obj
},
\param{int
}{level
}}
77 Recursively exports an object to the stream.
79 \membersection{wxRichTextXMLHandler::GetNodeContent
}\label{wxrichtextxmlhandlergetnodecontent
}
81 \func{wxString
}{GetNodeContent
}{\param{wxXmlNode*
}{node
}}
83 Helper function: gets node context.
85 \membersection{wxRichTextXMLHandler::GetParamNode
}\label{wxrichtextxmlhandlergetparamnode
}
87 \func{wxXmlNode*
}{GetParamNode
}{\param{wxXmlNode*
}{node
},
\param{const wxString\&
}{param
}}
89 Helper function: gets a named parameter from the XML node.
91 \membersection{wxRichTextXMLHandler::GetParamValue
}\label{wxrichtextxmlhandlergetparamvalue
}
93 \func{wxString
}{GetParamValue
}{\param{wxXmlNode*
}{node
},
\param{const wxString\&
}{param
}}
95 Helper function: gets a named parameter from the XML node.
97 \membersection{wxRichTextXMLHandler::GetStyle
}\label{wxrichtextxmlhandlergetstyle
}
99 \func{bool
}{GetStyle
}{\param{wxTextAttr\&
}{attr
},
\param{wxXmlNode*
}{node
},
\param{bool
}{isPara = false
}}
101 Helper function: gets style parameters from the given XML node.
103 \membersection{wxRichTextXMLHandler::GetText
}\label{wxrichtextxmlhandlergettext
}
105 \func{wxString
}{GetText
}{\param{wxXmlNode*
}{node
},
\param{const wxString\&
}{param = wxEmptyString
},
\param{bool
}{translate = false
}}
107 Helper function: gets text from the node.
109 \membersection{wxRichTextXMLHandler::HasParam
}\label{wxrichtextxmlhandlerhasparam
}
111 \func{bool
}{HasParam
}{\param{wxXmlNode*
}{node
},
\param{const wxString\&
}{param
}}
113 Helper function: returns
\true if the node has the given parameter.
115 \membersection{wxRichTextXMLHandler::ImportXML
}\label{wxrichtextxmlhandlerimportxml
}
117 \func{bool
}{ImportXML
}{\param{wxRichTextBuffer*
}{buffer
},
\param{wxXmlNode*
}{node
}}
119 Recursively imports an object.