本文整理汇总了C++中LLToast::setIsHidden方法的典型用法代码示例。如果您正苦于以下问题:C++ LLToast::setIsHidden方法的具体用法?C++ LLToast::setIsHidden怎么用?C++ LLToast::setIsHidden使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLToast
的用法示例。
在下文中一共展示了LLToast::setIsHidden方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: showToastsBottom
void LLNearbyChatScreenChannel::showToastsBottom()
{
if(mStopProcessing)
return;
LLRect toast_rect;
updateBottom();
S32 channel_bottom = getRect().mBottom;
S32 bottom = channel_bottom;
S32 margin = gSavedSettings.getS32("ToastGap");
//sort active toasts
std::sort(m_active_toasts.begin(),m_active_toasts.end(),sort_toasts_predicate);
//calc max visible item and hide other toasts.
for(toast_vec_t::iterator it = m_active_toasts.begin(); it != m_active_toasts.end(); ++it)
{
LLToast* toast = it->get();
if (!toast)
{
llwarns << "NULL found in the active chat toasts list!" << llendl;
continue;
}
S32 toast_top = bottom + toast->getRect().getHeight() + margin;
if(toast_top > gFloaterView->getRect().getHeight())
{
while(it!=m_active_toasts.end())
{
addToToastPool(it->get());
it=m_active_toasts.erase(it);
}
break;
}
toast_rect = toast->getRect();
toast_rect.setLeftTopAndSize(getRect().mLeft , bottom + toast_rect.getHeight(), toast_rect.getWidth() ,toast_rect.getHeight());
toast->setRect(toast_rect);
bottom += toast_rect.getHeight() - toast->getTopPad() + margin;
}
// use reverse order to provide correct z-order and avoid toast blinking
for(toast_vec_t::reverse_iterator it = m_active_toasts.rbegin(); it != m_active_toasts.rend(); ++it)
{
LLToast* toast = it->get();
if (toast)
{
toast->setIsHidden(false);
toast->setVisible(TRUE);
}
}
}
示例2: showToastsBottom
void LLNearbyChatScreenChannel::showToastsBottom()
{
if(mStopProcessing)
return;
LLRect toast_rect;
S32 bottom = getRect().mBottom;
S32 margin = gSavedSettings.getS32("ToastGap");
for(std::vector<LLToast*>::iterator it = m_active_toasts.begin(); it != m_active_toasts.end(); ++it)
{
LLToast* toast = (*it);
S32 toast_top = bottom + toast->getRect().getHeight() + margin;
if(toast_top > gFloaterView->getRect().getHeight())
{
while(it!=m_active_toasts.end())
{
toast->setVisible(FALSE);
toast->stopTimer();
m_toast_pool.push_back(toast);
it=m_active_toasts.erase(it);
}
break;
}
bottom = toast_top - toast->getTopPad();
}
// use reverse order to provide correct z-order and avoid toast blinking
for(std::vector<LLToast*>::reverse_iterator it = m_active_toasts.rbegin(); it != m_active_toasts.rend(); ++it)
{
LLToast* toast = (*it);
S32 toast_top = bottom + toast->getTopPad();
toast_rect = toast->getRect();
toast_rect.setLeftTopAndSize(getRect().mLeft , toast_top, toast_rect.getWidth() ,toast_rect.getHeight());
toast->setRect(toast_rect);
toast->setIsHidden(false);
toast->setVisible(TRUE);
bottom = toast->getRect().mBottom - margin;
}
}
示例3: loadStoredToastsToChannel
//--------------------------------------------------------------------------
void LLScreenChannel::loadStoredToastsToChannel()
{
std::vector<ToastElem>::iterator it;
if(mStoredToastList.size() == 0)
return;
for(it = mStoredToastList.begin(); it != mStoredToastList.end(); ++it)
{
LLToast* toast = it->getToast();
if (toast)
{
toast->setIsHidden(false);
toast->startTimer();
mToastList.push_back(*it);
}
}
mStoredToastList.clear();
redrawToasts();
}
示例4: loadStoredToastByNotificationIDToChannel
//--------------------------------------------------------------------------
void LLScreenChannel::loadStoredToastByNotificationIDToChannel(LLUUID id)
{
std::vector<ToastElem>::iterator it = find(mStoredToastList.begin(), mStoredToastList.end(), id);
if( it == mStoredToastList.end() )
return;
LLToast* toast = (*it).toast;
if(toast->getVisible())
{
// toast is already in channel
return;
}
toast->setIsHidden(false);
toast->resetTimer();
mToastList.push_back((*it));
redrawToasts();
}
示例5: arrangeToasts
void LLNearbyChatScreenChannel::arrangeToasts()
{
if(mStopProcessing || isHovering())
return;
if (mFloaterSnapRegion == NULL)
{
mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region");
}
if (!getParent())
{
// connect to floater snap region just to get resize events, we don't care about being a proper widget
mFloaterSnapRegion->addChild(this);
setFollows(FOLLOWS_ALL);
}
LLRect toast_rect;
updateRect();
LLRect channel_rect;
mFloaterSnapRegion->localRectToOtherView(mFloaterSnapRegion->getLocalRect(), &channel_rect, gFloaterView);
channel_rect.mLeft += 10;
channel_rect.mRight = channel_rect.mLeft + 300;
S32 channel_bottom = channel_rect.mBottom;
// <FS:Ansariel> Configurable nearby chat toasts offset
//S32 bottom = channel_bottom + 80;
S32 bottom = channel_bottom + gSavedSettings.getS32("FSNearbyChatToastsOffset");
S32 margin = gSavedSettings.getS32("ToastGap");
//sort active toasts
std::sort(m_active_toasts.begin(),m_active_toasts.end(),sort_toasts_predicate);
//calc max visible item and hide other toasts.
for(toast_vec_t::iterator it = m_active_toasts.begin(); it != m_active_toasts.end(); ++it)
{
LLToast* toast = it->get();
if (!toast)
{
llwarns << "NULL found in the active chat toasts list!" << llendl;
continue;
}
S32 toast_top = bottom + toast->getRect().getHeight() + margin;
if(toast_top > channel_rect.getHeight())
{
while(it!=m_active_toasts.end())
{
addToToastPool(it->get());
it=m_active_toasts.erase(it);
}
break;
}
toast_rect = toast->getRect();
toast_rect.setLeftTopAndSize(channel_rect.mLeft , bottom + toast_rect.getHeight(), toast_rect.getWidth() ,toast_rect.getHeight());
toast->setRect(toast_rect);
bottom += toast_rect.getHeight() - toast->getTopPad() + margin;
}
// use reverse order to provide correct z-order and avoid toast blinking
for(toast_vec_t::reverse_iterator it = m_active_toasts.rbegin(); it != m_active_toasts.rend(); ++it)
{
LLToast* toast = it->get();
if (toast)
{
toast->setIsHidden(false);
toast->setVisible(TRUE);
}
}
}