本文整理汇总了C++中LLFolderViewFolder::isOpen方法的典型用法代码示例。如果您正苦于以下问题:C++ LLFolderViewFolder::isOpen方法的具体用法?C++ LLFolderViewFolder::isOpen怎么用?C++ LLFolderViewFolder::isOpen使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLFolderViewFolder
的用法示例。
在下文中一共展示了LLFolderViewFolder::isOpen方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: buildContextMenu
void LLPlacesFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
{
std::vector<std::string> items;
std::vector<std::string> disabled_items;
LLInventoryPanel* inv_panel = mInventoryPanel.get();
bool is_open = false;
if (inv_panel)
{
LLFolderViewFolder* folder = dynamic_cast<LLFolderViewFolder*>(inv_panel->getRootFolder()->getItemByID(mUUID));
is_open = (NULL != folder) && folder->isOpen();
}
// collect all items' names
fill_items_with_menu_items(items, menu);
// remove expand or collapse menu item depend on folder state
std::string collapse_expand_item_to_hide(is_open ? "expand" : "collapse");
std::vector<std::string>::iterator it = std::find(items.begin(), items.end(), collapse_expand_item_to_hide);
if (it != items.end()) items.erase(it);
// Disabled items are processed via LLLandmarksPanel::isActionEnabled()
// they should be synchronized with Places/My Landmarks/Gear menu. See EXT-1601
// repeat parent functionality
sSelf = getHandle(); // necessary for "New Folder" functionality
hide_context_entries(menu, items, disabled_items);
}
}