本文整理汇总了C++中LLSideTrayPanelContainer::onOpen方法的典型用法代码示例。如果您正苦于以下问题:C++ LLSideTrayPanelContainer::onOpen方法的具体用法?C++ LLSideTrayPanelContainer::onOpen怎么用?C++ LLSideTrayPanelContainer::onOpen使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLSideTrayPanelContainer
的用法示例。
在下文中一共展示了LLSideTrayPanelContainer::onOpen方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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;
}
示例4: notifyChildren
bool LLPanelPeople::notifyChildren(const LLSD& info)
{
if (info.has("task-panel-action") && info["task-panel-action"].asString() == "handle-tri-state")
{
LLSideTrayPanelContainer* container = dynamic_cast<LLSideTrayPanelContainer*>(getParent());
if (!container)
{
llwarns << "Cannot find People panel container" << llendl;
return true;
}
if (container->getCurrentPanelIndex() > 0)
{
// if not on the default panel, switch to it
container->onOpen(LLSD().with(LLSideTrayPanelContainer::PARAM_SUB_PANEL_NAME, getName()));
}
else
LLSideTray::getInstance()->collapseSideBar();
return true; // this notification is only supposed to be handled by task panels
}
return LLPanel::notifyChildren(info);
}