]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/httag.tex
wxBook additions; added a couple of pixels in menu drawing; taskbar
[wxWidgets.git] / docs / latex / wx / httag.tex
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
8 This class represents single HTML tag.
9 It is used by \helpref{tag handlers}{handlers}.
10
11 \wxheading{Derived from}
12
13 wxObject
14
15 \latexignore{\rtfignore{\wxheading{Members}}}
16
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
21 Constructor. You'll probably never have to construct wxHtmlTag object
22 yourself. 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
29 Returns 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"
31 and name of {\tt </table>} is "TABLE")
32
33 \membersection{wxHtmlTag::HasParam}\label{wxhtmltaghasparam}
34
35 \constfunc{bool}{HasParam}{\param{const wxString\& }{par}}
36
37 Returns TRUE if the tag has parameter of the given name.
38 Example : {\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
49 Retuns the value of the parameter. You should check whether the
50 param 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"> */
64 dummy = tag.GetParam("SIZE");
65 // dummy == "+2"
66 dummy = tag.GetParam("COLOR");
67 // dummy == "#0000FF"
68 dummy = tag.GetParam("COLOR", TRUE);
69 // dummy == "\"#0000FF\"" -- see the difference!!
70 \end{verbatim}
71
72 \membersection{wxHtmlTag::ScanParam}\label{wxhtmltagscanparam}
73
74 \constfunc{wxString}{ScanParam}{\param{const wxString\& }{par}, \param{const char *}{format}, fuck}
75
76 This method scans given parameter. Usage is exatly the same as sscanf's
77 usage 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
87 If you're using Cygwin beta 20 or Mingw32 compiler please remember
88 that ScanParam() is only partially implemented!! The problem is
89 that under Cygnus' GCC vsscanf() function is not implemented. I workarounded
90 this 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
97 Returns string with all params.
98
99 Example : tag contains {\tt <FONT SIZE=+2 COLOR="\#000000">}. Call to
100 tag.GetAllParams() would return {\tt SIZE=+2 COLOR="\#000000"}.
101
102 \membersection{wxHtmlTag::IsEnding}\label{wxhtmltagisending}
103
104 \constfunc{bool}{IsEnding}{\void}
105
106 Returns 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
114 Returns TRUE if this tag is paired with ending tag, FALSE otherwise.
115
116 See the example of HTML document:
117
118 \begin{verbatim}
119 <html><body>
120 Hello<p>
121 How are you?
122 <p align=center>This is centered...</p>
123 Oops<br>Oooops!
124 </body></html>
125 \end{verbatim}
126
127 In this example tags HTML and BODY have ending tags, first P and BR
128 doesn't have ending tag while the second P has. The third P tag (which
129 is ending itself) of course doesn't have ending tag.
130
131 \membersection{wxHtmlTag::GetBeginPos}\label{wxhtmltaggetbeginpos}
132
133 \constfunc{int}{GetBeginPos}{\void}
134
135 Returns beginning position of the text {\it between} this tag and paired
136 ending tag.
137 See explanation (returned position is marked with '^'):
138
139 \begin{verbatim}
140 bla 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
148 Returns ending position of the text {\it between} this tag and paired
149 ending tag.
150 See explanation (returned position is marked with '^'):
151
152 \begin{verbatim}
153 bla bla bla <MYTAG> bla bla intenal text</MYTAG> bla bla
154 ^
155 \end{verbatim}
156
157 \membersection{wxHtmlTag::GetEndPos2}\label{wxhtmltaggetendpos2}
158
159 \constfunc{int}{GetEndPos2}{\void}
160
161 Returns ending position 2 of the text {\it between} this tag and paired
162 ending tag.
163 See explanation (returned position is marked with '^'):
164
165 \begin{verbatim}
166 bla bla bla <MYTAG> bla bla intenal text</MYTAG> bla bla
167 ^
168 \end{verbatim}
169