2 % automatically generated by HelpGen from
3 % htmltag.tex at 14/Mar/99 20:13:37
6 \section{\class{wxHtmlTag
}}\label{wxhtmltag
}
8 This class represents a single HTML tag.
9 It is used by
\helpref{tag handlers
}{handlers
}.
11 \wxheading{Derived from
}
15 \wxheading{Include files
}
19 \latexignore{\rtfignore{\wxheading{Members
}}}
21 \membersection{wxHtmlTag::wxHtmlTag
}\label{wxhtmltagwxhtmltag
}
23 \func{}{wxHtmlTag
}{\param{const wxString\&
}{source
},
\param{int
}{pos
},
\param{int
}{end
\_pos},
\param{wxHtmlTagsCache*
}{cache
}}
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.
29 \membersection{wxHtmlTag::GetAllParams
}\label{wxhtmltaggetallparams
}
31 \constfunc{const wxString\&
}{GetAllParams
}{\void}
33 Returns a string containing all parameters.
35 Example : tag contains
{\tt <FONT SIZE=+
2 COLOR="\
#000000">
}. Call to
36 tag.GetAllParams() would return
{\tt SIZE=+
2 COLOR="\
#000000"
}.
39 \membersection{wxHtmlTag::GetBeginPos
}\label{wxhtmltaggetbeginpos
}
41 \constfunc{int
}{GetBeginPos
}{\void}
43 Returns beginning position of the text
{\it between
} this tag and paired
45 See explanation (returned position is marked with `|'):
48 bla bla bla <MYTAG> bla bla internal text</MYTAG> bla bla
53 \membersection{wxHtmlTag::GetEndPos1
}\label{wxhtmltaggetendpos1
}
55 \constfunc{int
}{GetEndPos1
}{\void}
57 Returns ending position of the text
{\it between
} this tag and paired
59 See explanation (returned position is marked with `|'):
62 bla bla bla <MYTAG> bla bla internal text</MYTAG> bla bla
67 \membersection{wxHtmlTag::GetEndPos2
}\label{wxhtmltaggetendpos2
}
69 \constfunc{int
}{GetEndPos2
}{\void}
71 Returns ending position
2 of the text
{\it between
} this tag and paired
73 See explanation (returned position is marked with `|'):
76 bla bla bla <MYTAG> bla bla internal text</MYTAG> bla bla
80 \membersection{wxHtmlTag::GetName
}\label{wxhtmltaggetname
}
82 \constfunc{wxString
}{GetName
}{\void}
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")
89 \membersection{wxHtmlTag::GetParam
}\label{wxhtmltaggetparam
}
91 \constfunc{wxString
}{GetParam
}{\param{const wxString\&
}{par
},
\param{bool
}{with
\_commas = false
}}
93 Returns the value of the parameter. You should check whether the
94 parameter exists or not (use
\helpref{HasParam
}{wxhtmltaghasparam
}) first.
96 \wxheading{Parameters
}
98 \docparam{par
}{The parameter's name.
}
100 \docparam{with
\_commas}{true if you want to get commas as well. See example.
}
106 /* you have wxHtmlTag variable tag which is equal to
107 HTML tag <FONT SIZE=+
2 COLOR="
#0000FF"> */
108 dummy = tag.GetParam("SIZE");
110 dummy = tag.GetParam("COLOR");
111 // dummy == "
#0000FF"
112 dummy = tag.GetParam("COLOR", true);
113 // dummy == "\"
#0000FF\"" -- see the difference!!
116 \membersection{wxHtmlTag::GetParamAsColour
}\label{wxhtmltaggetparamascolour
}
118 \constfunc{bool
}{GetParamAsColour
}{\param{const wxString\&
}{par
},
\param{wxColour *
}{clr
}}
120 Interprets tag parameter
{\it par
} as colour specification and saves its value
121 into wxColour variable pointed by
{\it clr
}.
123 Returns true on success and false if
{\it par
} is not colour specification or
124 if the tag has no such parameter.
126 \membersection{wxHtmlTag::GetParamAsInt
}\label{wxhtmltaggetparamasint
}
128 \constfunc{bool
}{GetParamAsInt
}{\param{const wxString\&
}{par
},
\param{int *
}{value
}}
130 Interprets tag parameter
{\it par
} as an integer and saves its value
131 into int variable pointed by
{\it value
}.
133 Returns true on success and false if
{\it par
} is not an integer or
134 if the tag has no such parameter.
136 \membersection{wxHtmlTag::HasEnding
}\label{wxhtmltaghasending
}
138 \constfunc{bool
}{HasEnding
}{\void}
140 Returns true if this tag is paired with ending tag, false otherwise.
142 See the example of HTML
document:
148 <p align=center>This is centered...</p>
153 In this example tags HTML and BODY have ending tags, first P and BR
154 doesn't have ending tag while the second P has. The third P tag (which
155 is ending itself) of course doesn't have ending tag.
157 \membersection{wxHtmlTag::HasParam
}\label{wxhtmltaghasparam
}
159 \constfunc{bool
}{HasParam
}{\param{const wxString\&
}{par
}}
161 Returns true if the tag has a parameter of the given name.
162 Example :
{\tt <FONT SIZE=+
2 COLOR="\#FF00FF">
} has two parameters named
165 \wxheading{Parameters
}
167 \docparam{par
}{the parameter you're looking for.
}
169 \membersection{wxHtmlTag::IsEnding
}\label{wxhtmltagisending
}
171 \constfunc{bool
}{IsEnding
}{\void}
173 Returns true if this tag is ending one.
174 (
{\tt </FONT>
} is ending tag,
{\tt <FONT>
} is not)
176 \membersection{wxHtmlTag::ScanParam
}\label{wxhtmltagscanparam
}
178 \constfunc{wxString
}{ScanParam
}{\param{const wxString\&
}{par
},
\param{const wxChar *
}{format
},
\param{void *
}{value
}}
180 This method scans the given parameter. Usage is exactly the same as sscanf's
181 usage except that you don't pass a string but a parameter name as the first
183 and you can only retrieve one value (i.e. you can use only one "\%" element
187 \wxheading{Parameters
}
189 \docparam{par
}{The name of the tag you want to query
}
191 \docparam{format
}{scanf()-like format string.
}
193 \docparam{value
}{pointer to a variable to store the value in
}