\section{\class{wxHtmlCell}}\label{wxhtmlcell}
Internal data structure. It represents fragments of parsed HTML
-page, so-called {\bf cell} - a word, picture, table, horizontal line and so on.
+page, the so-called {\bf cell} - a word, picture, table, horizontal line and so on.
It is used by \helpref{wxHtmlWindow}{wxhtmlwindow} and
\helpref{wxHtmlWinParser}{wxhtmlwinparser} to represent HTML page in memory.
Constructor.
-\membersection{wxHtmlCell::SetParent}\label{wxhtmlcellsetparent}
+\membersection{wxHtmlCell::AdjustPagebreak}\label{wxhtmlcelladjustpagebreak}
-\func{void}{SetParent}{\param{wxHtmlContainerCell }{*p}}
+\func{virtual bool}{AdjustPagebreak}{\param{int * }{pagebreak}}
-Sets parent container of this cell. This is called from
-\helpref{wxHtmlContainerCell::InsertCell}{wxhtmlcontainercellinsertcell}.
+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.
-\membersection{wxHtmlCell::GetParent}\label{wxhtmlcellgetparent}
+Returns TRUE if pagebreak was modified, FALSE otherwise
-\constfunc{wxHtmlContainerCell*}{GetParent}{\void}
+Usage:
+\begin{verbatim}
+while (container->AdjustPagebreak(&p)) {}
+\end{verbatim}
-Returns pointer to parent container.
+\membersection{wxHtmlCell::Draw}\label{wxhtmlcelldraw}
-\membersection{wxHtmlCell::GetPosX}\label{wxhtmlcellgetposx}
+\func{virtual void}{Draw}{\param{wxDC\& }{dc}, \param{int }{x}, \param{int }{y}, \param{int }{view\_y1}, \param{int }{view\_y2}}
-\constfunc{int}{GetPosX}{\void}
+Renders the cell.
-Returns X position within parent (the value is relative to parent's
-upper left corner). The returned value is meaningful only if
-parent's \helpref{Layout}{wxhtmlcelllayout} was called before!
+\wxheading{Parameters}
-\membersection{wxHtmlCell::GetPosY}\label{wxhtmlcellgetposy}
+\docparam{dc}{Device context to which the cell is to be drawn}
-\constfunc{int}{GetPosY}{\void}
+\docparam{x,y}{Coordinates of parent's upper left corner (origin). You must
+add this to m\_PosX,m\_PosY when passing coordinates to dc's methods
+Example : {\tt dc -> DrawText("hello", x + m\_PosX, y + m\_PosY)}}
-Returns Y position within parent (the value is relative to parent's
-upper left corner). The returned value is meaningful only if
-parent's \helpref{Layout}{wxhtmlcelllayout} was called before!
+\docparam{view\_y1}{y-coord of the first line visible in window. This is
+used to optimize rendering speed}
-\membersection{wxHtmlCell::GetWidth}\label{wxhtmlcellgetwidth}
+\docparam{view\_y2}{y-coord of the last line visible in window. This is
+used to optimize rendering speed}
-\constfunc{int}{GetWidth}{\void}
+\membersection{wxHtmlCell::DrawInvisible}\label{wxhtmlcelldrawinvisible}
-Returns width of the cell (m_Width member).
+\func{virtual void}{DrawInvisible}{\param{wxDC\& }{dc}, \param{int }{x}, \param{int }{y}}
-\membersection{wxHtmlCell::GetHeight}\label{wxhtmlcellgetheight}
+This method is called instead of \helpref{Draw}{wxhtmlcelldraw} when the
+cell is certainly out of the screen (and thus invisible). This is not
+nonsense - some tags (like \helpref{wxHtmlColourCell}{wxhtmlcolourcell}
+or font setter) must be drawn even if they are invisible!
-\constfunc{int}{GetHeight}{\void}
+\wxheading{Parameters}
+
+\docparam{dc}{Device context to which the cell is to be drawn}
+
+\docparam{x,y}{Coordinates of parent's upper left corner. You must
+add this to m\_PosX,m\_PosY when passing coordinates to dc's methods
+Example : {\tt dc -> DrawText("hello", x + m\_PosX, y + m\_PosY)}}
+
+\membersection{wxHtmlCell::Find}\label{wxhtmlcellfind}
+
+\func{virtual const wxHtmlCell*}{Find}{\param{int }{condition}, \param{const void* }{param}}
+
+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. wxHtmlAnchorCell reacts on
+HTML\_COND\_ISANCHOR condition)
-Returns height of the cell (m_Height member).
+\wxheading{Parameters}
+
+\docparam{condition}{Unique integer identifier of condition}
+
+\docparam{param}{Optional parameters}
+
+\wxheading{Defined conditions}
+
+\begin{twocollist}\itemsep=0pt
+\twocolitem{{\bf HTML\_COND\_ISANCHOR}}{Finds particular anchor.
+{\it param} is pointer to wxString with name of the anchor.}
+\twocolitem{{\bf HTML\_COND\_USER}}{User-defined conditions start
+from this number.}
+\end{twocollist}
\membersection{wxHtmlCell::GetDescent}\label{wxhtmlcellgetdescent}
\constfunc{int}{GetDescent}{\void}
-Returns descent value of the cell (m_Descent member). See explanation:
+Returns descent value of the cell (m\_Descent member).
+\helponly{See explanation:
\image{}{descent.bmp}
+}
+
+\membersection{wxHtmlCell::GetHeight}\label{wxhtmlcellgetheight}
+
+\constfunc{int}{GetHeight}{\void}
+
+Returns height of the cell (m\_Height member).
\membersection{wxHtmlCell::GetLink}\label{wxhtmlcellgetlink}
-\constfunc{virtual wxString}{GetLink}{\param{int }{x = 0}, \param{int }{y = 0}}
+\constfunc{virtual wxHtmlLinkInfo*}{GetLink}{\param{int }{x = 0}, \param{int }{y = 0}}
-Returns hypertext link if associated with this cell or empty string otherwise.
-(Note : this makes sense only for visible tags).
+Returns hypertext link if associated with this cell or NULL otherwise.
+See \helpref{wxHtmlLinkInfo}{wxhtmllinkinfo}.
+(Note: this makes sense only for visible tags).
\wxheading{Parameters}
\docparam{x,y}{Coordinates of position where the user pressed mouse button.
These coordinates are used e.g. by COLORMAP. Values are relative to the
-upper left corner of THIS cell (i.e. from 0 to m_Width or m_Height)}
+upper left corner of THIS cell (i.e. from 0 to m\_Width or m\_Height)}
\membersection{wxHtmlCell::GetNext}\label{wxhtmlcellgetnext}
Returns pointer to the next cell in list (see htmlcell.h if you're
interested in details).
-\membersection{wxHtmlCell::SetPos}\label{wxhtmlcellsetpos}
+\membersection{wxHtmlCell::GetParent}\label{wxhtmlcellgetparent}
-\func{void}{SetPos}{\param{int }{x}, \param{int }{y}}
+\constfunc{wxHtmlContainerCell*}{GetParent}{\void}
-Sets cell's position within parent container.
+Returns pointer to parent container.
-\membersection{wxHtmlCell::SetLink}\label{wxhtmlcellsetlink}
+\membersection{wxHtmlCell::GetPosX}\label{wxhtmlcellgetposx}
-\func{void}{SetLink}{\param{const wxString\& }{link}}
+\constfunc{int}{GetPosX}{\void}
-Sets the hypertext link asocciated with this cell. (Default value
-is wxEmptyString (no link))
+Returns X position within parent (the value is relative to parent's
+upper left corner). The returned value is meaningful only if
+parent's \helpref{Layout}{wxhtmlcelllayout} was called before!
-\membersection{wxHtmlCell::SetNext}\label{wxhtmlcellsetnext}
+\membersection{wxHtmlCell::GetPosY}\label{wxhtmlcellgetposy}
-\func{void}{SetNext}{\param{wxHtmlCell }{*cell}}
+\constfunc{int}{GetPosY}{\void}
-Sets the next cell in the list. This shouldn't be called by user - it is
-to be used only by \helpref{wxHtmlContainerCell::InsertCell}{wxhtmlcontainercellinsertcell}
+Returns Y position within parent (the value is relative to parent's
+upper left corner). The returned value is meaningful only if
+parent's \helpref{Layout}{wxhtmlcelllayout} was called before!
+
+\membersection{wxHtmlCell::GetWidth}\label{wxhtmlcellgetwidth}
+
+\constfunc{int}{GetWidth}{\void}
+
+Returns width of the cell (m\_Width member).
\membersection{wxHtmlCell::Layout}\label{wxhtmlcelllayout}
This method performs 2 actions:
-\begin{enumerate}
+\begin{enumerate}\itemsep=0pt
\item adjusts cell's width according to the fact that maximal possible width is {\it w}.
(this has sense when working with horizontal lines, tables etc.)
\item prepares layout (=fill-in m\_PosX, m\_PosY (and sometimes m\_Height) members)
m\_PosX and m\_PosY are undefined (or invalid)
before calling Layout.
-\membersection{wxHtmlCell::Draw}\label{wxhtmlcelldraw}
-
-\func{virtual void}{Draw}{\param{wxDC\& }{dc}, \param{int }{x}, \param{int }{y}, \param{int }{view\_y1}, \param{int }{view\_y2}}
-
-Renders the cell.
-
-\wxheading{Parameters}
-
-\docparam{dc}{Device context to which the cell is to be drawn}
-
-\docparam{x,y}{Coordinates of parent's upper left corner (origin). You must
-add this to m\_PosX,m\_PosY when passing coordinates to dc's methods
-Example : {\tt dc -> DrawText("hello", x + m\_PosX, y + m\_PosY)}}
-
-\docparam{view_y1}{y-coord of the first line visible in window. This is
-used to optimize rendering speed}
-
-\docparam{view_y2}{y-coord of the last line visible in window. This is
-used to optimize rendering speed}
-
-\membersection{wxHtmlCell::DrawInvisible}\label{wxhtmlcelldrawinvisible}
-
-\func{virtual void}{DrawInvisible}{\param{wxDC\& }{dc}, \param{int }{x}, \param{int }{y}}
-
-This method is called instead of \helpref{Draw}{wxhtmlcelldraw} when the
-cell is certainly out of the screen (and thus invisible). This is not
-nonsense - some tags (like \helpref{wxHtmlColourCell}{wxhtmlcolourcell}
-or font setter) must be drawn even if they are invisible!
-
-\wxheading{Parameters}
-
-\docparam{dc}{Device context to which the cell is to be drawn}
-
-\docparam{x,y}{Coordinates of parent's upper left corner. You must
-add this to m\_PosX,m\_PosY when passing coordinates to dc's methods
-Example : {\tt dc -> DrawText("hello", x + m\_PosX, y + m\_PosY)}}
-
-\membersection{wxHtmlCell::Find}\label{wxhtmlcellfind}
-
-\func{virtual const wxHtmlCell*}{Find}{\param{int }{condition}, \param{const void* }{param}}
-
-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. wxHtmlAnchorCell reacts on
-HTML_COND_ISANCHOR condition)
-
-\wxheading{Parameters}
-
-\docparam{condition}{Unique integer identifier of condition}
-
-\docparam{param}{Optional parameters}
-
-\wxheading{Defined conditions}
-
-\begin{twocollist}
-\twocolitem{{\bf HTML_COND_ISANCHOR}}{Finds particular anchor.
-{\it param} is pointer to wxString with name of the anchor.}
-\twocolitem{{\bf HTML_COND_USER}}{User-defined conditions start
-from this number}
-\end{twocollist}
-
\membersection{wxHtmlCell::OnMouseClick}\label{wxhtmlcellonmouseclick}
\func{virtual void}{OnMouseClick}{\param{wxWindow* }{parent}, \param{int }{x}, \param{int }{y}, \param{bool }{left}, \param{bool }{middle}, \param{bool }{right}}
\docparam{left, middle, right}{boolean flags for mouse buttons. TRUE if the left/middle/right
button is pressed, FALSE otherwise}
+\membersection{wxHtmlCell::SetLink}\label{wxhtmlcellsetlink}
+
+\func{void}{SetLink}{\param{const wxHtmlLinkInfo\& }{link}}
+
+Sets the hypertext link asocciated with this cell. (Default value
+is \helpref{wxHtmlLinkInfo}{wxhtmllinkinfo}("", "") (no link))
+
+\membersection{wxHtmlCell::SetNext}\label{wxhtmlcellsetnext}
+
+\func{void}{SetNext}{\param{wxHtmlCell }{*cell}}
+
+Sets the next cell in the list. This shouldn't be called by user - it is
+to be used only by \helpref{wxHtmlContainerCell::InsertCell}{wxhtmlcontainercellinsertcell}
+
+\membersection{wxHtmlCell::SetParent}\label{wxhtmlcellsetparent}
+
+\func{void}{SetParent}{\param{wxHtmlContainerCell }{*p}}
+
+Sets parent container of this cell. This is called from
+\helpref{wxHtmlContainerCell::InsertCell}{wxhtmlcontainercellinsertcell}.
+
+\membersection{wxHtmlCell::SetPos}\label{wxhtmlcellsetpos}
+
+\func{void}{SetPos}{\param{int }{x}, \param{int }{y}}
+
+Sets the cell's position within parent container.
+