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
}
23 \helpref{Cells Overview
}{cells
},
24 \helpref{wxHtmlContainerCell
}{wxhtmlcontainercell
}
26 \latexignore{\rtfignore{\wxheading{Members
}}}
28 \membersection{wxHtmlCell::wxHtmlCell
}\label{wxhtmlcellwxhtmlcell
}
30 \func{}{wxHtmlCell
}{\void}
34 \membersection{wxHtmlCell::AdjustPagebreak
}\label{wxhtmlcelladjustpagebreak
}
36 \func{virtual bool
}{AdjustPagebreak
}{\param{int *
}{pagebreak
}}
38 This method is used to adjust pagebreak position. The parameter is
39 variable that contains y-coordinate of page break (= horizontal line that
40 should not be crossed by words, images etc.). If this cell cannot be divided
41 into two pieces (each one on another page) then it moves the pagebreak
44 Returns TRUE if pagebreak was modified, FALSE otherwise
48 while (container->AdjustPagebreak(&p))
{}
51 \membersection{wxHtmlCell::Draw
}\label{wxhtmlcelldraw
}
53 \func{virtual void
}{Draw
}{\param{wxDC\&
}{dc
},
\param{int
}{x
},
\param{int
}{y
},
\param{int
}{view
\_y1},
\param{int
}{view
\_y2}}
57 \wxheading{Parameters
}
59 \docparam{dc
}{Device context to which the cell is to be drawn
}
61 \docparam{x,y
}{Coordinates of parent's upper left corner (origin). You must
62 add this to m
\_PosX,m
\_PosY when passing coordinates to dc's methods
63 Example :
{\tt dc -> DrawText("hello", x + m
\_PosX, y + m
\_PosY)
}}
65 \docparam{view_y1
}{y-coord of the first line visible in window. This is
66 used to optimize rendering speed
}
68 \docparam{view_y2
}{y-coord of the last line visible in window. This is
69 used to optimize rendering speed
}
71 \membersection{wxHtmlCell::DrawInvisible
}\label{wxhtmlcelldrawinvisible
}
73 \func{virtual void
}{DrawInvisible
}{\param{wxDC\&
}{dc
},
\param{int
}{x
},
\param{int
}{y
}}
75 This method is called instead of
\helpref{Draw
}{wxhtmlcelldraw
} when the
76 cell is certainly out of the screen (and thus invisible). This is not
77 nonsense - some tags (like
\helpref{wxHtmlColourCell
}{wxhtmlcolourcell
}
78 or font setter) must be drawn even if they are invisible!
80 \wxheading{Parameters
}
82 \docparam{dc
}{Device context to which the cell is to be drawn
}
84 \docparam{x,y
}{Coordinates of parent's upper left corner. You must
85 add this to m
\_PosX,m
\_PosY when passing coordinates to dc's methods
86 Example :
{\tt dc -> DrawText("hello", x + m
\_PosX, y + m
\_PosY)
}}
88 \membersection{wxHtmlCell::Find
}\label{wxhtmlcellfind
}
90 \func{virtual const wxHtmlCell*
}{Find
}{\param{int
}{condition
},
\param{const void*
}{param
}}
92 Returns pointer to itself if this cell matches condition (or if any of the cells
93 following in the list matches), NULL otherwise.
94 (In other words if you call top-level container's Find it will
95 return pointer to the first cell that matches the condition)
97 It is recommended way how to obtain pointer to particular cell or
98 to cell of some type (e.g. wxHtmlAnchorCell reacts on
99 HTML_COND_ISANCHOR condition)
101 \wxheading{Parameters
}
103 \docparam{condition
}{Unique integer identifier of condition
}
105 \docparam{param
}{Optional parameters
}
107 \wxheading{Defined conditions
}
109 \begin{twocollist
}\itemsep=
0pt
110 \twocolitem{{\bf HTML_COND_ISANCHOR
}}{Finds particular anchor.
111 {\it param
} is pointer to wxString with name of the anchor.
}
112 \twocolitem{{\bf HTML_COND_USER
}}{User-defined conditions start
116 \membersection{wxHtmlCell::GetDescent
}\label{wxhtmlcellgetdescent
}
118 \constfunc{int
}{GetDescent
}{\void}
120 Returns descent value of the cell (m_Descent member). See explanation:
122 \image{}{descent.bmp
}
124 \membersection{wxHtmlCell::GetHeight
}\label{wxhtmlcellgetheight
}
126 \constfunc{int
}{GetHeight
}{\void}
128 Returns height of the cell (m_Height member).
130 \membersection{wxHtmlCell::GetLink
}\label{wxhtmlcellgetlink
}
132 \constfunc{virtual wxHtmlLinkInfo*
}{GetLink
}{\param{int
}{x =
0},
\param{int
}{y =
0}}
134 Returns hypertext link if associated with this cell or NULL otherwise.
135 See
\helpref{wxHtmlLinkInfo
}{wxhtmllinkinfo
}.
136 (Note: this makes sense only for visible tags).
138 \wxheading{Parameters
}
140 \docparam{x,y
}{Coordinates of position where the user pressed mouse button.
141 These coordinates are used e.g. by COLORMAP. Values are relative to the
142 upper left corner of THIS cell (i.e. from
0 to m_Width or m_Height)
}
144 \membersection{wxHtmlCell::GetNext
}\label{wxhtmlcellgetnext
}
146 \constfunc{wxHtmlCell*
}{GetNext
}{\void}
148 Returns pointer to the next cell in list (see htmlcell.h if you're
149 interested in details).
151 \membersection{wxHtmlCell::GetParent
}\label{wxhtmlcellgetparent
}
153 \constfunc{wxHtmlContainerCell*
}{GetParent
}{\void}
155 Returns pointer to parent container.
157 \membersection{wxHtmlCell::GetPosX
}\label{wxhtmlcellgetposx
}
159 \constfunc{int
}{GetPosX
}{\void}
161 Returns X position within parent (the value is relative to parent's
162 upper left corner). The returned value is meaningful only if
163 parent's
\helpref{Layout
}{wxhtmlcelllayout
} was called before!
165 \membersection{wxHtmlCell::GetPosY
}\label{wxhtmlcellgetposy
}
167 \constfunc{int
}{GetPosY
}{\void}
169 Returns Y position within parent (the value is relative to parent's
170 upper left corner). The returned value is meaningful only if
171 parent's
\helpref{Layout
}{wxhtmlcelllayout
} was called before!
173 \membersection{wxHtmlCell::GetWidth
}\label{wxhtmlcellgetwidth
}
175 \constfunc{int
}{GetWidth
}{\void}
177 Returns width of the cell (m_Width member).
179 \membersection{wxHtmlCell::Layout
}\label{wxhtmlcelllayout
}
181 \func{virtual void
}{Layout
}{\param{int
}{w
}}
183 This method performs
2 actions:
185 \begin{enumerate
}\itemsep=
0pt
186 \item adjusts cell's width according to the fact that maximal possible width is
{\it w
}.
187 (this has sense when working with horizontal lines, tables etc.)
188 \item prepares layout (=fill-in m
\_PosX, m
\_PosY (and sometimes m
\_Height) members)
189 based on actual width
{\it w
}
192 It must be called before displaying cells structure because
193 m
\_PosX and m
\_PosY are undefined (or invalid)
194 before calling Layout.
196 \membersection{wxHtmlCell::OnMouseClick
}\label{wxhtmlcellonmouseclick
}
198 \func{virtual void
}{OnMouseClick
}{\param{wxWindow*
}{parent
},
\param{int
}{x
},
\param{int
}{y
},
\param{bool
}{left
},
\param{bool
}{middle
},
\param{bool
}{right
}}
200 This function is simple event handler. Each time user clicks mouse button over a cell
201 within
\helpref{wxHtmlWindow
}{wxhtmlwindow
} this method of that cell is called. Default behavior is
202 that it calls
\helpref{wxHtmlWindow::LoadPage
}{wxhtmlwindowloadpage
}.
206 If you need more "advanced" behaviour (for example you'd like to catch mouse movement events or
207 key events or whatsoever) you should use wxHtmlBinderCell instead.
209 \wxheading{Parameters
}
211 \docparam{parent
}{parent window (always wxHtmlWindow!)
}
213 \docparam{x, y
}{coordinates of mouse click (this is relative to cell's origin
}
215 \docparam{left, middle, right
}{boolean flags for mouse buttons. TRUE if the left/middle/right
216 button is pressed, FALSE otherwise
}
218 \membersection{wxHtmlCell::SetLink
}\label{wxhtmlcellsetlink
}
220 \func{void
}{SetLink
}{\param{const wxHtmlLinkInfo\&
}{link
}}
222 Sets the hypertext link asocciated with this cell. (Default value
223 is
\helpref{wxHtmlLinkInfo
}{wxhtmllinkinfo
}("", "") (no link))
225 \membersection{wxHtmlCell::SetNext
}\label{wxhtmlcellsetnext
}
227 \func{void
}{SetNext
}{\param{wxHtmlCell
}{*cell
}}
229 Sets the next cell in the list. This shouldn't be called by user - it is
230 to be used only by
\helpref{wxHtmlContainerCell::InsertCell
}{wxhtmlcontainercellinsertcell
}
232 \membersection{wxHtmlCell::SetParent
}\label{wxhtmlcellsetparent
}
234 \func{void
}{SetParent
}{\param{wxHtmlContainerCell
}{*p
}}
236 Sets parent container of this cell. This is called from
237 \helpref{wxHtmlContainerCell::InsertCell
}{wxhtmlcontainercellinsertcell
}.
239 \membersection{wxHtmlCell::SetPos
}\label{wxhtmlcellsetpos
}
241 \func{void
}{SetPos
}{\param{int
}{x
},
\param{int
}{y
}}
243 Sets the cell's position within parent container.