本文整理汇总了C++中webcore::FrameView::horizontalScrollbar方法的典型用法代码示例。如果您正苦于以下问题:C++ FrameView::horizontalScrollbar方法的具体用法?C++ FrameView::horizontalScrollbar怎么用?C++ FrameView::horizontalScrollbar使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类webcore::FrameView
的用法示例。
在下文中一共展示了FrameView::horizontalScrollbar方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: renderFrameExtras
void QWebFrameAdapter::renderFrameExtras(WebCore::GraphicsContext* context, int layers, const QRegion& clip)
{
if (!(layers & (PanIconLayer | ScrollBarLayer)))
return;
QPainter* painter = context->platformContext();
WebCore::FrameView* view = frame->view();
QVector<QRect> vector = clip.rects();
for (int i = 0; i < vector.size(); ++i) {
const QRect& clipRect = vector.at(i);
QRect intersectedRect = clipRect.intersected(view->frameRect());
painter->save();
painter->setClipRect(clipRect, Qt::IntersectClip);
int x = view->x();
int y = view->y();
if (layers & ScrollBarLayer
&& !view->scrollbarsSuppressed()
&& (view->horizontalScrollbar() || view->verticalScrollbar())) {
QRect rect = intersectedRect;
context->translate(x, y);
rect.translate(-x, -y);
view->paintScrollbars(context, rect);
context->translate(-x, -y);
}
#if ENABLE(PAN_SCROLLING)
if (layers & PanIconLayer)
view->paintPanScrollIcon(context);
#endif
painter->restore();
}
}
示例2: renderRelativeCoords
void QWebFramePrivate::renderRelativeCoords(GraphicsContext* context, QWebFrame::RenderLayer layer, const QRegion& clip)
{
if (!frame->view() || !frame->contentRenderer())
return;
QVector<QRect> vector = clip.rects();
if (vector.isEmpty())
return;
QPainter* painter = context->platformContext();
WebCore::FrameView* view = frame->view();
view->layoutIfNeededRecursive();
for (int i = 0; i < vector.size(); ++i) {
const QRect& clipRect = vector.at(i);
QRect intersectedRect = clipRect.intersected(view->frameRect());
painter->save();
painter->setClipRect(clipRect, Qt::IntersectClip);
int x = view->x();
int y = view->y();
if (layer & QWebFrame::ContentsLayer) {
context->save();
int scrollX = view->scrollX();
int scrollY = view->scrollY();
QRect rect = intersectedRect;
context->translate(x, y);
rect.translate(-x, -y);
context->translate(-scrollX, -scrollY);
rect.translate(scrollX, scrollY);
context->clip(view->visibleContentRect());
view->paintContents(context, rect);
context->restore();
}
if (layer & QWebFrame::ScrollBarLayer
&& !view->scrollbarsSuppressed()
&& (view->horizontalScrollbar() || view->verticalScrollbar())) {
context->save();
QRect rect = intersectedRect;
context->translate(x, y);
rect.translate(-x, -y);
view->paintScrollbars(context, rect);
context->restore();
}
#if ENABLE(PAN_SCROLLING)
if (layer & QWebFrame::PanIconLayer)
view->paintPanScrollIcon(context);
#endif
painter->restore();
}
}