本文整理汇总了C++中LLFolderView::setSelection方法的典型用法代码示例。如果您正苦于以下问题:C++ LLFolderView::setSelection方法的具体用法?C++ LLFolderView::setSelection怎么用?C++ LLFolderView::setSelection使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLFolderView
的用法示例。
在下文中一共展示了LLFolderView::setSelection方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: selectItemInAccordionTab
LLFolderViewItem* LLLandmarksPanel::selectItemInAccordionTab(LLPlacesInventoryPanel* inventory_list,
const std::string& tab_name,
const LLUUID& obj_id,
BOOL take_keyboard_focus) const
{
if (!inventory_list)
return NULL;
LLFolderView* root = inventory_list->getRootFolder();
LLFolderViewItem* item = inventory_list->getItemByID(obj_id);
if (!item)
return NULL;
LLAccordionCtrlTab* tab = getChild<LLAccordionCtrlTab>(tab_name);
if (!tab->isExpanded())
{
tab->changeOpenClose(false);
}
root->setSelection(item, FALSE, take_keyboard_focus);
LLAccordionCtrl* accordion = getChild<LLAccordionCtrl>("landmarks_accordion");
LLRect screen_rc;
localRectToScreen(item->getRect(), &screen_rc);
accordion->notifyParent(LLSD().with("scrollToShowRect", screen_rc.getValue()));
return item;
}
示例2: onOpenOutfitButtonClicked
void LLSidepanelAppearance::onOpenOutfitButtonClicked()
{
const LLViewerInventoryItem *outfit_link = LLAppearanceMgr::getInstance()->getBaseOutfitLink();
if (!outfit_link)
return;
if (!outfit_link->getIsLinkType())
return;
LLAccordionCtrlTab* tab_outfits = mPanelOutfitsInventory->findChild<LLAccordionCtrlTab>("tab_outfits");
if (tab_outfits)
{
tab_outfits->changeOpenClose(FALSE);
LLInventoryPanel *inventory_panel = tab_outfits->findChild<LLInventoryPanel>("outfitslist_tab");
if (inventory_panel)
{
LLFolderView* root = inventory_panel->getRootFolder();
LLFolderViewItem *outfit_folder = inventory_panel->getItemByID(outfit_link->getLinkedUUID());
if (outfit_folder)
{
outfit_folder->setOpen(!outfit_folder->isOpen());
root->setSelection(outfit_folder,TRUE);
root->scrollToShowSelection();
}
}
}
}