git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24663
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#endif // wxUSE_CLIPBOARD
#endif // wxUSE_CLIPBOARD
-void wxHtmlWindow::CopySelection(ClipboardType t)
+bool wxHtmlWindow::CopySelection(ClipboardType t)
{
#if wxUSE_CLIPBOARD
if ( m_selection )
{
#if wxUSE_CLIPBOARD
if ( m_selection )
//
// TODO: this should be abstracted at wxClipboard level!
if ( t == Primary )
//
// TODO: this should be abstracted at wxClipboard level!
if ( t == Primary )
#endif // __UNIX__/!__UNIX__
if ( wxTheClipboard->Open() )
#endif // __UNIX__/!__UNIX__
if ( wxTheClipboard->Open() )
wxTheClipboard->Close();
wxLogTrace(_T("wxhtmlselection"),
_("Copied to clipboard:\"%s\""), txt.c_str());
wxTheClipboard->Close();
wxLogTrace(_T("wxhtmlselection"),
_("Copied to clipboard:\"%s\""), txt.c_str());
}
}
#endif // wxUSE_CLIPBOARD
}
}
#endif // wxUSE_CLIPBOARD
m_makingSelection = false;
// did the user move the mouse far enough from starting point?
m_makingSelection = false;
// did the user move the mouse far enough from starting point?
+ if ( CopySelection(Primary) )
- CopySelection(Primary);
-
// we don't want mouse up event that ended selecting to be
// handled as mouse click and e.g. follow hyperlink:
return;
// we don't want mouse up event that ended selecting to be
// handled as mouse click and e.g. follow hyperlink:
return;
if ( IsSelectionEnabled() &&
event.GetKeyCode() == 'C' && event.ControlDown() )
{
if ( IsSelectionEnabled() &&
event.GetKeyCode() == 'C' && event.ControlDown() )
{
- if ( m_selection )
- CopySelection();
}
}
void wxHtmlWindow::OnCopy(wxCommandEvent& WXUNUSED(event))
{
}
}
void wxHtmlWindow::OnCopy(wxCommandEvent& WXUNUSED(event))
{
- if ( m_selection )
- CopySelection();
}
void wxHtmlWindow::OnDoubleClick(wxMouseEvent& event)
}
void wxHtmlWindow::OnDoubleClick(wxMouseEvent& event)