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()