2 % automatically generated by HelpGen from
3 % htmlcell.tex at 21/Mar/99 22:45:23
7 \section{\class{wxHtmlCell
}}\label{wxhtmlcell
}
9 Internal data structure. It represents fragments of parsed HTML
10 page, so-called
{\bf cell
} - a word, picture, table, horizontal line and so on.
11 It is used by
\helpref{wxHtmlWindow
}{wxhtmlwindow
} and
12 \helpref{wxHtmlWinParser
}{wxhtmlwinparser
} to represent HTML page in memory.
14 You can divide cells into two groups :
{\it visible
} cells with non-zero width and
15 height and
{\it helper
} cells (usually with zero width and height) that
16 perform special actions such as
color or font change.
19 \wxheading{Derived from
}
25 \helpref{Cells Overview
}{cells
},
26 \helpref{wxHtmlContainerCell
}{wxhtmlcontainercell
},
28 \latexignore{\rtfignore{\wxheading{Members
}}}
31 \membersection{wxHtmlCell::wxHtmlCell
}\label{wxhtmlcellwxhtmlcell
}
33 \func{}{wxHtmlCell
}{\void}
38 \membersection{wxHtmlCell::SetParent
}\label{wxhtmlcellsetparent
}
40 \func{void
}{SetParent
}{\param{wxHtmlContainerCell
}{*p
}}
42 Sets parent container of this cell. This is called from
43 \helpref{wxHtmlContainerCell::InsertCell
}{wxhtmlcontainercellinsertcell
}.
45 \membersection{wxHtmlCell::GetParent
}\label{wxhtmlcellgetparent
}
47 \constfunc{wxHtmlContainerCell*
}{GetParent
}{\void}
49 Returns pointer to parent container.
51 \membersection{wxHtmlCell::GetPosX
}\label{wxhtmlcellgetposx
}
53 \constfunc{int
}{GetPosX
}{\void}
55 Returns X position within parent (the value is relative to parent's
56 upper left corner). The returned value is meaningful only if
57 parent's
\helpref{Layout
}{wxhtmlcelllayout
} was called before!
59 \membersection{wxHtmlCell::GetPosY
}\label{wxhtmlcellgetposy
}
61 \constfunc{int
}{GetPosY
}{\void}
63 Returns Y position within parent (the value is relative to parent's
64 upper left corner). The returned value is meaningful only if
65 parent's
\helpref{Layout
}{wxhtmlcelllayout
} was called before!
67 \membersection{wxHtmlCell::GetWidth
}\label{wxhtmlcellgetwidth
}
69 \constfunc{int
}{GetWidth
}{\void}
71 Returns width of the cell (m_Width member).
73 \membersection{wxHtmlCell::GetHeight
}\label{wxhtmlcellgetheight
}
75 \constfunc{int
}{GetHeight
}{\void}
77 Returns height of the cell (m_Height member).
79 \membersection{wxHtmlCell::GetDescent
}\label{wxhtmlcellgetdescent
}
81 \constfunc{int
}{GetDescent
}{\void}
83 Returns descent value of the cell (m_Descent member). See explanation:
87 \membersection{wxHtmlCell::GetLink
}\label{wxhtmlcellgetlink
}
89 \constfunc{virtual wxString
}{GetLink
}{\param{int
}{x =
0},
\param{int
}{y =
0}}
91 Returns hypertext link if associated with this cell or empty string otherwise.
92 (Note : this makes sense only for visible tags).
94 \wxheading{Parameters
}
96 \docparam{x,y
}{Coordinates of position where the user pressed mouse button.
97 These coordinates are used e.g. by COLORMAP. Values are relative to the
98 upper left corner of THIS cell (i.e. from
0 to m_Width or m_Height)
}
100 \membersection{wxHtmlCell::GetNext
}\label{wxhtmlcellgetnext
}
102 \constfunc{wxHtmlCell*
}{GetNext
}{\void}
104 Returns pointer to the next cell in list (see htmlcell.h if you're
105 interested in details).
107 \membersection{wxHtmlCell::SetPos
}\label{wxhtmlcellsetpos
}
109 \func{void
}{SetPos
}{\param{int
}{x
},
\param{int
}{y
}}
111 Sets cell's position within parent container.
114 \membersection{wxHtmlCell::SetLink
}\label{wxhtmlcellsetlink
}
116 \func{void
}{SetLink
}{\param{const wxString\&
}{link
}}
118 Sets the hypertext link asocciated with this cell. (Default value
119 is wxEmptyString (no link))
121 \membersection{wxHtmlCell::SetNext
}\label{wxhtmlcellsetnext
}
123 \func{void
}{SetNext
}{\param{wxHtmlCell
}{*cell
}}
125 Sets the next cell in the list. This shouldn't be called by user - it is
126 to be used only by
\helpref{wxHtmlContainerCell::InsertCell
}{wxhtmlcontainercellinsertcell
}
128 \membersection{wxHtmlCell::Layout
}\label{wxhtmlcelllayout
}
130 \func{virtual void
}{Layout
}{\param{int
}{w
}}
132 This method performs
2 actions:
135 \item adjusts cell's width according to the fact that maximal possible width is
{\it w
}.
136 (this has sense when working with horizontal lines, tables etc.)
137 \item prepares layout (=fill-in m
\_PosX, m
\_PosY (and sometimes m
\_Height) members)
138 based on actual width
{\it w
}
141 It must be called before displaying cells structure because
142 m
\_PosX and m
\_PosY are undefined (or invalid)
143 before calling Layout.
145 \membersection{wxHtmlCell::Draw
}\label{wxhtmlcelldraw
}
147 \func{virtual void
}{Draw
}{\param{wxDC\&
}{dc
},
\param{int
}{x
},
\param{int
}{y
},
\param{int
}{view
\_y1},
\param{int
}{view
\_y2}}
151 \wxheading{Parameters
}
153 \docparam{dc
}{Device context to which the cell is to be drawn
}
155 \docparam{x,y
}{Coordinates of parent's upper left corner (origin). You must
156 add this to m
\_PosX,m
\_PosY when passing coordinates to dc's methods
157 Example :
{\tt dc -> DrawText("hello", x + m
\_PosX, y + m
\_PosY)
}}
159 \docparam{view_y1
}{y-coord of the first line visible in window. This is
160 used to optimize rendering speed
}
162 \docparam{view_y2
}{y-coord of the last line visible in window. This is
163 used to optimize rendering speed
}
165 \membersection{wxHtmlCell::DrawInvisible
}\label{wxhtmlcelldrawinvisible
}
167 \func{virtual void
}{DrawInvisible
}{\param{wxDC\&
}{dc
},
\param{int
}{x
},
\param{int
}{y
}}
169 This method is called instead of
\helpref{Draw
{wxhtmlcelldraw
} when the
170 cell is certainly out of the screen (and thus invisible). This is not
171 nonsense - some tags (like
\helpref{wxHtmlColourCell
}{wxhtmlcolourcell
}
172 or font setter) must be drawn even if they are invisible!
174 \wxheading{Parameters
}
176 \docparam{dc
}{Device context to which the cell is to be drawn
}
178 \docparam{x,y
}{Coordinates of parent's upper left corner. You must
179 add this to m
\_PosX,m
\_PosY when passing coordinates to dc's methods
180 Example :
{\tt dc -> DrawText("hello", x + m
\_PosX, y + m
\_PosY)
} }
183 \membersection{wxHtmlCell::Find
}\label{wxhtmlcellfind
}
185 \func{virtual const wxHtmlCell*
}{Find
}{\param{int
}{condition
},
\param{const void*
}{param
}}
187 Returns pointer to itself if this cell matches condition (or if any of the cells
188 following in the list matches), NULL otherwise.
189 (In other words if you call top-level container's Find it will
190 return pointer to the first cell that matches the condition)
192 It is recommended way how to obtain pointer to particular cell or
193 to cell of some type (e.g. wxHtmlAnchorCell reacts on
194 HTML_COND_ISANCHOR condition)
196 \wxheading{Parameters
}
198 \docparam{condition
}{Unique integer identifier of condition
}
200 \docparam{param
}{Optional parameters
}
202 \wxheading{Defined conditions
}
205 \twocolitem{{\bf HTML_COND_ISANCHOR
}}{Finds particular anchor.
206 {\it param
} is pointer to wxString with name of the anchor.
}
207 \twocolitem{{\bf HTML_COND_USER
}}{User-defined conditions start
213 \membersection{wxHtmlCell::OnMouseClick
}\label{wxhtmlcellonmouseclick
}
216 \func{virtual void
}{OnMouseClick
}{\param{wxWindow*
}{parent
},
\param{int
}{x
},
\param{int
}{y
},
\param{bool
}{left
},
\param{bool
}{middle
},
\param{bool
}{right
}}
218 This function is simple event handler. Each time user clicks mouse button over a cell
219 within
\helpref{wxHtmlWindow
}{wxhtmlwindow
} this method of that cell is called. Default behavior is
220 that it calls
\helpref{wxHtmlWindow::LoadPage
}{wxhtmlwindowloadpage
}.
224 If you need more "advanced" behaviour (for example you'd like to catch mouse movement events or
225 key events or whatsooever) you should use
\helpref{wxHtmlBinderCell
}{wxhtmlbindercell
} instead.
227 \wxheading{Parameters
}
229 \docparam{parent
}{parent window (always wxHtmlWindow!!)
}
231 \docparam{x, y
}{coordinates of mouse click (this is relative to cell's origin
}
233 \docparam{left, middle, right
}{boolean flags for mouse buttons. TRUE if the left/middle/right
234 button is pressed, FALSE otherwise
}