wx.html.HtmlWindowInterface¶
Abstract interface to a HTML rendering window (such as wx.html.HtmlWindow or wx.html.HtmlListBox) that is passed to wx.html.HtmlWinParser.
It encapsulates all communication from the parser to the window.
Class Hierarchy¶
Known Subclasses¶
Methods Summary¶
Ctor. |
|
Returns background colour to use by default. |
|
Returns mouse cursor of given type. |
|
Returns the window used for rendering (may be |
|
Converts coordinates pos relative to given cell to physical coordinates in the window. |
|
Called when a link is clicked. |
|
Called when the parser needs to open another URL (e.g. |
|
Sets window’s background to colour clr. |
|
Sets window’s background to given bitmap. |
|
Sets status bar text. |
|
Called by the parser to set window’s title to given text. |
Properties Summary¶
See |
Class API¶
- class wx.html.HtmlWindowInterface(object)¶
Possible constructors:
HtmlWindowInterface() -> None
Abstract interface to a HTML rendering window (such as HtmlWindow or HtmlListBox) that is passed to HtmlWinParser.
Methods¶
- __init__(self)¶
Ctor.
- Return type:
None
- GetHTMLBackgroundColour(self)¶
Returns background colour to use by default.
- Return type:
Colour
- GetHTMLCursor(self, type)¶
Returns mouse cursor of given type.
- Parameters:
type (HtmlWindowInterface.HTMLCursor)
- Return type:
Cursor
- GetHTMLWindow(self)¶
Returns the window used for rendering (may be
None
).- Return type:
Window
- HTMLCoordsToWindow(self, cell, pos)¶
Converts coordinates pos relative to given cell to physical coordinates in the window.
- Parameters:
cell (wx.html.HtmlCell)
pos (wx.Point)
- Return type:
Point
- OnHTMLLinkClicked(self, link)¶
Called when a link is clicked.
- Parameters:
link (wx.html.HtmlLinkInfo) – information about the clicked link
- Return type:
None
- OnHTMLOpeningURL(self, type, url)¶
Called when the parser needs to open another URL (e.g.
an image).
- Parameters:
type (HtmlURLType) – Type of the URL request (e.g. image)
url (string) – URL the parser wants to open
If the return value is
wx.html.HTML_REDIRECT
, then the URL to redirect to will be stored in this variable (the pointer must never beNone
)- Return type:
Tuple[HtmlOpeningStatus, str]
- Returns:
indicator of how to treat the request
- SetHTMLBackgroundColour(self, clr)¶
Sets window’s background to colour clr.
- Parameters:
clr (wx.Colour)
- Return type:
None
- SetHTMLBackgroundImage(self, bmpBg)¶
Sets window’s background to given bitmap.
- Parameters:
bmpBg (wx.BitmapBundle)
- Return type:
None
- SetHTMLStatusText(self, text)¶
Sets status bar text.
- Parameters:
text (string)
- Return type:
None
- SetHTMLWindowTitle(self, title)¶
Called by the parser to set window’s title to given text.
- Parameters:
title (string)
- Return type:
None
Properties¶
- HTMLBackgroundColour¶
- HTMLWindow¶
See
GetHTMLWindow