2 % automatically generated by HelpGen from
3 % htmlcell.tex at 21/Mar/99 22:45:23
6 \section{\class{wxHtmlCell
}}\label{wxhtmlcell
}
8 Internal data structure. It represents fragments of parsed HTML
9 page, the so-called
{\bf cell
} - a word, picture, table, horizontal line and so on.
10 It is used by
\helpref{wxHtmlWindow
}{wxhtmlwindow
} and
11 \helpref{wxHtmlWinParser
}{wxhtmlwinparser
} to represent HTML page in memory.
13 You can divide cells into two groups :
{\it visible
} cells with non-zero width and
14 height and
{\it helper
} cells (usually with zero width and height) that
15 perform special actions such as
color or font change.
17 \wxheading{Derived from
}
19 \helpref{wxObject
}{wxobject
}
21 \wxheading{Include files
}
27 \helpref{Cells Overview
}{cells
},
28 \helpref{wxHtmlContainerCell
}{wxhtmlcontainercell
}
30 \latexignore{\rtfignore{\wxheading{Members
}}}
32 \membersection{wxHtmlCell::wxHtmlCell
}\label{wxhtmlcellwxhtmlcell
}
34 \func{}{wxHtmlCell
}{\void}
38 \membersection{wxHtmlCell::AdjustPagebreak
}\label{wxhtmlcelladjustpagebreak
}
40 \func{virtual bool
}{AdjustPagebreak
}{\param{int *
}{pagebreak
}}
42 This method is used to adjust pagebreak position. The parameter is
43 variable that contains y-coordinate of page break (= horizontal line that
44 should not be crossed by words, images etc.). If this cell cannot be divided
45 into two pieces (each one on another page) then it moves the pagebreak
48 Returns TRUE if pagebreak was modified, FALSE otherwise
52 while (container->AdjustPagebreak(&p))
{}
55 \membersection{wxHtmlCell::Draw
}\label{wxhtmlcelldraw
}
57 \func{virtual void
}{Draw
}{\param{wxDC\&
}{dc
},
\param{int
}{x
},
\param{int
}{y
},
\param{int
}{view
\_y1},
\param{int
}{view
\_y2}}
61 \wxheading{Parameters
}
63 \docparam{dc
}{Device context to which the cell is to be drawn
}
65 \docparam{x,y
}{Coordinates of parent's upper left corner (origin). You must
66 add this to m
\_PosX,m
\_PosY when passing coordinates to dc's methods
67 Example :
{\tt dc -> DrawText("hello", x + m
\_PosX, y + m
\_PosY)
}}
69 \docparam{view
\_y1}{y-coord of the first line visible in window. This is
70 used to optimize rendering speed
}
72 \docparam{view
\_y2}{y-coord of the last line visible in window. This is
73 used to optimize rendering speed
}
75 \membersection{wxHtmlCell::DrawInvisible
}\label{wxhtmlcelldrawinvisible
}
77 \func{virtual void
}{DrawInvisible
}{\param{wxDC\&
}{dc
},
\param{int
}{x
},
\param{int
}{y
}}
79 This method is called instead of
\helpref{Draw
}{wxhtmlcelldraw
} when the
80 cell is certainly out of the screen (and thus invisible). This is not
81 nonsense - some tags (like
\helpref{wxHtmlColourCell
}{wxhtmlcolourcell
}
82 or font setter) must be drawn even if they are invisible!
84 \wxheading{Parameters
}
86 \docparam{dc
}{Device context to which the cell is to be drawn
}
88 \docparam{x,y
}{Coordinates of parent's upper left corner. You must
89 add this to m
\_PosX,m
\_PosY when passing coordinates to dc's methods
90 Example :
{\tt dc -> DrawText("hello", x + m
\_PosX, y + m
\_PosY)
}}
92 \membersection{wxHtmlCell::Find
}\label{wxhtmlcellfind
}
94 \func{virtual const wxHtmlCell*
}{Find
}{\param{int
}{condition
},
\param{const void*
}{param
}}
96 Returns pointer to itself if this cell matches condition (or if any of the cells
97 following in the list matches), NULL otherwise.
98 (In other words if you call top-level container's Find it will
99 return pointer to the first cell that matches the condition)
101 It is recommended way how to obtain pointer to particular cell or
102 to cell of some type (e.g. wxHtmlAnchorCell reacts on
103 wxHTML
\_COND\_ISANCHOR condition)
105 \wxheading{Parameters
}
107 \docparam{condition
}{Unique integer identifier of condition
}
109 \docparam{param
}{Optional parameters
}
111 \wxheading{Defined conditions
}
113 \begin{twocollist
}\itemsep=
0pt
114 \twocolitem{{\bf wxHTML
\_COND\_ISANCHOR}}{Finds particular anchor.
115 {\it param
} is pointer to wxString with name of the anchor.
}
116 \twocolitem{{\bf wxHTML
\_COND\_USER}}{User-defined conditions start
120 \membersection{wxHtmlCell::GetDescent
}\label{wxhtmlcellgetdescent
}
122 \constfunc{int
}{GetDescent
}{\void}
124 Returns descent value of the cell (m
\_Descent member).
125 \helponly{See explanation:
127 \image{}{descent.bmp
}
130 \membersection{wxHtmlCell::GetHeight
}\label{wxhtmlcellgetheight
}
132 \constfunc{int
}{GetHeight
}{\void}
134 Returns height of the cell (m
\_Height member).
136 \membersection{wxHtmlCell::GetLink
}\label{wxhtmlcellgetlink
}
138 \constfunc{virtual wxHtmlLinkInfo*
}{GetLink
}{\param{int
}{x =
0},
\param{int
}{y =
0}}
140 Returns hypertext link if associated with this cell or NULL otherwise.
141 See
\helpref{wxHtmlLinkInfo
}{wxhtmllinkinfo
}.
142 (Note: this makes sense only for visible tags).
144 \wxheading{Parameters
}
146 \docparam{x,y
}{Coordinates of position where the user pressed mouse button.
147 These coordinates are used e.g. by COLORMAP. Values are relative to the
148 upper left corner of THIS cell (i.e. from
0 to m
\_Width or m
\_Height)
}
150 \membersection{wxHtmlCell::GetNext
}\label{wxhtmlcellgetnext
}
152 \constfunc{wxHtmlCell*
}{GetNext
}{\void}
154 Returns pointer to the next cell in list (see htmlcell.h if you're
155 interested in details).
157 \membersection{wxHtmlCell::GetParent
}\label{wxhtmlcellgetparent
}
159 \constfunc{wxHtmlContainerCell*
}{GetParent
}{\void}
161 Returns pointer to parent container.
163 \membersection{wxHtmlCell::GetPosX
}\label{wxhtmlcellgetposx
}
165 \constfunc{int
}{GetPosX
}{\void}
167 Returns X position within parent (the value is relative to parent's
168 upper left corner). The returned value is meaningful only if
169 parent's
\helpref{Layout
}{wxhtmlcelllayout
} was called before!
171 \membersection{wxHtmlCell::GetPosY
}\label{wxhtmlcellgetposy
}
173 \constfunc{int
}{GetPosY
}{\void}
175 Returns Y position within parent (the value is relative to parent's
176 upper left corner). The returned value is meaningful only if
177 parent's
\helpref{Layout
}{wxhtmlcelllayout
} was called before!
179 \membersection{wxHtmlCell::GetWidth
}\label{wxhtmlcellgetwidth
}
181 \constfunc{int
}{GetWidth
}{\void}
183 Returns width of the cell (m
\_Width member).
185 \membersection{wxHtmlCell::Layout
}\label{wxhtmlcelllayout
}
187 \func{virtual void
}{Layout
}{\param{int
}{w
}}
189 This method performs two actions:
191 \begin{enumerate
}\itemsep=
0pt
192 \item adjusts the cell's width according to the fact that maximal possible width is
{\it w
}.
193 (this has sense when working with horizontal lines, tables etc.)
194 \item prepares layout (=fill-in m
\_PosX, m
\_PosY (and sometimes m
\_Height) members)
195 based on actual width
{\it w
}
198 It must be called before displaying cells structure because
199 m
\_PosX and m
\_PosY are undefined (or invalid)
200 before calling Layout.
202 \membersection{wxHtmlCell::OnMouseClick
}\label{wxhtmlcellonmouseclick
}
204 \func{virtual void
}{OnMouseClick
}{\param{wxWindow*
}{parent
},
\param{int
}{x
},
\param{int
}{y
},
\param{const wxMouseEvent\&
}{event
}}
206 This function is simple event handler. Each time the user clicks mouse button over a cell
207 within
\helpref{wxHtmlWindow
}{wxhtmlwindow
} this method of that cell is called. Default behavior is
208 that it calls
\helpref{wxHtmlWindow::LoadPage
}{wxhtmlwindowloadpage
}.
212 If you need more "advanced" event handling
213 you should use wxHtmlBinderCell instead.
215 \wxheading{Parameters
}
217 \docparam{parent
}{parent window (always wxHtmlWindow!)
}
219 \docparam{x, y
}{coordinates of mouse click (this is relative to cell's origin
}
221 \docparam{left, middle, right
}{boolean flags for mouse buttons. TRUE if the left/middle/right
222 button is pressed, FALSE otherwise
}
224 \membersection{wxHtmlCell::SetLink
}\label{wxhtmlcellsetlink
}
226 \func{void
}{SetLink
}{\param{const wxHtmlLinkInfo\&
}{link
}}
228 Sets the hypertext link asocciated with this cell. (Default value
229 is
\helpref{wxHtmlLinkInfo
}{wxhtmllinkinfo
}("", "") (no link))
231 \membersection{wxHtmlCell::SetNext
}\label{wxhtmlcellsetnext
}
233 \func{void
}{SetNext
}{\param{wxHtmlCell
}{*cell
}}
235 Sets the next cell in the list. This shouldn't be called by user - it is
236 to be used only by
\helpref{wxHtmlContainerCell::InsertCell
}{wxhtmlcontainercellinsertcell
}.
238 \membersection{wxHtmlCell::SetParent
}\label{wxhtmlcellsetparent
}
240 \func{void
}{SetParent
}{\param{wxHtmlContainerCell
}{*p
}}
242 Sets parent container of this cell. This is called from
243 \helpref{wxHtmlContainerCell::InsertCell
}{wxhtmlcontainercellinsertcell
}.
245 \membersection{wxHtmlCell::SetPos
}\label{wxhtmlcellsetpos
}
247 \func{void
}{SetPos
}{\param{int
}{x
},
\param{int
}{y
}}
249 Sets the cell's position within parent container.