2 % automatically generated by HelpGen from
3 % htmltag.tex at 14/Mar/99 20:13:37
7 \section{\class{wxHtmlTag
}}\label{wxhtmltag
}
9 This class represents single HTML tag.
10 It is used by
\helpref{tag handlers
}{handlers
}.
13 \wxheading{Derived from
}
17 \latexignore{\rtfignore{\wxheading{Members
}}}
20 \membersection{wxHtmlTag::wxHtmlTag
}\label{wxhtmltagwxhtmltag
}
22 \func{}{wxHtmlTag
}{\param{const wxString\&
}{source
},
\param{int
}{pos
},
\param{int
}{end
\_pos},
\param{wxHtmlTagsCache*
}{cache
}}
24 Constructor. You'll probably never have to construct wxHtmlTag object
25 yourself. Feel free to ignore the constructor parameters...
26 (have a look at lib/htmlparser.cpp if you're interested in creating it)
28 \membersection{wxHtmlTag::GetName
}\label{wxhtmltaggetname
}
30 \constfunc{wxString
}{GetName
}{\void}
32 Returns tag's name. The name is always in uppercase and it doesn't contain
33 '<' or '/' characters. (So the name of
{\tt <FONT SIZE=+
2>
} tag is "FONT"
34 and name of
{\tt </table>
} is "TABLE")
37 \membersection{wxHtmlTag::HasParam
}\label{wxhtmltaghasparam
}
39 \constfunc{bool
}{HasParam
}{\param{const wxString\&
}{par
}}
41 Returns TRUE if the tag has parameter of the given name.
42 Example :
{\tt <FONT SIZE=+
2 COLOR="\#FF00FF">
} has two parameters named
45 \wxheading{Parameters
}
47 \docparam{par
}{the parameter you're looking for. It must
{\it always
} be in uppercase!
}
49 \membersection{wxHtmlTag::GetParam
}\label{wxhtmltaggetparam
}
51 \constfunc{wxString
}{GetParam
}{\param{const wxString\&
}{par
},
\param{bool
}{with
\_commas = FALSE
}}
53 Retuns the value of the parameter. You should check whether the
54 param exists or not (use
\helpref{HasParam
}{wxhtmltaghasparam
}) first.
56 \wxheading{Parameters
}
58 \docparam{par
}{The parameter's name in uppercase
}
60 \docparam{with
\_commas}{TRUE if you want to get commas as well. See example.
}
66 /* you have wxHtmlTag variable tag which is equal to
67 HTML tag <FONT SIZE=+
2 COLOR="
#0000FF"> */
68 dummy = tag.GetParam("SIZE");
70 dummy = tag.GetParam("COLOR");
72 dummy = tag.GetParam("COLOR", TRUE);
73 // dummy == "\"
#0000FF\"" -- see the difference!!
78 \membersection{wxHtmlTag::ScanParam
}\label{wxhtmltagscanparam
}
80 \constfunc{wxString
}{ScanParam
}{\param{const wxString\&
}{par
},
\param{const char *
}{format
}, fuck
}
82 This method scans given parameter. Usage is exatly the same as sscanf's
83 usage except that you don't pass string but param name as the first parameter.
85 \wxheading{Parameters
}
87 \docparam{par
}{The name of tag you wanna query (in uppercase)
}
89 \docparam{format
}{scanf()-like format string.
}
91 \wxheading{Cygwin and Mingw32
}
93 If you're using Cygwin beta
20 or Mingw32 compiler please remember
94 that ScanParam() is only partially implemented!! The problem is
95 that under Cygnus' GCC vsscanf() function is not implemented. I workarounded
96 this in a way which causes that you can use only one parameter in ...
97 (and only one \% in
{\it format
})
99 \membersection{wxHtmlTag::GetAllParams
}\label{wxhtmltaggetallparams
}
101 \constfunc{const wxString\&
}{GetAllParams
}{\void}
103 Returns string with all params.
105 Example : tag contains
{\tt <FONT SIZE=+
2 COLOR="\
#000000">
}. Call to
106 tag.GetAllParams() would return
{\tt SIZE=+
2 COLOR="\
#000000"
}.
108 \membersection{wxHtmlTag::IsEnding
}\label{wxhtmltagisending
}
110 \constfunc{bool
}{IsEnding
}{\void}
112 Returns TRUE if this tag is ending one.
113 (
{\tt </FONT>
} is ending tag,
{\tt <FONT>
} is not)
116 \membersection{wxHtmlTag::HasEnding
}\label{wxhtmltaghasending
}
118 \constfunc{bool
}{HasEnding
}{\void}
120 Returns TRUE if this tag is paired with ending tag, FALSE otherwise.
122 See the example of HTML
document:
128 <p align=center>This is centered...</p>
133 In this example tags HTML and BODY have ending tags, first P and BR
134 doesn't have ending tag while the second P has. The third P tag (which
135 is ending itself) of course doesn't have ending tag.
137 \membersection{wxHtmlTag::GetBeginPos
}\label{wxhtmltaggetbeginpos
}
139 \constfunc{int
}{GetBeginPos
}{\void}
141 Returns beginning position of the text
{\it between
} this tag and paired
143 See explanation (returned position is marked with '^'):
146 bla bla bla <MYTAG> bla bla intenal text</MYTAG> bla bla
150 \membersection{wxHtmlTag::GetEndPos1
}\label{wxhtmltaggetendpos1
}
152 \constfunc{int
}{GetEndPos1
}{\void}
154 Returns ending position of the text
{\it between
} this tag and paired
156 See explanation (returned position is marked with '^'):
159 bla bla bla <MYTAG> bla bla intenal text</MYTAG> bla bla
164 \membersection{wxHtmlTag::GetEndPos2
}\label{wxhtmltaggetendpos2
}
166 \constfunc{int
}{GetEndPos2
}{\void}
168 Returns ending position
2 of the text
{\it between
} this tag and paired
170 See explanation (returned position is marked with '^'):
173 bla bla bla <MYTAG> bla bla intenal text</MYTAG> bla bla