2 % automatically generated by HelpGen from
3 % htmlwinparser.tex at 14/Mar/99 20:13:37
6 \section{\class{wxHtmlWinParser
}}\label{wxhtmlwinparser
}
8 This class is derived from
\helpref{wxHtmlParser
}{wxhtmlparser
} and
9 its main goal is to parse HTML input so that it can be displayed in
10 \helpref{wxHtmlWindow
}{wxhtmlwindow
}. It uses a special
11 \helpref{wxHtmlWinTagHandler
}{wxhtmlwintaghandler
}.
15 The product of parsing is a wxHtmlCell (resp. wxHtmlContainer) object.
17 \wxheading{Derived from
}
19 \helpref{wxHtmlParser
}{wxhtmlparser
}
21 \wxheading{Include files
}
27 \helpref{Handlers overview
}{handlers
}
29 \latexignore{\rtfignore{\wxheading{Members
}}}
31 \membersection{wxHtmlWinParser::wxHtmlWinParser
}\label{wxhtmlwinparserwxhtmlwinparser
}
33 \func{}{wxHtmlWinParser
}{\void}
35 \func{}{wxHtmlWinParser
}{\param{wxHtmlWindowInterface
}{*wndIface
}}
37 Constructor. Don't use the default one, use constructor with
38 {\it wndIface
} parameter (
{\it wndIface
} is a pointer to interface object for
39 the associated
\helpref{wxHtmlWindow
}{wxhtmlwindow
} or other HTML rendering
40 window such as
\helpref{wxHtmlListBox
}{wxhtmllistbox
}).
42 \membersection{wxHtmlWinParser::AddModule
}\label{wxhtmlwinparseraddmodule
}
44 \func{static void
}{AddModule
}{\param{wxHtmlTagsModule
}{*module
}}
46 Adds
\helpref{module
}{handlers
} to the list of wxHtmlWinParser tag handler.
48 \membersection{wxHtmlWinParser::CloseContainer
}\label{wxhtmlwinparserclosecontainer
}
50 \func{wxHtmlContainerCell*
}{CloseContainer
}{\void}
52 Closes the container, sets actual container to the parent one
53 and returns pointer to it (see
\helpref{Overview
}{cells
}).
55 \membersection{wxHtmlWinParser::CreateCurrentFont
}\label{wxhtmlwinparsercreatecurrentfont
}
57 \func{virtual wxFont*
}{CreateCurrentFont
}{\void}
59 Creates font based on current setting (see
60 \helpref{SetFontSize
}{wxhtmlwinparsersetfontsize
},
61 \helpref{SetFontBold
}{wxhtmlwinparsersetfontbold
},
62 \helpref{SetFontItalic
}{wxhtmlwinparsersetfontitalic
},
63 \helpref{SetFontFixed
}{wxhtmlwinparsersetfontfixed
},
64 \helpref{SetFontUnderlined
}{wxhtmlwinparsersetfontunderlined
})
65 and returns pointer to it.
66 If the font was already created only a pointer is returned.
69 \membersection{wxHtmlWinParser::GetActualColor
}\label{wxhtmlwinparsergetactualcolor
}
71 \constfunc{const wxColour\&
}{GetActualColor
}{\void}
73 Returns actual text colour.
75 \membersection{wxHtmlWinParser::GetAlign
}\label{wxhtmlwinparsergetalign
}
77 \constfunc{int
}{GetAlign
}{\void}
79 Returns default horizontal alignment.
81 \membersection{wxHtmlWinParser::GetCharHeight
}\label{wxhtmlwinparsergetcharheight
}
83 \constfunc{int
}{GetCharHeight
}{\void}
85 Returns (average) char height in standard font. It is used as DC-independent metrics.
87 {\bf Note:
} This function doesn't return the
{\it actual
} height. If you want to
88 know the height of the current font, call
{\tt GetDC -> GetCharHeight()
}.
90 \membersection{wxHtmlWinParser::GetCharWidth
}\label{wxhtmlwinparsergetcharwidth
}
92 \constfunc{int
}{GetCharWidth
}{\void}
94 Returns average char width in standard font. It is used as DC-independent metrics.
96 {\bf Note:
} This function doesn't return the
{\it actual
} width. If you want to
97 know the height of the current font, call
{\tt GetDC -> GetCharWidth()
}
99 \membersection{wxHtmlWinParser::GetContainer
}\label{wxhtmlwinparsergetcontainer
}
101 \constfunc{wxHtmlContainerCell*
}{GetContainer
}{\void}
103 Returns pointer to the currently opened container (see
\helpref{Overview
}{cells
}).
107 m_WParser -> GetContainer() -> InsertCell(new ...);
110 \membersection{wxHtmlWinParser::GetDC
}\label{wxhtmlwinparsergetdc
}
112 \func{wxDC*
}{GetDC
}{\void}
114 Returns pointer to the DC used during parsing.
116 \membersection{wxHtmlWinParser::GetEncodingConverter
}\label{wxhtmlwinparsergetencodingconverter
}
118 \constfunc{wxEncodingConverter *
}{GetEncodingConverter
}{\void}
120 Returns
\helpref{wxEncodingConverter
}{wxencodingconverter
} class used
121 to do conversion between
\helpref{input encoding
}{wxhtmlwinparsergetinputencoding
}
122 and
\helpref{output encoding
}{wxhtmlwinparsergetoutputencoding
}.
124 \membersection{wxHtmlWinParser::GetFontBold
}\label{wxhtmlwinparsergetfontbold
}
126 \constfunc{int
}{GetFontBold
}{\void}
128 Returns true if actual font is bold, false otherwise.
130 \membersection{wxHtmlWinParser::GetFontFace
}\label{wxhtmlwinparsergetfontface
}
132 \constfunc{wxString
}{GetFontFace
}{\void}
134 Returns actual font face name.
136 \membersection{wxHtmlWinParser::GetFontFixed
}\label{wxhtmlwinparsergetfontfixed
}
138 \constfunc{int
}{GetFontFixed
}{\void}
140 Returns true if actual font is fixed face, false otherwise.
142 \membersection{wxHtmlWinParser::GetFontItalic
}\label{wxhtmlwinparsergetfontitalic
}
144 \constfunc{int
}{GetFontItalic
}{\void}
146 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.
166 \membersection{wxHtmlWinParser::GetLink
}\label{wxhtmlwinparsergetlink
}
168 \constfunc{const wxHtmlLinkInfo\&
}{GetLink
}{\void}
170 Returns actual hypertext link. (This value has a non-empty
171 \helpref{Href
}{wxhtmllinkinfogethref
} string
172 if the parser is between
{\tt <A>
} and
{\tt </A>
} tags,
173 wxEmptyString otherwise.)
175 \membersection{wxHtmlWinParser::GetLinkColor
}\label{wxhtmlwinparsergetlinkcolor
}
177 \constfunc{const wxColour\&
}{GetLinkColor
}{\void}
179 Returns the colour of hypertext link text.
181 \membersection{wxHtmlWinParser::GetOutputEncoding
}\label{wxhtmlwinparsergetoutputencoding
}
183 \constfunc{wxFontEncoding
}{GetOutputEncoding
}{\void}
185 Returns output encoding, i.e. closest match to
document's input encoding
186 that is supported by operating system.
188 \membersection{wxHtmlWinParser::GetWindow
}\label{wxhtmlwinparsergetwindow
}
190 \func{wxHtmlWindow*
}{GetWindow
}{\void}
192 Returns associated window (wxHtmlWindow). This may be NULL! (You should always
193 test if it is non-NULL. For example
{\tt TITLE
} handler sets window
194 title only if some window is associated, otherwise it does nothing)
196 \membersection{wxHtmlWinParser::OpenContainer
}\label{wxhtmlwinparseropencontainer
}
198 \func{wxHtmlContainerCell*
}{OpenContainer
}{\void}
200 Opens new container and returns pointer to it (see
\helpref{Overview
}{cells
}).
202 \membersection{wxHtmlWinParser::SetActualColor
}\label{wxhtmlwinparsersetactualcolor
}
204 \func{void
}{SetActualColor
}{\param{const wxColour\&
}{clr
}}
206 Sets actual text colour. Note: this DOESN'T change the colour!
207 You must create
\helpref{wxHtmlColourCell
}{wxhtmlcolourcell
} yourself.
209 \membersection{wxHtmlWinParser::SetAlign
}\label{wxhtmlwinparsersetalign
}
211 \func{void
}{SetAlign
}{\param{int
}{a
}}
213 Sets default horizontal alignment (see
214 \helpref{wxHtmlContainerCell::SetAlignHor
}{wxhtmlcontainercellsetalignhor
}.)
215 Alignment of newly opened container is set to this value.
217 \membersection{wxHtmlWinParser::SetContainer
}\label{wxhtmlwinparsersetcontainer
}
219 \func{wxHtmlContainerCell*
}{SetContainer
}{\param{wxHtmlContainerCell *
}{c
}}
221 Allows you to directly set opened container. This is not recommended - you should use OpenContainer
224 \membersection{wxHtmlWinParser::SetDC
}\label{wxhtmlwinparsersetdc
}
226 \func{virtual void
}{SetDC
}{\param{wxDC
}{*dc
},
\param{double
}{pixel
\_scale =
1.0}}
228 Sets the DC. This must be called before
\helpref{Parse
}{wxhtmlparserparse
}!
229 {\it pixel
\_scale} can be used when rendering to high-resolution
230 DCs (e.g. printer) to adjust size of pixel metrics. (Many dimensions in
231 HTML are given in pixels -- e.g. image sizes.
300x300 image would be only one
232 inch wide on typical printer. With pixel
\_scale =
3.0 it would be
3 inches.)
234 \membersection{wxHtmlWinParser::SetFontBold
}\label{wxhtmlwinparsersetfontbold
}
236 \func{void
}{SetFontBold
}{\param{int
}{x
}}
238 Sets bold flag of actualfont.
{\it x
} is either true of false.
240 \membersection{wxHtmlWinParser::SetFontFace
}\label{wxhtmlwinparsersetfontface
}
242 \func{void
}{SetFontFace
}{\param{const wxString\&
}{face
}}
244 Sets current font face to
{\it face
}. This affects either fixed size
245 font or proportional, depending on context (whether the parser is
246 inside
{\tt <TT>
} tag or not).
248 \membersection{wxHtmlWinParser::SetFontFixed
}\label{wxhtmlwinparsersetfontfixed
}
250 \func{void
}{SetFontFixed
}{\param{int
}{x
}}
252 Sets fixed face flag of actualfont.
{\it x
} is either true of false.
254 \membersection{wxHtmlWinParser::SetFontItalic
}\label{wxhtmlwinparsersetfontitalic
}
256 \func{void
}{SetFontItalic
}{\param{int
}{x
}}
258 Sets italic flag of actualfont.
{\it x
} is either true of false.
260 \membersection{wxHtmlWinParser::SetFontSize
}\label{wxhtmlwinparsersetfontsize
}
262 \func{void
}{SetFontSize
}{\param{int
}{s
}}
264 Sets actual font size (HTML size varies from
1 to
7)
266 \membersection{wxHtmlWinParser::SetFontUnderlined
}\label{wxhtmlwinparsersetfontunderlined
}
268 \func{void
}{SetFontUnderlined
}{\param{int
}{x
}}
270 Sets underlined flag of actualfont.
{\it x
} is either true of false.
272 \membersection{wxHtmlWinParser::SetFonts
}\label{wxhtmlwinparsersetfonts
}
274 \func{void
}{SetFonts
}{\param{const wxString\&
}{normal
\_face},
\param{const wxString\&
}{fixed
\_face},
\param{const int
}{*sizes = NULL
}}
276 Sets fonts. See
\helpref{wxHtmlWindow::SetFonts
}{wxhtmlwindowsetfonts
} for
277 detailed description.
279 \membersection{wxHtmlWinParser::SetInputEncoding
}\label{wxhtmlwinparsersetinputencoding
}
281 \func{void
}{SetInputEncoding
}{\param{wxFontEncoding
}{enc
}}
283 Sets input encoding. The parser uses this information to build conversion
284 tables from
document's encoding to some encoding supported by operating
287 \membersection{wxHtmlWinParser::SetLink
}\label{wxhtmlwinparsersetlink
}
289 \func{void
}{SetLink
}{\param{const wxHtmlLinkInfo\&
}{link
}}
291 Sets actual hypertext link. Empty link is represented
292 by
\helpref{wxHtmlLinkInfo
}{wxhtmllinkinfo
} with
{\it Href
} equal
295 \membersection{wxHtmlWinParser::SetLinkColor
}\label{wxhtmlwinparsersetlinkcolor
}
297 \func{void
}{SetLinkColor
}{\param{const wxColour\&
}{clr
}}
299 Sets colour of hypertext link.