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
}
21 \helpref{wxHtml
}{librarieslist
}
23 \latexignore{\rtfignore{\wxheading{Members
}}}
25 \membersection{wxHtmlTag::wxHtmlTag
}\label{wxhtmltagwxhtmltag
}
27 \func{}{wxHtmlTag
}{\param{wxHtmlTag *
}{parent
},
\param{const wxString\&
}{source
},
28 \param{int
}{pos
},
\param{int
}{end
\_pos},
29 \param{wxHtmlTagsCache*
}{cache
},
\param{wxHtmlEntitiesParser *
}{entParser
}}
31 Constructor. You will probably never have to construct a wxHtmlTag object
32 yourself. Feel free to ignore the constructor parameters.
33 Have a look at src/html/htmlpars.cpp if you're interested in creating it.
35 \membersection{wxHtmlTag::GetAllParams
}\label{wxhtmltaggetallparams
}
37 \constfunc{const wxString\&
}{GetAllParams
}{\void}
39 Returns a string containing all parameters.
41 Example : tag contains
{\tt <FONT SIZE=+
2 COLOR="\
#000000">
}. Call to
42 tag.GetAllParams() would return
{\tt SIZE=+
2 COLOR="\
#000000"
}.
45 \membersection{wxHtmlTag::GetBeginPos
}\label{wxhtmltaggetbeginpos
}
47 \constfunc{int
}{GetBeginPos
}{\void}
49 Returns beginning position of the text
{\it between
} this tag and paired
51 See explanation (returned position is marked with `|'):
54 bla bla bla <MYTAG> bla bla internal text</MYTAG> bla bla
59 \membersection{wxHtmlTag::GetEndPos1
}\label{wxhtmltaggetendpos1
}
61 \constfunc{int
}{GetEndPos1
}{\void}
63 Returns ending position of the text
{\it between
} this tag and paired
65 See explanation (returned position is marked with `|'):
68 bla bla bla <MYTAG> bla bla internal text</MYTAG> bla bla
73 \membersection{wxHtmlTag::GetEndPos2
}\label{wxhtmltaggetendpos2
}
75 \constfunc{int
}{GetEndPos2
}{\void}
77 Returns ending position
2 of the text
{\it between
} this tag and paired
79 See explanation (returned position is marked with `|'):
82 bla bla bla <MYTAG> bla bla internal text</MYTAG> bla bla
86 \membersection{wxHtmlTag::GetName
}\label{wxhtmltaggetname
}
88 \constfunc{wxString
}{GetName
}{\void}
90 Returns tag's name. The name is always in uppercase and it doesn't contain
91 '<' or '/' characters. (So the name of
{\tt <FONT SIZE=+
2>
} tag is "FONT"
92 and name of
{\tt </table>
} is "TABLE")
95 \membersection{wxHtmlTag::GetParam
}\label{wxhtmltaggetparam
}
97 \constfunc{wxString
}{GetParam
}{\param{const wxString\&
}{par
},
\param{bool
}{with
\_quotes = false
}}
99 Returns the value of the parameter. You should check whether the
100 parameter exists or not (use
\helpref{HasParam
}{wxhtmltaghasparam
}) first.
102 \wxheading{Parameters
}
104 \docparam{par
}{The parameter's name.
}
106 \docparam{with
\_quotes}{true if you want to get quotes as well. See example.
}
112 /* you have wxHtmlTag variable tag which is equal to
113 HTML tag <FONT SIZE=+
2 COLOR="
#0000FF"> */
114 dummy = tag.GetParam("SIZE");
116 dummy = tag.GetParam("COLOR");
117 // dummy == "
#0000FF"
118 dummy = tag.GetParam("COLOR", true);
119 // dummy == "\"
#0000FF\"" -- see the difference!!
122 \membersection{wxHtmlTag::GetParamAsColour
}\label{wxhtmltaggetparamascolour
}
124 \constfunc{bool
}{GetParamAsColour
}{\param{const wxString\&
}{par
},
\param{wxColour *
}{clr
}}
126 Interprets tag parameter
{\it par
} as colour specification and saves its value
127 into wxColour variable pointed by
{\it clr
}.
129 Returns true on success and false if
{\it par
} is not colour specification or
130 if the tag has no such parameter.
132 \membersection{wxHtmlTag::GetParamAsInt
}\label{wxhtmltaggetparamasint
}
134 \constfunc{bool
}{GetParamAsInt
}{\param{const wxString\&
}{par
},
\param{int *
}{value
}}
136 Interprets tag parameter
{\it par
} as an integer and saves its value
137 into int variable pointed by
{\it value
}.
139 Returns true on success and false if
{\it par
} is not an integer or
140 if the tag has no such parameter.
142 \membersection{wxHtmlTag::HasEnding
}\label{wxhtmltaghasending
}
144 \constfunc{bool
}{HasEnding
}{\void}
146 Returns true if this tag is paired with ending tag, false otherwise.
148 See the example of HTML
document:
154 <p align=center>This is centered...</p>
159 In this example tags HTML and BODY have ending tags, first P and BR
160 doesn't have ending tag while the second P has. The third P tag (which
161 is ending itself) of course doesn't have ending tag.
163 \membersection{wxHtmlTag::HasParam
}\label{wxhtmltaghasparam
}
165 \constfunc{bool
}{HasParam
}{\param{const wxString\&
}{par
}}
167 Returns true if the tag has a parameter of the given name.
168 Example :
{\tt <FONT SIZE=+
2 COLOR="\#FF00FF">
} has two parameters named
171 \wxheading{Parameters
}
173 \docparam{par
}{the parameter you're looking for.
}
175 \membersection{wxHtmlTag::ScanParam
}\label{wxhtmltagscanparam
}
177 \constfunc{wxString
}{ScanParam
}{\param{const wxString\&
}{par
},
\param{const wxChar *
}{format
},
\param{void *
}{value
}}
179 This method scans the given parameter. Usage is exactly the same as sscanf's
180 usage except that you don't pass a string but a parameter name as the first
182 and you can only retrieve one value (i.e. you can use only one "\%" element
186 \wxheading{Parameters
}
188 \docparam{par
}{The name of the tag you want to query
}
190 \docparam{format
}{scanf()-like format string.
}
192 \docparam{value
}{pointer to a variable to store the value in
}