X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/605d715ddd84ddc3e78423e3f3ae5c27c8ff4d43..a607d8d633e055fc5cea22c0b829cd65b5c3dbfb:/docs/latex/wx/httag.tex diff --git a/docs/latex/wx/httag.tex b/docs/latex/wx/httag.tex index ab8d362aee..70e6bb48c7 100644 --- a/docs/latex/wx/httag.tex +++ b/docs/latex/wx/httag.tex @@ -12,21 +12,31 @@ It is used by \helpref{tag handlers}{handlers}. wxObject +\wxheading{Include files} + + + +\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 a wxHtmlTag object +Constructor. You will probably never have to construct a wxHtmlTag object yourself. Feel free to ignore the constructor parameters. -Have a look at lib/htmlparser.cpp if you're interested in creating it. +Have a look at src/html/htmlpars.cpp if you're interested in creating it. \membersection{wxHtmlTag::GetAllParams}\label{wxhtmltaggetallparams} \constfunc{const wxString\&}{GetAllParams}{\void} -Returns string with all params. +Returns a string containing all parameters. Example : tag contains {\tt }. Call to tag.GetAllParams() would return {\tt SIZE=+2 COLOR="\#000000"}. @@ -41,7 +51,7 @@ ending tag. See explanation (returned position is marked with `|'): \begin{verbatim} -bla bla bla bla bla intenal text bla bla +bla bla bla bla bla internal text bla bla | \end{verbatim} @@ -55,7 +65,7 @@ ending tag. See explanation (returned position is marked with `|'): \begin{verbatim} -bla bla bla bla bla intenal text bla bla +bla bla bla bla bla internal text bla bla | \end{verbatim} @@ -69,7 +79,7 @@ ending tag. See explanation (returned position is marked with `|'): \begin{verbatim} -bla bla bla bla bla intenal text bla bla +bla bla bla bla bla internal text bla bla | \end{verbatim} @@ -84,16 +94,16 @@ and name of {\tt } is "TABLE") \membersection{wxHtmlTag::GetParam}\label{wxhtmltaggetparam} -\constfunc{wxString}{GetParam}{\param{const wxString\& }{par}, \param{bool }{with\_commas = FALSE}} +\constfunc{wxString}{GetParam}{\param{const wxString\& }{par}, \param{bool }{with\_commas = false}} -Retuns the value of the parameter. You should check whether the -param exists or not (use \helpref{HasParam}{wxhtmltaghasparam}) first. +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 parameter's name in uppercase} +\docparam{par}{The parameter's name.} -\docparam{with\_commas}{TRUE if you want to get commas as well. See example.} +\docparam{with\_commas}{true if you want to get commas as well. See example.} \wxheading{Example} @@ -105,15 +115,35 @@ dummy = tag.GetParam("SIZE"); // dummy == "+2" dummy = tag.GetParam("COLOR"); // dummy == "#0000FF" -dummy = tag.GetParam("COLOR", TRUE); +dummy = tag.GetParam("COLOR", true); // dummy == "\"#0000FF\"" -- see the difference!! \end{verbatim} +\membersection{wxHtmlTag::GetParamAsColour}\label{wxhtmltaggetparamascolour} + +\constfunc{bool}{GetParamAsColour}{\param{const wxString\& }{par}, \param{wxColour *}{clr}} + +Interprets tag parameter {\it par} as colour specification and saves its value +into wxColour variable pointed by {\it clr}. + +Returns true on success and false if {\it par} is not colour specification or +if the tag has no such parameter. + +\membersection{wxHtmlTag::GetParamAsInt}\label{wxhtmltaggetparamasint} + +\constfunc{bool}{GetParamAsInt}{\param{const wxString\& }{par}, \param{int *}{value}} + +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: @@ -134,39 +164,30 @@ is ending itself) of course doesn't have ending tag. \constfunc{bool}{HasParam}{\param{const wxString\& }{par}} -Returns TRUE if the tag has parameter of the given name. +Returns true if the tag has a parameter of the given name. Example : {\tt } has two parameters named "SIZE" and "COLOR". \wxheading{Parameters} -\docparam{par}{the parameter you're looking for. It must {\it always} be in uppercase!} - -\membersection{wxHtmlTag::IsEnding}\label{wxhtmltagisending} - -\constfunc{bool}{IsEnding}{\void} - -Returns TRUE if this tag is ending one. -({\tt } is ending tag, {\tt } is not) +\docparam{par}{the parameter you're looking for.} \membersection{wxHtmlTag::ScanParam}\label{wxhtmltagscanparam} -\constfunc{wxString}{ScanParam}{\param{const wxString\& }{par}, \param{const char *}{format}, fuck} +\constfunc{wxString}{ScanParam}{\param{const wxString\& }{par}, \param{const wxChar *}{format}, \param{void *}{value}} + +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}). -This method scans given parameter. Usage is exactly the same as sscanf's -usage except that you don't pass string but param name as the first parameter. \wxheading{Parameters} -\docparam{par}{The name of tag you want to query (in uppercase)} +\docparam{par}{The name of the tag you want to query} \docparam{format}{scanf()-like format string.} -\wxheading{Cygwin and Mingw32} - -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 worked around -this in a way which causes that you can use only one parameter in ... -(and only one \% in {\it format}). +\docparam{value}{pointer to a variable to store the value in }