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