2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: html/htmlwin.h
|
2008-03-10 11:24:38 -04:00
|
|
|
// Purpose: interface of wxHtmlWindow
|
2008-03-08 08:52:38 -05:00
|
|
|
// Author: wxWidgets team
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Licence: wxWindows license
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxHtmlWindow
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
wxHtmlWindow is probably the only class you will directly use
|
|
|
|
unless you want to do something special (like adding new tag
|
|
|
|
handlers or MIME filters).
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
The purpose of this class is to display HTML pages (either local
|
|
|
|
file or downloaded via HTTP protocol) in a window. The width
|
|
|
|
of the window is constant - given in the constructor - and virtual height
|
|
|
|
is changed dynamically depending on page size.
|
2008-03-08 09:43:31 -05:00
|
|
|
Once the window is created you can set its content by calling
|
2008-03-08 08:52:38 -05:00
|
|
|
@ref wxHtmlWindow::setpage SetPage(text),
|
|
|
|
@ref wxHtmlWindow::loadpage LoadPage(filename) or
|
|
|
|
wxHtmlWindow::LoadFile.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@beginStyleTable
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxHW_SCROLLBAR_NEVER}
|
2008-03-08 08:52:38 -05:00
|
|
|
Never display scrollbars, not even when the page is larger than the
|
|
|
|
window.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxHW_SCROLLBAR_AUTO}
|
2008-03-08 08:52:38 -05:00
|
|
|
Display scrollbars only if page's size exceeds window's size.
|
2008-04-06 10:43:04 -04:00
|
|
|
@style{wxHW_NO_SELECTION}
|
2008-03-08 08:52:38 -05:00
|
|
|
Don't allow the user to select text.
|
|
|
|
@endStyleTable
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxhtml}
|
|
|
|
@category{html}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-10 11:24:38 -04:00
|
|
|
@see wxHtmlLinkEvent, wxHtmlCellEvent
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
class wxHtmlWindow : public wxScrolledWindow
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
//@{
|
|
|
|
/**
|
2008-04-17 03:06:20 -04:00
|
|
|
Constructor. The parameters are the same as wxScrolled::wxScrolled()
|
2008-03-08 08:52:38 -05:00
|
|
|
constructor.
|
2008-10-13 07:29:37 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param style
|
2008-03-09 08:33:59 -04:00
|
|
|
Window style. See wxHtmlWindow.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
wxHtmlWindow();
|
2008-03-08 09:43:31 -05:00
|
|
|
wxHtmlWindow(wxWindow parent, wxWindowID id = -1,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxHW_DEFAULT_STYLE,
|
|
|
|
const wxString& name = "htmlWindow");
|
2008-03-08 08:52:38 -05:00
|
|
|
//@}
|
|
|
|
|
|
|
|
/**
|
|
|
|
Adds @ref overview_filters "input filter" to the static list of available
|
|
|
|
filters. These filters are present by default:
|
|
|
|
@c text/html MIME type
|
|
|
|
@c image/* MIME types
|
|
|
|
Plain Text filter (this filter is used if no other filter matches)
|
|
|
|
*/
|
|
|
|
static void AddFilter(wxHtmlFilter filter);
|
|
|
|
|
|
|
|
/**
|
2008-03-08 09:43:31 -05:00
|
|
|
Appends HTML fragment to currently displayed text and refreshes the window.
|
2008-10-13 07:29:37 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param source
|
2008-03-09 08:33:59 -04:00
|
|
|
HTML code fragment
|
2008-10-13 07:29:37 -04:00
|
|
|
|
2008-05-10 21:38:53 -04:00
|
|
|
@return @false if an error occurred, @true otherwise.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
bool AppendToPage(const wxString& source);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Returns pointer to the top-level container.
|
2008-03-08 09:43:31 -05:00
|
|
|
See also: @ref overview_cells "Cells Overview",
|
2008-03-09 08:33:59 -04:00
|
|
|
@ref overview_printing
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
wxHtmlContainerCell* GetInternalRepresentation() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns anchor within currently opened page
|
2008-03-08 09:43:31 -05:00
|
|
|
(see wxHtmlWindow::GetOpenedPage).
|
2008-03-08 08:52:38 -05:00
|
|
|
If no page is opened or if the displayed page wasn't
|
|
|
|
produced by call to LoadPage, empty string is returned.
|
|
|
|
*/
|
2008-09-27 07:21:10 -04:00
|
|
|
wxString GetOpenedAnchor() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns full location of the opened page. If no page is opened or if the
|
|
|
|
displayed page wasn't
|
|
|
|
produced by call to LoadPage, empty string is returned.
|
|
|
|
*/
|
2008-09-27 07:21:10 -04:00
|
|
|
wxString GetOpenedPage() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns title of the opened page or wxEmptyString if current page does not
|
|
|
|
contain @c TITLE tag.
|
|
|
|
*/
|
2008-09-27 07:21:10 -04:00
|
|
|
wxString GetOpenedPageTitle() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the related frame.
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
wxFrame* GetRelatedFrame() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
2008-03-08 09:43:31 -05:00
|
|
|
Moves back to the previous page. (each page displayed using
|
2008-03-08 08:52:38 -05:00
|
|
|
LoadPage() is stored in history list.)
|
|
|
|
*/
|
|
|
|
bool HistoryBack();
|
|
|
|
|
|
|
|
/**
|
|
|
|
Returns @true if it is possible to go back in the history (i.e. HistoryBack()
|
|
|
|
won't fail).
|
|
|
|
*/
|
|
|
|
bool HistoryCanBack();
|
|
|
|
|
|
|
|
/**
|
|
|
|
Returns @true if it is possible to go forward in the history (i.e. HistoryBack()
|
|
|
|
won't fail).
|
|
|
|
*/
|
|
|
|
bool HistoryCanForward();
|
|
|
|
|
|
|
|
/**
|
|
|
|
Clears history.
|
|
|
|
*/
|
|
|
|
void HistoryClear();
|
|
|
|
|
|
|
|
/**
|
|
|
|
Moves to next page in history.
|
|
|
|
*/
|
|
|
|
bool HistoryForward();
|
|
|
|
|
|
|
|
/**
|
|
|
|
Loads HTML page from file and displays it.
|
2008-10-13 07:29:37 -04:00
|
|
|
|
2008-05-10 21:38:53 -04:00
|
|
|
@return @false if an error occurred, @true otherwise
|
2008-10-13 07:29:37 -04:00
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
@see LoadPage()
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-09-27 07:21:10 -04:00
|
|
|
bool LoadFile(const wxFileName& filename);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
2008-03-09 08:33:59 -04:00
|
|
|
Unlike SetPage this function first loads HTML page from @a location
|
2008-03-08 08:52:38 -05:00
|
|
|
and then displays it. See example:
|
2008-10-13 07:29:37 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param location
|
2008-03-09 08:33:59 -04:00
|
|
|
The address of document. See wxFileSystem for details on address format and
|
2008-03-08 08:52:38 -05:00
|
|
|
behaviour of "opener".
|
2008-10-13 07:29:37 -04:00
|
|
|
|
2008-05-10 21:38:53 -04:00
|
|
|
@return @false if an error occurred, @true otherwise
|
2008-10-13 07:29:37 -04:00
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
@see LoadFile()
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
virtual bool LoadPage(const wxString& location);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Called when user clicks on hypertext link. Default behaviour is to emit a
|
|
|
|
wxHtmlLinkEvent and, if the event was not processed
|
|
|
|
or skipped, call LoadPage() and do nothing else.
|
|
|
|
Overloading this method is deprecated; intercept the event instead.
|
|
|
|
Also see wxHtmlLinkInfo.
|
|
|
|
*/
|
|
|
|
virtual void OnLinkClicked(const wxHtmlLinkInfo& link);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Called when an URL is being opened (either when the user clicks on a link or
|
2008-03-08 09:43:31 -05:00
|
|
|
an image is loaded). The URL will be opened only if OnOpeningURL returns
|
2008-03-08 08:52:38 -05:00
|
|
|
@c wxHTML_OPEN. This method is called by
|
|
|
|
wxHtmlParser::OpenURL.
|
|
|
|
You can override OnOpeningURL to selectively block some
|
|
|
|
URLs (e.g. for security reasons) or to redirect them elsewhere. Default
|
|
|
|
behaviour is to always return @c wxHTML_OPEN.
|
2008-10-13 07:29:37 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param type
|
2008-03-09 08:33:59 -04:00
|
|
|
Indicates type of the resource. Is one of
|
2008-10-13 07:29:37 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
wxHTML_URL_PAGE
|
2008-10-13 07:29:37 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
Opening a HTML page.
|
2008-10-13 07:29:37 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
wxHTML_URL_IMAGE
|
2008-10-13 07:29:37 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
Opening an image.
|
2008-10-13 07:29:37 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
wxHTML_URL_OTHER
|
2008-10-13 07:29:37 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
Opening a resource that doesn't fall into
|
|
|
|
any other category.
|
|
|
|
@param url
|
|
|
|
URL being opened.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param redirect
|
2008-03-09 08:33:59 -04:00
|
|
|
Pointer to wxString variable that must be filled with an
|
|
|
|
URL if OnOpeningURL returns wxHTML_REDIRECT.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
virtual wxHtmlOpeningStatus OnOpeningURL(wxHtmlURLType type,
|
2008-09-27 07:21:10 -04:00
|
|
|
const wxString& url,
|
|
|
|
wxString* redirect) const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Called on parsing @c TITLE tag.
|
|
|
|
*/
|
|
|
|
virtual void OnSetTitle(const wxString& title);
|
|
|
|
|
|
|
|
/**
|
|
|
|
This reads custom settings from wxConfig. It uses the path 'path'
|
|
|
|
if given, otherwise it saves info into currently selected path.
|
|
|
|
The values are stored in sub-path @c wxHtmlWindow
|
|
|
|
Read values: all things set by SetFonts, SetBorders.
|
2008-10-13 07:29:37 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param cfg
|
2008-03-09 08:33:59 -04:00
|
|
|
wxConfig from which you want to read the configuration.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param path
|
2008-03-09 08:33:59 -04:00
|
|
|
Optional path in config tree. If not given current path is used.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
virtual void ReadCustomization(wxConfigBase cfg,
|
|
|
|
wxString path = wxEmptyString);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Selects all text in the window.
|
2008-10-13 07:29:37 -04:00
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
@see SelectLine(), SelectWord()
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
void SelectAll();
|
|
|
|
|
|
|
|
/**
|
2008-03-09 08:33:59 -04:00
|
|
|
Selects the line of text that @a pos points at. Note that @e pos
|
2008-03-08 08:52:38 -05:00
|
|
|
is relative to the top of displayed page, not to window's origin, use
|
2008-04-17 03:06:20 -04:00
|
|
|
wxScrolled::CalcUnscrolledPosition()
|
2008-03-08 08:52:38 -05:00
|
|
|
to convert physical coordinate.
|
2008-10-13 07:29:37 -04:00
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
@see SelectAll(), SelectWord()
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
void SelectLine(const wxPoint& pos);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Selects the word at position @e pos. Note that @e pos
|
|
|
|
is relative to the top of displayed page, not to window's origin, use
|
2008-04-17 03:06:20 -04:00
|
|
|
wxScrolled::CalcUnscrolledPosition()
|
2008-03-08 08:52:38 -05:00
|
|
|
to convert physical coordinate.
|
2008-10-13 07:29:37 -04:00
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
@see SelectAll(), SelectLine()
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
void SelectWord(const wxPoint& pos);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Returns current selection as plain text. Returns empty string if no text
|
|
|
|
is currently selected.
|
|
|
|
*/
|
|
|
|
wxString SelectionToText();
|
|
|
|
|
|
|
|
/**
|
|
|
|
This function sets the space between border of window and HTML contents. See
|
|
|
|
image:
|
2008-10-13 07:29:37 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param b
|
2008-03-09 08:33:59 -04:00
|
|
|
indentation from borders in pixels
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
void SetBorders(int b);
|
|
|
|
|
|
|
|
/**
|
|
|
|
This function sets font sizes and faces.
|
2008-10-13 07:29:37 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param normal_face
|
2008-03-09 08:33:59 -04:00
|
|
|
This is face name for normal (i.e. non-fixed) font.
|
|
|
|
It can be either empty string (then the default face is chosen) or
|
|
|
|
platform-specific face name. Examples are "helvetica" under Unix or
|
|
|
|
"Times New Roman" under Windows.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param fixed_face
|
2008-03-09 08:33:59 -04:00
|
|
|
The same thing for fixed face ( TT../TT )
|
2008-03-08 09:43:31 -05:00
|
|
|
@param sizes
|
2008-03-09 08:33:59 -04:00
|
|
|
This is an array of 7 items of int type.
|
|
|
|
The values represent size of font with HTML size from -2 to +4
|
|
|
|
( FONT SIZE=-2 to FONT SIZE=+4 ). Default sizes are used if sizes
|
|
|
|
is @NULL.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
void SetFonts(const wxString& normal_face,
|
|
|
|
const wxString& fixed_face,
|
2008-03-09 08:33:59 -04:00
|
|
|
const int sizes = NULL);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Sets HTML page and display it. This won't @b load the page!!
|
|
|
|
It will display the @e source. See example:
|
2008-10-13 07:29:37 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
If you want to load a document from some location use
|
2008-03-08 08:52:38 -05:00
|
|
|
LoadPage() instead.
|
2008-10-13 07:29:37 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param source
|
2008-03-09 08:33:59 -04:00
|
|
|
The HTML document source to be displayed.
|
2008-10-13 07:29:37 -04:00
|
|
|
|
2008-05-10 21:38:53 -04:00
|
|
|
@return @false if an error occurred, @true otherwise.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-09-27 07:21:10 -04:00
|
|
|
virtual bool SetPage(const wxString& source);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
2008-03-09 08:33:59 -04:00
|
|
|
Sets the frame in which page title will be displayed. @a format is format of
|
2008-03-08 08:52:38 -05:00
|
|
|
frame title, e.g. "HtmlHelp : %s". It must contain exactly one %s. This
|
|
|
|
%s is substituted with HTML page title.
|
|
|
|
*/
|
|
|
|
void SetRelatedFrame(wxFrame* frame, const wxString& format);
|
|
|
|
|
|
|
|
/**
|
|
|
|
@b After calling SetRelatedFrame(),
|
|
|
|
this sets statusbar slot where messages will be displayed.
|
|
|
|
(Default is -1 = no messages.)
|
2008-06-05 05:38:37 -04:00
|
|
|
|
|
|
|
@param index
|
|
|
|
Statusbar slot number (0..n)
|
|
|
|
*/
|
|
|
|
void SetRelatedStatusBar(int index);
|
|
|
|
|
|
|
|
/**
|
|
|
|
@b Sets the associated statusbar where messages will be displayed.
|
|
|
|
Call this instead of SetRelatedFrame() if you want statusbar updates only,
|
|
|
|
no changing of the frame title.
|
|
|
|
|
|
|
|
@param statusbar
|
|
|
|
Statusbar pointer
|
|
|
|
@param index
|
|
|
|
Statusbar slot number (0..n)
|
|
|
|
|
|
|
|
@since 2.9.0
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-06-05 05:38:37 -04:00
|
|
|
void SetRelatedStatusBar(wxStatusBar* statusbar, int index = 0);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns content of currently displayed page as plain text.
|
|
|
|
*/
|
|
|
|
wxString ToText();
|
|
|
|
|
|
|
|
/**
|
|
|
|
Saves custom settings into wxConfig. It uses the path 'path'
|
|
|
|
if given, otherwise it saves info into currently selected path.
|
2008-03-08 09:43:31 -05:00
|
|
|
Regardless of whether the path is given or not, the function creates sub-path
|
2008-03-08 08:52:38 -05:00
|
|
|
@c wxHtmlWindow.
|
|
|
|
Saved values: all things set by SetFonts, SetBorders.
|
2008-10-13 07:29:37 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param cfg
|
2008-03-09 08:33:59 -04:00
|
|
|
wxConfig to which you want to save the configuration.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param path
|
2008-03-09 08:33:59 -04:00
|
|
|
Optional path in config tree. If not given, the current path is used.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
virtual void WriteCustomization(wxConfigBase cfg,
|
|
|
|
wxString path = wxEmptyString);
|
2008-10-13 07:29:37 -04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
/**
|
|
|
|
This method is called when a mouse button is clicked inside wxHtmlWindow.
|
|
|
|
The default behaviour is to emit a wxHtmlCellEvent
|
|
|
|
and, if the event was not processed or skipped, call
|
|
|
|
OnLinkClicked() if the cell contains an
|
|
|
|
hypertext link.
|
|
|
|
Overloading this method is deprecated; intercept the event instead.
|
|
|
|
|
|
|
|
@param cell
|
|
|
|
The cell inside which the mouse was clicked, always a simple
|
|
|
|
(i.e. non-container) cell
|
|
|
|
@param x, y
|
|
|
|
The logical coordinates of the click point
|
|
|
|
@param event
|
|
|
|
The mouse event containing other information about the click
|
|
|
|
|
|
|
|
@return @true if a link was clicked, @false otherwise.
|
|
|
|
*/
|
|
|
|
virtual bool OnCellClicked(wxHtmlCell cell, wxCoord x, wxCoord y,
|
|
|
|
const wxMouseEvent& event);
|
|
|
|
|
|
|
|
/**
|
|
|
|
This method is called when a mouse moves over an HTML cell.
|
|
|
|
Default behaviour is to emit a wxHtmlCellEvent.
|
|
|
|
Overloading this method is deprecated; intercept the event instead.
|
|
|
|
|
|
|
|
@param cell
|
|
|
|
The cell inside which the mouse is currently, always a simple
|
|
|
|
(i.e. non-container) cell
|
|
|
|
@param x, y
|
|
|
|
The logical coordinates of the click point
|
|
|
|
*/
|
|
|
|
virtual void OnCellMouseHover(wxHtmlCell cell, wxCoord x, wxCoord y);
|
2008-03-08 08:52:38 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-03-10 11:24:38 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
@class wxHtmlLinkEvent
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
This event class is used for the events generated by wxHtmlWindow.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxhtml}
|
|
|
|
@category{FIXME}
|
|
|
|
*/
|
|
|
|
class wxHtmlLinkEvent : public wxCommandEvent
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
The constructor is not normally used by the user code.
|
|
|
|
*/
|
2008-03-09 08:33:59 -04:00
|
|
|
wxHyperlinkEvent(int id, const wxHtmlLinkInfo& linkinfo);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the wxHtmlLinkInfo which contains info about the cell clicked and the
|
|
|
|
hyperlink it contains.
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
const wxHtmlLinkInfo GetLinkInfo() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-03-10 11:24:38 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
@class wxHtmlCellEvent
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
This event class is used for the events generated by wxHtmlWindow.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxhtml}
|
|
|
|
@category{FIXME}
|
|
|
|
*/
|
|
|
|
class wxHtmlCellEvent : public wxCommandEvent
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
The constructor is not normally used by the user code.
|
|
|
|
*/
|
|
|
|
wxHtmlCellEvent(wxEventType commandType, int id,
|
2008-03-09 08:33:59 -04:00
|
|
|
wxHtmlCell* cell,
|
|
|
|
const wxPoint& point);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the wxHtmlCellEvent associated with the event.
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
wxHtmlCell* GetCell() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns @true if @ref setlinkclicked() SetLinkClicked(@true) has previously
|
|
|
|
been called;
|
|
|
|
@false otherwise.
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
bool GetLinkClicked() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the wxPoint associated with the event.
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
wxPoint GetPoint() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Call this function with @c linkclicked set to @true if the cell which has
|
|
|
|
been clicked contained a link or
|
|
|
|
@false otherwise (which is the default). With this function the event handler
|
|
|
|
can return info to the
|
|
|
|
wxHtmlWindow which sent the event.
|
|
|
|
*/
|
|
|
|
bool SetLinkClicked(bool linkclicked);
|
|
|
|
};
|
2008-03-10 11:24:38 -04:00
|
|
|
|