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{wxHtml
}{librarieslist
}
31 \helpref{Handlers overview
}{handlers
}
33 \latexignore{\rtfignore{\wxheading{Members
}}}
35 \membersection{wxHtmlWinParser::wxHtmlWinParser
}\label{wxhtmlwinparserwxhtmlwinparser
}
37 \func{}{wxHtmlWinParser
}{\void}
39 \func{}{wxHtmlWinParser
}{\param{wxHtmlWindowInterface
}{*wndIface
}}
41 Constructor. Don't use the default one, use constructor with
42 {\it wndIface
} parameter (
{\it wndIface
} is a pointer to interface object for
43 the associated
\helpref{wxHtmlWindow
}{wxhtmlwindow
} or other HTML rendering
44 window such as
\helpref{wxHtmlListBox
}{wxhtmllistbox
}).
46 \membersection{wxHtmlWinParser::AddModule
}\label{wxhtmlwinparseraddmodule
}
48 \func{static void
}{AddModule
}{\param{wxHtmlTagsModule
}{*module
}}
50 Adds
\helpref{module
}{handlers
} to the list of wxHtmlWinParser tag handler.
52 \membersection{wxHtmlWinParser::CloseContainer
}\label{wxhtmlwinparserclosecontainer
}
54 \func{wxHtmlContainerCell*
}{CloseContainer
}{\void}
56 Closes the container, sets actual container to the parent one
57 and returns pointer to it (see
\helpref{Overview
}{cells
}).
59 \membersection{wxHtmlWinParser::CreateCurrentFont
}\label{wxhtmlwinparsercreatecurrentfont
}
61 \func{virtual wxFont*
}{CreateCurrentFont
}{\void}
63 Creates font based on current setting (see
64 \helpref{SetFontSize
}{wxhtmlwinparsersetfontsize
},
65 \helpref{SetFontBold
}{wxhtmlwinparsersetfontbold
},
66 \helpref{SetFontItalic
}{wxhtmlwinparsersetfontitalic
},
67 \helpref{SetFontFixed
}{wxhtmlwinparsersetfontfixed
},
68 \helpref{SetFontUnderlined
}{wxhtmlwinparsersetfontunderlined
})
69 and returns pointer to it.
70 If the font was already created only a pointer is returned.
73 \membersection{wxHtmlWinParser::GetActualColor
}\label{wxhtmlwinparsergetactualcolor
}
75 \constfunc{const wxColour\&
}{GetActualColor
}{\void}
77 Returns actual text colour.
79 \membersection{wxHtmlWinParser::GetAlign
}\label{wxhtmlwinparsergetalign
}
81 \constfunc{int
}{GetAlign
}{\void}
83 Returns default horizontal alignment.
85 \membersection{wxHtmlWinParser::GetCharHeight
}\label{wxhtmlwinparsergetcharheight
}
87 \constfunc{int
}{GetCharHeight
}{\void}
89 Returns (average) char height in standard font. It is used as DC-independent metrics.
91 {\bf Note:
} This function doesn't return the
{\it actual
} height. If you want to
92 know the height of the current font, call
{\tt GetDC -> GetCharHeight()
}.
94 \membersection{wxHtmlWinParser::GetCharWidth
}\label{wxhtmlwinparsergetcharwidth
}
96 \constfunc{int
}{GetCharWidth
}{\void}
98 Returns average char width in standard font. It is used as DC-independent metrics.
100 {\bf Note:
} This function doesn't return the
{\it actual
} width. If you want to
101 know the height of the current font, call
{\tt GetDC -> GetCharWidth()
}
103 \membersection{wxHtmlWinParser::GetContainer
}\label{wxhtmlwinparsergetcontainer
}
105 \constfunc{wxHtmlContainerCell*
}{GetContainer
}{\void}
107 Returns pointer to the currently opened container (see
\helpref{Overview
}{cells
}).
111 m_WParser -> GetContainer() -> InsertCell(new ...);
114 \membersection{wxHtmlWinParser::GetDC
}\label{wxhtmlwinparsergetdc
}
116 \func{wxDC*
}{GetDC
}{\void}
118 Returns pointer to the DC used during parsing.
120 \membersection{wxHtmlWinParser::GetEncodingConverter
}\label{wxhtmlwinparsergetencodingconverter
}
122 \constfunc{wxEncodingConverter *
}{GetEncodingConverter
}{\void}
124 Returns
\helpref{wxEncodingConverter
}{wxencodingconverter
} class used
125 to do conversion between
\helpref{input encoding
}{wxhtmlwinparsergetinputencoding
}
126 and
\helpref{output encoding
}{wxhtmlwinparsergetoutputencoding
}.
128 \membersection{wxHtmlWinParser::GetFontBold
}\label{wxhtmlwinparsergetfontbold
}
130 \constfunc{int
}{GetFontBold
}{\void}
132 Returns true if actual font is bold, false otherwise.
134 \membersection{wxHtmlWinParser::GetFontFace
}\label{wxhtmlwinparsergetfontface
}
136 \constfunc{wxString
}{GetFontFace
}{\void}
138 Returns actual font face name.
140 \membersection{wxHtmlWinParser::GetFontFixed
}\label{wxhtmlwinparsergetfontfixed
}
142 \constfunc{int
}{GetFontFixed
}{\void}
144 Returns true if actual font is fixed face, false otherwise.
146 \membersection{wxHtmlWinParser::GetFontItalic
}\label{wxhtmlwinparsergetfontitalic
}
148 \constfunc{int
}{GetFontItalic
}{\void}
150 Returns true if actual font is italic, false otherwise.
152 \membersection{wxHtmlWinParser::GetFontSize
}\label{wxhtmlwinparsergetfontsize
}
154 \constfunc{int
}{GetFontSize
}{\void}
156 Returns actual font size (HTML size varies from -
2 to +
4)
158 \membersection{wxHtmlWinParser::GetFontUnderlined
}\label{wxhtmlwinparsergetfontunderlined
}
160 \constfunc{int
}{GetFontUnderlined
}{\void}
162 Returns true if actual font is underlined, false otherwise.
164 \membersection{wxHtmlWinParser::GetInputEncoding
}\label{wxhtmlwinparsergetinputencoding
}
166 \constfunc{wxFontEncoding
}{GetInputEncoding
}{\void}
168 Returns input encoding.
170 \membersection{wxHtmlWinParser::GetLink
}\label{wxhtmlwinparsergetlink
}
172 \constfunc{const wxHtmlLinkInfo\&
}{GetLink
}{\void}
174 Returns actual hypertext link. (This value has a non-empty
175 \helpref{Href
}{wxhtmllinkinfogethref
} string
176 if the parser is between
{\tt <A>
} and
{\tt </A>
} tags,
177 wxEmptyString otherwise.)
179 \membersection{wxHtmlWinParser::GetLinkColor
}\label{wxhtmlwinparsergetlinkcolor
}
181 \constfunc{const wxColour\&
}{GetLinkColor
}{\void}
183 Returns the colour of hypertext link text.
185 \membersection{wxHtmlWinParser::GetOutputEncoding
}\label{wxhtmlwinparsergetoutputencoding
}
187 \constfunc{wxFontEncoding
}{GetOutputEncoding
}{\void}
189 Returns output encoding, i.e. closest match to
document's input encoding
190 that is supported by operating system.
192 \membersection{wxHtmlWinParser::GetWindow
}\label{wxhtmlwinparsergetwindow
}
194 \func{wxHtmlWindow*
}{GetWindow
}{\void}
196 Returns associated window (wxHtmlWindow). This may be NULL! (You should always
197 test if it is non-NULL. For example
{\tt TITLE
} handler sets window
198 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
}).
206 \membersection{wxHtmlWinParser::SetActualColor
}\label{wxhtmlwinparsersetactualcolor
}
208 \func{void
}{SetActualColor
}{\param{const wxColour\&
}{clr
}}
210 Sets actual text colour. Note: this DOESN'T change the colour!
211 You must create
\helpref{wxHtmlColourCell
}{wxhtmlcolourcell
} yourself.
213 \membersection{wxHtmlWinParser::SetAlign
}\label{wxhtmlwinparsersetalign
}
215 \func{void
}{SetAlign
}{\param{int
}{a
}}
217 Sets default horizontal alignment (see
218 \helpref{wxHtmlContainerCell::SetAlignHor
}{wxhtmlcontainercellsetalignhor
}.)
219 Alignment of newly opened container is set to this value.
221 \membersection{wxHtmlWinParser::SetContainer
}\label{wxhtmlwinparsersetcontainer
}
223 \func{wxHtmlContainerCell*
}{SetContainer
}{\param{wxHtmlContainerCell *
}{c
}}
225 Allows you to directly set opened container. This is not recommended - you should use OpenContainer
228 \membersection{wxHtmlWinParser::SetDC
}\label{wxhtmlwinparsersetdc
}
230 \func{virtual void
}{SetDC
}{\param{wxDC
}{*dc
},
\param{double
}{pixel
\_scale =
1.0}}
232 Sets the DC. This must be called before
\helpref{Parse
}{wxhtmlparserparse
}!
233 {\it pixel
\_scale} can be used when rendering to high-resolution
234 DCs (e.g. printer) to adjust size of pixel metrics. (Many dimensions in
235 HTML are given in pixels -- e.g. image sizes.
300x300 image would be only one
236 inch wide on typical printer. With pixel
\_scale =
3.0 it would be
3 inches.)
238 \membersection{wxHtmlWinParser::SetFontBold
}\label{wxhtmlwinparsersetfontbold
}
240 \func{void
}{SetFontBold
}{\param{int
}{x
}}
242 Sets bold flag of actualfont.
{\it x
} is either true of false.
244 \membersection{wxHtmlWinParser::SetFontFace
}\label{wxhtmlwinparsersetfontface
}
246 \func{void
}{SetFontFace
}{\param{const wxString\&
}{face
}}
248 Sets current font face to
{\it face
}. This affects either fixed size
249 font or proportional, depending on context (whether the parser is
250 inside
{\tt <TT>
} tag or not).
252 \membersection{wxHtmlWinParser::SetFontFixed
}\label{wxhtmlwinparsersetfontfixed
}
254 \func{void
}{SetFontFixed
}{\param{int
}{x
}}
256 Sets fixed face flag of actualfont.
{\it x
} is either true of false.
258 \membersection{wxHtmlWinParser::SetFontItalic
}\label{wxhtmlwinparsersetfontitalic
}
260 \func{void
}{SetFontItalic
}{\param{int
}{x
}}
262 Sets italic flag of actualfont.
{\it x
} is either true of false.
264 \membersection{wxHtmlWinParser::SetFontSize
}\label{wxhtmlwinparsersetfontsize
}
266 \func{void
}{SetFontSize
}{\param{int
}{s
}}
268 Sets actual font size (HTML size varies from
1 to
7)
270 \membersection{wxHtmlWinParser::SetFontUnderlined
}\label{wxhtmlwinparsersetfontunderlined
}
272 \func{void
}{SetFontUnderlined
}{\param{int
}{x
}}
274 Sets underlined flag of actualfont.
{\it x
} is either true of false.
276 \membersection{wxHtmlWinParser::SetFonts
}\label{wxhtmlwinparsersetfonts
}
278 \func{void
}{SetFonts
}{\param{const wxString\&
}{normal
\_face},
\param{const wxString\&
}{fixed
\_face},
\param{const int
}{*sizes = NULL
}}
280 Sets fonts. See
\helpref{wxHtmlWindow::SetFonts
}{wxhtmlwindowsetfonts
} for
281 detailed description.
283 \membersection{wxHtmlWinParser::SetInputEncoding
}\label{wxhtmlwinparsersetinputencoding
}
285 \func{void
}{SetInputEncoding
}{\param{wxFontEncoding
}{enc
}}
287 Sets input encoding. The parser uses this information to build conversion
288 tables from
document's encoding to some encoding supported by operating
291 \membersection{wxHtmlWinParser::SetLink
}\label{wxhtmlwinparsersetlink
}
293 \func{void
}{SetLink
}{\param{const wxHtmlLinkInfo\&
}{link
}}
295 Sets actual hypertext link. Empty link is represented
296 by
\helpref{wxHtmlLinkInfo
}{wxhtmllinkinfo
} with
{\it Href
} equal
299 \membersection{wxHtmlWinParser::SetLinkColor
}\label{wxhtmlwinparsersetlinkcolor
}
301 \func{void
}{SetLinkColor
}{\param{const wxColour\&
}{clr
}}
303 Sets colour of hypertext link.