********************* wx.html.HtmlWinParser ********************* Inheritance diagram for `wx.html.HtmlWinParser`: | .. inheritance-diagram:: wx.html.HtmlWinParser | Description =========== This class is derived from `wx.html.HtmlParser `_ and its main goal is to parse HTML input so that it can be displayed in `wx.html.HtmlWindow `_. It uses a special `wx.html.HtmlWinTagHandler `_. Derived From ^^^^^^^^^^^^^ * `wx.html.HtmlParser `_ Methods Summary ^^^^^^^^^^^^^^^ * `__init__ <#__init__>`_ * `CloseContainer <#CloseContainer>`_ * `CreateCurrentFont <#CreateCurrentFont>`_ * `GetActualColor <#GetActualColor>`_ * `GetAlign <#GetAlign>`_ * `GetCharHeight <#GetCharHeight>`_ * `GetCharWidth <#GetCharWidth>`_ * `GetContainer <#GetContainer>`_ * `GetDC <#GetDC>`_ * `GetFontBold <#GetFontBold>`_ * `GetFontFixed <#GetFontFixed>`_ * `GetFontItalic <#GetFontItalic>`_ * `GetFontSize <#GetFontSize>`_ * `GetFontUnderlined <#GetFontUnderlined>`_ * `GetLink <#GetLink>`_ * `GetLinkColor <#GetLinkColor>`_ * `GetWindow <#GetWindow>`_ * `GetWindowInterface <#GetWindowInterface>`_ * `OpenContainer <#OpenContainer>`_ * `SetActualColor <#SetActualColor>`_ * `SetAlign <#SetAlign>`_ * `SetContainer <#SetContainer>`_ * `SetDC <#SetDC>`_ * `SetFontBold <#SetFontBold>`_ * `SetFontFixed <#SetFontFixed>`_ * `SetFontItalic <#SetFontItalic>`_ * `SetFontSize <#SetFontSize>`_ * `SetFontUnderlined <#SetFontUnderlined>`_ * `SetFonts <#SetFonts>`_ * `SetLink <#SetLink>`_ * `SetLinkColor <#SetLinkColor>`_ * `SetStandardFonts <#SetStandardFonts>`_ Properties Summary ^^^^^^^^^^^^^^^^^^ * `ActualColor <#ActualColor>`_ * `ActualColour <#ActualColour>`_ * `Align <#Align>`_ * `CharHeight <#CharHeight>`_ * `CharWidth <#CharWidth>`_ * `Container <#Container>`_ * `DC <#DC>`_ * `FontBold <#FontBold>`_ * `FontFixed <#FontFixed>`_ * `FontItalic <#FontItalic>`_ * `FontSize <#FontSize>`_ * `FontUnderlined <#FontUnderlined>`_ * `Link <#Link>`_ * `LinkColor <#LinkColor>`_ * `WindowInterface <#WindowInterface>`_ Class API ========= Methods ^^^^^^^ .. method:: __init__(wnd=None) Constructor. **Parameters:** * `wnd` (`wx.html.HtmlWindow `_) | **Returns:** `wx.html.HtmlWinParser `_ -------- .. method:: CloseContainer() Closes the container, sets actual container to the parent one and returns pointer to it. | **Returns:** `wx.html.HtmlContainerCell `_ -------- .. method:: CreateCurrentFont() Creates font based on current setting (see `SetFontSize <#SetFontSize>`_, `SetFontBold <#SetFontBold>`_, `SetFontItalic <#SetFontItalic>`_, `SetFontFixed <#SetFontFixed>`_, `SetFontUnderlined <#SetFontUnderlined>`_) and returns pointer to it. If the font was already created only a pointer is returned. | **Returns:** `wx.Font <../Widgets/wx.Font.html>`_ -------- .. method:: GetActualColor() Returns actual text colour. | **Returns:** `wx.Colour <../Widgets/wx.Colour.html>`_ -------- .. method:: GetAlign() Returns default horizontal alignment. | **Returns:** `int` -------- .. method:: 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()`. -------- .. method:: 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()`. -------- .. method:: GetContainer() Returns pointer to the currently opened container. | **Returns:** `wx.html.HtmlContainerCell `_ -------- .. method:: GetDC() Returns pointer to the DC used during parsing. | **Returns:** `wx.DC <../Widgets/wx.DC.html>`_ -------- .. method:: GetFontBold() Returns ``True`` if actual font is bold, ``False`` otherwise. | **Returns:** `bool` -------- .. method:: GetFontFixed() Returns ``True`` if actual font is fixed face, ``False`` otherwise. | **Returns:** `bool` -------- .. method:: GetFontItalic() Returns ``True`` if actual font is italic, ``False`` otherwise. | **Returns:** `bool` -------- .. method:: GetFontSize() Returns actual font size (HTML size varies from -2 to +4) | **Returns:** `int` -------- .. method:: GetFontUnderlined() Returns ``True`` if actual font is underlined, ``False`` otherwise. | **Returns:** `bool` -------- .. method:: GetLink() Returns actual hypertext link. | **Returns:** `wx.html.HtmlLinkInfo `_ -------- .. method:: GetLinkColor() Returns the colour of hypertext link text. | **Returns:** `wx.Colour <../Widgets/wx.Colour.html>`_ -------- .. method:: 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 `_ -------- .. method:: GetWindowInterface() `No docstrings available for this method.` -------- .. method:: OpenContainer() Opens new container and returns pointer to it. | **Returns:** `wx.html.HtmlContainerCell `_ -------- .. method:: SetActualColor(clr) Sets actual text colour. **Parameters:** * `clr` (`wx.Colour <../Widgets/wx.Colour.html>`_) .. note:: This DOESN'T change the colour! You must create `wx.html.HtmlColourCell `_ yourself. -------- .. method:: SetAlign(a) Sets default horizontal alignment (see `wx.html.HtmlContainerCell.SetAlignHor `_). Alignment of newly opened container is set to this value. **Parameters:** * `a` (int) -------- .. method:: SetContainer(c) Allows you to directly set opened container. This is not recommended - you should use `OpenContainer <#OpenContainer>`_ wherever possible. **Parameters:** * `c` (`wx.html.HtmlContainerCell `_) | **Returns:** `wx.html.HtmlContainerCell `_ -------- .. method:: SetDC(dc) Sets the DC. This must be called before `Parse `_! **Parameters:** * `dc` (`wx.DC <../Widgets/wx.DC.html>`_) -------- .. method:: SetFontBold(x) Sets bold flag of actual font. `x` is either ``True`` or ``False``. **Parameters:** * `x` (bool) -------- .. method:: SetFontFixed(x) Sets fixed face flag of actual font. `x` is either ``True`` or ``False``. **Parameters:** * `x` (bool) -------- .. method:: SetFontItalic(x) Sets italic flag of actual font. `x` is either ``True`` or ``False``. **Parameters:** * `x` (bool) -------- .. method:: SetFontSize(s) Sets actual font size (HTML size varies from 1 to 7) **Parameters:** * `s` (int) -------- .. method:: SetFontUnderlined(x) Sets underlined flag of actual font. `x` is either ``True`` or ``False``. **Parameters:** * `x` (bool) -------- .. method:: 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) -------- .. method:: SetLink(link) Sets actual hypertext link. Empty link is represented by `wx.html.HtmlLinkInfo `_ with `Href` equal to "". **Parameters:** * `link` (`wx.html.HtmlLinkInfo `_) -------- .. method:: SetLinkColor(clr) Sets colour of hypertext link. **Parameters:** * `clr` (`wx.Colour <../Widgets/wx.Colour.html>`_) -------- .. method:: SetStandardFonts(size=-1, normal_face="", fixed_face="") | **Parameters:** * `size` (int) * `normal_face` (string) * `fixed_face` (string) -------- Properties ^^^^^^^^^^ .. attribute:: ActualColor See `GetActualColor <#GetActualColor>`_ and `SetActualColor <#SetActualColor>`_ .. attribute:: ActualColour See `GetActualColor <#GetActualColor>`_ and `SetActualColor <#SetActualColor>`_ .. attribute:: Align See `GetAlign <#GetAlign>`_ and `SetAlign <#SetAlign>`_ .. attribute:: CharHeight See `GetCharHeight <#GetCharHeight>`_ .. attribute:: CharWidth See `GetCharWidth <#GetCharWidth>`_ .. attribute:: Container See `GetContainer <#GetContainer>`_ and `SetContainer <#SetContainer>`_ .. attribute:: DC See `GetDC <#GetDC>`_ and `SetDC <#SetDC>`_ .. attribute:: FontBold See `GetFontBold <#GetFontBold>`_ and `SetFontBold <#SetFontBold>`_ .. attribute:: FontFixed See `GetFontFixed <#GetFontFixed>`_ and `SetFontFixed <#SetFontFixed>`_ .. attribute:: FontItalic See `GetFontItalic <#GetFontItalic>`_ and `SetFontItalic <#SetFontItalic>`_ .. attribute:: FontSize See `GetFontSize <#GetFontSize>`_ and `SetFontSize <#SetFontSize>`_ .. attribute:: FontUnderlined See `GetFontUnderlined <#GetFontUnderlined>`_ and `SetFontUnderlined <#SetFontUnderlined>`_ .. attribute:: Link See `GetLink <#GetLink>`_ and `SetLink <#SetLink>`_ .. attribute:: LinkColor See `GetLinkColor <#GetLinkColor>`_ and `SetLinkColor <#SetLinkColor>`_ .. attribute:: WindowInterface See `GetWindowInterface <#GetWindowInterface>`_