]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/httag.tex
Minor changes
[wxWidgets.git] / docs / latex / wx / httag.tex
CommitLineData
704a4b75
VS
1%
2% automatically generated by HelpGen from
3% htmltag.tex at 14/Mar/99 20:13:37
4%
5
6
7\section{\class{wxHtmlTag}}\label{wxhtmltag}
8
9This class represents single HTML tag.
10It is used by \helpref{tag handlers}{handlers}.
11
12
13\wxheading{Derived from}
14
15wxObject
16
17\latexignore{\rtfignore{\wxheading{Members}}}
18
19
20\membersection{wxHtmlTag::wxHtmlTag}\label{wxhtmltagwxhtmltag}
21
22\func{}{wxHtmlTag}{\param{const wxString\& }{source}, \param{int }{pos}, \param{int }{end\_pos}, \param{wxHtmlTagsCache* }{cache}}
23
24Constructor. You'll probably never have to construct wxHtmlTag object
25yourself. Feel free to ignore the constructor parameters...
26(have a look at lib/htmlparser.cpp if you're interested in creating it)
27
28\membersection{wxHtmlTag::GetName}\label{wxhtmltaggetname}
29
30\constfunc{wxString}{GetName}{\void}
31
32Returns tag's name. The name is always in uppercase and it doesn't contain
33'<' or '/' characters. (So the name of {\tt <FONT SIZE=+2>} tag is "FONT"
34and name of {\tt </table>} is "TABLE")
35
36
37\membersection{wxHtmlTag::HasParam}\label{wxhtmltaghasparam}
38
39\constfunc{bool}{HasParam}{\param{const wxString\& }{par}}
40
41Returns TRUE if the tag has parameter of the given name.
42Example : {\tt <FONT SIZE=+2 COLOR="\#FF00FF">} has two parameters named
43"SIZE" and "COLOR".
44
45\wxheading{Parameters}
46
47\docparam{par}{the parameter you're looking for. It must {\it always} be in uppercase!}
48
49\membersection{wxHtmlTag::GetParam}\label{wxhtmltaggetparam}
50
51\constfunc{wxString}{GetParam}{\param{const wxString\& }{par}, \param{bool }{with\_commas = FALSE}}
52
53Retuns the value of the parameter. You should check whether the
54param exists or not (use \helpref{HasParam}{wxhtmltaghasparam}) first.
55
56\wxheading{Parameters}
57
58\docparam{par}{The parameter's name in uppercase}
59
60\docparam{with\_commas}{TRUE if you want to get commas as well. See example.}
61
62\wxheading{Example}
63
64\begin{verbatim}
65...
66/* you have wxHtmlTag variable tag which is equal to
67 HTML tag <FONT SIZE=+2 COLOR="#0000FF"> */
68dummy = tag.GetParam("SIZE");
69 // dummy == "+2"
70dummy = tag.GetParam("COLOR");
71 // dummy == "#0000FF"
72dummy = tag.GetParam("COLOR", TRUE);
73 // dummy == "\"#0000FF\"" -- see the difference!!
74\end{verbatim}
75
76
77
78\membersection{wxHtmlTag::ScanParam}\label{wxhtmltagscanparam}
79
80\constfunc{wxString}{ScanParam}{\param{const wxString\& }{par}, \param{const char *}{format}, fuck}
81
82This method scans given parameter. Usage is exatly the same as sscanf's
83usage except that you don't pass string but param name as the first parameter.
84
85\wxheading{Parameters}
86
87\docparam{par}{The name of tag you wanna query (in uppercase)}
88
89\docparam{format}{scanf()-like format string.}
90
91\wxheading{Cygwin and Mingw32}
92
93If you're using Cygwin beta 20 or Mingw32 compiler please remember
94that ScanParam() is only partially implemented!! The problem is
95that under Cygnus' GCC vsscanf() function is not implemented. I workarounded
96this in a way which causes that you can use only one parameter in ...
97(and only one \% in {\it format})
98
99\membersection{wxHtmlTag::GetAllParams}\label{wxhtmltaggetallparams}
100
101\constfunc{const wxString\&}{GetAllParams}{\void}
102
103Returns string with all params.
104
105Example : tag contains {\tt <FONT SIZE=+2 COLOR="\#000000">}. Call to
106tag.GetAllParams() would return {\tt SIZE=+2 COLOR="\#000000"}.
107
108\membersection{wxHtmlTag::IsEnding}\label{wxhtmltagisending}
109
110\constfunc{bool}{IsEnding}{\void}
111
112Returns TRUE if this tag is ending one.
113({\tt </FONT>} is ending tag, {\tt <FONT>} is not)
114
115
116\membersection{wxHtmlTag::HasEnding}\label{wxhtmltaghasending}
117
118\constfunc{bool}{HasEnding}{\void}
119
120Returns TRUE if this tag is paired with ending tag, FALSE otherwise.
121
122See the example of HTML document:
123
124\begin{verbatim}
125<html><body>
126Hello<p>
127How are you?
128<p align=center>This is centered...</p>
129Oops<br>Oooops!
130</body></html>
131\end{verbatim}
132
133In this example tags HTML and BODY have ending tags, first P and BR
134doesn't have ending tag while the second P has. The third P tag (which
135is ending itself) of course doesn't have ending tag.
136
137\membersection{wxHtmlTag::GetBeginPos}\label{wxhtmltaggetbeginpos}
138
139\constfunc{int}{GetBeginPos}{\void}
140
141Returns beginning position of the text {\it between} this tag and paired
142ending tag.
143See explanation (returned position is marked with '^'):
144
145\begin{verbatim}
146bla bla bla <MYTAG> bla bla intenal text</MYTAG> bla bla
147 ^
148\end{verbatim}
149
150\membersection{wxHtmlTag::GetEndPos1}\label{wxhtmltaggetendpos1}
151
152\constfunc{int}{GetEndPos1}{\void}
153
154Returns ending position of the text {\it between} this tag and paired
155ending tag.
156See explanation (returned position is marked with '^'):
157
158\begin{verbatim}
159bla bla bla <MYTAG> bla bla intenal text</MYTAG> bla bla
160 ^
161\end{verbatim}
162
163
164\membersection{wxHtmlTag::GetEndPos2}\label{wxhtmltaggetendpos2}
165
166\constfunc{int}{GetEndPos2}{\void}
167
168Returns ending position 2 of the text {\it between} this tag and paired
169ending tag.
170See explanation (returned position is marked with '^'):
171
172\begin{verbatim}
173bla bla bla <MYTAG> bla bla intenal text</MYTAG> bla bla
174 ^
175\end{verbatim}
176