#if wxUSE_HTML && wxUSE_STREAMS
-#ifndef WXPRECOMP
+#ifndef WX_PRECOMP
#include "wx/list.h"
#include "wx/log.h"
#include "wx/intl.h"
void wxHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link)
{
wxHtmlLinkEvent event(GetId(), link);
+ event.SetEventObject(this);
if (!GetEventHandler()->ProcessEvent(event))
{
// the default behaviour is to load the URL in this window
void wxHtmlWindow::OnKeyUp(wxKeyEvent& event)
{
- if ( IsSelectionEnabled() && event.GetKeyCode() == 'C' && event.CmdDown() )
+ if ( IsSelectionEnabled() &&
+ (event.GetKeyCode() == 'C' && event.CmdDown()) )
{
- (void) CopySelection();
+ wxClipboardTextEvent evt(wxEVT_COMMAND_TEXT_COPY, GetId());
+
+ evt.SetEventObject(this);
+
+ GetEventHandler()->ProcessEvent(evt);
}
}
(void) CopySelection();
}
+void wxHtmlWindow::OnClipboardEvent(wxClipboardTextEvent& WXUNUSED(event))
+{
+ (void) CopySelection();
+}
+
void wxHtmlWindow::OnDoubleClick(wxMouseEvent& event)
{
// select word under cursor:
EVT_MOUSE_CAPTURE_LOST(wxHtmlWindow::OnMouseCaptureLost)
EVT_KEY_UP(wxHtmlWindow::OnKeyUp)
EVT_MENU(wxID_COPY, wxHtmlWindow::OnCopy)
+ EVT_TEXT_COPY(wxID_ANY, wxHtmlWindow::OnClipboardEvent)
#endif // wxUSE_CLIPBOARD
END_EVENT_TABLE()