rjxray wrote:Is it possible to know when the mouse is hovered over a URL link, and to get the text of the URL?
rjxray wrote:Thanks for the suggestion, I might be able to make it work although it would be a bit cumbersome.
The background to my question is that we have an off screen canvas with multiple browsers.
We want to allow the user to click and drag any URL link on a browser's render to our widget which will create a new browser by splitting or replacing an existing one
I do see the cursor type changing to CT_HAND when moving over a link.
So I guess I could grab and somehow check the HTML for the current cursor position when I get the mouse button down event if the current cursor is CT_HAND
It would be good if there was an easier way though!
//Return the link URL that is being dragged.
virtual CefString GetLinkURL() = 0;
bool CEFRenderHandler::StartDragging(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefDragData> drag_data,
CefRenderHandler::DragOperationsMask allowed_ops,
int x,
int y) {
current_drag_data_ = drag_data->Clone();
cout << "OnDragEnter called" << endl;
if (current_drag_data_->IsLink()) {
cout << "data is a link to " << current_drag_data_->GetLinkURL() << endl;
}
return DRAG_OPERATION_NONE;
}
Users browsing this forum: Google [Bot] and 97 guests