]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/httag.tex
added wxApp::Yield()
[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 a single HTML tag.
9 It is used by \helpref{tag handlers}{handlers}.
10
11 \wxheading{Derived from}
12
13 wxObject
14
15 \wxheading{Include files}
16
17 <wx/html/htmltag.h>
18
19 \latexignore{\rtfignore{\wxheading{Members}}}
20
21 \membersection{wxHtmlTag::wxHtmlTag}\label{wxhtmltagwxhtmltag}
22
23 \func{}{wxHtmlTag}{\param{const wxString\& }{source}, \param{int }{pos}, \param{int }{end\_pos}, \param{wxHtmlTagsCache* }{cache}}
24
25 Constructor. You will probably never have to construct a wxHtmlTag object
26 yourself. Feel free to ignore the constructor parameters.
27 Have a look at src/html/htmlpars.cpp if you're interested in creating it.
28
29 \membersection{wxHtmlTag::GetAllParams}\label{wxhtmltaggetallparams}
30
31 \constfunc{const wxString\&}{GetAllParams}{\void}
32
33 Returns a string containing all parameters.
34
35 Example : tag contains {\tt <FONT SIZE=+2 COLOR="\#000000">}. Call to
36 tag.GetAllParams() would return {\tt SIZE=+2 COLOR="\#000000"}.
37
38
39 \membersection{wxHtmlTag::GetBeginPos}\label{wxhtmltaggetbeginpos}
40
41 \constfunc{int}{GetBeginPos}{\void}
42
43 Returns beginning position of the text {\it between} this tag and paired
44 ending tag.
45 See explanation (returned position is marked with `|'):
46
47 \begin{verbatim}
48 bla bla bla <MYTAG> bla bla intenal text</MYTAG> bla bla
49 |
50 \end{verbatim}
51
52
53 \membersection{wxHtmlTag::GetEndPos1}\label{wxhtmltaggetendpos1}
54
55 \constfunc{int}{GetEndPos1}{\void}
56
57 Returns ending position of the text {\it between} this tag and paired
58 ending tag.
59 See explanation (returned position is marked with `|'):
60
61 \begin{verbatim}
62 bla bla bla <MYTAG> bla bla intenal text</MYTAG> bla bla
63 |
64 \end{verbatim}
65
66
67 \membersection{wxHtmlTag::GetEndPos2}\label{wxhtmltaggetendpos2}
68
69 \constfunc{int}{GetEndPos2}{\void}
70
71 Returns ending position 2 of the text {\it between} this tag and paired
72 ending tag.
73 See explanation (returned position is marked with `|'):
74
75 \begin{verbatim}
76 bla bla bla <MYTAG> bla bla intenal text</MYTAG> bla bla
77 |
78 \end{verbatim}
79
80 \membersection{wxHtmlTag::GetName}\label{wxhtmltaggetname}
81
82 \constfunc{wxString}{GetName}{\void}
83
84 Returns tag's name. The name is always in uppercase and it doesn't contain
85 '<' or '/' characters. (So the name of {\tt <FONT SIZE=+2>} tag is "FONT"
86 and name of {\tt </table>} is "TABLE")
87
88
89 \membersection{wxHtmlTag::GetParam}\label{wxhtmltaggetparam}
90
91 \constfunc{wxString}{GetParam}{\param{const wxString\& }{par}, \param{bool }{with\_commas = FALSE}}
92
93 Returns the value of the parameter. You should check whether the
94 parameter exists or not (use \helpref{HasParam}{wxhtmltaghasparam}) first.
95
96 \wxheading{Parameters}
97
98 \docparam{par}{The parameter's name.}
99
100 \docparam{with\_commas}{TRUE if you want to get commas as well. See example.}
101
102 \wxheading{Example}
103
104 \begin{verbatim}
105 ...
106 /* you have wxHtmlTag variable tag which is equal to
107 HTML tag <FONT SIZE=+2 COLOR="#0000FF"> */
108 dummy = tag.GetParam("SIZE");
109 // dummy == "+2"
110 dummy = tag.GetParam("COLOR");
111 // dummy == "#0000FF"
112 dummy = tag.GetParam("COLOR", TRUE);
113 // dummy == "\"#0000FF\"" -- see the difference!!
114 \end{verbatim}
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::HasParam}\label{wxhtmltaghasparam}
138
139 \constfunc{bool}{HasParam}{\param{const wxString\& }{par}}
140
141 Returns TRUE if the tag has parameter of the given name.
142 Example : {\tt <FONT SIZE=+2 COLOR="\#FF00FF">} has two parameters named
143 "SIZE" and "COLOR".
144
145 \wxheading{Parameters}
146
147 \docparam{par}{the parameter you're looking for.}
148
149 \membersection{wxHtmlTag::IsEnding}\label{wxhtmltagisending}
150
151 \constfunc{bool}{IsEnding}{\void}
152
153 Returns TRUE if this tag is ending one.
154 ({\tt </FONT>} is ending tag, {\tt <FONT>} is not)
155
156 \membersection{wxHtmlTag::ScanParam}\label{wxhtmltagscanparam}
157
158 \constfunc{wxString}{ScanParam}{\param{const wxString\& }{par}, \param{const wxChar *}{format}, \param{void *}{value}}
159
160 This method scans given parameter. Usage is exactly the same as sscanf's
161 usage except that you don't pass string but parameter name as the first parameter
162 and that you can only retrieve one value (i.e. you can use only one "\%" element
163 in {\it format}).
164
165
166 \wxheading{Parameters}
167
168 \docparam{par}{The name of tag you want to query}
169
170 \docparam{format}{scanf()-like format string.}
171
172 \docparam{value}{pointer to a variable to store value in }
173