本文整理汇总了C++中MouseEventWithHitTestResults类的典型用法代码示例。如果您正苦于以下问题:C++ MouseEventWithHitTestResults类的具体用法?C++ MouseEventWithHitTestResults怎么用?C++ MouseEventWithHitTestResults使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MouseEventWithHitTestResults类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: passWidgetMouseDownEventToWidget
bool EventHandler::passWidgetMouseDownEventToWidget(const MouseEventWithHitTestResults& event)
{
// Figure out which view to send the event to.
if (!event.targetNode() || !event.targetNode()->renderer() || !event.targetNode()->renderer()->isWidget())
return false;
return passMouseDownEventToWidget(toRenderWidget(event.targetNode()->renderer())->widget());
}
示例2: passWidgetMouseDownEventToWidget
bool EventHandler::passWidgetMouseDownEventToWidget(const MouseEventWithHitTestResults& event)
{
// Figure out which view to send the event to.
RenderObject* target = event.targetNode() ? event.targetNode()->renderer() : nullptr;
if (!is<RenderWidget>(target))
return false;
return passMouseDownEventToWidget(downcast<RenderWidget>(*target).widget());
}
示例3: passWidgetMouseDownEventToWidget
bool EventHandler::passWidgetMouseDownEventToWidget(const MouseEventWithHitTestResults& event)
{
// Figure out which view to send the event to.
RenderObject* target = event.targetNode() ? event.targetNode()->renderer() : 0;
if (!target || !target->isWidget())
return false;
return passMouseDownEventToWidget(static_cast<RenderWidget*>(target)->widget());
}
示例4: passMouseMoveEventToSubframe
bool EventHandler::passMouseMoveEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe, HitTestResult* hoveredNode)
{
if (m_mouseDownMayStartDrag && !m_mouseDownWasInSubframe)
return false;
subframe->eventHandler()->handleMouseMoveEvent(mev.event(), hoveredNode);
return true;
}
示例5: passMouseMoveEventToSubframe
bool EventHandler::passMouseMoveEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe, HitTestResult* hoveredNode)
{
#if ENABLE(DRAG_SUPPORT)
if (m_mouseDownMayStartDrag && !m_mouseDownWasInSubframe)
return false;
#endif
subframe->eventHandler().handleMouseMoveEvent(mev.event(), hoveredNode);
return true;
}
示例6: passMousePressEventToSubframe
bool EventHandler::passMousePressEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe)
{
// If we're clicking into a frame that is selected, the frame will appear
// greyed out even though we're clicking on the selection. This looks
// really strange (having the whole frame be greyed out), so we deselect the
// selection.
IntPoint p = m_frame->view()->windowToContents(mev.event().pos());
if (m_frame->selection()->contains(p)) {
VisiblePosition visiblePos(
mev.targetNode()->renderer()->positionForPoint(mev.localPoint()));
Selection newSelection(visiblePos);
if (m_frame->shouldChangeSelection(newSelection))
m_frame->selection()->setSelection(newSelection);
}
subframe->eventHandler()->handleMousePressEvent(mev.event());
return true;
}
示例7: passMouseReleaseEventToSubframe
bool EventHandler::passMouseReleaseEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe)
{
subframe->eventHandler().handleMouseReleaseEvent(mev.event());
return true;
}
示例8: passMouseMoveEventToSubframe
bool EventHandler::passMouseMoveEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe, HitTestResult* hoveredNode)
{
subframe->eventHandler().handleMouseMoveEvent(mev.event(), hoveredNode);
return true;
}
示例9: passMouseMoveEventToSubframe
bool EventHandler::passMouseMoveEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe, WebCore::HitTestResult* hittest)
{
subframe->eventHandler()->handleMouseMoveEvent(mev.event(), hittest);
return true;
}
示例10: passSubframeEventToSubframe
bool FrameGdk::passSubframeEventToSubframe(MouseEventWithHitTestResults& mev, Frame*)
{
if (mev.targetNode() == 0)
return true;
return false;
}