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 \latexignore{\rtfignore{\wxheading{Members
}}}
17 \membersection{wxHtmlTag::wxHtmlTag
}\label{wxhtmltagwxhtmltag
}
19 \func{}{wxHtmlTag
}{\param{const wxString\&
}{source
},
\param{int
}{pos
},
\param{int
}{end
\_pos},
\param{wxHtmlTagsCache*
}{cache
}}
21 Constructor. You'll probably never have to construct a wxHtmlTag object
22 yourself. Feel free to ignore the constructor parameters.
23 Have a look at lib/htmlparser.cpp if you're interested in creating it.
25 \membersection{wxHtmlTag::GetAllParams
}\label{wxhtmltaggetallparams
}
27 \constfunc{const wxString\&
}{GetAllParams
}{\void}
29 Returns string with all params.
31 Example : tag contains
{\tt <FONT SIZE=+
2 COLOR="\
#000000">
}. Call to
32 tag.GetAllParams() would return
{\tt SIZE=+
2 COLOR="\
#000000"
}.
34 \membersection{wxHtmlTag::GetBeginPos
}\label{wxhtmltaggetbeginpos
}
36 \constfunc{int
}{GetBeginPos
}{\void}
38 Returns beginning position of the text
{\it between
} this tag and paired
40 See explanation (returned position is marked with '^'):
43 bla bla bla <MYTAG> bla bla intenal text</MYTAG> bla bla
47 \membersection{wxHtmlTag::GetEndPos1
}\label{wxhtmltaggetendpos1
}
49 \constfunc{int
}{GetEndPos1
}{\void}
51 Returns ending position of the text
{\it between
} this tag and paired
53 See explanation (returned position is marked with '^'):
56 bla bla bla <MYTAG> bla bla intenal text</MYTAG> bla bla
60 \membersection{wxHtmlTag::GetEndPos2
}\label{wxhtmltaggetendpos2
}
62 \constfunc{int
}{GetEndPos2
}{\void}
64 Returns ending position
2 of the text
{\it between
} this tag and paired
66 See explanation (returned position is marked with '^'):
69 bla bla bla <MYTAG> bla bla intenal text</MYTAG> bla bla
73 \membersection{wxHtmlTag::GetName
}\label{wxhtmltaggetname
}
75 \constfunc{wxString
}{GetName
}{\void}
77 Returns tag's name. The name is always in uppercase and it doesn't contain
78 '<' or '/' characters. (So the name of
{\tt <FONT SIZE=+
2>
} tag is "FONT"
79 and name of
{\tt </table>
} is "TABLE")
81 \membersection{wxHtmlTag::GetParam
}\label{wxhtmltaggetparam
}
83 \constfunc{wxString
}{GetParam
}{\param{const wxString\&
}{par
},
\param{bool
}{with
\_commas = FALSE
}}
85 Retuns the value of the parameter. You should check whether the
86 param exists or not (use
\helpref{HasParam
}{wxhtmltaghasparam
}) first.
88 \wxheading{Parameters
}
90 \docparam{par
}{The parameter's name in uppercase
}
92 \docparam{with
\_commas}{TRUE if you want to get commas as well. See example.
}
98 /* you have wxHtmlTag variable tag which is equal to
99 HTML tag <FONT SIZE=+
2 COLOR="
#0000FF"> */
100 dummy = tag.GetParam("SIZE");
102 dummy = tag.GetParam("COLOR");
103 // dummy == "
#0000FF"
104 dummy = tag.GetParam("COLOR", TRUE);
105 // dummy == "\"
#0000FF\"" -- see the difference!!
108 \membersection{wxHtmlTag::HasEnding
}\label{wxhtmltaghasending
}
110 \constfunc{bool
}{HasEnding
}{\void}
112 Returns TRUE if this tag is paired with ending tag, FALSE otherwise.
114 See the example of HTML
document:
120 <p align=center>This is centered...</p>
125 In this example tags HTML and BODY have ending tags, first P and BR
126 doesn't have ending tag while the second P has. The third P tag (which
127 is ending itself) of course doesn't have ending tag.
129 \membersection{wxHtmlTag::HasParam
}\label{wxhtmltaghasparam
}
131 \constfunc{bool
}{HasParam
}{\param{const wxString\&
}{par
}}
133 Returns TRUE if the tag has parameter of the given name.
134 Example :
{\tt <FONT SIZE=+
2 COLOR="\#FF00FF">
} has two parameters named
137 \wxheading{Parameters
}
139 \docparam{par
}{the parameter you're looking for. It must
{\it always
} be in uppercase!
}
141 \membersection{wxHtmlTag::IsEnding
}\label{wxhtmltagisending
}
143 \constfunc{bool
}{IsEnding
}{\void}
145 Returns TRUE if this tag is ending one.
146 (
{\tt </FONT>
} is ending tag,
{\tt <FONT>
} is not)
148 \membersection{wxHtmlTag::ScanParam
}\label{wxhtmltagscanparam
}
150 \constfunc{wxString
}{ScanParam
}{\param{const wxString\&
}{par
},
\param{const char *
}{format
}, fuck
}
152 This method scans given parameter. Usage is exactly the same as sscanf's
153 usage except that you don't pass string but param name as the first parameter.
155 \wxheading{Parameters
}
157 \docparam{par
}{The name of tag you want to query (in uppercase)
}
159 \docparam{format
}{scanf()-like format string.
}
161 \wxheading{Cygwin and Mingw32
}
163 If you're using Cygwin beta
20 or Mingw32 compiler please remember
164 that ScanParam() is only partially implemented! The problem is
165 that under Cygnus' GCC vsscanf() function is not implemented. I worked around
166 this in a way which causes that you can use only one parameter in ...
167 (and only one \% in
{\it format
}).