]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/httag.tex
missing closing bracket broke tex2rtf
[wxWidgets.git] / docs / latex / wx / httag.tex
... / ...
CommitLineData
1%
2% automatically generated by HelpGen from
3% htmltag.tex at 14/Mar/99 20:13:37
4%
5
6\section{\class{wxHtmlTag}}\label{wxhtmltag}
7
8This class represents a single HTML tag.
9It is used by \helpref{tag handlers}{handlers}.
10
11\wxheading{Derived from}
12
13wxObject
14
15\wxheading{Include files}
16
17<wx/html/htmltag.h>
18
19\latexignore{\rtfignore{\wxheading{Members}}}
20
21\membersection{wxHtmlTag::wxHtmlTag}\label{wxhtmltagwxhtmltag}
22
23\func{}{wxHtmlTag}{\param{wxHtmlTag *}{parent}, \param{const wxString\& }{source},
24\param{int }{pos}, \param{int }{end\_pos},
25\param{wxHtmlTagsCache* }{cache}, \param{wxHtmlEntitiesParser *}{entParser}}
26
27Constructor. You will probably never have to construct a wxHtmlTag object
28yourself. Feel free to ignore the constructor parameters.
29Have a look at src/html/htmlpars.cpp if you're interested in creating it.
30
31\membersection{wxHtmlTag::GetAllParams}\label{wxhtmltaggetallparams}
32
33\constfunc{const wxString\&}{GetAllParams}{\void}
34
35Returns a string containing all parameters.
36
37Example : tag contains {\tt <FONT SIZE=+2 COLOR="\#000000">}. Call to
38tag.GetAllParams() would return {\tt SIZE=+2 COLOR="\#000000"}.
39
40
41\membersection{wxHtmlTag::GetBeginPos}\label{wxhtmltaggetbeginpos}
42
43\constfunc{int}{GetBeginPos}{\void}
44
45Returns beginning position of the text {\it between} this tag and paired
46ending tag.
47See explanation (returned position is marked with `|'):
48
49\begin{verbatim}
50bla bla bla <MYTAG> bla bla internal text</MYTAG> bla bla
51 |
52\end{verbatim}
53
54
55\membersection{wxHtmlTag::GetEndPos1}\label{wxhtmltaggetendpos1}
56
57\constfunc{int}{GetEndPos1}{\void}
58
59Returns ending position of the text {\it between} this tag and paired
60ending tag.
61See explanation (returned position is marked with `|'):
62
63\begin{verbatim}
64bla bla bla <MYTAG> bla bla internal text</MYTAG> bla bla
65 |
66\end{verbatim}
67
68
69\membersection{wxHtmlTag::GetEndPos2}\label{wxhtmltaggetendpos2}
70
71\constfunc{int}{GetEndPos2}{\void}
72
73Returns ending position 2 of the text {\it between} this tag and paired
74ending tag.
75See explanation (returned position is marked with `|'):
76
77\begin{verbatim}
78bla bla bla <MYTAG> bla bla internal text</MYTAG> bla bla
79 |
80\end{verbatim}
81
82\membersection{wxHtmlTag::GetName}\label{wxhtmltaggetname}
83
84\constfunc{wxString}{GetName}{\void}
85
86Returns tag's name. The name is always in uppercase and it doesn't contain
87'<' or '/' characters. (So the name of {\tt <FONT SIZE=+2>} tag is "FONT"
88and name of {\tt </table>} is "TABLE")
89
90
91\membersection{wxHtmlTag::GetParam}\label{wxhtmltaggetparam}
92
93\constfunc{wxString}{GetParam}{\param{const wxString\& }{par}, \param{bool }{with\_commas = false}}
94
95Returns the value of the parameter. You should check whether the
96parameter exists or not (use \helpref{HasParam}{wxhtmltaghasparam}) first.
97
98\wxheading{Parameters}
99
100\docparam{par}{The parameter's name.}
101
102\docparam{with\_commas}{true if you want to get commas as well. See example.}
103
104\wxheading{Example}
105
106\begin{verbatim}
107...
108/* you have wxHtmlTag variable tag which is equal to
109 HTML tag <FONT SIZE=+2 COLOR="#0000FF"> */
110dummy = tag.GetParam("SIZE");
111 // dummy == "+2"
112dummy = tag.GetParam("COLOR");
113 // dummy == "#0000FF"
114dummy = tag.GetParam("COLOR", true);
115 // dummy == "\"#0000FF\"" -- see the difference!!
116\end{verbatim}
117
118\membersection{wxHtmlTag::GetParamAsColour}\label{wxhtmltaggetparamascolour}
119
120\constfunc{bool}{GetParamAsColour}{\param{const wxString\& }{par}, \param{wxColour *}{clr}}
121
122Interprets tag parameter {\it par} as colour specification and saves its value
123into wxColour variable pointed by {\it clr}.
124
125Returns true on success and false if {\it par} is not colour specification or
126if the tag has no such parameter.
127
128\membersection{wxHtmlTag::GetParamAsInt}\label{wxhtmltaggetparamasint}
129
130\constfunc{bool}{GetParamAsInt}{\param{const wxString\& }{par}, \param{int *}{value}}
131
132Interprets tag parameter {\it par} as an integer and saves its value
133into int variable pointed by {\it value}.
134
135Returns true on success and false if {\it par} is not an integer or
136if the tag has no such parameter.
137
138\membersection{wxHtmlTag::HasEnding}\label{wxhtmltaghasending}
139
140\constfunc{bool}{HasEnding}{\void}
141
142Returns true if this tag is paired with ending tag, false otherwise.
143
144See the example of HTML document:
145
146\begin{verbatim}
147<html><body>
148Hello<p>
149How are you?
150<p align=center>This is centered...</p>
151Oops<br>Oooops!
152</body></html>
153\end{verbatim}
154
155In this example tags HTML and BODY have ending tags, first P and BR
156doesn't have ending tag while the second P has. The third P tag (which
157is ending itself) of course doesn't have ending tag.
158
159\membersection{wxHtmlTag::HasParam}\label{wxhtmltaghasparam}
160
161\constfunc{bool}{HasParam}{\param{const wxString\& }{par}}
162
163Returns true if the tag has a parameter of the given name.
164Example : {\tt <FONT SIZE=+2 COLOR="\#FF00FF">} has two parameters named
165"SIZE" and "COLOR".
166
167\wxheading{Parameters}
168
169\docparam{par}{the parameter you're looking for.}
170
171\membersection{wxHtmlTag::ScanParam}\label{wxhtmltagscanparam}
172
173\constfunc{wxString}{ScanParam}{\param{const wxString\& }{par}, \param{const wxChar *}{format}, \param{void *}{value}}
174
175This method scans the given parameter. Usage is exactly the same as sscanf's
176usage except that you don't pass a string but a parameter name as the first
177argument
178and you can only retrieve one value (i.e. you can use only one "\%" element
179in {\it format}).
180
181
182\wxheading{Parameters}
183
184\docparam{par}{The name of the tag you want to query}
185
186\docparam{format}{scanf()-like format string.}
187
188\docparam{value}{pointer to a variable to store the value in }
189