本文整理汇总了C++中LLPanel::setFocus方法的典型用法代码示例。如果您正苦于以下问题:C++ LLPanel::setFocus方法的具体用法?C++ LLPanel::setFocus怎么用?C++ LLPanel::setFocus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLPanel
的用法示例。
在下文中一共展示了LLPanel::setFocus方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: showPanel
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);
}
示例2: onOpen
// virtual
void LLInspectToast::onOpen(const LLSD& notification_id)
{
LLInspect::onOpen(notification_id);
LLToast* toast = mScreenChannel->getToastByNotificationID(notification_id);
if (toast == NULL)
{
llwarns << "Could not get requested toast from screen channel." << llendl;
return;
}
mConnection = toast->setOnToastDestroyedCallback(boost::bind(&LLInspectToast::onToastDestroy, this, _1));
LLPanel * panel = toast->getPanel();
panel->setVisible(TRUE);
panel->setMouseOpaque(FALSE);
if(mPanel != NULL && mPanel->getParent() == this)
{
removeChild(mPanel);
}
addChild(panel);
panel->setFocus(TRUE);
mPanel = panel;
LLRect panel_rect;
panel_rect = panel->getRect();
reshape(panel_rect.getWidth(), panel_rect.getHeight());
LLUI::positionViewNearMouse(this);
}
示例3: showPanel
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);
}
示例4: onTabChanged
// static
void LLFloaterGodTools::onTabChanged(void* data, bool from_click)
{
LLPanel* panel = (LLPanel*)data;
if (panel)
{
panel->setFocus(TRUE);
}
}
示例5: showPanel
void LLFloaterGodTools::showPanel(const std::string& panel_name)
{
childShowTab("GodTools Tabs", panel_name);
openFloater();
LLPanel *panel = childGetVisibleTab("GodTools Tabs");
if (panel)
panel->setFocus(TRUE);
}
示例6: focusCurrentPanel
void LLFloaterDirectory::focusCurrentPanel()
{
LLTabContainer* tabs = getChild<LLTabContainer>("Directory Tabs");
if (!tabs) return;
LLPanel* panel = tabs->getCurrentPanel();
if (!panel) return;
panel->setFocus(TRUE);
}
示例7: focusCurrentPanel
void LLFloaterDirectory::focusCurrentPanel()
{
LLTabContainerCommon* tabs = LLUICtrlFactory::getTabContainerByName(this, "Directory Tabs");
if (!tabs) return;
LLPanel* panel = tabs->getCurrentPanel();
if (!panel) return;
panel->setFocus(TRUE);
}
示例8: rebuild
//-----------------------------------------------------------------------------
// rebuild()
//-----------------------------------------------------------------------------
void LLUICtrlFactory::rebuild()
{
built_panel_t built_panels = mBuiltPanels;
mBuiltPanels.clear();
built_panel_t::iterator built_panel_it;
for (built_panel_it = built_panels.begin();
built_panel_it != built_panels.end();
++built_panel_it)
{
std::string filename = built_panel_it->second;
LLPanel* panelp = built_panel_it->first.get();
if (!panelp)
{
continue;
}
llinfos << "Rebuilding UI panel " << panelp->getName()
<< " from " << filename
<< llendl;
BOOL visible = panelp->getVisible();
panelp->setVisible(FALSE);
panelp->setFocus(FALSE);
panelp->deleteAllChildren();
buildPanel(panelp, filename.c_str(), &panelp->getFactoryMap());
panelp->setVisible(visible);
}
built_floater_t::iterator built_floater_it;
for (built_floater_it = mBuiltFloaters.begin();
built_floater_it != mBuiltFloaters.end();
++built_floater_it)
{
LLFloater* floaterp = built_floater_it->first.get();
if (!floaterp)
{
continue;
}
std::string filename = built_floater_it->second;
llinfos << "Rebuilding UI floater " << floaterp->getName()
<< " from " << filename
<< llendl;
BOOL visible = floaterp->getVisible();
floaterp->setVisible(FALSE);
floaterp->setFocus(FALSE);
floaterp->deleteAllChildren();
gFloaterView->removeChild(floaterp);
buildFloater(floaterp, filename, &floaterp->getFactoryMap());
floaterp->setVisible(visible);
}
}
示例9: show
// static
void LLFloaterGodTools::show(void *)
{
LLFloaterGodTools* god_tools = instance();
god_tools->open();
LLPanel *panel = god_tools->childGetVisibleTab("GodTools Tabs");
if (panel) panel->setFocus(TRUE);
if (god_tools->mPanelObjectTools) god_tools->mPanelObjectTools->setTargetAvatar(LLUUID::null);
if (gAgent.getRegionHost() != god_tools->mCurrentHost)
{
// we're in a new region
god_tools->sendRegionInfoRequest();
}
}
示例10: removeTabPanel
void LLTabContainer::removeTabPanel(LLPanel* child)
{
if (mIsVertical)
{
// Fix-up button sizes
S32 tab_count = 0;
for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter)
{
LLTabTuple* tuple = *iter;
LLRect rect;
rect.setLeftTopAndSize(TABCNTRV_PAD + LLPANEL_BORDER_WIDTH + 2, // JC - Fudge factor
(getRect().getHeight() - LLPANEL_BORDER_WIDTH - 1) - ((BTN_HEIGHT + TABCNTRV_PAD) * (tab_count)),
mMinTabWidth,
BTN_HEIGHT);
if (tuple->mPlaceholderText)
{
tuple->mPlaceholderText->setRect(rect);
}
else
{
tuple->mButton->setRect(rect);
}
tab_count++;
}
}
else
{
// Adjust the total tab width.
for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter)
{
LLTabTuple* tuple = *iter;
if( tuple->mTabPanel == child )
{
mTotalTabWidth -= tuple->mButton->getRect().getWidth();
break;
}
}
}
BOOL has_focus = gFocusMgr.childHasKeyboardFocus(this);
// If the tab being deleted is the selected one, select a different tab.
for(std::vector<LLTabTuple*>::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter)
{
LLTabTuple* tuple = *iter;
if( tuple->mTabPanel == child )
{
removeChild( tuple->mButton );
delete tuple->mButton;
removeChild( tuple->mTabPanel );
// delete tuple->mTabPanel;
mTabList.erase( iter );
delete tuple;
break;
}
}
// make sure we don't have more locked tabs than we have tabs
mLockedTabCount = llmin(getTabCount(), mLockedTabCount);
if (mCurrentTabIdx >= (S32)mTabList.size())
{
mCurrentTabIdx = mTabList.size()-1;
}
selectTab(mCurrentTabIdx);
if (has_focus)
{
LLPanel* panelp = getPanelByIndex(mCurrentTabIdx);
if (panelp)
{
panelp->setFocus(TRUE);
}
}
updateMaxScrollPos();
}