]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/httag.tex
wxMemoryStream doc updated
[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
7 \section{\class{wxHtmlTag}}\label{wxhtmltag}
8
9 This class represents single HTML tag.
10 It is used by \helpref{tag handlers}{handlers}.
11
12
13 \wxheading{Derived from}
14
15 wxObject
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
24 Constructor. You'll probably never have to construct wxHtmlTag object
25 yourself. 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
32 Returns 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"
34 and name of {\tt </table>} is "TABLE")
35
36
37 \membersection{wxHtmlTag::HasParam}\label{wxhtmltaghasparam}
38
39 \constfunc{bool}{HasParam}{\param{const wxString\& }{par}}
40
41 Returns TRUE if the tag has parameter of the given name.
42 Example : {\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
53 Retuns the value of the parameter. You should check whether the
54 param 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"> */
68 dummy = tag.GetParam("SIZE");
69 // dummy == "+2"
70 dummy = tag.GetParam("COLOR");
71 // dummy == "#0000FF"
72 dummy = 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
82 This method scans given parameter. Usage is exatly the same as sscanf's
83 usage 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
93 If you're using Cygwin beta 20 or Mingw32 compiler please remember
94 that ScanParam() is only partially implemented!! The problem is
95 that under Cygnus' GCC vsscanf() function is not implemented. I workarounded
96 this 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
103 Returns string with all params.
104
105 Example : tag contains {\tt <FONT SIZE=+2 COLOR="\#000000">}. Call to
106 tag.GetAllParams() would return {\tt SIZE=+2 COLOR="\#000000"}.
107
108 \membersection{wxHtmlTag::IsEnding}\label{wxhtmltagisending}
109
110 \constfunc{bool}{IsEnding}{\void}
111
112 Returns 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
120 Returns TRUE if this tag is paired with ending tag, FALSE otherwise.
121
122 See the example of HTML document:
123
124 \begin{verbatim}
125 <html><body>
126 Hello<p>
127 How are you?
128 <p align=center>This is centered...</p>
129 Oops<br>Oooops!
130 </body></html>
131 \end{verbatim}
132
133 In this example tags HTML and BODY have ending tags, first P and BR
134 doesn't have ending tag while the second P has. The third P tag (which
135 is ending itself) of course doesn't have ending tag.
136
137 \membersection{wxHtmlTag::GetBeginPos}\label{wxhtmltaggetbeginpos}
138
139 \constfunc{int}{GetBeginPos}{\void}
140
141 Returns beginning position of the text {\it between} this tag and paired
142 ending tag.
143 See explanation (returned position is marked with '^'):
144
145 \begin{verbatim}
146 bla 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
154 Returns ending position of the text {\it between} this tag and paired
155 ending tag.
156 See explanation (returned position is marked with '^'):
157
158 \begin{verbatim}
159 bla 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
168 Returns ending position 2 of the text {\it between} this tag and paired
169 ending tag.
170 See explanation (returned position is marked with '^'):
171
172 \begin{verbatim}
173 bla bla bla <MYTAG> bla bla intenal text</MYTAG> bla bla
174 ^
175 \end{verbatim}
176