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{wxHtmlTag *
}{parent
},
\param{const wxString\&
}{source
},
24 \param{int
}{pos
},
\param{int
}{end
\_pos},
25 \param{wxHtmlTagsCache*
}{cache
},
\param{wxHtmlEntitiesParser *
}{entParser
}}
27 Constructor. You will probably never have to construct a wxHtmlTag object
28 yourself. Feel free to ignore the constructor parameters.
29 Have a look at src/html/htmlpars.cpp if you're interested in creating it.
31 \membersection{wxHtmlTag::GetAllParams
}\label{wxhtmltaggetallparams
}
33 \constfunc{const wxString\&
}{GetAllParams
}{\void}
35 Returns a string containing all parameters.
37 Example : tag contains
{\tt <FONT SIZE=+
2 COLOR="\
#000000">
}. Call to
38 tag.GetAllParams() would return
{\tt SIZE=+
2 COLOR="\
#000000"
}.
41 \membersection{wxHtmlTag::GetBeginPos
}\label{wxhtmltaggetbeginpos
}
43 \constfunc{int
}{GetBeginPos
}{\void}
45 Returns beginning position of the text
{\it between
} this tag and paired
47 See explanation (returned position is marked with `|'):
50 bla bla bla <MYTAG> bla bla internal text</MYTAG> bla bla
55 \membersection{wxHtmlTag::GetEndPos1
}\label{wxhtmltaggetendpos1
}
57 \constfunc{int
}{GetEndPos1
}{\void}
59 Returns ending position of the text
{\it between
} this tag and paired
61 See explanation (returned position is marked with `|'):
64 bla bla bla <MYTAG> bla bla internal text</MYTAG> bla bla
69 \membersection{wxHtmlTag::GetEndPos2
}\label{wxhtmltaggetendpos2
}
71 \constfunc{int
}{GetEndPos2
}{\void}
73 Returns ending position
2 of the text
{\it between
} this tag and paired
75 See explanation (returned position is marked with `|'):
78 bla bla bla <MYTAG> bla bla internal text</MYTAG> bla bla
82 \membersection{wxHtmlTag::GetName
}\label{wxhtmltaggetname
}
84 \constfunc{wxString
}{GetName
}{\void}
86 Returns tag's name. The name is always in uppercase and it doesn't contain
87 '<' or '/' characters. (So the name of
{\tt <FONT SIZE=+
2>
} tag is "FONT"
88 and name of
{\tt </table>
} is "TABLE")
91 \membersection{wxHtmlTag::GetParam
}\label{wxhtmltaggetparam
}
93 \constfunc{wxString
}{GetParam
}{\param{const wxString\&
}{par
},
\param{bool
}{with
\_commas = false
}}
95 Returns the value of the parameter. You should check whether the
96 parameter exists or not (use
\helpref{HasParam
}{wxhtmltaghasparam
}) first.
98 \wxheading{Parameters
}
100 \docparam{par
}{The parameter's name.
}
102 \docparam{with
\_commas}{true if you want to get commas as well. See example.
}
108 /* you have wxHtmlTag variable tag which is equal to
109 HTML tag <FONT SIZE=+
2 COLOR="
#0000FF"> */
110 dummy = tag.GetParam("SIZE");
112 dummy = tag.GetParam("COLOR");
113 // dummy == "
#0000FF"
114 dummy = tag.GetParam("COLOR", true);
115 // dummy == "\"
#0000FF\"" -- see the difference!!
118 \membersection{wxHtmlTag::GetParamAsColour
}\label{wxhtmltaggetparamascolour
}
120 \constfunc{bool
}{GetParamAsColour
}{\param{const wxString\&
}{par
},
\param{wxColour *
}{clr
}}
122 Interprets tag parameter
{\it par
} as colour specification and saves its value
123 into wxColour variable pointed by
{\it clr
}.
125 Returns true on success and false if
{\it par
} is not colour specification or
126 if the tag has no such parameter.
128 \membersection{wxHtmlTag::GetParamAsInt
}\label{wxhtmltaggetparamasint
}
130 \constfunc{bool
}{GetParamAsInt
}{\param{const wxString\&
}{par
},
\param{int *
}{value
}}
132 Interprets tag parameter
{\it par
} as an integer and saves its value
133 into int variable pointed by
{\it value
}.
135 Returns true on success and false if
{\it par
} is not an integer or
136 if the tag has no such parameter.
138 \membersection{wxHtmlTag::HasEnding
}\label{wxhtmltaghasending
}
140 \constfunc{bool
}{HasEnding
}{\void}
142 Returns true if this tag is paired with ending tag, false otherwise.
144 See the example of HTML
document:
150 <p align=center>This is centered...</p>
155 In this example tags HTML and BODY have ending tags, first P and BR
156 doesn't have ending tag while the second P has. The third P tag (which
157 is ending itself) of course doesn't have ending tag.
159 \membersection{wxHtmlTag::HasParam
}\label{wxhtmltaghasparam
}
161 \constfunc{bool
}{HasParam
}{\param{const wxString\&
}{par
}}
163 Returns true if the tag has a parameter of the given name.
164 Example :
{\tt <FONT SIZE=+
2 COLOR="\#FF00FF">
} has two parameters named
167 \wxheading{Parameters
}
169 \docparam{par
}{the parameter you're looking for.
}
171 \membersection{wxHtmlTag::ScanParam
}\label{wxhtmltagscanparam
}
173 \constfunc{wxString
}{ScanParam
}{\param{const wxString\&
}{par
},
\param{const wxChar *
}{format
},
\param{void *
}{value
}}
175 This method scans the given parameter. Usage is exactly the same as sscanf's
176 usage except that you don't pass a string but a parameter name as the first
178 and you can only retrieve one value (i.e. you can use only one "\%" element
182 \wxheading{Parameters
}
184 \docparam{par
}{The name of the tag you want to query
}
186 \docparam{format
}{scanf()-like format string.
}
188 \docparam{value
}{pointer to a variable to store the value in
}