本文整理汇总了C++中LLFloater::getVisible方法的典型用法代码示例。如果您正苦于以下问题:C++ LLFloater::getVisible方法的具体用法?C++ LLFloater::getVisible怎么用?C++ LLFloater::getVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLFloater
的用法示例。
在下文中一共展示了LLFloater::getVisible方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getLastFloaterCascading
LLFloater* LLFloaterReg::getLastFloaterCascading()
{
LLRect candidate_rect;
candidate_rect.mTop = 100000;
LLFloater* candidate_floater = NULL;
std::map<std::string,std::string>::const_iterator it = sGroupMap.begin(), it_end = sGroupMap.end();
for( ; it != it_end; ++it)
{
const std::string& group_name = it->second;
instance_list_t& instances = sInstanceMap[group_name];
for (instance_list_t::const_iterator iter = instances.begin(); iter != instances.end(); ++iter)
{
LLFloater* inst = *iter;
if (inst->getVisible()
&& (inst->isPositioning(LLFloaterEnums::POSITIONING_CASCADING)
|| inst->isPositioning(LLFloaterEnums::POSITIONING_CASCADE_GROUP)))
{
if (candidate_rect.mTop > inst->getRect().mTop)
{
candidate_floater = inst;
candidate_rect = inst->getRect();
}
}
}
}
return candidate_floater;
}
示例2: 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);
}
}
示例3: getLastFloaterInGroup
//static
LLFloater* LLFloaterReg::getLastFloaterInGroup(const std::string& name)
{
const std::string& groupname = sGroupMap[name];
if (!groupname.empty())
{
instance_list_t& list = sInstanceMap[groupname];
if (!list.empty())
{
for (instance_list_t::reverse_iterator iter = list.rbegin(); iter != list.rend(); ++iter)
{
LLFloater* inst = *iter;
if (inst->getVisible() && !inst->isMinimized())
{
return inst;
}
}
}
}
return NULL;
}
示例4: getVisibleFloaterInstanceCount
// static
U32 LLFloaterReg::getVisibleFloaterInstanceCount()
{
U32 count = 0;
std::map<std::string,std::string>::const_iterator it = sGroupMap.begin(), it_end = sGroupMap.end();
for( ; it != it_end; ++it)
{
const std::string& group_name = it->second;
instance_list_t& instances = sInstanceMap[group_name];
for (instance_list_t::const_iterator iter = instances.begin(); iter != instances.end(); ++iter)
{
LLFloater* inst = *iter;
if (inst->getVisible() && !inst->isMinimized())
{
count++;
}
}
}
return count;
}
示例5: profileVisible
//static
bool LLAvatarActions::profileVisible(const LLUUID& id)
{
LLFloater* browser = getProfileFloater(id);
return browser && browser->getVisible();
}
示例6: display
// Paint the display!
void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot, bool tiling)
{
LLFastTimer t(FTM_RENDER);
if (gWindowResized)
{ //skip render on frames where window has been resized
gGL.flush();
glClear(GL_COLOR_BUFFER_BIT);
gViewerWindow->getWindow()->swapBuffers();
LLPipeline::refreshCachedSettings();
gPipeline.resizeScreenTexture();
gResizeScreenTexture = FALSE;
gWindowResized = FALSE;
return;
}
//Nope
/*if (LLPipeline::sRenderDeferred)
{ //hack to make sky show up in deferred snapshots
for_snapshot = FALSE;
}*/
if (LLPipeline::sRenderFrameTest)
{
send_agent_pause();
}
gSnapshot = for_snapshot;
LLGLSDefault gls_default;
LLGLDepthTest gls_depth(GL_TRUE, GL_TRUE, GL_LEQUAL);
LLVertexBuffer::unbind();
LLGLState::checkStates();
LLGLState::checkTextureChannels();
stop_glerror();
gPipeline.disableLights();
//reset vertex buffers if needed
gPipeline.doResetVertexBuffers();
stop_glerror();
// Don't draw if the window is hidden or minimized.
// In fact, must explicitly check the minimized state before drawing.
// Attempting to draw into a minimized window causes a GL error. JC
if ( !gViewerWindow->getActive()
|| !gViewerWindow->getWindow()->getVisible()
|| gViewerWindow->getWindow()->getMinimized() )
{
// Clean up memory the pools may have allocated
if (rebuild)
{
gFrameStats.start(LLFrameStats::REBUILD);
stop_glerror();
gPipeline.rebuildPools();
stop_glerror();
}
stop_glerror();
gViewerWindow->returnEmptyPicks();
stop_glerror();
return;
}
gViewerWindow->checkSettings();
if(gWindowResized) //Singu Note: gViewerWindow->checkSettings() can call LLViewerWindow::reshape(). If it has then skip this frame.
{
return;
}
{
LLFastTimer ftm(FTM_PICK);
LLAppViewer::instance()->pingMainloopTimeout("Display:Pick");
gViewerWindow->performPick();
}
LLAppViewer::instance()->pingMainloopTimeout("Display:CheckStates");
LLGLState::checkStates();
LLGLState::checkTextureChannels();
//////////////////////////////////////////////////////////
//
// Logic for forcing window updates if we're in drone mode.
//
if (gNoRender)
{
#if LL_WINDOWS
static F32 last_update_time = 0.f;
if ((gFrameTimeSeconds - last_update_time) > 1.f)
{
InvalidateRect((HWND)gViewerWindow->getPlatformWindow(), NULL, FALSE);
last_update_time = gFrameTimeSeconds;
}
//.........这里部分代码省略.........
示例7: toggleInstanceOrBringToFront
//static
void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD& key)
{
//
// Floaters controlled by the toolbar behave a bit differently from others.
// Namely they have 3-4 states as defined in the design wiki page here:
// https://wiki.lindenlab.com/wiki/FUI_Button_states
//
// The basic idea is this:
// * If the target floater is minimized, this button press will un-minimize it.
// * Else if the target floater is closed open it.
// * Else if the target floater does not have focus, give it focus.
// * Also, if it is not on top, bring it forward when focus is given.
// * Else the target floater is open, close it.
//
std::string name = sdname.asString();
LLFloater* instance = getInstance(name, key);
if (!instance)
{
LL_DEBUGS() << "Unable to get instance of floater '" << name << "'" << LL_ENDL;
return;
}
// If hosted, we need to take that into account
LLFloater* host = instance->getHost();
if (host)
{
//FS:LO from above: * Else if the target floater does not have focus, give it focus. * Also, if it is not on top, bring it forward when focus is given.
//if (host->isMinimized() || !host->isShown() || !host->isFrontmost())
if (host->isMinimized() || !host->isShown() || (!host->hasFocus() || !host->isFrontmost()))
{
host->setMinimized(FALSE);
instance->openFloater(key);
instance->setVisibleAndFrontmost(true, key);
}
else if (!instance->getVisible())
{
instance->openFloater(key);
instance->setVisibleAndFrontmost(true, key);
instance->setFocus(TRUE);
}
else
{
instance->closeHostedFloater();
}
}
else
{
if (instance->isMinimized())
{
instance->setMinimized(FALSE);
instance->setVisibleAndFrontmost(true, key);
}
else if (!instance->isShown())
{
instance->openFloater(key);
instance->setVisibleAndFrontmost(true, key);
}
//FS:LO from above: * Else if the target floater does not have focus, give it focus. * Also, if it is not on top, bring it forward when focus is given.
//else if (!instance->isFrontmost())
else if (!instance->hasFocus() || !instance->isFrontmost())
{
instance->setVisibleAndFrontmost(true, key);
}
else
{
instance->closeHostedFloater();
}
}
}