本文整理汇总了C++中ScrollableArea::scrollbarsCanBeActive方法的典型用法代码示例。如果您正苦于以下问题:C++ ScrollableArea::scrollbarsCanBeActive方法的具体用法?C++ ScrollableArea::scrollbarsCanBeActive怎么用?C++ ScrollableArea::scrollbarsCanBeActive使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ScrollableArea
的用法示例。
在下文中一共展示了ScrollableArea::scrollbarsCanBeActive方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setContainingWindowIsVisible
void FocusController::setContainingWindowIsVisible(bool containingWindowIsVisible)
{
if (m_containingWindowIsVisible == containingWindowIsVisible)
return;
m_containingWindowIsVisible = containingWindowIsVisible;
FrameView* view = m_page->mainFrame()->view();
if (!view)
return;
contentAreaDidShowOrHide(view, containingWindowIsVisible);
for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
FrameView* frameView = frame->view();
if (!frameView)
continue;
const HashSet<ScrollableArea*>* scrollableAreas = frameView->scrollableAreas();
if (!scrollableAreas)
continue;
for (HashSet<ScrollableArea*>::const_iterator it = scrollableAreas->begin(), end = scrollableAreas->end(); it != end; ++it) {
ScrollableArea* scrollableArea = *it;
ASSERT(scrollableArea->scrollbarsCanBeActive() || m_page->shouldSuppressScrollbarAnimations());
contentAreaDidShowOrHide(scrollableArea, containingWindowIsVisible);
}
}
}
示例2: setShouldSuppressScrollbarAnimations
void Page::setShouldSuppressScrollbarAnimations(bool suppressAnimations)
{
if (suppressAnimations == m_suppressScrollbarAnimations)
return;
if (!suppressAnimations) {
// If animations are not going to be suppressed anymore, then there is nothing to do here but
// change the cached value.
m_suppressScrollbarAnimations = suppressAnimations;
return;
}
// On the other hand, if we are going to start suppressing animations, then we need to make sure we
// finish any current scroll animations first.
FrameView* view = mainFrame()->view();
if (!view)
return;
view->finishCurrentScrollAnimations();
for (Frame* frame = mainFrame(); frame; frame = frame->tree()->traverseNext()) {
FrameView* frameView = frame->view();
if (!frameView)
continue;
const HashSet<ScrollableArea*>* scrollableAreas = frameView->scrollableAreas();
if (!scrollableAreas)
continue;
for (HashSet<ScrollableArea*>::const_iterator it = scrollableAreas->begin(), end = scrollableAreas->end(); it != end; ++it) {
ScrollableArea* scrollableArea = *it;
ASSERT(scrollableArea->scrollbarsCanBeActive());
scrollableArea->finishCurrentScrollAnimations();
}
}
m_suppressScrollbarAnimations = suppressAnimations;
}