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 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 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::GetName
}\label{wxhtmltaggetname
}
27 \constfunc{wxString
}{GetName
}{\void}
29 Returns tag's name. The name is always in uppercase and it doesn't contain
30 '<' or '/' characters. (So the name of
{\tt <FONT SIZE=+
2>
} tag is "FONT"
31 and name of
{\tt </table>
} is "TABLE")
33 \membersection{wxHtmlTag::HasParam
}\label{wxhtmltaghasparam
}
35 \constfunc{bool
}{HasParam
}{\param{const wxString\&
}{par
}}
37 Returns TRUE if the tag has parameter of the given name.
38 Example :
{\tt <FONT SIZE=+
2 COLOR="\#FF00FF">
} has two parameters named
41 \wxheading{Parameters
}
43 \docparam{par
}{the parameter you're looking for. It must
{\it always
} be in uppercase!
}
45 \membersection{wxHtmlTag::GetParam
}\label{wxhtmltaggetparam
}
47 \constfunc{wxString
}{GetParam
}{\param{const wxString\&
}{par
},
\param{bool
}{with
\_commas = FALSE
}}
49 Retuns the value of the parameter. You should check whether the
50 param exists or not (use
\helpref{HasParam
}{wxhtmltaghasparam
}) first.
52 \wxheading{Parameters
}
54 \docparam{par
}{The parameter's name in uppercase
}
56 \docparam{with
\_commas}{TRUE if you want to get commas as well. See example.
}
62 /* you have wxHtmlTag variable tag which is equal to
63 HTML tag <FONT SIZE=+
2 COLOR="
#0000FF"> */
64 dummy = tag.GetParam("SIZE");
66 dummy = tag.GetParam("COLOR");
68 dummy = tag.GetParam("COLOR", TRUE);
69 // dummy == "\"
#0000FF\"" -- see the difference!!
72 \membersection{wxHtmlTag::ScanParam
}\label{wxhtmltagscanparam
}
74 \constfunc{wxString
}{ScanParam
}{\param{const wxString\&
}{par
},
\param{const char *
}{format
}, fuck
}
76 This method scans given parameter. Usage is exatly the same as sscanf's
77 usage except that you don't pass string but param name as the first parameter.
79 \wxheading{Parameters
}
81 \docparam{par
}{The name of tag you wanna query (in uppercase)
}
83 \docparam{format
}{scanf()-like format string.
}
85 \wxheading{Cygwin and Mingw32
}
87 If you're using Cygwin beta
20 or Mingw32 compiler please remember
88 that ScanParam() is only partially implemented!! The problem is
89 that under Cygnus' GCC vsscanf() function is not implemented. I workarounded
90 this in a way which causes that you can use only one parameter in ...
91 (and only one \% in
{\it format
})
93 \membersection{wxHtmlTag::GetAllParams
}\label{wxhtmltaggetallparams
}
95 \constfunc{const wxString\&
}{GetAllParams
}{\void}
97 Returns string with all params.
99 Example : tag contains
{\tt <FONT SIZE=+
2 COLOR="\
#000000">
}. Call to
100 tag.GetAllParams() would return
{\tt SIZE=+
2 COLOR="\
#000000"
}.
102 \membersection{wxHtmlTag::IsEnding
}\label{wxhtmltagisending
}
104 \constfunc{bool
}{IsEnding
}{\void}
106 Returns TRUE if this tag is ending one.
107 (
{\tt </FONT>
} is ending tag,
{\tt <FONT>
} is not)
110 \membersection{wxHtmlTag::HasEnding
}\label{wxhtmltaghasending
}
112 \constfunc{bool
}{HasEnding
}{\void}
114 Returns TRUE if this tag is paired with ending tag, FALSE otherwise.
116 See the example of HTML
document:
122 <p align=center>This is centered...</p>
127 In this example tags HTML and BODY have ending tags, first P and BR
128 doesn't have ending tag while the second P has. The third P tag (which
129 is ending itself) of course doesn't have ending tag.
131 \membersection{wxHtmlTag::GetBeginPos
}\label{wxhtmltaggetbeginpos
}
133 \constfunc{int
}{GetBeginPos
}{\void}
135 Returns beginning position of the text
{\it between
} this tag and paired
137 See explanation (returned position is marked with '^'):
140 bla bla bla <MYTAG> bla bla intenal text</MYTAG> bla bla
144 \membersection{wxHtmlTag::GetEndPos1
}\label{wxhtmltaggetendpos1
}
146 \constfunc{int
}{GetEndPos1
}{\void}
148 Returns ending position of the text
{\it between
} this tag and paired
150 See explanation (returned position is marked with '^'):
153 bla bla bla <MYTAG> bla bla intenal text</MYTAG> bla bla
157 \membersection{wxHtmlTag::GetEndPos2
}\label{wxhtmltaggetendpos2
}
159 \constfunc{int
}{GetEndPos2
}{\void}
161 Returns ending position
2 of the text
{\it between
} this tag and paired
163 See explanation (returned position is marked with '^'):
166 bla bla bla <MYTAG> bla bla intenal text</MYTAG> bla bla