当前位置: 首页>>代码示例>>C++>>正文


C++ LLToast::hide方法代码示例

本文整理汇总了C++中LLToast::hide方法的典型用法代码示例。如果您正苦于以下问题:C++ LLToast::hide方法的具体用法?C++ LLToast::hide怎么用?C++ LLToast::hide使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LLToast的用法示例。


在下文中一共展示了LLToast::hide方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: hideToast

//--------------------------------------------------------------------------
void LLScreenChannel::hideToast(const LLUUID& notification_id)
{
	std::vector<ToastElem>::iterator it = find(mToastList.begin(), mToastList.end(), notification_id);
	if(mToastList.end() != it)
	{
		LLToast* toast = it->getToast();
		if (toast)
		{
			toast->hide();
		}
		else
		{
			llwarns << "Attempt to hide a deleted toast." << llendl;
		}
	}
}
开发者ID:JohnMcCaffery,项目名称:Armadillo-Phoenix,代码行数:17,代码来源:llscreenchannel.cpp

示例2: showToastsBottom


//.........这里部分代码省略.........
		if(it != vToastList.rbegin())
		{
			LLToast* toast = (it-1)->getToast();
			if (!toast)
			{
				llwarns << "Attempt to display a deleted toast." << llendl;
				return;
			}

			bottom = toast->getRect().mTop - toast->getTopPad();
			toast_margin = gSavedSettings.getS32("ToastGap");
		}

		LLToast* toast = it->getToast();
		if(!toast)
		{
			llwarns << "Attempt to display a deleted toast." << llendl;
			return;
		}

		toast_rect = toast->getRect();
		toast_rect.setOriginAndSize(getRect().mRight - toast_rect.getWidth(),
				bottom + toast_margin, 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.mTop > channel_rect.mTop)
			{
				break;
			}
		}

		bool stop_showing_toasts = toast->getRect().mTop > getRect().mTop;

		if(!stop_showing_toasts)
		{
			if( it != vToastList.rend()-1)
			{
				S32 toast_top = toast->getRect().mTop + gSavedSettings.getS32("ToastGap");
				stop_showing_toasts = toast_top > getRect().mTop;
			}
		} 

		// 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
		{
			// Fixing Z-order of toasts (EXT-4862)
			// Next toast will be positioned under this one.
			gFloaterView->sendChildToBack(toast);
		}
	}

	// Dismiss toasts we don't have space for (STORM-391).
	if(it != vToastList.rend())
	{
		mHiddenToastsNum = 0;

		for(; it != vToastList.rend(); it++)
		{
			LLToast* toast = it->getToast();
			if (toast)
			{
				toast->hide();
			}
		}
	}
}
开发者ID:JohnMcCaffery,项目名称:Armadillo-Phoenix,代码行数:101,代码来源:llscreenchannel.cpp


注:本文中的LLToast::hide方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。