add events API to wxHtmlWindow (patch #1504493 by Francesco Montorsi)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2006-10-29 20:26:03 +00:00
parent 55f42db2fb
commit a1c3cdc4a2
10 changed files with 408 additions and 72 deletions

View File

@@ -295,37 +295,6 @@ enum
wxID_HTML_COUNTINFO
};
/*!
* Help window event
*/
class WXDLLIMPEXP_HTML wxHtmlWindowEvent: public wxNotifyEvent
{
public:
wxHtmlWindowEvent(wxEventType commandType = wxEVT_NULL, int id = 0):
wxNotifyEvent(commandType, id)
{
}
void SetURL(const wxString& url) { m_url = url; }
const wxString& GetURL() const { return m_url; }
private:
wxString m_url;
DECLARE_DYNAMIC_CLASS(wxHtmlWindowEvent)
};
typedef void (wxEvtHandler::*wxHtmlWindowEventFunction)(wxHtmlWindowEvent&);
BEGIN_DECLARE_EVENT_TYPES()
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_HTML,
wxEVT_COMMAND_HTMLWINDOW_URL_CLICKED, 1000)
END_DECLARE_EVENT_TYPES()
#define EVT_HTMLWINDOW_URL_CLICKED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_HTMLWINDOW_URL_CLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxHtmlWindowEventFunction) & fn, (wxObject *) NULL ),
#endif // wxUSE_WXHTML_HELP
#endif