本文整理汇总了C++中webcore::Page::groupPtr方法的典型用法代码示例。如果您正苦于以下问题:C++ Page::groupPtr方法的具体用法?C++ Page::groupPtr怎么用?C++ Page::groupPtr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类webcore::Page
的用法示例。
在下文中一共展示了Page::groupPtr方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ewk_history_clear
Eina_Bool ewk_history_clear(Ewk_History* history)
{
EWK_HISTORY_CORE_GET_OR_RETURN(history, core, false);
WebCore::Page* page = core->page();
if (page && page->groupPtr())
page->groupPtr()->removeVisitedLinks();
const int limit = ewk_history_limit_get(history);
ewk_history_limit_set(history, 0);
ewk_history_limit_set(history, limit);
return true;
}
示例2: clear
/*!
Clears the history.
\sa count(), items()
*/
void QWebHistory::clear()
{
//shortcut to private BackForwardListImpl
WebCore::BackForwardListImpl* lst = d->lst;
//clear visited links
WebCore::Page* page = static_cast<WebCore::BackForwardListImpl*>(lst)->page();
if (page && page->groupPtr())
page->groupPtr()->removeVisitedLinks();
//if count() == 0 then just return
if (!lst->entries().size())
return;
RefPtr<WebCore::HistoryItem> current = lst->currentItem();
int capacity = lst->capacity();
lst->setCapacity(0);
lst->setCapacity(capacity); //revert capacity
lst->addItem(current.get()); //insert old current item
lst->goToItem(current.get()); //and set it as current again
d->page()->updateNavigationActions();
}