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 HtmlWindow and
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.
Cells Overview,
HtmlContainerCell
This method is used to adjust pagebreak position. The parameter is
variable that contains y-coordinate of page break (= horizontal line that
should not be crossed by words, images etc.). If this cell cannot be divided
into two pieces (each one on another page) then it moves the pagebreak
few pixels up.
Returns true if pagebreak was modified, false otherwise
Usage:
while (container→AdjustPagebreak(&p)) {}Renders the cell.
dc -> DrawText("hello", x + m_PosX, y + m_PosY)
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 HtmlColourCell
or font setter) must be drawn even if they are invisible!
dc -> DrawText("hello", x + m_PosX, y + m_PosY)
Returns pointer to itself if this cell matches condition (or if any of the cells
following in the list matches), NULL 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. HtmlAnchorCell reacts on
HTML_COND_ISANCHOR condition)
HTML_COND_ISANCHOR | Finds particular anchor. param is pointer to String with name of the anchor. |
HTML_COND_USER | User-defined conditions startfrom this number. |
Returns descent value of the cell (m_Descent member).
See explanation:
descent.bmp
Returns pointer to the first cell in the list.
You can then use child’s get_next
method to obtain pointer to the next cell in list.
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 (m_Height member).
Returns unique cell identifier if there is any, empty string otherwise.
Returns hypertext link if associated with this cell or NULL otherwise.
See HtmlLinkInfo.
(Note: this makes sense only for visible tags).
Returns pointer to the next cell in list (see htmlcell.h if you’re
interested in details).
Returns pointer to parent container.
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 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 width of the cell (m_Width member).
This method performs two actions:
It must be called before displaying cells structure because
m_PosX and m_PosY are undefined (or invalid)
before calling Layout.
This function is simple event handler. Each time the user clicks mouse button over a cell
within HtmlWindow this method of that cell is called. Default behavior is
that it calls HtmlWindow#load_page.
If you need more “advanced” event handling
you should use HtmlBinderCell instead.
Sets unique cell identifier. Default value is no identifier, i.e. empty string.
Sets the hypertext link associated with this cell. (Default value
is HtmlLinkInfo("", "") (no link))
Sets the next cell in the list. This shouldn’t be called by user – it is
to be used only by HtmlContainerCell#insert_cell.
Sets parent container of this cell. This is called from
HtmlContainerCell#insert_cell.
Sets the cell’s position within parent container.
[This page automatically generated from the Textile source at 2023-06-13 21:31:36 +0000]