本文整理汇总了C++中LLToast::getVisible方法的典型用法代码示例。如果您正苦于以下问题:C++ LLToast::getVisible方法的具体用法?C++ LLToast::getVisible怎么用?C++ LLToast::getVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLToast
的用法示例。
在下文中一共展示了LLToast::getVisible方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: closeHiddenToasts
void LLScreenChannel::closeHiddenToasts(const Matcher& matcher)
{
// since we can't guarantee that close toast operation doesn't change mToastList
// we collect matched toasts that should be closed into separate list
std::list<LLToast*> toasts;
for (std::vector<ToastElem>::iterator it = mToastList.begin(); it
!= mToastList.end(); it++)
{
LLToast* toast = it->getToast();
// add to list valid toast that match to provided matcher criteria
if (toast != NULL && !toast->isDead() && toast->getNotification() != NULL
&& !toast->getVisible() && matcher.matches(toast->getNotification()))
{
toasts.push_back(toast);
}
}
// close collected toasts
for (std::list<LLToast*>::iterator it = toasts.begin(); it
!= toasts.end(); it++)
{
LLToast* toast = *it;
toast->closeFloater();
}
}
示例2: 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();
}
示例3: showToastsTop
//--------------------------------------------------------------------------
void LLScreenChannel::showToastsTop()
{
LLRect channel_rect = getChannelRect();
LLRect toast_rect;
S32 top = channel_rect.mTop;
std::vector<ToastElem>::reverse_iterator it;
updateRect();
LLDockableFloater* floater = dynamic_cast<LLDockableFloater*>(LLDockableFloater::getInstanceHandle().get());
// <FS:Ansariel> Show toasts in front of other floaters
BOOL toasts_in_front = gSavedSettings.getBOOL("FSShowToastsInFront");
// Use a local variable instead of mToastList.
// mToastList can be modified during recursive calls and then all iteratos will be invalidated.
std::vector<ToastElem> vToastList( mToastList );
for(it = vToastList.rbegin(); it != vToastList.rend(); ++it)
{
if(it != vToastList.rbegin())
{
LLToast* toast = (it-1)->getToast();
if (!toast)
{
llwarns << "Attempt to display a deleted toast." << llendl;
return;
}
top = toast->getRect().mBottom - toast->getTopPad();
gSavedSettings.getS32("ToastGap");
}
LLToast* toast = it->getToast();
if (!toast)
{
llwarns << "Attempt to display a deleted toast." << llendl;
return;
}
toast_rect = toast->getRect();
toast_rect.setLeftTopAndSize(channel_rect.mRight - toast_rect.getWidth(),
top, toast_rect.getWidth(),
toast_rect.getHeight());
toast->setRect(toast_rect);
if(floater && floater->overlapsScreenChannel())
{
if(it == vToastList.rbegin())
{
// move first toast above docked floater
S32 shift = -floater->getRect().getHeight();
if(floater->getDockControl())
{
shift -= floater->getDockControl()->getTongueHeight();
}
toast->translate(0, shift);
}
LLRect channel_rect = getChannelRect();
// don't show toasts if there is not enough space
if(toast_rect.mBottom < channel_rect.mBottom)
{
break;
}
}
bool stop_showing_toasts = toast->getRect().mBottom < channel_rect.mBottom;
if(!stop_showing_toasts)
{
if( it != vToastList.rend()-1)
{
S32 toast_bottom = toast->getRect().mBottom - gSavedSettings.getS32("ToastGap");
stop_showing_toasts = toast_bottom < channel_rect.mBottom;
}
}
// at least one toast should be visible
if(it == vToastList.rbegin())
{
stop_showing_toasts = false;
}
if(stop_showing_toasts)
break;
if (!toast->getVisible())
{
// HACK
// EXT-2653: it is necessary to prevent overlapping for secondary showed toasts
toast->setVisible(TRUE);
}
// <FS:Ansariel> Show toasts in front of other floaters
//if (!toast->hasFocus())
if (!toast->hasFocus() && !toasts_in_front)
// </FS:Ansariel> Show toasts in front of other floaters
{
//.........这里部分代码省略.........