2 % automatically generated by HelpGen from
3 % htmlwinparser.tex at 14/Mar/99 20:13:37
7 \section{\class{wxHtmlWinParser
}}\label{wxhtmlwinparser
}
9 This class is derived from
\helpref{wxHtmlParser
}{wxhtmlparser
} and
10 its mail goal is to parse HTML input so that it can be displayed in
11 \helpref{wxHtmlWindow
}{wxhtmlwindow
}. It uses special
12 \helpref{wxHtmlWinTagHandler
}{wxhtmlwintaghandler
}.
17 \item Product of parsing is wxHtmlCell (resp. wxHtmlContainer) object.
20 \wxheading{Derived from
}
22 \helpref{wxHtmlParser
}{wxhtmlparser
}
26 \helpref{Handlers overview
}{handlers
}
28 \latexignore{\rtfignore{\wxheading{Members
}}}
30 \membersection{wxHtmlWinParser::wxHtmlWinParser
}\label{wxhtmlwinparserwxhtmlwinparser
}
32 \func{}{wxHtmlWinParser
}{\void}
34 \func{}{wxHtmlWinParser
}{\param{wxWindow
}{*wnd
}}
36 Constructor. Don't use the default one, use constructor with
37 {\it wnd
} paremeter (
{\it wnd
} is pointer to associated
\helpref{wxHtmlWindow
}{wxhtmlwindow
})
39 \membersection{wxHtmlWinParser::AddModule
}\label{wxhtmlwinparseraddmodule
}
41 \func{static void
}{AddModule
}{\param{wxHtmlTagsModule
}{*module
}}
43 Adds
\helpref{module
}{handlers
} to the list of wxHtmlWinParser tag handler.
45 \membersection{wxHtmlWinParser::CloseContainer
}\label{wxhtmlwinparserclosecontainer
}
47 \func{wxHtmlContainerCell*
}{CloseContainer
}{\void}
49 Closes the container, sets actual container to the parent one
50 and returns pointer to it (see
\helpref{Overview
}{cells
}).
52 \membersection{wxHtmlWinParser::CreateCurrentFont
}\label{wxhtmlwinparsercreatecurrentfont
}
54 \func{virtual wxFont*
}{CreateCurrentFont
}{\void}
56 Creates font based on current setting (see
57 \helpref{SetFontSize
}{wxhtmlwinparsersetfontsize
},
58 \helpref{SetFontBold
}{wxhtmlwinparsersetfontbold
},
59 \helpref{SetFontItalic
}{wxhtmlwinparsersetfontitalic
},
60 \helpref{SetFontFixed
}{wxhtmlwinparsersetfontfixed
},
61 \helpref{SetFontUnderlined
}{wxhtmlwinparsersetfontunderlined
})
62 and returns pointer to it.
63 (If the font was already created only a pointer is returned.)
66 \membersection{wxHtmlWinParser::GetActualColor
}\label{wxhtmlwinparsergetactualcolor
}
68 \constfunc{const wxColour\&
}{GetActualColor
}{\void}
70 Returns actual text
color.
72 \membersection{wxHtmlWinParser::GetAlign
}\label{wxhtmlwinparsergetalign
}
74 \constfunc{int
}{GetAlign
}{\void}
76 Returns default horizontal alignment.
78 \membersection{wxHtmlWinParser::GetCharHeight
}\label{wxhtmlwinparsergetcharheight
}
80 \constfunc{int
}{GetCharHeight
}{\void}
82 Returns (average) char height in standard font. It's used as DC-independent metrics.
84 {\bf Note:
} This function doesn't return
{\it actual
} height. If you want to
85 know the height of the current font, call
{\tt GetDC -> GetCharHeight()
}.
87 \membersection{wxHtmlWinParser::GetCharWidth
}\label{wxhtmlwinparsergetcharwidth
}
89 \constfunc{int
}{GetCharWidth
}{\void}
91 Returns average char width in standard font. It's used as DC-independent metrics.
93 {\bf Note:
} This function doesn't return
{\it actual
} width. If you want to
94 know the height of the current font, call
{\tt GetDC -> GetCharWidth()
}
96 \membersection{wxHtmlWinParser::GetContainer
}\label{wxhtmlwinparsergetcontainer
}
98 \constfunc{wxHtmlContainerCell*
}{GetContainer
}{\void}
100 Returns pointer to the currectly opened container (see
\helpref{Overview
}{cells
}).
104 m_WParser -> GetContainer() -> InsertCell(new ...);
107 \membersection{wxHtmlWinParser::GetDC
}\label{wxhtmlwinparsergetdc
}
109 \func{wxDC*
}{GetDC
}{\void}
111 Returns pointer to the DC used during parsing.
114 \membersection{wxHtmlWinParser::GetEncodingConverter
}\label{wxhtmlwinparsergetencodingconverter
}
116 \constfunc{wxEncodingConverter *
}{GetEncodingConverter
}{\void}
118 Returns
\helpref{wxEncodingConverter
}{wxencodingconverter
} class used
119 to do conversion between
\helpref{input encoding
}{wxhtmlwinparsergetinputencoding
}
120 and
\helpref{output encoding
}{wxhtmlwinparsergetoutputencoding
}.
122 \membersection{wxHtmlWinParser::GetFontBold
}\label{wxhtmlwinparsergetfontbold
}
124 \constfunc{int
}{GetFontBold
}{\void}
126 Returns TRUE if actual font is bold, FALSE otherwise.
128 \membersection{wxHtmlWinParser::GetFontFace
}\label{wxhtmlwinparsergetfontface
}
130 \constfunc{wxString
}{GetFontFace
}{\void}
132 Returns actual font face name.
135 \membersection{wxHtmlWinParser::GetFontFixed
}\label{wxhtmlwinparsergetfontfixed
}
137 \constfunc{int
}{GetFontFixed
}{\void}
139 Returns TRUE if actual font is fixed face, FALSE otherwise.
141 \membersection{wxHtmlWinParser::GetFontItalic
}\label{wxhtmlwinparsergetfontitalic
}
143 \constfunc{int
}{GetFontItalic
}{\void}
145 Returns TRUE if actual font is italic, FALSE otherwise.
148 \membersection{wxHtmlWinParser::GetFontSize
}\label{wxhtmlwinparsergetfontsize
}
150 \constfunc{int
}{GetFontSize
}{\void}
152 Returns actual font size (HTML size varies from -
2 to +
4)
154 \membersection{wxHtmlWinParser::GetFontUnderlined
}\label{wxhtmlwinparsergetfontunderlined
}
156 \constfunc{int
}{GetFontUnderlined
}{\void}
158 Returns TRUE if actual font is underlined, FALSE otherwise.
160 \membersection{wxHtmlWinParser::GetInputEncoding
}\label{wxhtmlwinparsergetinputencoding
}
162 \constfunc{wxFontEncoding
}{GetInputEncoding
}{\void}
164 Returns input encoding.
167 \membersection{wxHtmlWinParser::GetLink
}\label{wxhtmlwinparsergetlink
}
169 \constfunc{const wxHtmlLinkInfo\&
}{GetLink
}{\void}
171 Returns actual hypertext link. (This value has non-empty
172 \helpref{Href
}{wxhtmllinkinfogethref
} string
173 if the parser is between
{\tt <A>
} and
{\tt </A>
} tags,
174 wxEmptyString otherwise.)
177 \membersection{wxHtmlWinParser::GetLinkColor
}\label{wxhtmlwinparsergetlinkcolor
}
179 \constfunc{const wxColour\&
}{GetLinkColor
}{\void}
181 Returns
color of hypertext link text.
184 \membersection{wxHtmlWinParser::GetOutputEncoding
}\label{wxhtmlwinparsergetoutputencoding
}
186 \constfunc{wxFontEncoding
}{GetOutputEncoding
}{\void}
188 Returns output encoding, i.e. closest match to
document's input encoding
189 that is supported by operating system.
191 \membersection{wxHtmlWinParser::GetWindow
}\label{wxhtmlwinparsergetwindow
}
193 \func{wxWindow*
}{GetWindow
}{\void}
195 Returns associated window (wxHtmlWindow). This may be NULL! (You should always
196 test if it is non-NULL. For example
{\tt TITLE
} handler sets window
197 title only if some window is associated, otherwise it does nothing)
200 \membersection{wxHtmlWinParser::OpenContainer
}\label{wxhtmlwinparseropencontainer
}
202 \func{wxHtmlContainerCell*
}{OpenContainer
}{\void}
204 Opens new container and returns pointer to it (see
\helpref{Overview
}{cells
}).
207 \membersection{wxHtmlWinParser::SetActualColor
}\label{wxhtmlwinparsersetactualcolor
}
209 \func{void
}{SetActualColor
}{\param{const wxColour\&
}{clr
}}
211 Sets actual text
color. Note: this DOESN'T change the
color!
212 You must create
\helpref{wxHtmlColourCell
}{wxhtmlcolourcell
} yourself.
214 \membersection{wxHtmlWinParser::SetAlign
}\label{wxhtmlwinparsersetalign
}
216 \func{void
}{SetAlign
}{\param{int
}{a
}}
218 Sets default horizontal alignment (see
219 \helpref{wxHtmlContainerCell::SetAlignHor
}{wxhtmlcontainercellsetalignhor
}.)
220 Alignment of newly opened container is set to this value.
223 \membersection{wxHtmlWinParser::SetContainer
}\label{wxhtmlwinparsersetcontainer
}
225 \func{wxHtmlContainerCell*
}{SetContainer
}{\param{wxHtmlContainerCell *
}{c
}}
227 Allows you to directly set opened container. This is not recommended - you should use OpenContainer
231 \membersection{wxHtmlWinParser::SetDC
}\label{wxhtmlwinparsersetdc
}
233 \func{virtual void
}{SetDC
}{\param{wxDC
}{*dc
},
\param{double
}{pixel
\_scale =
1.0}}
235 Sets the DC. This must be called before
\helpref{Parse
}{wxhtmlparserparse
}!
236 {\it pixel
\_scale} can be used when rendering to high-resolution
237 DCs (e.g. printer) to adjust size of pixel metrics. (Many dimensions in
238 HTML are given in pixels -- e.g. image sizes.
300x300 image would be only one
239 inch wide on typical printer. With pixel
\_scale =
3.0 it would be
3 inches.)
242 \membersection{wxHtmlWinParser::SetFontBold
}\label{wxhtmlwinparsersetfontbold
}
244 \func{void
}{SetFontBold
}{\param{int
}{x
}}
246 Sets bold flag of actualfont.
{\it x
} is either TRUE of FALSE.
248 \membersection{wxHtmlWinParser::SetFontFace
}\label{wxhtmlwinparsersetfontface
}
250 \func{void
}{SetFontFace
}{\param{const wxString\&
}{face
}}
252 Sets current font face to
{\it face
}. This affects either fixed size
253 font or proportional, depending on context (whether the parser is
254 inside
{\tt <TT>
} tag or not).
256 \membersection{wxHtmlWinParser::SetFontFixed
}\label{wxhtmlwinparsersetfontfixed
}
258 \func{void
}{SetFontFixed
}{\param{int
}{x
}}
260 Sets fixed face flag of actualfont.
{\it x
} is either TRUE of FALSE.
262 \membersection{wxHtmlWinParser::SetFontItalic
}\label{wxhtmlwinparsersetfontitalic
}
264 \func{void
}{SetFontItalic
}{\param{int
}{x
}}
266 Sets italic flag of actualfont.
{\it x
} is either TRUE of FALSE.
269 \membersection{wxHtmlWinParser::SetFontSize
}\label{wxhtmlwinparsersetfontsize
}
271 \func{void
}{SetFontSize
}{\param{int
}{s
}}
273 Sets actual font size (HTML size varies from
1 to
7)
275 \membersection{wxHtmlWinParser::SetFontUnderlined
}\label{wxhtmlwinparsersetfontunderlined
}
277 \func{void
}{SetFontUnderlined
}{\param{int
}{x
}}
279 Sets underlined flag of actualfont.
{\it x
} is either TRUE of FALSE.
281 \membersection{wxHtmlWinParser::SetFonts
}\label{wxhtmlwinparsersetfonts
}
283 \func{void
}{SetFonts
}{\param{wxString
}{normal
\_face},
\param{wxString
}{fixed
\_face},
\param{const int
}{*sizes
}}
285 Sets fonts. This method is identical to
\helpref{wxHtmlWindow::SetFonts
}{wxhtmlwindowsetfonts
}
288 \membersection{wxHtmlWinParser::SetInputEncoding
}\label{wxhtmlwinparsersetinputencoding
}
290 \func{void
}{SetInputEncoding
}{\param{wxFontEncoding
}{enc
}}
292 Sets input encoding. The parser uses this information to build conversion
293 tables from
document's encoding to some encoding supported by operating
297 \membersection{wxHtmlWinParser::SetLink
}\label{wxhtmlwinparsersetlink
}
299 \func{void
}{SetLink
}{\param{const wxHtmlLinkInfo\&
}{link
}}
301 Sets actual hypertext link. Empty link is represented
302 by
\helpref{wxHtmlLinkInfo
}{wxhtmllinkinfo
} with
{\it Href
} equal
305 \membersection{wxHtmlWinParser::SetLinkColor
}\label{wxhtmlwinparsersetlinkcolor
}
307 \func{void
}{SetLinkColor
}{\param{const wxColour\&
}{clr
}}
309 Sets
color of hypertext link.