]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/richtextxmlhandler.tex
Documented new menu label functions
[wxWidgets.git] / docs / latex / wx / richtextxmlhandler.tex
1 \section{\class{wxRichTextXMLHandler}}\label{wxrichtextxmlhandler}
2
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
7 functions directly.
8
9 \wxheading{Handler flags}
10
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:
14
15 \twocolwidtha{7cm}
16 \begin{twocollist}\itemsep=0pt
17 \twocolitem{\windowstyle{wxRICHTEXT\_HANDLER\_INCLUDE\_STYLESHEET}}{Include the style sheet in loading and saving operations.}
18 \end{twocollist}
19
20 \wxheading{Derived from}
21
22 \helpref{wxRichTextFileHandler}{wxrichtextfilehandler}
23
24 \wxheading{Include files}
25
26 <wx/richtext/richtextxml.h>
27
28 \wxheading{Library}
29
30 \helpref{wxRichtext}{librarieslist}
31
32 \wxheading{Data structures}
33
34 \latexignore{\rtfignore{\wxheading{Members}}}
35
36 \membersection{wxRichTextXMLHandler::wxRichTextXMLHandler}\label{wxrichtextxmlhandlerwxrichtextxmlhandler}
37
38 \func{}{wxRichTextXMLHandler}{\param{const wxString\& }{name = wxT("XML")}, \param{const wxString\& }{ext = wxT("xml")}, \param{int }{type = wxRICHTEXT\_TYPE\_XML}}
39
40 Constructor.
41
42 \membersection{wxRichTextXMLHandler::CanLoad}\label{wxrichtextxmlhandlercanload}
43
44 \constfunc{bool}{CanLoad}{\void}
45
46 Returns \true.
47
48 \membersection{wxRichTextXMLHandler::CanSave}\label{wxrichtextxmlhandlercansave}
49
50 \constfunc{bool}{CanSave}{\void}
51
52 Returns \true.
53
54 \membersection{wxRichTextXMLHandler::CreateStyle}\label{wxrichtextxmlhandlercreatestyle}
55
56 \func{wxString}{CreateStyle}{\param{const wxTextAttrEx\& }{attr}, \param{bool }{isPara = false}}
57
58 Creates XML code for a given character or paragraph style.
59
60 \membersection{wxRichTextXMLHandler::DoLoadFile}\label{wxrichtextxmlhandlerdoloadfile}
61
62 \func{bool}{DoLoadFile}{\param{wxRichTextBuffer* }{buffer}, \param{wxInputStream\& }{stream}}
63
64 Loads buffer context from the given stream.
65
66 \membersection{wxRichTextXMLHandler::DoSaveFile}\label{wxrichtextxmlhandlerdosavefile}
67
68 \func{bool}{DoSaveFile}{\param{wxRichTextBuffer* }{buffer}, \param{wxOutputStream\& }{stream}}
69
70 Saves buffer context to the given stream.
71
72 \membersection{wxRichTextXMLHandler::ExportXML}\label{wxrichtextxmlhandlerexportxml}
73
74 \func{bool}{ExportXML}{\param{wxOutputStream\& }{stream}, \param{wxMBConv* }{convMem}, \param{wxMBConv* }{convFile}, \param{wxRichTextObject\& }{obj}, \param{int }{level}}
75
76 Recursively exports an object to the stream.
77
78 \membersection{wxRichTextXMLHandler::GetNodeContent}\label{wxrichtextxmlhandlergetnodecontent}
79
80 \func{wxString}{GetNodeContent}{\param{wxXmlNode* }{node}}
81
82 Helper function: gets node context.
83
84 \membersection{wxRichTextXMLHandler::GetParamNode}\label{wxrichtextxmlhandlergetparamnode}
85
86 \func{wxXmlNode*}{GetParamNode}{\param{wxXmlNode* }{node}, \param{const wxString\& }{param}}
87
88 Helper function: gets a named parameter from the XML node.
89
90 \membersection{wxRichTextXMLHandler::GetParamValue}\label{wxrichtextxmlhandlergetparamvalue}
91
92 \func{wxString}{GetParamValue}{\param{wxXmlNode* }{node}, \param{const wxString\& }{param}}
93
94 Helper function: gets a named parameter from the XML node.
95
96 \membersection{wxRichTextXMLHandler::GetStyle}\label{wxrichtextxmlhandlergetstyle}
97
98 \func{bool}{GetStyle}{\param{wxTextAttrEx\& }{attr}, \param{wxXmlNode* }{node}, \param{bool }{isPara = false}}
99
100 Helper function: gets style parameters from the given XML node.
101
102 \membersection{wxRichTextXMLHandler::GetText}\label{wxrichtextxmlhandlergettext}
103
104 \func{wxString}{GetText}{\param{wxXmlNode* }{node}, \param{const wxString\& }{param = wxEmptyString}, \param{bool }{translate = false}}
105
106 Helper function: gets text from the node.
107
108 \membersection{wxRichTextXMLHandler::HasParam}\label{wxrichtextxmlhandlerhasparam}
109
110 \func{bool}{HasParam}{\param{wxXmlNode* }{node}, \param{const wxString\& }{param}}
111
112 Helper function: returns \true if the node has the given parameter.
113
114 \membersection{wxRichTextXMLHandler::ImportXML}\label{wxrichtextxmlhandlerimportxml}
115
116 \func{bool}{ImportXML}{\param{wxRichTextBuffer* }{buffer}, \param{wxXmlNode* }{node}}
117
118 Recursively imports an object.
119