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


C++ LLNotifyBox::isDead方法代码示例

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


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

示例1: onNotification

//static 
bool LLNotifyBox::onNotification(const LLSD& notify)
{
	LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID());
	
	if (!notification) return false;

	if(notify["sigtype"].asString() == "add" || notify["sigtype"].asString() == "change")
	{
		//bring existing notification to top
		LLNotifyBox* boxp = LLNotifyBox::getInstance(notification->getID());
		if (boxp && !boxp->isDead())
		{
			gNotifyBoxView->showOnly(boxp);
		}
		else
		{
			bool is_script_dialog = (notification->getName() == "ScriptDialog" || notification->getName() == "ScriptDialogGroup");
			LLNotifyBox* notify_box = new LLNotifyBox(
				notification,
				is_script_dialog); //layout_script_dialog);

			gNotifyBoxView->addChild(notify_box);
		}
	}
	else if (notify["sigtype"].asString() == "delete")
	{
		LLNotifyBox* boxp = LLNotifyBox::getInstance(notification->getID());
		if (boxp && !boxp->isDead())
		{
			boxp->close();
		}
	}

	return false;
}
开发者ID:Kiera,项目名称:Sausages,代码行数:36,代码来源:llnotify.cpp

示例2: onNotification

//static 
bool LLNotifyBox::onNotification(const LLSD& notify)
{
	LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID());
	
	if (!notification) return false;

	if (notify["sigtype"].asString() == "add" || notify["sigtype"].asString() == "change")
	{
		if (notification->getPayload().has("SUPPRESS_TOAST"))
		{
			chat_notification(notification);
			return false;
		}
		//bring existing notification to top
		//This getInstance is ugly, as LLNotifyBox is derived from both LLInstanceTracker and LLEventTimer, which also is derived from its own LLInstanceTracker
		//Have to explicitly determine which getInstance function to use.
		LLNotifyBox* boxp = LLInstanceTracker<LLNotifyBox, LLUUID>::getInstance(notification->getID());
		if (boxp && !boxp->isDead())
		{
			gNotifyBoxView->showOnly(boxp);
		}
		else
		{
			gNotifyBoxView->addChild(new LLNotifyBox(notification));
		}
	}
	else if (notify["sigtype"].asString() == "delete")
	{
		LLNotifyBox* boxp = LLInstanceTracker<LLNotifyBox, LLUUID>::getInstance(notification->getID());
		if (boxp && !boxp->isDead())
		{
			boxp->close();
		}
	}

	return false;
}
开发者ID:CmdrCupcake,项目名称:SingularityViewer,代码行数:38,代码来源:llnotify.cpp

示例3: onNotification

//static 
bool LLNotifyBox::onNotification(const LLSD& notify)
{
	LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID());
	
	if (!notification) return false;

	if(notify["sigtype"].asString() == "add" || notify["sigtype"].asString() == "change")
	{
		//bring existing notification to top
		//This getInstance is ugly, as LLNotifyBox is derived from both LLInstanceTracker and LLEventTimer, which also is derived from its own LLInstanceTracker
		//Have to explicitly determine which getInstance function to use.
		LLNotifyBox* boxp = LLInstanceTracker<LLNotifyBox, LLUUID>::getInstance(notification->getID());
		if (boxp && !boxp->isDead())
		{
			gNotifyBoxView->showOnly(boxp);
		}
		else
		{
			bool is_script_dialog = (notification->getName() == "ScriptDialog" || notification->getName() == "ScriptDialogGroup");
			LLNotifyBox* notify_box = new LLNotifyBox(
				notification,
				is_script_dialog); //layout_script_dialog);

			gNotifyBoxView->addChild(notify_box);
		}
	}
	else if (notify["sigtype"].asString() == "delete")
	{
		LLNotifyBox* boxp = LLInstanceTracker<LLNotifyBox, LLUUID>::getInstance(notification->getID());
		if (boxp && !boxp->isDead())
		{
			boxp->close();
		}
	}

	return false;
}
开发者ID:Barosonix,项目名称:AstraViewer,代码行数:38,代码来源:llnotify.cpp

示例4: getFirstNontipBox

LLNotifyBox* LLNotifyBoxView::getFirstNontipBox() const
{
	// *TODO: Don't make assumptions like this!
	// assumes every child is a notify box
	for(child_list_const_iter_t iter = getChildList()->begin();
			iter != getChildList()->end();
			iter++)
	{
		// hack! *TODO: Integrate llnotify and llgroupnotify
		if (isGroupNotifyBox(*iter))
			continue;

		LLNotifyBox* box = static_cast<LLNotifyBox*>(*iter);
		if (!box->isTip() && !box->isDead())
			return box;
	}
	return NULL;
}
开发者ID:CmdrCupcake,项目名称:SingularityViewer,代码行数:18,代码来源:llnotify.cpp


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