Inheritance diagram for wx.html.HtmlCell:
Internal data structure. It represents fragments of parsed HTML page, the so-called cell – a word, picture, table, horizontal line and so on. It is used by wx.html.HtmlWindow and wx.html.HtmlWinParser to represent HTML page in memory.
You can divide cells into two groups: visible cells with non-zero width and height and helper cells (usually with zero width and height) that perform special actions such as color or font change.
See also
wx.html.HtmlColourCell, wx.html.HtmlContainerCell, wx.html.HtmlFontCell, wx.html.HtmlWidgetCell, wx.html.HtmlWordCell
Parameters:
Returns:
string
Renders the cell.
Parameters:
dc (wx.DC): Device context to which the cell is to be drawn
x, y (int): Coordinates of parent’s upper left corner (origin). You must add this to GetPosX, GetPosY when passing coordinates to dc’s methods. Example:
dc.DrawText("hello", x + self.GetPosX(), y + self.GetPosY())
view_y1 (int): y-coord of the first line visible in window. This is used to optimize rendering speed
view_y2 (int): y-coord of the last line visible in window. This is used to optimize rendering speed
info (wx.html.HtmlRenderingInfo)
This method is called instead of Draw when the cell is certainly out of the screen (and thus invisible). This is not nonsense – some tags (like wx.html.HtmlColourCell or font setter) must be drawn even if they are invisible!
Parameters:
dc (wx.DC): Device context to which the cell is to be drawn
x, y (int): Coordinates of parent’s upper left corner (origin). You must add this to GetPosX, GetPosY when passing coordinates to dc’s methods. Example:
dc.DrawText("hello", x + self.GetPosX(), y + self.GetPosY())
info (wx.html.HtmlRenderingInfo)
Returns pointer to itself if this cell matches condition (or if any of the cells following in the list matches), None otherwise. (In other words if you call top-level container’s Find it will return pointer to the first cell that matches the condition).
It is recommended way how to obtain pointer to particular cell or to cell of some type (e.g. wx.html.HtmlAnchorCell reacts on wx.html.HTML_COND_ISANCHOR condition).
Parameters:
condition (int): Unique integer identifier of condition, which may be one of:
Condition Flag |
Description |
---|---|
wx.html.HTML_COND_ISANCHOR |
Finds particular anchor. param is a string with name of the anchor. |
wx.html.HTML_COND_USER |
User-defined conditions start from this number. |
param: Optional parameters.
Returns:
Parameters:
Returns:
Returns cursor to show when mouse pointer is over the cell.
Parameters:
Returns:
Warning
This method is deprecated. Use GetMouseCursor instead.
Returns descent value of the cell. See this image for explanation:
Returns:
int
Returns pointer to the first cell in the list.
You can then use child’s GetNext method to obtain pointer to the next cell in list.
Returns:
Note
This shouldn’t be used by the end user. If you need some way of finding particular cell in the list, try Find method instead.
Returns height of the cell.
Returns:
int
Returns unique cell identifier if there is any, empty string otherwise.
Returns:
string
Returns hypertext link if associated with this cell or None otherwise.
Parameters:
Returns:
Note
this makes sense only for visible tags.
See also
Returns cursor to show when mouse pointer is over the cell.
This function is new since wxPython version 2.7.0 (before GetCursor method served a similar purpose, which is now deprecated).
Parameters:
Returns:
Returns pointer to the next cell in list.
Returns:
Returns pointer to parent container.
Returns:
Returns X position within parent (the value is relative to parent’s upper left corner).
The returned value is meaningful only if parent’s Layout was called before!
Returns:
int
Returns Y position within parent (the value is relative to parent’s upper left corner).
The returned value is meaningful only if parent’s Layout was called before!
Returns:
int
Returns width of the cell.
Returns:
int
Parameters:
Returns:
bool
This method performs two actions:
It must be called before displaying cells structure because GetPosX and GetPosY are undefined (or invalid) before calling Layout.
Parameters:
This function is simple event handler.
Each time the user clicks mouse button over a cell within wx.html.HtmlWindow this method of that cell is called.
Default behavior is to call wx.html.HtmlWindow.LoadPage.
Parameters:
Returns:
bool
Parameters:
Sets unique cell identifier. Default value is no identifier, i.e. empty string.
Parameters:
Sets the hypertext link associated with this cell.
Default value is wx.html.HtmlLinkInfo (“”, “”) – i.e., no link.
Parameters:
Sets the next cell in the list. This shouldn’t be called by user – it is to be used only by wx.html.HtmlContainerCell.InsertCell.
Parameters:
Sets parent container of this cell.
This is called from wx.html.HtmlContainerCell.InsertCell.
Parameters:
Sets the cell’s position within parent container.
Parameters: