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