1999-07-10 17:17:24 -04:00
|
|
|
%
|
|
|
|
% automatically generated by HelpGen from
|
|
|
|
% htmlcell.tex at 21/Mar/99 22:45:23
|
|
|
|
%
|
|
|
|
|
|
|
|
\section{\class{wxHtmlCell}}\label{wxhtmlcell}
|
|
|
|
|
|
|
|
Internal data structure. It represents fragments of parsed HTML
|
1999-10-25 09:46:48 -04:00
|
|
|
page, the so-called {\bf cell} - a word, picture, table, horizontal line and so on.
|
1999-08-05 18:05:15 -04:00
|
|
|
It is used by \helpref{wxHtmlWindow}{wxhtmlwindow} and
|
1999-07-10 17:17:24 -04:00
|
|
|
\helpref{wxHtmlWinParser}{wxhtmlwinparser} to represent HTML page in memory.
|
|
|
|
|
|
|
|
You can divide cells into two groups : {\it visible} cells with non-zero width and
|
|
|
|
height and {\it helper} cells (usually with zero width and height) that
|
|
|
|
perform special actions such as color or font change.
|
|
|
|
|
|
|
|
\wxheading{Derived from}
|
|
|
|
|
2000-02-27 16:06:58 -05:00
|
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
|
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/html/htmlcell.h>
|
1999-07-10 17:17:24 -04:00
|
|
|
|
|
|
|
\wxheading{See Also}
|
|
|
|
|
|
|
|
\helpref{Cells Overview}{cells},
|
1999-08-05 18:05:15 -04:00
|
|
|
\helpref{wxHtmlContainerCell}{wxhtmlcontainercell}
|
1999-07-10 17:17:24 -04:00
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
|
|
|
\membersection{wxHtmlCell::wxHtmlCell}\label{wxhtmlcellwxhtmlcell}
|
|
|
|
|
|
|
|
\func{}{wxHtmlCell}{\void}
|
|
|
|
|
|
|
|
Constructor.
|
|
|
|
|
1999-10-16 08:28:03 -04:00
|
|
|
\membersection{wxHtmlCell::AdjustPagebreak}\label{wxhtmlcelladjustpagebreak}
|
|
|
|
|
|
|
|
\func{virtual bool}{AdjustPagebreak}{\param{int * }{pagebreak}}
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
2003-01-17 19:16:34 -05:00
|
|
|
Returns true if pagebreak was modified, false otherwise
|
1999-10-16 08:28:03 -04:00
|
|
|
|
1999-10-25 09:46:48 -04:00
|
|
|
Usage:
|
1999-10-16 08:28:03 -04:00
|
|
|
\begin{verbatim}
|
|
|
|
while (container->AdjustPagebreak(&p)) {}
|
|
|
|
\end{verbatim}
|
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
\membersection{wxHtmlCell::Draw}\label{wxhtmlcelldraw}
|
1999-07-10 17:17:24 -04:00
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
\func{virtual void}{Draw}{\param{wxDC\& }{dc}, \param{int }{x}, \param{int }{y}, \param{int }{view\_y1}, \param{int }{view\_y2}}
|
1999-07-10 17:17:24 -04:00
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
Renders the cell.
|
1999-07-10 17:17:24 -04:00
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
\wxheading{Parameters}
|
1999-07-10 17:17:24 -04:00
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
\docparam{dc}{Device context to which the cell is to be drawn}
|
1999-07-10 17:17:24 -04:00
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
\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)}}
|
1999-07-10 17:17:24 -04:00
|
|
|
|
1999-12-24 18:40:13 -05:00
|
|
|
\docparam{view\_y1}{y-coord of the first line visible in window. This is
|
1999-10-16 11:38:26 -04:00
|
|
|
used to optimize rendering speed}
|
1999-07-10 17:17:24 -04:00
|
|
|
|
1999-12-24 18:40:13 -05:00
|
|
|
\docparam{view\_y2}{y-coord of the last line visible in window. This is
|
1999-10-16 11:38:26 -04:00
|
|
|
used to optimize rendering speed}
|
1999-07-10 17:17:24 -04:00
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
\membersection{wxHtmlCell::DrawInvisible}\label{wxhtmlcelldrawinvisible}
|
1999-07-10 17:17:24 -04:00
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
\func{virtual void}{DrawInvisible}{\param{wxDC\& }{dc}, \param{int }{x}, \param{int }{y}}
|
1999-07-10 17:17:24 -04:00
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
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!
|
1999-07-10 17:17:24 -04:00
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
\wxheading{Parameters}
|
1999-07-10 17:17:24 -04:00
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
\docparam{dc}{Device context to which the cell is to be drawn}
|
1999-07-10 17:17:24 -04:00
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
\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)}}
|
1999-07-10 17:17:24 -04:00
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
\membersection{wxHtmlCell::Find}\label{wxhtmlcellfind}
|
1999-07-10 17:17:24 -04:00
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
\func{virtual const wxHtmlCell*}{Find}{\param{int }{condition}, \param{const void* }{param}}
|
1999-07-10 17:17:24 -04:00
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
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)
|
1999-07-10 17:17:24 -04:00
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
It is recommended way how to obtain pointer to particular cell or
|
|
|
|
to cell of some type (e.g. wxHtmlAnchorCell reacts on
|
2000-01-18 04:18:17 -05:00
|
|
|
wxHTML\_COND\_ISANCHOR condition)
|
1999-10-16 11:38:26 -04:00
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{condition}{Unique integer identifier of condition}
|
|
|
|
|
|
|
|
\docparam{param}{Optional parameters}
|
|
|
|
|
|
|
|
\wxheading{Defined conditions}
|
|
|
|
|
1999-10-25 09:46:48 -04:00
|
|
|
\begin{twocollist}\itemsep=0pt
|
2000-01-18 04:18:17 -05:00
|
|
|
\twocolitem{{\bf wxHTML\_COND\_ISANCHOR}}{Finds particular anchor.
|
1999-10-16 11:38:26 -04:00
|
|
|
{\it param} is pointer to wxString with name of the anchor.}
|
2000-01-18 04:18:17 -05:00
|
|
|
\twocolitem{{\bf wxHTML\_COND\_USER}}{User-defined conditions start
|
1999-10-25 09:46:48 -04:00
|
|
|
from this number.}
|
1999-10-16 11:38:26 -04:00
|
|
|
\end{twocollist}
|
1999-07-10 17:17:24 -04:00
|
|
|
|
|
|
|
\membersection{wxHtmlCell::GetDescent}\label{wxhtmlcellgetdescent}
|
|
|
|
|
|
|
|
\constfunc{int}{GetDescent}{\void}
|
|
|
|
|
1999-12-24 18:40:13 -05:00
|
|
|
Returns descent value of the cell (m\_Descent member).
|
|
|
|
\helponly{See explanation:
|
1999-07-10 17:17:24 -04:00
|
|
|
|
|
|
|
\image{}{descent.bmp}
|
1999-12-24 18:40:13 -05:00
|
|
|
}
|
1999-07-10 17:17:24 -04:00
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
\membersection{wxHtmlCell::GetHeight}\label{wxhtmlcellgetheight}
|
|
|
|
|
|
|
|
\constfunc{int}{GetHeight}{\void}
|
|
|
|
|
1999-12-24 18:40:13 -05:00
|
|
|
Returns height of the cell (m\_Height member).
|
1999-10-16 11:38:26 -04:00
|
|
|
|
2001-09-02 16:07:45 -04:00
|
|
|
\membersection{wxHtmlCell::GetId}\label{wxhtmlcellgetid}
|
|
|
|
|
|
|
|
\constfunc{virtual wxString}{GetId}{\void}
|
|
|
|
|
|
|
|
Returns unique cell identifier if there is any, empty string otherwise.
|
|
|
|
|
1999-07-10 17:17:24 -04:00
|
|
|
\membersection{wxHtmlCell::GetLink}\label{wxhtmlcellgetlink}
|
|
|
|
|
1999-12-23 16:12:23 -05:00
|
|
|
\constfunc{virtual wxHtmlLinkInfo*}{GetLink}{\param{int }{x = 0}, \param{int }{y = 0}}
|
1999-07-10 17:17:24 -04:00
|
|
|
|
1999-12-23 16:12:23 -05:00
|
|
|
Returns hypertext link if associated with this cell or NULL otherwise.
|
|
|
|
See \helpref{wxHtmlLinkInfo}{wxhtmllinkinfo}.
|
1999-10-25 09:46:48 -04:00
|
|
|
(Note: this makes sense only for visible tags).
|
1999-07-10 17:17:24 -04:00
|
|
|
|
|
|
|
\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
|
1999-12-24 18:40:13 -05:00
|
|
|
upper left corner of THIS cell (i.e. from 0 to m\_Width or m\_Height)}
|
1999-07-10 17:17:24 -04:00
|
|
|
|
|
|
|
\membersection{wxHtmlCell::GetNext}\label{wxhtmlcellgetnext}
|
|
|
|
|
|
|
|
\constfunc{wxHtmlCell*}{GetNext}{\void}
|
|
|
|
|
|
|
|
Returns pointer to the next cell in list (see htmlcell.h if you're
|
|
|
|
interested in details).
|
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
\membersection{wxHtmlCell::GetParent}\label{wxhtmlcellgetparent}
|
1999-07-10 17:17:24 -04:00
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
\constfunc{wxHtmlContainerCell*}{GetParent}{\void}
|
1999-07-10 17:17:24 -04:00
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
Returns pointer to parent container.
|
1999-07-10 17:17:24 -04:00
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
\membersection{wxHtmlCell::GetPosX}\label{wxhtmlcellgetposx}
|
1999-07-10 17:17:24 -04:00
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
\constfunc{int}{GetPosX}{\void}
|
1999-07-10 17:17:24 -04:00
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
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!
|
1999-07-10 17:17:24 -04:00
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
\membersection{wxHtmlCell::GetPosY}\label{wxhtmlcellgetposy}
|
1999-07-10 17:17:24 -04:00
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
\constfunc{int}{GetPosY}{\void}
|
1999-07-10 17:17:24 -04:00
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
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}
|
|
|
|
|
1999-12-24 18:40:13 -05:00
|
|
|
Returns width of the cell (m\_Width member).
|
1999-07-10 17:17:24 -04:00
|
|
|
|
|
|
|
\membersection{wxHtmlCell::Layout}\label{wxhtmlcelllayout}
|
|
|
|
|
|
|
|
\func{virtual void}{Layout}{\param{int }{w}}
|
|
|
|
|
2000-03-14 19:21:49 -05:00
|
|
|
This method performs two actions:
|
1999-07-10 17:17:24 -04:00
|
|
|
|
1999-10-25 09:46:48 -04:00
|
|
|
\begin{enumerate}\itemsep=0pt
|
2000-03-14 19:21:49 -05:00
|
|
|
\item adjusts the cell's width according to the fact that maximal possible width is {\it w}.
|
1999-07-10 17:17:24 -04:00
|
|
|
(this has sense when working with horizontal lines, tables etc.)
|
|
|
|
\item prepares layout (=fill-in m\_PosX, m\_PosY (and sometimes m\_Height) members)
|
|
|
|
based on actual width {\it w}
|
|
|
|
\end{enumerate}
|
|
|
|
|
1999-07-28 01:52:04 -04:00
|
|
|
It must be called before displaying cells structure because
|
|
|
|
m\_PosX and m\_PosY are undefined (or invalid)
|
|
|
|
before calling Layout.
|
1999-07-10 17:17:24 -04:00
|
|
|
|
|
|
|
\membersection{wxHtmlCell::OnMouseClick}\label{wxhtmlcellonmouseclick}
|
|
|
|
|
2000-02-07 05:14:56 -05:00
|
|
|
\func{virtual void}{OnMouseClick}{\param{wxWindow* }{parent}, \param{int}{x}, \param{int }{y}, \param{const wxMouseEvent\& }{event}}
|
1999-07-10 17:17:24 -04:00
|
|
|
|
2000-03-14 19:21:49 -05:00
|
|
|
This function is simple event handler. Each time the user clicks mouse button over a cell
|
1999-07-10 17:17:24 -04:00
|
|
|
within \helpref{wxHtmlWindow}{wxhtmlwindow} this method of that cell is called. Default behavior is
|
|
|
|
that it calls \helpref{wxHtmlWindow::LoadPage}{wxhtmlwindowloadpage}.
|
|
|
|
|
|
|
|
\wxheading{Note}
|
|
|
|
|
2000-01-11 18:30:43 -05:00
|
|
|
If you need more "advanced" event handling
|
|
|
|
you should use wxHtmlBinderCell instead.
|
1999-07-10 17:17:24 -04:00
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
1999-08-05 11:51:32 -04:00
|
|
|
\docparam{parent}{parent window (always wxHtmlWindow!)}
|
1999-07-10 17:17:24 -04:00
|
|
|
|
|
|
|
\docparam{x, y}{coordinates of mouse click (this is relative to cell's origin}
|
|
|
|
|
2003-01-17 19:16:34 -05:00
|
|
|
\docparam{left, middle, right}{boolean flags for mouse buttons. true if the left/middle/right
|
|
|
|
button is pressed, false otherwise}
|
1999-07-10 17:17:24 -04:00
|
|
|
|
2001-09-02 16:07:45 -04:00
|
|
|
\membersection{wxHtmlCell::SetId}\label{wxhtmlcellsetid}
|
|
|
|
|
|
|
|
\func{void}{SetId}{\param{const wxString\& }{id}}
|
|
|
|
|
|
|
|
Sets unique cell identifier. Default value is no identifier, i.e. empty string.
|
|
|
|
|
1999-10-16 11:38:26 -04:00
|
|
|
\membersection{wxHtmlCell::SetLink}\label{wxhtmlcellsetlink}
|
|
|
|
|
1999-12-23 16:12:23 -05:00
|
|
|
\func{void}{SetLink}{\param{const wxHtmlLinkInfo\& }{link}}
|
1999-10-16 11:38:26 -04:00
|
|
|
|
2002-06-07 16:15:28 -04:00
|
|
|
Sets the hypertext link associated with this cell. (Default value
|
1999-12-23 16:12:23 -05:00
|
|
|
is \helpref{wxHtmlLinkInfo}{wxhtmllinkinfo}("", "") (no link))
|
1999-10-16 11:38:26 -04:00
|
|
|
|
|
|
|
\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
|
2000-03-14 19:21:49 -05:00
|
|
|
to be used only by \helpref{wxHtmlContainerCell::InsertCell}{wxhtmlcontainercellinsertcell}.
|
1999-10-16 11:38:26 -04:00
|
|
|
|
|
|
|
\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}}
|
|
|
|
|
1999-10-25 09:46:48 -04:00
|
|
|
Sets the cell's position within parent container.
|
1999-10-16 11:38:26 -04:00
|
|
|
|