⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 htcell.tex

📁 很牛的GUI源码wxWidgets-2.8.0.zip 可在多种平台下运行.
💻 TEX
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Name:        htcell.tex%% Purpose:     wxHtmlCell documentation%% Author:      wxWidgets Team%% Modified by:%% Created:     21/Mar/99 22:45:23%% RCS-ID:      $Id: htcell.tex,v 1.22 2006/05/28 09:47:08 MR Exp $%% Copyright:   (c) wxWidgets Team%% License:     wxWindows license%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\section{\class{wxHtmlCell}}\label{wxhtmlcell}Internal data structure. It represents fragments of parsed HTMLpage, the so-called {\bf cell} - a word, picture, table, horizontal line and so on.It is used by \helpref{wxHtmlWindow}{wxhtmlwindow} and \helpref{wxHtmlWinParser}{wxhtmlwinparser} to represent HTML page in memory.You can divide cells into two groups : {\it visible} cells with non-zero width andheight and {\it helper} cells (usually with zero width and height) thatperform special actions such as color or font change.\wxheading{Derived from}\helpref{wxObject}{wxobject}\wxheading{Include files}<wx/html/htmlcell.h>\wxheading{See Also}\helpref{Cells Overview}{cells},\helpref{wxHtmlContainerCell}{wxhtmlcontainercell}\latexignore{\rtfignore{\wxheading{Members}}}\membersection{wxHtmlCell::wxHtmlCell}\label{wxhtmlcellwxhtmlcell}\func{}{wxHtmlCell}{\void}Constructor.\membersection{wxHtmlCell::AdjustPagebreak}\label{wxhtmlcelladjustpagebreak}\func{virtual bool}{AdjustPagebreak}{\param{int * }{pagebreak}}This method is used to adjust pagebreak position. The parameter isvariable that contains y-coordinate of page break (= horizontal line thatshould not be crossed by words, images etc.). If this cell cannot be dividedinto two pieces (each one on another page) then it moves the pagebreakfew pixels up.Returns true if pagebreak was modified, false otherwiseUsage: \begin{verbatim}while (container->AdjustPagebreak(&p)) {}\end{verbatim}\membersection{wxHtmlCell::Draw}\label{wxhtmlcelldraw}\func{virtual void}{Draw}{\param{wxDC\& }{dc}, \param{int }{x}, \param{int }{y}, \param{int }{view\_y1}, \param{int }{view\_y2}}Renders the cell.\wxheading{Parameters}\docparam{dc}{Device context to which the cell is to be drawn}\docparam{x,y}{Coordinates of parent's upper left corner (origin). You mustadd this to m\_PosX,m\_PosY when passing coordinates to dc's methodsExample : {\tt dc -> DrawText("hello", x + m\_PosX, y + m\_PosY)}}\docparam{view\_y1}{y-coord of the first line visible in window. This isused to optimize rendering speed}\docparam{view\_y2}{y-coord of the last line visible in window. This isused to optimize rendering speed}\membersection{wxHtmlCell::DrawInvisible}\label{wxhtmlcelldrawinvisible}\func{virtual void}{DrawInvisible}{\param{wxDC\& }{dc}, \param{int }{x}, \param{int }{y}}This method is called instead of \helpref{Draw}{wxhtmlcelldraw} when thecell is certainly out of the screen (and thus invisible). This is notnonsense - some tags (like \helpref{wxHtmlColourCell}{wxhtmlcolourcell}or font setter) must be drawn even if they are invisible!\wxheading{Parameters}\docparam{dc}{Device context to which the cell is to be drawn}\docparam{x,y}{Coordinates of parent's upper left corner. You mustadd this to m\_PosX,m\_PosY when passing coordinates to dc's methodsExample : {\tt dc -> DrawText("hello", x + m\_PosX, y + m\_PosY)}}\membersection{wxHtmlCell::Find}\label{wxhtmlcellfind}\func{virtual const wxHtmlCell*}{Find}{\param{int }{condition}, \param{const void* }{param}}Returns pointer to itself if this cell matches condition (or if any of the cellsfollowing in the list matches), NULL otherwise.(In other words if you call top-level container's Find it willreturn pointer to the first cell that matches the condition)It is recommended way how to obtain pointer to particular cell orto cell of some type (e.g. wxHtmlAnchorCell reacts onwxHTML\_COND\_ISANCHOR condition)\wxheading{Parameters}\docparam{condition}{Unique integer identifier of condition}\docparam{param}{Optional parameters}\wxheading{Defined conditions}\begin{twocollist}\itemsep=0pt\twocolitem{{\bf wxHTML\_COND\_ISANCHOR}}{Finds particular anchor. {\it param} is pointer to wxString with name of the anchor.}\twocolitem{{\bf wxHTML\_COND\_USER}}{User-defined conditions startfrom this number.}\end{twocollist}\membersection{wxHtmlCell::GetDescent}\label{wxhtmlcellgetdescent}\constfunc{int}{GetDescent}{\void}Returns descent value of the cell (m\_Descent member). \helponly{See explanation:\image{}{descent.bmp}}\membersection{wxHtmlCell::GetFirstChild}\label{wxhtmlcellgetfirstchild}\func{wxHtmlCell*}{GetFirstChild}{\void}Returns pointer to the first cell in the list.You can then use child's \helpref{GetNext}{wxhtmlcellgetnext}method to obtain pointer to the next cell in list.{\bf Note:} This shouldn't be used by the end user. If you need some way offinding particular cell in the list, try \helpref{Find}{wxhtmlcellfind} methodinstead.\membersection{wxHtmlCell::GetHeight}\label{wxhtmlcellgetheight}\constfunc{int}{GetHeight}{\void}Returns height of the cell (m\_Height member).\membersection{wxHtmlCell::GetId}\label{wxhtmlcellgetid}\constfunc{virtual wxString}{GetId}{\void}Returns unique cell identifier if there is any, empty string otherwise.\membersection{wxHtmlCell::GetLink}\label{wxhtmlcellgetlink}\constfunc{virtual wxHtmlLinkInfo*}{GetLink}{\param{int }{x = 0}, \param{int }{y = 0}}Returns hypertext link if associated with this cell or NULL otherwise.See \helpref{wxHtmlLinkInfo}{wxhtmllinkinfo}.(Note: this makes sense only for visible tags).\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 theupper left corner of THIS cell (i.e. from 0 to m\_Width or m\_Height)}\membersection{wxHtmlCell::GetMouseCursor}\label{wxhtmlcellgetmousecursor}\func{virtual wxCursor}{GetMouseCursor}{\param{wxHtmlWindowInterface* }{window}}Returns cursor to show when mouse pointer is over the cell.\wxheading{Parameters}\docparam{window}{interface to the parent HTML window}\newsince{2.7.0} (before \tt{GetCursor} method served a similar purpose, which is now deprecated).\membersection{wxHtmlCell::GetNext}\label{wxhtmlcellgetnext}\constfunc{wxHtmlCell*}{GetNext}{\void}Returns pointer to the next cell in list (see htmlcell.h if you'reinterested in details).\membersection{wxHtmlCell::GetParent}\label{wxhtmlcellgetparent}\constfunc{wxHtmlContainerCell*}{GetParent}{\void}Returns pointer to parent container.\membersection{wxHtmlCell::GetPosX}\label{wxhtmlcellgetposx}\constfunc{int}{GetPosX}{\void}Returns X position within parent (the value is relative to parent'supper left corner). The returned value is meaningful only ifparent's \helpref{Layout}{wxhtmlcelllayout} was called before!\membersection{wxHtmlCell::GetPosY}\label{wxhtmlcellgetposy}\constfunc{int}{GetPosY}{\void}Returns Y position within parent (the value is relative to parent'supper left corner). The returned value is meaningful only ifparent's \helpref{Layout}{wxhtmlcelllayout} was called before!\membersection{wxHtmlCell::GetWidth}\label{wxhtmlcellgetwidth}\constfunc{int}{GetWidth}{\void}Returns width of the cell (m\_Width member).\membersection{wxHtmlCell::Layout}\label{wxhtmlcelllayout}\func{virtual void}{Layout}{\param{int }{w}}This method performs two actions:\begin{enumerate}\itemsep=0pt\item adjusts the cell's width according to the fact that maximal possible width is {\it w}.(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}It must be called before displaying cells structure becausem\_PosX and m\_PosY are undefined (or invalid)before calling Layout.\membersection{wxHtmlCell::ProcessMouseClick}\label{wxhtmlcellprocessmouseclick}\func{virtual bool}{ProcessMouseClick}{\param{wxHtmlWindowInterface* }{window}, \param{const wxPoint\& }{pos}, \param{const wxMouseEvent\& }{event}}This function is simple event handler. Each time the user clicks mouse buttonover a cell within \helpref{wxHtmlWindow}{wxhtmlwindow} this method of thatcell is called. Default behavior is to call\helpref{wxHtmlWindow::LoadPage}{wxhtmlwindowloadpage}.\wxheading{Note}If you need more "advanced" event handlingyou should use wxHtmlBinderCell instead.\wxheading{Parameters}\docparam{window}{interface to the parent HTML window}\docparam{pos}{coordinates of mouse click (this is relative to cell's origin}\docparam{event}{mouse event that triggered the call}\wxheading{Return value}\true if a link was clicked, \false otherwise.\newsince{2.7.0} (before \tt{OnMouseClick} method served a similar purpose).\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.\membersection{wxHtmlCell::SetLink}\label{wxhtmlcellsetlink}\func{void}{SetLink}{\param{const wxHtmlLinkInfo\& }{link}}Sets the hypertext link associated with this cell. (Default valueis \helpref{wxHtmlLinkInfo}{wxhtmllinkinfo}("", "") (no link))\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 isto be used only by \helpref{wxHtmlContainerCell::InsertCell}{wxhtmlcontainercellinsertcell}.\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}}Sets the cell's position within parent container.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -