.\" This is a wxWidgets manpage page generated from the XML docs
.TH wxHtmlWinParser 3wx 2005-02-15 "wxWidgets" "wxWidgets class documentation"
.SH NAME
wxHtmlWinParser \-
HTML parser class for wxHtmlWindow
.SH DESCRIPTION
This class is derived from
wxHtmlParser
and its main goal is to parse HTML input so that it can be displayed in
wxHtmlWindow
. It uses a special
wxHtmlWinTagHandler
.
.SH NOTE
The product of parsing is a wxHtmlCell (resp. wxHtmlContainer) object.
.SH "PARENTS"
wxHtmlParser
.SH "INCLUDE FILES"
wx/html/winpars.h
.SH MEMBERS
.SS wxHtmlWinParser ()
.SS wxHtmlWinParser (wxHtmlWindow *wnd)
Constructor. Don't use the default one, use constructor with
wnd
parameter (
wnd
is pointer to associated
wxHtmlWindow
)
.SS static void AddModule (wxHtmlTagsModule *module)
Adds
module
to the list of wxHtmlWinParser tag handler.
.SS wxHtmlContainerCell* CloseContainer ()
Closes the container, sets actual container to the parent one and returns
pointer to it (see
Overview
).
.SS virtual wxFont* CreateCurrentFont ()
Creates font based on current setting (see
SetFontSize
,
SetFontBold
,
SetFontItalic
,
SetFontFixed
,
SetFontUnderlined
) and returns pointer to it. If the font was already created only a
pointer is returned.
.SS const wxColour& GetActualColor ()
Returns actual text colour.
.SS int GetAlign ()
Returns default horizontal alignment.
.SS int GetCharHeight ()
Returns (average) char height in standard font. It is used as
DC-independent metrics.
Note:
This function doesn't return the
actual
height. If you want to know the height of the current font, call
GetDC -> GetCharHeight()
.
.SS int GetCharWidth ()
Returns average char width in standard font. It is used as DC-independent
metrics.
Note:
This function doesn't return the
actual
width. If you want to know the height of the current font, call
GetDC -> GetCharWidth()
.SS wxHtmlContainerCell* GetContainer ()
Returns pointer to the currently opened container (see
Overview
). Common use:
m_WParser -> GetContainer() -> InsertCell(new ...);
.SS wxDC* GetDC ()
Returns pointer to the DC used during parsing.
.SS wxEncodingConverter * GetEncodingConverter ()
Returns
wxEncodingConverter
class used to do conversion between
input encoding
and
output encoding
.
.SS int GetFontBold ()
Returns true if actual font is bold, false otherwise.
.SS wxString GetFontFace ()
Returns actual font face name.
.SS int GetFontFixed ()
Returns true if actual font is fixed face, false otherwise.
.SS int GetFontItalic ()
Returns true if actual font is italic, false otherwise.
.SS int GetFontSize ()
Returns actual font size (HTML size varies from -2 to +4)
.SS int GetFontUnderlined ()
Returns true if actual font is underlined, false otherwise.
.SS wxFontEncoding GetInputEncoding ()
Returns input encoding.
.SS const wxHtmlLinkInfo& GetLink ()
Returns actual hypertext link. (This value has a non-empty
Href
string if the parser is between
and
tags, wxEmptyString otherwise.)
.SS const wxColour& GetLinkColor ()
Returns the colour of hypertext link text.
.SS wxFontEncoding GetOutputEncoding ()
Returns output encoding, i.e. closest match to document's input encoding
that is supported by operating system.
.SS wxHtmlWindow* GetWindow ()
Returns associated window (wxHtmlWindow). This may be NULL! (You should
always test if it is non-NULL. For example
TITLE
handler sets window title only if some window is associated, otherwise it
does nothing)
.SS wxHtmlContainerCell* OpenContainer ()
Opens new container and returns pointer to it (see
Overview
).
.SS void SetActualColor (const wxColour& clr)
Sets actual text colour. Note: this DOESN'T change the colour! You must
create
wxHtmlColourCell
yourself.
.SS void SetAlign (int a)
Sets default horizontal alignment (see
wxHtmlContainerCell::SetAlignHor
.) Alignment of newly opened container is set to this value.
.SS wxHtmlContainerCell* SetContainer (wxHtmlContainerCell *c)
Allows you to directly set opened container. This is not recommended - you
should use OpenContainer wherever possible.
.SS virtual void SetDC (wxDC *dcdouble pixel_scale = 1.0)
Sets the DC. This must be called before
Parse
!
pixel_scale
can be used when rendering to high-resolution DCs (e.g. printer) to adjust
size of pixel metrics. (Many dimensions in HTML are given in pixels --
e.g. image sizes. 300x300 image would be only one inch wide on typical
printer. With pixel_scale = 3.0 it would be 3 inches.)
.SS void SetFontBold (int x)
Sets bold flag of actualfont.
x
is either true of false.
.SS void SetFontFace (const wxString& face)
Sets current font face to
face
. This affects either fixed size font or proportional, depending on
context (whether the parser is inside
tag or not).
.SS void SetFontFixed (int x)
Sets fixed face flag of actualfont.
x
is either true of false.
.SS void SetFontItalic (int x)
Sets italic flag of actualfont.
x
is either true of false.
.SS void SetFontSize (int s)
Sets actual font size (HTML size varies from 1 to 7)
.SS void SetFontUnderlined (int x)
Sets underlined flag of actualfont.
x
is either true of false.
.SS void SetFonts (const wxString& normal_faceconst wxString& fixed_faceconst int *sizes = NULL)
Sets fonts. See
wxHtmlWindow::SetFonts
for detailed description.
.SS void SetInputEncoding (wxFontEncoding enc)
Sets input encoding. The parser uses this information to build conversion
tables from document's encoding to some encoding supported by operating
system.
.SS void SetLink (const wxHtmlLinkInfo& link)
Sets actual hypertext link. Empty link is represented by
wxHtmlLinkInfo
with
Href
equal to wxEmptyString.
.SS void SetLinkColor (const wxColour& clr)
Sets colour of hypertext link.
.SH "SEE ALSO"
wxHtmlParser
Handlers overview
.SH "AUTHORS"
Documentation content by Julian Smart, Robert Roebling, Vadim Zeitlin, Robin Dunn, et al
Conversion to manpage format by Arnout Engelen (http://bzzt.net), bugreports welcome.