本文整理汇总了C++中LLPanel类的典型用法代码示例。如果您正苦于以下问题:C++ LLPanel类的具体用法?C++ LLPanel怎么用?C++ LLPanel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了LLPanel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: childSetAction
BOOL LLFloaterLuaConsole::postBuild()
{
childSetAction("Send", onClickSend, this);
childSetAction("Clear", onClickClear, this);
childSetAction("Abort", onClickAbort, this);
childSetAction("Reset", onClickReset, this);
//childDisable("Send");
LLButton * sendp = getChild<LLButton>("Send");
LLPanel * luap = getChild<LLPanel>("lua_panel");
if(sendp && luap)
{
luap->setDefaultBtn(sendp);
}
LLLineEditor * editorp = getChild<LLLineEditor>("Lua Editor", TRUE);
if(editorp)
{
editorp->setCommitOnFocusLost(FALSE);
editorp->setRevertOnEsc(FALSE);
editorp->setEnableLineHistory(TRUE);
editorp->setFocusReceivedCallback( &onInputEditorGainFocus, this );
}
getChild<LLViewerTextEditor>("Lua Output Editor",TRUE);
return TRUE;
}
示例2: childSetEnabled
void LLFloaterAvatarPicker::draw()
{
LLFloater::draw();
// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-1.0.0e
// TODO-RLVa: this code needs revisiting
if (rlv_handler_t::isEnabled())
{
LLPanel* pNearMePanel = getChild<LLPanel>("NearMePanel");
if ( (pNearMePanel) && (childGetVisibleTab("ResidentChooserTabs") == pNearMePanel) )
{
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
{
if (mNearMeListComplete)
{
getChild<LLScrollListCtrl>("NearMe")->deleteAllItems();
childSetEnabled("Select", false);
}
mNearMeListComplete = FALSE;
pNearMePanel->setCtrlsEnabled(FALSE);
return;
}
pNearMePanel->setCtrlsEnabled(TRUE);
}
}
// [/RLVa:KB]
if (!mNearMeListComplete && childGetVisibleTab("ResidentChooserTabs") == getChild<LLPanel>("NearMePanel"))
{
populateNearMe();
}
}
示例3: getCurrentVoiceFloater
//static
LLFloater* LLFloaterChatterBox::getCurrentVoiceFloater()
{
if (!LLVoiceClient::getInstance()->voiceEnabled())
{
return NULL;
}
if (LLVoiceChannelProximal::getInstance() == LLVoiceChannel::getCurrentVoiceChannel())
{
// show near me tab if in proximal channel
return LLFloaterChat::getInstance(LLSD());
}
else
{
LLFloaterChatterBox* floater = LLFloaterChatterBox::getInstance(LLSD());
// iterator over all IM tabs (skip friends and near me)
for (S32 i = 0; i < floater->getFloaterCount(); i++)
{
LLPanel* panelp = floater->mTabContainer->getPanelByIndex(i);
if (panelp->getName() == "im_floater")
{
// only LLFloaterIMPanels are called "im_floater"
LLFloaterIMPanel* im_floaterp = (LLFloaterIMPanel*)panelp;
if (im_floaterp->getVoiceChannel() == LLVoiceChannel::getCurrentVoiceChannel())
{
return im_floaterp;
}
}
}
}
return NULL;
}
示例4: getChildView
//virtual
LLView* LLTabContainer::getChildView(const std::string& name, BOOL recurse, BOOL create_if_missing) const
{
tuple_list_t::const_iterator itor;
for (itor = mTabList.begin(); itor != mTabList.end(); ++itor)
{
LLPanel *panel = (*itor)->mTabPanel;
if (panel->getName() == name)
{
return panel;
}
}
if (recurse)
{
for (itor = mTabList.begin(); itor != mTabList.end(); ++itor)
{
LLPanel *panel = (*itor)->mTabPanel;
LLView *child = panel->getChildView(name, recurse, FALSE);
if (child)
{
return child;
}
}
}
return LLView::getChildView(name, recurse, create_if_missing);
}
示例5: findChildView
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;
}
示例6: name
LLView* LLPanel::fromXML(LLXMLNodePtr node, LLView* parent, LLUICtrlFactory *factory)
{
std::string name("panel");
node->getAttributeString("name", name);
LLPanel* panelp = factory->createFactoryPanel(name);
// Fall back on a default panel, if there was no special factory.
if (!panelp)
{
LLRect rect;
createRect(node, rect, parent, LLRect());
// create a new panel without a border, by default
panelp = new LLPanel(name, rect, FALSE);
panelp->initPanelXML(node, parent, factory);
// preserve panel's width and height, but override the location
const LLRect& panelrect = panelp->getRect();
S32 w = panelrect.getWidth();
S32 h = panelrect.getHeight();
rect.setLeftTopAndSize(rect.mLeft, rect.mTop, w, h);
panelp->setRect(rect);
}
else
{
panelp->initPanelXML(node, parent, factory);
}
return panelp;
}
示例7: expandSideBar
/**
* 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;
}
示例8: childShowTab
void LLFloaterGodTools::showPanel(const LLString& panel_name)
{
childShowTab("GodTools Tabs", panel_name);
open(); /*Flawfinder: ignore*/
LLPanel *panel = childGetVisibleTab("GodTools Tabs");
if (panel) panel->setFocus(TRUE);
}
示例9:
static LLPanel *childGetVisiblePanelWithHelp(LLView *parent)
{
LLView *child;
// look through immediate children first for an active panel with help
for (child = parent->getFirstChild(); child; child = parent->findNextSibling(child))
{
// do we have a panel with a help topic?
LLPanel *panel = dynamic_cast<LLPanel *>(child);
if (panel && panel->getVisible() && !panel->getHelpTopic().empty())
{
return panel;
}
}
// then try a bit harder and recurse through all children
for (child = parent->getFirstChild(); child; child = parent->findNextSibling(child))
{
if (child->getVisible())
{
LLPanel* panel = ::childGetVisiblePanelWithHelp(child);
if (panel)
{
return panel;
}
}
}
// couldn't find any active panels with a help topic string
return NULL;
}
示例10: selectAll
bool LLFlatListView::selectAll()
{
if (!mAllowSelection)
return false;
mSelectedItemPairs.clear();
for (pairs_const_iterator_t it= mItemPairs.begin(); it != mItemPairs.end(); ++it)
{
item_pair_t* item_pair = *it;
mSelectedItemPairs.push_back(item_pair);
//a way of notifying panel of selection state changes
LLPanel* item = item_pair->first;
item->setValue(SELECTED_EVENT);
}
if (mCommitOnSelectionChange)
{
onCommit();
}
// Stretch selected item rect to ensure it won't be clipped
mSelectedItemsBorder->setRect(getLastSelectedItemRect().stretch(-1));
return true;
}
示例11: llassert
bool LLFlatListView::selectItemPair(item_pair_t* item_pair, bool select)
{
llassert(item_pair);
if (!mAllowSelection && select) return false;
if (isSelected(item_pair) == select) return true; //already in specified selection state
if (select)
{
mSelectedItemPairs.push_back(item_pair);
}
else
{
mSelectedItemPairs.remove(item_pair);
}
//a way of notifying panel of selection state changes
LLPanel* item = item_pair->first;
item->setValue(select ? SELECTED_EVENT : UNSELECTED_EVENT);
if (mCommitOnSelectionChange)
{
onCommit();
}
// Stretch selected item rect to ensure it won't be clipped
mSelectedItemsBorder->setRect(getLastSelectedItemRect().stretch(-1));
return true;
}
示例12: onTabChange
void LLPanelMarketplaceListings::onTabChange()
{
// Find active panel
LLInventoryPanel* panel = (LLInventoryPanel*)getChild<LLTabContainer>("marketplace_filter_tabs")->getCurrentPanel();
if (panel)
{
// If the panel doesn't allow drop on root, it doesn't allow the creation of new folder on root either
LLButton* add_btn = getChild<LLButton>("add_btn");
add_btn->setEnabled(panel->getAllowDropOnRoot());
// Set filter string on active panel
panel->setFilterSubString(mFilterSubString);
// Show/hide the drop zone and resize the inventory tabs panel accordingly
LLPanel* drop_zone = (LLPanel*)getChild<LLPanel>("marketplace_drop_zone");
bool drop_zone_visible = drop_zone->getVisible();
bool allow_drop_on_root = panel->getAllowDropOnRoot() && gSavedSettings.getBOOL("LiruEnableWIPUI");
if (drop_zone_visible != allow_drop_on_root)
{
LLPanel* tabs = (LLPanel*)getChild<LLPanel>("tab_container_panel");
S32 delta_height = drop_zone->getRect().getHeight();
delta_height = (drop_zone_visible ? delta_height : -delta_height);
tabs->reshape(tabs->getRect().getWidth(),tabs->getRect().getHeight() + delta_height);
tabs->translate(0,-delta_height);
}
drop_zone->setVisible(allow_drop_on_root);
}
}
示例13: onTabChanged
// static
void LLFloaterGodTools::onTabChanged(void* data, bool from_click)
{
LLPanel* panel = (LLPanel*)data;
if (panel)
{
panel->setFocus(TRUE);
}
}
示例14: openFloater
void LLFloaterGodTools::showPanel(const std::string& panel_name)
{
getChild<LLTabContainer>("GodTools Tabs")->selectTabByName(panel_name);
openFloater();
LLPanel *panel = getChild<LLTabContainer>("GodTools Tabs")->getCurrentPanel();
if (panel)
panel->setFocus(TRUE);
}
示例15: childShowTab
void LLFloaterGodTools::showPanel(const std::string& panel_name)
{
childShowTab("GodTools Tabs", panel_name);
openFloater();
LLPanel *panel = childGetVisibleTab("GodTools Tabs");
if (panel)
panel->setFocus(TRUE);
}