1. added abstract interface to wxHtmlWindow for use by wxHtmlWinParser and implemented it for wxHtmlListBox
2. used the above to implement clickable links support in wxHtmlListBox git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38701 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -223,13 +223,14 @@ It must be called before displaying cells structure because
|
||||
m\_PosX and m\_PosY are undefined (or invalid)
|
||||
before calling Layout.
|
||||
|
||||
\membersection{wxHtmlCell::OnMouseClick}\label{wxhtmlcellonmouseclick}
|
||||
\membersection{wxHtmlCell::ProcessMouseClick}\label{wxhtmlcellprocessmouseclick}
|
||||
|
||||
\func{virtual void}{OnMouseClick}{\param{wxWindow* }{parent}, \param{int}{x}, \param{int }{y}, \param{const wxMouseEvent\& }{event}}
|
||||
\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 button over a cell
|
||||
within \helpref{wxHtmlWindow}{wxhtmlwindow} this method of that cell is called. Default behavior is
|
||||
that it calls \helpref{wxHtmlWindow::LoadPage}{wxhtmlwindowloadpage}.
|
||||
This function is simple event handler. Each time the user clicks mouse button
|
||||
over a cell within \helpref{wxHtmlWindow}{wxhtmlwindow} this method of that
|
||||
cell is called. Default behavior is to call
|
||||
\helpref{wxHtmlWindow::LoadPage}{wxhtmlwindowloadpage}.
|
||||
|
||||
\wxheading{Note}
|
||||
|
||||
@@ -238,12 +239,15 @@ you should use wxHtmlBinderCell instead.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{parent}{parent window (always wxHtmlWindow!)}
|
||||
\docparam{window}{interface to the parent HTML window}
|
||||
|
||||
\docparam{x, y}{coordinates of mouse click (this is relative to cell's origin}
|
||||
\docparam{pos}{coordinates of mouse click (this is relative to cell's origin}
|
||||
|
||||
\docparam{left, middle, right}{boolean flags for mouse buttons. true if the left/middle/right
|
||||
button is pressed, false otherwise}
|
||||
\docparam{event}{mouse event that triggered the call}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
\true if a link was clicked, \false otherwise.
|
||||
|
||||
\membersection{wxHtmlCell::SetId}\label{wxhtmlcellsetid}
|
||||
|
||||
|
@@ -127,3 +127,18 @@ for the given item.
|
||||
This function may be overridden to decorate HTML returned by
|
||||
\helpref{OnGetItem()}{wxhtmllistboxongetitem}.
|
||||
|
||||
\membersection{wxHtmlListBox::OnLinkClicked}\label{wxhtmlistboxonlinkclicked}
|
||||
|
||||
\func{virtual void}{OnLinkClicked}{\param{size\_t }{n}, \param{const wxHtmlLinkInfo\& }{link}}
|
||||
|
||||
Called when the user clicks on hypertext link. Does nothing by default.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{n}{Index of the item containing the link.}
|
||||
|
||||
\docparam{link}{Description of the link.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
See also \helpref{wxHtmlLinkInfo}{wxhtmllinkinfo}.
|
||||
|
@@ -197,7 +197,7 @@ false if an error occurred, true otherwise
|
||||
|
||||
\membersection{wxHtmlWindow::OnCellClicked}\label{wxhtmlwindowoncellclicked}
|
||||
|
||||
\func{virtual void}{OnCellClicked}{\param{wxHtmlCell }{*cell}, \param{wxCoord }{x}, \param{wxCoord }{y}, \param{const wxMouseEvent\& }{event}}
|
||||
\func{virtual bool}{OnCellClicked}{\param{wxHtmlCell }{*cell}, \param{wxCoord }{x}, \param{wxCoord }{y}, \param{const wxMouseEvent\& }{event}}
|
||||
|
||||
This method is called when a mouse button is clicked inside wxHtmlWindow.
|
||||
The default behaviour is to call
|
||||
@@ -213,6 +213,10 @@ hypertext link.
|
||||
|
||||
\docparam{event}{The mouse event containing other information about the click}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
\true if a link was clicked, \false otherwise.
|
||||
|
||||
\membersection{wxHtmlWindow::OnCellMouseHover}\label{wxhtmlwindowoncellmousehover}
|
||||
|
||||
\func{virtual void}{OnCellMouseHover}{\param{wxHtmlCell }{*cell}, \param{wxCoord }{x}, \param{wxCoord }{y}}
|
||||
|
@@ -32,10 +32,12 @@ The product of parsing is a wxHtmlCell (resp. wxHtmlContainer) object.
|
||||
|
||||
\func{}{wxHtmlWinParser}{\void}
|
||||
|
||||
\func{}{wxHtmlWinParser}{\param{wxHtmlWindow }{*wnd}}
|
||||
\func{}{wxHtmlWinParser}{\param{wxHtmlWindowInterface }{*wndIface}}
|
||||
|
||||
Constructor. Don't use the default one, use constructor with
|
||||
{\it wnd} parameter ({\it wnd} is pointer to associated \helpref{wxHtmlWindow}{wxhtmlwindow})
|
||||
{\it wndIface} parameter ({\it wndIface} is a pointer to interface object for
|
||||
the associated \helpref{wxHtmlWindow}{wxhtmlwindow} or other HTML rendering
|
||||
window such as \helpref{wxHtmlListBox}{wxhtmllistbox}).
|
||||
|
||||
\membersection{wxHtmlWinParser::AddModule}\label{wxhtmlwinparseraddmodule}
|
||||
|
||||
|
Reference in New Issue
Block a user