X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/704a4b7524e05d7bf4d208eb1b30be9989abef4c..0cc7251efec4fb9f7e9e3f403fe9f3e6585e9497:/docs/latex/wx/httag.tex diff --git a/docs/latex/wx/httag.tex b/docs/latex/wx/httag.tex index 40b1da9983..c9db5ff1db 100644 --- a/docs/latex/wx/httag.tex +++ b/docs/latex/wx/httag.tex @@ -3,115 +3,115 @@ % 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} + + +\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}} -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) - -\membersection{wxHtmlTag::GetName}\label{wxhtmltaggetname} - -\constfunc{wxString}{GetName}{\void} +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. -Returns tag's name. The name is always in uppercase and it doesn't contain -'<' or '/' characters. (So the name of {\tt } tag is "FONT" -and name of {\tt } is "TABLE") +\membersection{wxHtmlTag::GetAllParams}\label{wxhtmltaggetallparams} +\constfunc{const wxString\&}{GetAllParams}{\void} -\membersection{wxHtmlTag::HasParam}\label{wxhtmltaghasparam} +Returns a string containing all parameters. -\constfunc{bool}{HasParam}{\param{const wxString\& }{par}} +Example : tag contains {\tt }. Call to +tag.GetAllParams() would return {\tt SIZE=+2 COLOR="\#000000"}. -Returns TRUE if the tag has parameter of the given name. -Example : {\tt } has two parameters named -"SIZE" and "COLOR". -\wxheading{Parameters} +\membersection{wxHtmlTag::GetBeginPos}\label{wxhtmltaggetbeginpos} -\docparam{par}{the parameter you're looking for. It must {\it always} be in uppercase!} +\constfunc{int}{GetBeginPos}{\void} -\membersection{wxHtmlTag::GetParam}\label{wxhtmltaggetparam} +Returns beginning position of the text {\it between} this tag and paired +ending tag. +See explanation (returned position is marked with `|'): -\constfunc{wxString}{GetParam}{\param{const wxString\& }{par}, \param{bool }{with\_commas = FALSE}} +\begin{verbatim} +bla bla bla bla bla intenal text bla bla + | +\end{verbatim} -Retuns the value of the parameter. You should check whether the -param exists or not (use \helpref{HasParam}{wxhtmltaghasparam}) first. -\wxheading{Parameters} - -\docparam{par}{The parameter's name in uppercase} +\membersection{wxHtmlTag::GetEndPos1}\label{wxhtmltaggetendpos1} -\docparam{with\_commas}{TRUE if you want to get commas as well. See example.} +\constfunc{int}{GetEndPos1}{\void} -\wxheading{Example} +Returns ending position 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 */ -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 bla bla intenal text bla bla + | \end{verbatim} +\membersection{wxHtmlTag::GetEndPos2}\label{wxhtmltaggetendpos2} -\membersection{wxHtmlTag::ScanParam}\label{wxhtmltagscanparam} - -\constfunc{wxString}{ScanParam}{\param{const wxString\& }{par}, \param{const char *}{format}, fuck} +\constfunc{int}{GetEndPos2}{\void} -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. +Returns ending position 2 of the text {\it between} this tag and paired +ending tag. +See explanation (returned position is marked with `|'): -\wxheading{Parameters} +\begin{verbatim} +bla bla bla bla bla intenal text bla bla + | +\end{verbatim} -\docparam{par}{The name of tag you wanna query (in uppercase)} +\membersection{wxHtmlTag::GetName}\label{wxhtmltaggetname} -\docparam{format}{scanf()-like format string.} +\constfunc{wxString}{GetName}{\void} -\wxheading{Cygwin and Mingw32} +Returns tag's name. The name is always in uppercase and it doesn't contain +'<' or '/' characters. (So the name of {\tt } tag is "FONT" +and name of {\tt } is "TABLE") -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}) -\membersection{wxHtmlTag::GetAllParams}\label{wxhtmltaggetallparams} +\membersection{wxHtmlTag::GetParam}\label{wxhtmltaggetparam} -\constfunc{const wxString\&}{GetAllParams}{\void} +\constfunc{wxString}{GetParam}{\param{const wxString\& }{par}, \param{bool }{with\_commas = FALSE}} -Returns string with all params. +Returns the value of the parameter. You should check whether the +parameter exists or not (use \helpref{HasParam}{wxhtmltaghasparam}) first. -Example : tag contains {\tt }. Call to -tag.GetAllParams() would return {\tt SIZE=+2 COLOR="\#000000"}. +\wxheading{Parameters} -\membersection{wxHtmlTag::IsEnding}\label{wxhtmltagisending} +\docparam{par}{The parameter's name.} -\constfunc{bool}{IsEnding}{\void} +\docparam{with\_commas}{TRUE if you want to get commas as well. See example.} -Returns TRUE if this tag is ending one. -({\tt } is ending tag, {\tt } is not) +\wxheading{Example} +\begin{verbatim} +... +/* you have wxHtmlTag variable tag which is equal to + HTML tag */ +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::HasEnding}\label{wxhtmltaghasending} @@ -134,43 +134,40 @@ In this example tags HTML and BODY have ending tags, first P and BR 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 parameter of the given name. +Example : {\tt } has two parameters named +"SIZE" and "COLOR". -\begin{verbatim} -bla bla bla bla bla intenal text 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::IsEnding}\label{wxhtmltagisending} -Returns ending position of the text {\it between} this tag and paired -ending tag. -See explanation (returned position is marked with '^'): +\constfunc{bool}{IsEnding}{\void} -\begin{verbatim} -bla bla bla bla bla intenal text bla bla - ^ -\end{verbatim} +Returns TRUE if this tag is ending one. +({\tt } is ending tag, {\tt } is not) +\membersection{wxHtmlTag::ScanParam}\label{wxhtmltagscanparam} -\membersection{wxHtmlTag::GetEndPos2}\label{wxhtmltaggetendpos2} +\constfunc{wxString}{ScanParam}{\param{const wxString\& }{par}, \param{const wxChar *}{format}, \param{void *}{value}} -\constfunc{int}{GetEndPos2}{\void} +This method scans given parameter. Usage is exactly the same as sscanf's +usage except that you don't pass string but parameter name as the first parameter +and that you can only retrieve one value (i.e. you can use only one "\%" element +in {\it format}). -Returns ending position 2 of the text {\it between} this tag and paired -ending tag. -See explanation (returned position is marked with '^'): -\begin{verbatim} -bla bla bla bla bla intenal text bla bla - ^ -\end{verbatim} +\wxheading{Parameters} + +\docparam{par}{The name of tag you want to query} + +\docparam{format}{scanf()-like format string.} + +\docparam{value}{pointer to a variable to store value in }