This class is derived from wxHtmlParser and its mail goal is to parse HTML input so that it can be displayed in wxHtmlWindow. It uses special wxHtmlWinTagHandler.
Notes
Derived from
See Also
Members
wxHtmlWinParser::wxHtmlWinParser
wxHtmlWinParser::AddModule
wxHtmlWinParser::CloseContainer
wxHtmlWinParser::CreateCurrentFont
wxHtmlWinParser::GetActualColor
wxHtmlWinParser::GetAlign
wxHtmlWinParser::GetCharHeight
wxHtmlWinParser::GetCharWidth
wxHtmlWinParser::GetContainer
wxHtmlWinParser::GetDC
wxHtmlWinParser::GetFontBold
wxHtmlWinParser::GetFontFixed
wxHtmlWinParser::GetFontItalic
wxHtmlWinParser::GetFontSize
wxHtmlWinParser::GetFontUnderlined
wxHtmlWinParser::GetLink
wxHtmlWinParser::GetLinkColor
wxHtmlWinParser::GetWindow
wxHtmlWinParser::OpenContainer
wxHtmlWinParser::SetActualColor
wxHtmlWinParser::SetAlign
wxHtmlWinParser::SetDC
wxHtmlWinParser::SetFontBold
wxHtmlWinParser::SetFontFixed
wxHtmlWinParser::SetFontItalic
wxHtmlWinParser::SetFontSize
wxHtmlWinParser::SetFontUnderlined
wxHtmlWinParser::SetFonts
wxHtmlWinParser::SetLink
wxHtmlWinParser::SetLinkColor
wxHtmlWinParser()
wxHtmlWinParser(wxWindow *wnd)
Constructor. Don't use the default one, use constructor with wnd paremeter (wnd is pointer to associated wxHtmlWindow)
static void AddModule(wxHtmlTagsModule *module)
Adds module to the list of wxHtmlWinParser tag handler.
wxHtmlContainerCell* CloseContainer()
Closes the container, sets actual container to the parent one and returns pointer to it (see Overview).
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.)
Fonts created during parsing are temporary data and are not freed on DoneParser. You must call delete myparser->GetTempData(); to free the memory!
const wxColour& GetActualColor() const
Returns actual text color.
int GetAlign() const
Returns default horizontal alignment.
int GetCharHeight() const
Returns (average) char height in standard font. It's used as DC-independent metrics.
Note: This function doesn't return actual height. If you want to know the height of the current font, call GetDC -> GetCharHeight().
int GetCharWidth() const
Returns average char width in standard font. It's used as DC-independent metrics.
Note: This function doesn't return actual width. If you want to know the height of the current font, call GetDC -> GetCharWidth()
wxHtmlContainerCell* GetContainer() const
Returns pointer to the currectly opened container (see Overview). Common use:
m_WParser -> GetContainer() -> InsertCell(new ...);
wxDC* GetDC()
Returns pointer to the DC used during parsing.
int GetFontBold() const
Returns TRUE if actual font is bold, FALSE otherwise.
int GetFontFixed() const
Returns TRUE if actual font is fixed face, FALSE otherwise.
int GetFontItalic() const
Returns TRUE if actual font is italic, FALSE otherwise.
int GetFontSize() const
Returns actual font size (HTML size varies from -2 to +4)
int GetFontUnderlined() const
Returns TRUE if actual font is underlined, FALSE otherwise.
const wxString& GetLink() const
Returns actual hypertext link. (This value is non-empty string if the parser is between <A> and </A> tags, wxEmptyString otherwise.
const wxColour& GetLinkColor() const
Returns color of hypertext link text.
wxWindow* 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)
wxHtmlContainerCell* OpenContainer()
Opens new container and returns pointer to it (see Overview).
void SetActualColor(const wxColour& clr)
Sets actual text color. Note: this DOESN'T change the color! You must create wxHtmlColourCell yourself.
void SetAlign(int a)
Sets default horizontal alignment (see wxHtmlContainerCell::SetAlignHor. Alignment of newly opened container is set to this value.
virtual void SetDC(wxDC *dc)
Sets the DC. This must be called before Parse!
void SetFontBold(int x)
Sets bold flag of actualfont. x is either TRUE of FALSE.
void SetFontFixed(int x)
Sets fixed face flag of actualfont. x is either TRUE of FALSE.
void SetFontItalic(int x)
Sets italic flag of actualfont. x is either TRUE of FALSE.
void SetFontSize(int s)
Sets actual font size (HTML size varies from -2 to +4)
void SetFontUnderlined(int x)
Sets underlined flag of actualfont. x is either TRUE of FALSE.
void SetFonts(wxString normal_face, int normal_italic_mode, wxString fixed_face, int fixed_italic_mode, const int *sizes)
Sets fonts. This method is identical to wxHtmlWindow::SetFonts
void SetLink(const wxString& link)
Sets actual hypertext link. wxEmptyString means no link.
void SetLinkColor(const wxColour& clr)
Sets color of hypertext link.