% htmltag.tex at 14/Mar/99 20:13:37
%
-
\section{\class{wxHtmlTag}}\label{wxhtmltag}
-This class represents single HTML tag.
+This class represents a single HTML tag.
It is used by \helpref{tag handlers}{handlers}.
-
\wxheading{Derived from}
wxObject
-\latexignore{\rtfignore{\wxheading{Members}}}
+\wxheading{Include files}
+
+<wx/html/htmltag.h>
+\wxheading{Library}
+
+\helpref{wxHtml}{librarieslist}
+
+\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxHtmlTag::wxHtmlTag}\label{wxhtmltagwxhtmltag}
-\func{}{wxHtmlTag}{\param{const wxString\& }{source}, \param{int }{pos}, \param{int }{end\_pos}, \param{wxHtmlTagsCache* }{cache}}
+\func{}{wxHtmlTag}{\param{wxHtmlTag *}{parent}, \param{const wxString\& }{source},
+\param{int }{pos}, \param{int }{end\_pos},
+\param{wxHtmlTagsCache* }{cache}, \param{wxHtmlEntitiesParser *}{entParser}}
-Constructor. You'll probably never have to construct wxHtmlTag object
-yourself. Feel free to ignore the constructor parameters...
-(have a look at lib/htmlparser.cpp if you're interested in creating it)
+Constructor. You will probably never have to construct a wxHtmlTag object
+yourself. Feel free to ignore the constructor parameters.
+Have a look at src/html/htmlpars.cpp if you're interested in creating it.
-\membersection{wxHtmlTag::GetName}\label{wxhtmltaggetname}
+\membersection{wxHtmlTag::GetAllParams}\label{wxhtmltaggetallparams}
-\constfunc{wxString}{GetName}{\void}
+\constfunc{const wxString\&}{GetAllParams}{\void}
-Returns tag's name. The name is always in uppercase and it doesn't contain
-'<' or '/' characters. (So the name of {\tt <FONT SIZE=+2>} tag is "FONT"
-and name of {\tt </table>} is "TABLE")
+Returns a string containing all parameters.
+Example : tag contains {\tt <FONT SIZE=+2 COLOR="\#000000">}. Call to
+tag.GetAllParams() would return {\tt SIZE=+2 COLOR="\#000000"}.
-\membersection{wxHtmlTag::HasParam}\label{wxhtmltaghasparam}
-\constfunc{bool}{HasParam}{\param{const wxString\& }{par}}
+\membersection{wxHtmlTag::GetBeginPos}\label{wxhtmltaggetbeginpos}
-Returns TRUE if the tag has parameter of the given name.
-Example : {\tt <FONT SIZE=+2 COLOR="\#FF00FF">} has two parameters named
-"SIZE" and "COLOR".
+\constfunc{int}{GetBeginPos}{\void}
-\wxheading{Parameters}
+Returns beginning position of the text {\it between} this tag and paired
+ending tag.
+See explanation (returned position is marked with `|'):
-\docparam{par}{the parameter you're looking for. It must {\it always} be in uppercase!}
+\begin{verbatim}
+bla bla bla <MYTAG> bla bla internal text</MYTAG> bla bla
+ |
+\end{verbatim}
-\membersection{wxHtmlTag::GetParam}\label{wxhtmltaggetparam}
-\constfunc{wxString}{GetParam}{\param{const wxString\& }{par}, \param{bool }{with\_commas = FALSE}}
+\membersection{wxHtmlTag::GetEndPos1}\label{wxhtmltaggetendpos1}
-Retuns the value of the parameter. You should check whether the
-param exists or not (use \helpref{HasParam}{wxhtmltaghasparam}) first.
+\constfunc{int}{GetEndPos1}{\void}
-\wxheading{Parameters}
+Returns ending position of the text {\it between} this tag and paired
+ending tag.
+See explanation (returned position is marked with `|'):
-\docparam{par}{The parameter's name in uppercase}
+\begin{verbatim}
+bla bla bla <MYTAG> bla bla internal text</MYTAG> bla bla
+ |
+\end{verbatim}
-\docparam{with\_commas}{TRUE if you want to get commas as well. See example.}
-\wxheading{Example}
+\membersection{wxHtmlTag::GetEndPos2}\label{wxhtmltaggetendpos2}
+
+\constfunc{int}{GetEndPos2}{\void}
+
+Returns ending position 2 of the text {\it between} this tag and paired
+ending tag.
+See explanation (returned position is marked with `|'):
\begin{verbatim}
-...
-/* you have wxHtmlTag variable tag which is equal to
- HTML tag <FONT SIZE=+2 COLOR="#0000FF"> */
-dummy = tag.GetParam("SIZE");
- // dummy == "+2"
-dummy = tag.GetParam("COLOR");
- // dummy == "#0000FF"
-dummy = tag.GetParam("COLOR", TRUE);
- // dummy == "\"#0000FF\"" -- see the difference!!
+bla bla bla <MYTAG> bla bla internal text</MYTAG> bla bla
+ |
\end{verbatim}
+\membersection{wxHtmlTag::GetName}\label{wxhtmltaggetname}
+\constfunc{wxString}{GetName}{\void}
+
+Returns tag's name. The name is always in uppercase and it doesn't contain
+'<' or '/' characters. (So the name of {\tt <FONT SIZE=+2>} tag is "FONT"
+and name of {\tt </table>} is "TABLE")
-\membersection{wxHtmlTag::ScanParam}\label{wxhtmltagscanparam}
-\constfunc{wxString}{ScanParam}{\param{const wxString\& }{par}, \param{const char *}{format}, fuck}
+\membersection{wxHtmlTag::GetParam}\label{wxhtmltaggetparam}
-This method scans given parameter. Usage is exatly the same as sscanf's
-usage except that you don't pass string but param name as the first parameter.
+\constfunc{wxString}{GetParam}{\param{const wxString\& }{par}, \param{bool }{with\_quotes = false}}
+
+Returns the value of the parameter. You should check whether the
+parameter exists or not (use \helpref{HasParam}{wxhtmltaghasparam}) first.
\wxheading{Parameters}
-\docparam{par}{The name of tag you wanna query (in uppercase)}
+\docparam{par}{The parameter's name.}
-\docparam{format}{scanf()-like format string.}
+\docparam{with\_quotes}{true if you want to get quotes as well. See example.}
-\wxheading{Cygwin and Mingw32}
+\wxheading{Example}
-If you're using Cygwin beta 20 or Mingw32 compiler please remember
-that ScanParam() is only partially implemented!! The problem is
-that under Cygnus' GCC vsscanf() function is not implemented. I workarounded
-this in a way which causes that you can use only one parameter in ...
-(and only one \% in {\it format})
+\begin{verbatim}
+...
+/* you have wxHtmlTag variable tag which is equal to
+ HTML tag <FONT SIZE=+2 COLOR="#0000FF"> */
+dummy = tag.GetParam("SIZE");
+ // dummy == "+2"
+dummy = tag.GetParam("COLOR");
+ // dummy == "#0000FF"
+dummy = tag.GetParam("COLOR", true);
+ // dummy == "\"#0000FF\"" -- see the difference!!
+\end{verbatim}
-\membersection{wxHtmlTag::GetAllParams}\label{wxhtmltaggetallparams}
+\membersection{wxHtmlTag::GetParamAsColour}\label{wxhtmltaggetparamascolour}
-\constfunc{const wxString\&}{GetAllParams}{\void}
+\constfunc{bool}{GetParamAsColour}{\param{const wxString\& }{par}, \param{wxColour *}{clr}}
-Returns string with all params.
+Interprets tag parameter {\it par} as colour specification and saves its value
+into wxColour variable pointed by {\it clr}.
-Example : tag contains {\tt <FONT SIZE=+2 COLOR="\#000000">}. Call to
-tag.GetAllParams() would return {\tt SIZE=+2 COLOR="\#000000"}.
+Returns true on success and false if {\it par} is not colour specification or
+if the tag has no such parameter.
-\membersection{wxHtmlTag::IsEnding}\label{wxhtmltagisending}
+\membersection{wxHtmlTag::GetParamAsInt}\label{wxhtmltaggetparamasint}
-\constfunc{bool}{IsEnding}{\void}
+\constfunc{bool}{GetParamAsInt}{\param{const wxString\& }{par}, \param{int *}{value}}
-Returns TRUE if this tag is ending one.
-({\tt </FONT>} is ending tag, {\tt <FONT>} is not)
+Interprets tag parameter {\it par} as an integer and saves its value
+into int variable pointed by {\it value}.
+Returns true on success and false if {\it par} is not an integer or
+if the tag has no such parameter.
\membersection{wxHtmlTag::HasEnding}\label{wxhtmltaghasending}
\constfunc{bool}{HasEnding}{\void}
-Returns TRUE if this tag is paired with ending tag, FALSE otherwise.
+Returns true if this tag is paired with ending tag, false otherwise.
See the example of HTML document:
doesn't have ending tag while the second P has. The third P tag (which
is ending itself) of course doesn't have ending tag.
-\membersection{wxHtmlTag::GetBeginPos}\label{wxhtmltaggetbeginpos}
+\membersection{wxHtmlTag::HasParam}\label{wxhtmltaghasparam}
-\constfunc{int}{GetBeginPos}{\void}
+\constfunc{bool}{HasParam}{\param{const wxString\& }{par}}
-Returns beginning position of the text {\it between} this tag and paired
-ending tag.
-See explanation (returned position is marked with '^'):
+Returns true if the tag has a parameter of the given name.
+Example : {\tt <FONT SIZE=+2 COLOR="\#FF00FF">} has two parameters named
+"SIZE" and "COLOR".
-\begin{verbatim}
-bla bla bla <MYTAG> bla bla intenal text</MYTAG> bla bla
- ^
-\end{verbatim}
+\wxheading{Parameters}
-\membersection{wxHtmlTag::GetEndPos1}\label{wxhtmltaggetendpos1}
+\docparam{par}{the parameter you're looking for.}
-\constfunc{int}{GetEndPos1}{\void}
+\membersection{wxHtmlTag::ScanParam}\label{wxhtmltagscanparam}
-Returns ending position of the text {\it between} this tag and paired
-ending tag.
-See explanation (returned position is marked with '^'):
+\constfunc{wxString}{ScanParam}{\param{const wxString\& }{par}, \param{const wxChar *}{format}, \param{void *}{value}}
-\begin{verbatim}
-bla bla bla <MYTAG> bla bla intenal text</MYTAG> bla bla
- ^
-\end{verbatim}
+This method scans the given parameter. Usage is exactly the same as sscanf's
+usage except that you don't pass a string but a parameter name as the first
+argument
+and you can only retrieve one value (i.e. you can use only one "\%" element
+in {\it format}).
-\membersection{wxHtmlTag::GetEndPos2}\label{wxhtmltaggetendpos2}
+\wxheading{Parameters}
-\constfunc{int}{GetEndPos2}{\void}
+\docparam{par}{The name of the tag you want to query}
-Returns ending position 2 of the text {\it between} this tag and paired
-ending tag.
-See explanation (returned position is marked with '^'):
+\docparam{format}{scanf()-like format string.}
-\begin{verbatim}
-bla bla bla <MYTAG> bla bla intenal text</MYTAG> bla bla
- ^
-\end{verbatim}
+\docparam{value}{pointer to a variable to store the value in }