本文整理汇总了C++中LLSideTrayPanelContainer::getCurrentPanel方法的典型用法代码示例。如果您正苦于以下问题:C++ LLSideTrayPanelContainer::getCurrentPanel方法的具体用法?C++ LLSideTrayPanelContainer::getCurrentPanel怎么用?C++ LLSideTrayPanelContainer::getCurrentPanel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLSideTrayPanelContainer
的用法示例。
在下文中一共展示了LLSideTrayPanelContainer::getCurrentPanel方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: openChildPanel
LLPanel* LLFloaterSidePanelContainer::openChildPanel(const std::string& panel_name, const LLSD& params)
{
LLView* view = findChildView(panel_name, true);
if (!view) return NULL;
if (!getVisible())
{
openFloater();
}
LLPanel* panel = NULL;
LLSideTrayPanelContainer* container = dynamic_cast<LLSideTrayPanelContainer*>(view->getParent());
if (container)
{
LLSD new_params = params;
new_params[LLSideTrayPanelContainer::PARAM_SUB_PANEL_NAME] = panel_name;
container->onOpen(new_params);
panel = container->getCurrentPanel();
}
else if ((panel = dynamic_cast<LLPanel*>(view)) != NULL)
{
panel->onOpen(params);
}
return panel;
}
示例2:
/**
* Activate tab with "panel_name" panel
* if no such tab - return false, otherwise true.
* TODO* In some cases a pointer to a panel of
* a specific class may be needed so this method
* would need to use templates.
*/
LLPanel* LLSideTray::showPanel (const std::string& panel_name, const LLSD& params)
{
//arrange tabs
child_vector_const_iter_t child_it;
for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it)
{
LLView* view = (*child_it)->findChildView(panel_name,true);
if(view)
{
selectTabByName ((*child_it)->getName());
if(mCollapsed)
expandSideBar();
LLSideTrayPanelContainer* container = dynamic_cast<LLSideTrayPanelContainer*>(view->getParent());
if(container)
{
LLSD new_params = params;
new_params[LLSideTrayPanelContainer::PARAM_SUB_PANEL_NAME] = panel_name;
container->onOpen(new_params);
return container->getCurrentPanel();
}
LLPanel* panel = dynamic_cast<LLPanel*>(view);
if(panel)
{
panel->onOpen(params);
}
return panel;
}
}
return NULL;
}
示例3: goBack
void LLPanelSnapshot::goBack()
{
LLSideTrayPanelContainer* parent = getParentContainer();
if (parent)
{
parent->openPreviousPanel();
parent->getCurrentPanel()->onOpen(LLSD());
}
}
示例4: openPanel
void LLPanelSnapshotOptions::openPanel(const std::string& panel_name)
{
LLSideTrayPanelContainer* parent = dynamic_cast<LLSideTrayPanelContainer*>(getParent());
if (!parent)
{
llwarns << "Cannot find panel container" << llendl;
return;
}
parent->openPanel(panel_name);
parent->getCurrentPanel()->onOpen(LLSD());
LLFloaterSnapshot::postPanelSwitch();
}
示例5: openChildPanel
LLPanel* LLSideTray::openChildPanel(LLSideTrayTab* tab, const std::string& panel_name, const LLSD& params)
{
LLView* view = tab->findChildView(panel_name, true);
if (!view) return NULL;
std::string tab_name = tab->getName();
bool tab_attached = isTabAttached(tab_name);
if (tab_attached && LLUI::sSettingGroups["config"]->getBOOL("OpenSidePanelsInFloaters"))
{
tab->toggleTabDocked();
tab_attached = false;
}
// Select tab and expand Side Tray only when a tab is attached.
if (tab_attached)
{
selectTabByName(tab_name);
if (mCollapsed)
expandSideBar();
}
else
{
LLFloater* floater_tab = LLFloaterReg::getInstance("side_bar_tab", tab_name);
if (!floater_tab) return NULL;
floater_tab->openFloater(tab_name);
}
LLSideTrayPanelContainer* container = dynamic_cast<LLSideTrayPanelContainer*>(view->getParent());
if (container)
{
LLSD new_params = params;
new_params[LLSideTrayPanelContainer::PARAM_SUB_PANEL_NAME] = panel_name;
container->onOpen(new_params);
return container->getCurrentPanel();
}
LLPanel* panel = dynamic_cast<LLPanel*>(view);
if (panel)
{
panel->onOpen(params);
}
return panel;
}