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 mail 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{wxHtmlWindow
}{*wnd
}}
37 Constructor. Don't use the default one, use constructor with
38 {\it wnd
} parameter (
{\it wnd
} is pointer to associated
\helpref{wxHtmlWindow
}{wxhtmlwindow
})
40 \membersection{wxHtmlWinParser::AddModule
}\label{wxhtmlwinparseraddmodule
}
42 \func{static void
}{AddModule
}{\param{wxHtmlTagsModule
}{*module
}}
44 Adds
\helpref{module
}{handlers
} to the list of wxHtmlWinParser tag handler.
46 \membersection{wxHtmlWinParser::CloseContainer
}\label{wxhtmlwinparserclosecontainer
}
48 \func{wxHtmlContainerCell*
}{CloseContainer
}{\void}
50 Closes the container, sets actual container to the parent one
51 and returns pointer to it (see
\helpref{Overview
}{cells
}).
53 \membersection{wxHtmlWinParser::CreateCurrentFont
}\label{wxhtmlwinparsercreatecurrentfont
}
55 \func{virtual wxFont*
}{CreateCurrentFont
}{\void}
57 Creates font based on current setting (see
58 \helpref{SetFontSize
}{wxhtmlwinparsersetfontsize
},
59 \helpref{SetFontBold
}{wxhtmlwinparsersetfontbold
},
60 \helpref{SetFontItalic
}{wxhtmlwinparsersetfontitalic
},
61 \helpref{SetFontFixed
}{wxhtmlwinparsersetfontfixed
},
62 \helpref{SetFontUnderlined
}{wxhtmlwinparsersetfontunderlined
})
63 and returns pointer to it.
64 If the font was already created only a pointer is returned.
67 \membersection{wxHtmlWinParser::GetActualColor
}\label{wxhtmlwinparsergetactualcolor
}
69 \constfunc{const wxColour\&
}{GetActualColor
}{\void}
71 Returns actual text colour.
73 \membersection{wxHtmlWinParser::GetAlign
}\label{wxhtmlwinparsergetalign
}
75 \constfunc{int
}{GetAlign
}{\void}
77 Returns default horizontal alignment.
79 \membersection{wxHtmlWinParser::GetCharHeight
}\label{wxhtmlwinparsergetcharheight
}
81 \constfunc{int
}{GetCharHeight
}{\void}
83 Returns (average) char height in standard font. It is used as DC-independent metrics.
85 {\bf Note:
} This function doesn't return the
{\it actual
} height. If you want to
86 know the height of the current font, call
{\tt GetDC -> GetCharHeight()
}.
88 \membersection{wxHtmlWinParser::GetCharWidth
}\label{wxhtmlwinparsergetcharwidth
}
90 \constfunc{int
}{GetCharWidth
}{\void}
92 Returns average char width in standard font. It is used as DC-independent metrics.
94 {\bf Note:
} This function doesn't return the
{\it actual
} width. If you want to
95 know the height of the current font, call
{\tt GetDC -> GetCharWidth()
}
97 \membersection{wxHtmlWinParser::GetContainer
}\label{wxhtmlwinparsergetcontainer
}
99 \constfunc{wxHtmlContainerCell*
}{GetContainer
}{\void}
101 Returns pointer to the currently opened container (see
\helpref{Overview
}{cells
}).
105 m_WParser -> GetContainer() -> InsertCell(new ...);
108 \membersection{wxHtmlWinParser::GetDC
}\label{wxhtmlwinparsergetdc
}
110 \func{wxDC*
}{GetDC
}{\void}
112 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.
134 \membersection{wxHtmlWinParser::GetFontFixed
}\label{wxhtmlwinparsergetfontfixed
}
136 \constfunc{int
}{GetFontFixed
}{\void}
138 Returns true if actual font is fixed face, false otherwise.
140 \membersection{wxHtmlWinParser::GetFontItalic
}\label{wxhtmlwinparsergetfontitalic
}
142 \constfunc{int
}{GetFontItalic
}{\void}
144 Returns true if actual font is italic, false otherwise.
146 \membersection{wxHtmlWinParser::GetFontSize
}\label{wxhtmlwinparsergetfontsize
}
148 \constfunc{int
}{GetFontSize
}{\void}
150 Returns actual font size (HTML size varies from -
2 to +
4)
152 \membersection{wxHtmlWinParser::GetFontUnderlined
}\label{wxhtmlwinparsergetfontunderlined
}
154 \constfunc{int
}{GetFontUnderlined
}{\void}
156 Returns true if actual font is underlined, false otherwise.
158 \membersection{wxHtmlWinParser::GetInputEncoding
}\label{wxhtmlwinparsergetinputencoding
}
160 \constfunc{wxFontEncoding
}{GetInputEncoding
}{\void}
162 Returns input encoding.
164 \membersection{wxHtmlWinParser::GetLink
}\label{wxhtmlwinparsergetlink
}
166 \constfunc{const wxHtmlLinkInfo\&
}{GetLink
}{\void}
168 Returns actual hypertext link. (This value has a non-empty
169 \helpref{Href
}{wxhtmllinkinfogethref
} string
170 if the parser is between
{\tt <A>
} and
{\tt </A>
} tags,
171 wxEmptyString otherwise.)
173 \membersection{wxHtmlWinParser::GetLinkColor
}\label{wxhtmlwinparsergetlinkcolor
}
175 \constfunc{const wxColour\&
}{GetLinkColor
}{\void}
177 Returns the colour of hypertext link text.
179 \membersection{wxHtmlWinParser::GetOutputEncoding
}\label{wxhtmlwinparsergetoutputencoding
}
181 \constfunc{wxFontEncoding
}{GetOutputEncoding
}{\void}
183 Returns output encoding, i.e. closest match to
document's input encoding
184 that is supported by operating system.
186 \membersection{wxHtmlWinParser::GetWindow
}\label{wxhtmlwinparsergetwindow
}
188 \func{wxHtmlWindow*
}{GetWindow
}{\void}
190 Returns associated window (wxHtmlWindow). This may be NULL! (You should always
191 test if it is non-NULL. For example
{\tt TITLE
} handler sets window
192 title only if some window is associated, otherwise it does nothing)
194 \membersection{wxHtmlWinParser::OpenContainer
}\label{wxhtmlwinparseropencontainer
}
196 \func{wxHtmlContainerCell*
}{OpenContainer
}{\void}
198 Opens new container and returns pointer to it (see
\helpref{Overview
}{cells
}).
200 \membersection{wxHtmlWinParser::SetActualColor
}\label{wxhtmlwinparsersetactualcolor
}
202 \func{void
}{SetActualColor
}{\param{const wxColour\&
}{clr
}}
204 Sets actual text colour. Note: this DOESN'T change the colour!
205 You must create
\helpref{wxHtmlColourCell
}{wxhtmlcolourcell
} yourself.
207 \membersection{wxHtmlWinParser::SetAlign
}\label{wxhtmlwinparsersetalign
}
209 \func{void
}{SetAlign
}{\param{int
}{a
}}
211 Sets default horizontal alignment (see
212 \helpref{wxHtmlContainerCell::SetAlignHor
}{wxhtmlcontainercellsetalignhor
}.)
213 Alignment of newly opened container is set to this value.
215 \membersection{wxHtmlWinParser::SetContainer
}\label{wxhtmlwinparsersetcontainer
}
217 \func{wxHtmlContainerCell*
}{SetContainer
}{\param{wxHtmlContainerCell *
}{c
}}
219 Allows you to directly set opened container. This is not recommended - you should use OpenContainer
222 \membersection{wxHtmlWinParser::SetDC
}\label{wxhtmlwinparsersetdc
}
224 \func{virtual void
}{SetDC
}{\param{wxDC
}{*dc
},
\param{double
}{pixel
\_scale =
1.0}}
226 Sets the DC. This must be called before
\helpref{Parse
}{wxhtmlparserparse
}!
227 {\it pixel
\_scale} can be used when rendering to high-resolution
228 DCs (e.g. printer) to adjust size of pixel metrics. (Many dimensions in
229 HTML are given in pixels -- e.g. image sizes.
300x300 image would be only one
230 inch wide on typical printer. With pixel
\_scale =
3.0 it would be
3 inches.)
232 \membersection{wxHtmlWinParser::SetFontBold
}\label{wxhtmlwinparsersetfontbold
}
234 \func{void
}{SetFontBold
}{\param{int
}{x
}}
236 Sets bold flag of actualfont.
{\it x
} is either true of false.
238 \membersection{wxHtmlWinParser::SetFontFace
}\label{wxhtmlwinparsersetfontface
}
240 \func{void
}{SetFontFace
}{\param{const wxString\&
}{face
}}
242 Sets current font face to
{\it face
}. This affects either fixed size
243 font or proportional, depending on context (whether the parser is
244 inside
{\tt <TT>
} tag or not).
246 \membersection{wxHtmlWinParser::SetFontFixed
}\label{wxhtmlwinparsersetfontfixed
}
248 \func{void
}{SetFontFixed
}{\param{int
}{x
}}
250 Sets fixed face flag of actualfont.
{\it x
} is either true of false.
252 \membersection{wxHtmlWinParser::SetFontItalic
}\label{wxhtmlwinparsersetfontitalic
}
254 \func{void
}{SetFontItalic
}{\param{int
}{x
}}
256 Sets italic flag of actualfont.
{\it x
} is either true of false.
258 \membersection{wxHtmlWinParser::SetFontSize
}\label{wxhtmlwinparsersetfontsize
}
260 \func{void
}{SetFontSize
}{\param{int
}{s
}}
262 Sets actual font size (HTML size varies from
1 to
7)
264 \membersection{wxHtmlWinParser::SetFontUnderlined
}\label{wxhtmlwinparsersetfontunderlined
}
266 \func{void
}{SetFontUnderlined
}{\param{int
}{x
}}
268 Sets underlined flag of actualfont.
{\it x
} is either true of false.
270 \membersection{wxHtmlWinParser::SetFonts
}\label{wxhtmlwinparsersetfonts
}
272 \func{void
}{SetFonts
}{\param{wxString
}{normal
\_face},
\param{wxString
}{fixed
\_face},
\param{const int
}{*sizes = NULL
}}
274 Sets fonts. See
\helpref{wxHtmlWindow::SetFonts
}{wxhtmlwindowsetfonts
} for
275 detailed description.
277 \membersection{wxHtmlWinParser::SetInputEncoding
}\label{wxhtmlwinparsersetinputencoding
}
279 \func{void
}{SetInputEncoding
}{\param{wxFontEncoding
}{enc
}}
281 Sets input encoding. The parser uses this information to build conversion
282 tables from
document's encoding to some encoding supported by operating
285 \membersection{wxHtmlWinParser::SetLink
}\label{wxhtmlwinparsersetlink
}
287 \func{void
}{SetLink
}{\param{const wxHtmlLinkInfo\&
}{link
}}
289 Sets actual hypertext link. Empty link is represented
290 by
\helpref{wxHtmlLinkInfo
}{wxhtmllinkinfo
} with
{\it Href
} equal
293 \membersection{wxHtmlWinParser::SetLinkColor
}\label{wxhtmlwinparsersetlinkcolor
}
295 \func{void
}{SetLinkColor
}{\param{const wxColour\&
}{clr
}}
297 Sets colour of hypertext link.