本文整理汇总了C++中LLPanel::getLabel方法的典型用法代码示例。如果您正苦于以下问题:C++ LLPanel::getLabel方法的具体用法?C++ LLPanel::getLabel怎么用?C++ LLPanel::getLabel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLPanel
的用法示例。
在下文中一共展示了LLPanel::getLabel方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fromXML
// static
LLView* LLTabContainer::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
{
std::string name("tab_container");
node->getAttributeString("name", name);
// Figure out if we are creating a vertical or horizontal tab container.
bool is_vertical = false;
LLTabContainer::TabPosition tab_position = LLTabContainer::TOP;
if (node->hasAttribute("tab_position"))
{
std::string tab_position_string;
node->getAttributeString("tab_position", tab_position_string);
LLStringUtil::toLower(tab_position_string);
if ("top" == tab_position_string)
{
tab_position = LLTabContainer::TOP;
is_vertical = false;
}
else if ("bottom" == tab_position_string)
{
tab_position = LLTabContainer::BOTTOM;
is_vertical = false;
}
else if ("left" == tab_position_string)
{
is_vertical = true;
}
}
BOOL border = FALSE;
node->getAttributeBOOL("border", border);
LLTabContainer* tab_container = new LLTabContainer(name, LLRect::null, tab_position, border, is_vertical);
S32 tab_min_width = tab_container->mMinTabWidth;
if (node->hasAttribute("tab_width"))
{
node->getAttributeS32("tab_width", tab_min_width);
}
else if( node->hasAttribute("tab_min_width"))
{
node->getAttributeS32("tab_min_width", tab_min_width);
}
S32 tab_max_width = tab_container->mMaxTabWidth;
if (node->hasAttribute("tab_max_width"))
{
node->getAttributeS32("tab_max_width", tab_max_width);
}
tab_container->setMinTabWidth(tab_min_width);
tab_container->setMaxTabWidth(tab_max_width);
BOOL hidden(tab_container->getTabsHidden());
node->getAttributeBOOL("hide_tabs", hidden);
tab_container->setTabsHidden(hidden);
tab_container->setPanelParameters(node, parent);
if (LLFloater::getFloaterHost())
{
LLFloater::getFloaterHost()->setTabContainer(tab_container);
}
//parent->addChild(tab_container);
// Add all tab panels.
LLXMLNodePtr child;
for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling())
{
LLView *control = factory->createCtrlWidget(tab_container, child);
if (control && control->isPanel())
{
LLPanel* panelp = (LLPanel*)control;
std::string label;
child->getAttributeString("label", label);
if (label.empty())
{
label = panelp->getLabel();
}
BOOL placeholder = FALSE;
child->getAttributeBOOL("placeholder", placeholder);
tab_container->addTabPanel(panelp, label, false,
NULL, NULL, 0, placeholder);
}
}
tab_container->selectFirstTab();
tab_container->postBuild();
tab_container->initButtons(); // now that we have the correct rect
return tab_container;
}