.\" This is a wxWidgets manpage page generated from the XML docs .TH wxHtmlCell 3wx 2005-02-15 "wxWidgets" "wxWidgets class documentation" .SH NAME wxHtmlCell \- .SH DESCRIPTION Internal data structure. It represents fragments of parsed HTML page, the so-called cell - a word, picture, table, horizontal line and so on. It is used by wxHtmlWindow and wxHtmlWinParser to represent HTML page in memory. You can divide cells into two groups : visible cells with non-zero width and height and helper cells (usually with zero width and height) that perform special actions such as color or font change. .SH "PARENTS" wxObject .SH "INCLUDE FILES" wx/html/htmlcell.h .SH MEMBERS .SS wxHtmlCell () Constructor. .SS virtual bool AdjustPagebreak (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. Returns true if pagebreak was modified, false otherwise Usage: while (container->AdjustPagebreak(&p)) {} .SS virtual void Draw (wxDC& dcint xint yint view_y1int view_y2) Renders the cell. .SS virtual void DrawInvisible (wxDC& dcint xint y) This method is called instead of Draw when the cell is certainly out of the screen (and thus invisible). This is not nonsense - some tags (like wxHtmlColourCell or font setter) must be drawn even if they are invisible! .SS virtual const wxHtmlCell* Find (int conditionconst 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 wxHTML_COND_ISANCHOR condition) Defined conditions wxHTML_COND_ISANCHOR Finds particular anchor. param is pointer to wxString with name of the anchor. wxHTML_COND_USER User-defined conditions start from this number. .SS int GetDescent () Returns descent value of the cell (m_Descent member). \helponly{See explanation: \image{}{descent.bmp} } .SS wxHtmlCell* GetFirstChild () Returns pointer to the first cell in the list. You can then use child's GetNext method to obtain pointer to the next cell in list. Note: This shouldn't be used by the end user. If you need some way of finding particular cell in the list, try Find method instead. .SS int GetHeight () Returns height of the cell (m_Height member). .SS virtual wxString GetId () Returns unique cell identifier if there is any, empty string otherwise. .SS virtual wxHtmlLinkInfo* GetLink (int x = 0int y = 0) Returns hypertext link if associated with this cell or NULL otherwise. See wxHtmlLinkInfo . (Note: this makes sense only for visible tags). .SS wxHtmlCell* GetNext () Returns pointer to the next cell in list (see htmlcell.h if you're interested in details). .SS wxHtmlContainerCell* GetParent () Returns pointer to parent container. .SS int GetPosX () Returns X position within parent (the value is relative to parent's upper left corner). The returned value is meaningful only if parent's Layout was called before! .SS int GetPosY () Returns Y position within parent (the value is relative to parent's upper left corner). The returned value is meaningful only if parent's Layout was called before! .SS int GetWidth () Returns width of the cell (m_Width member). .SS virtual void Layout (int w) This method performs two actions: adjusts the cell's width according to the fact that maximal possible width is w . (this has sense when working with horizontal lines, tables etc.) prepares layout (=fill-in m_PosX, m_PosY (and sometimes m_Height) members) based on actual width w It must be called before displaying cells structure because m_PosX and m_PosY are undefined (or invalid) before calling Layout. .SS virtual void OnMouseClick (wxWindow* parentintxint yconst wxMouseEvent& event) This function is simple event handler. Each time the user clicks mouse button over a cell within wxHtmlWindow this method of that cell is called. Default behavior is that it calls wxHtmlWindow::LoadPage . .SS void SetId (const wxString& id) Sets unique cell identifier. Default value is no identifier, i.e. empty string. .SS void SetLink (const wxHtmlLinkInfo& link) Sets the hypertext link associated with this cell. (Default value is wxHtmlLinkInfo ("", "") (no link)) .SS void SetNext (wxHtmlCell *cell) Sets the next cell in the list. This shouldn't be called by user - it is to be used only by wxHtmlContainerCell::InsertCell . .SS void SetParent (wxHtmlContainerCell *p) Sets parent container of this cell. This is called from wxHtmlContainerCell::InsertCell . .SS void SetPos (int xint y) Sets the cell's position within parent container. .SH "SEE ALSO" wxObject Cells Overview , wxHtmlContainerCell .SH "AUTHORS" Documentation content by Julian Smart, Robert Roebling, Vadim Zeitlin, Robin Dunn, et al Conversion to manpage format by Arnout Engelen (http://bzzt.net), bugreports welcome.