wx.html.HtmlWinParser

Inheritance diagram for wx.html.HtmlWinParser:



Class API

Methods

__init__(wnd=None)

Constructor.

Parameters:


Returns:

wx.html.HtmlWinParser


CloseContainer()

Closes the container, sets actual container to the parent one and returns pointer to it.


Returns:

wx.html.HtmlContainerCell


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.


Returns:

wx.Font


GetActualColor()

Returns actual text colour.


Returns:

wx.Colour


GetAlign()

Returns default horizontal alignment.


Returns:

int


GetCharHeight()

Returns (average) char height in standard font. It is used as DC-independent metrics.


Returns:

int

Note

This function doesn’t return the actual height. If you want to know the height of the current font, call GetDC().GetCharHeight().


GetCharWidth()

Returns average char width in standard font. It is used as DC-independent metrics.


Returns:

int

Note

This function doesn’t return the actual height. If you want to know the height of the current font, call GetDC().GetCharWidth().


GetContainer()

Returns pointer to the currently opened container.


Returns:

wx.html.HtmlContainerCell


GetDC()

Returns pointer to the DC used during parsing.


Returns:

wx.DC


GetFontBold()

Returns True if actual font is bold, False otherwise.


Returns:

bool


GetFontFixed()

Returns True if actual font is fixed face, False otherwise.


Returns:

bool


GetFontItalic()

Returns True if actual font is italic, False otherwise.


Returns:

bool


GetFontSize()

Returns actual font size (HTML size varies from -2 to +4)


Returns:

int


GetFontUnderlined()

Returns True if actual font is underlined, False otherwise.


Returns:

bool


Returns actual hypertext link.


Returns:

wx.html.HtmlLinkInfo


GetLinkColor()

Returns the colour of hypertext link text.


Returns:

wx.Colour


GetWindow()

Returns associated window (wx.html.HtmlWindow).

This may be None! (You should always test if it is not None. For example TITLE handler sets window title only if some window is associated, otherwise it does nothing).


Returns:

wx.html.HtmlWindow


GetWindowInterface()
No docstrings available for this method.

OpenContainer()

Opens new container and returns pointer to it.


Returns:

wx.html.HtmlContainerCell


SetActualColor(clr)

Sets actual text colour.

Parameters:

Note

This DOESN’T change the colour! You must create wx.html.HtmlColourCell yourself.


SetAlign(a)

Sets default horizontal alignment (see wx.html.HtmlContainerCell.SetAlignHor).

Alignment of newly opened container is set to this value.

Parameters:

  • a (int)

SetContainer(c)

Allows you to directly set opened container. This is not recommended - you should use OpenContainer wherever possible.

Parameters:


Returns:

wx.html.HtmlContainerCell


SetDC(dc)

Sets the DC. This must be called before Parse!

Parameters:


SetFontBold(x)

Sets bold flag of actual font. x is either True or False.

Parameters:

  • x (bool)

SetFontFixed(x)

Sets fixed face flag of actual font. x is either True or False.

Parameters:

  • x (bool)

SetFontItalic(x)

Sets italic flag of actual font. x is either True or False.

Parameters:

  • x (bool)

SetFontSize(s)

Sets actual font size (HTML size varies from 1 to 7)

Parameters:

  • s (int)

SetFontUnderlined(x)

Sets underlined flag of actual font. x is either True or False.

Parameters:

  • x (bool)

SetFonts(normal_face, fixed_face, sizes=None)

Sets fonts. See wx.html.HtmlWindow.SetFonts for detailed description.

Parameters:

  • normal_face (string)
  • fixed_face (string)
  • sizes (int)

Sets actual hypertext link.

Empty link is represented by wx.html.HtmlLinkInfo with Href equal to “”.

Parameters:


SetLinkColor(clr)

Sets colour of hypertext link.

Parameters:


SetStandardFonts(size=-1, normal_face="", fixed_face="")

Parameters:

  • size (int)
  • normal_face (string)
  • fixed_face (string)

Properties

ActualColor
See GetActualColor and SetActualColor
ActualColour
See GetActualColor and SetActualColor
Align
See GetAlign and SetAlign
CharHeight
See GetCharHeight
CharWidth
See GetCharWidth
Container
See GetContainer and SetContainer
DC
See GetDC and SetDC
FontBold
See GetFontBold and SetFontBold
FontFixed
See GetFontFixed and SetFontFixed
FontItalic
See GetFontItalic and SetFontItalic
FontSize
See GetFontSize and SetFontSize
FontUnderlined
See GetFontUnderlined and SetFontUnderlined
See GetLink and SetLink
LinkColor
See GetLinkColor and SetLinkColor
WindowInterface
See GetWindowInterface