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