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


C++ LLNotificationPtr::hasFormElements方法代码示例

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


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

示例1: processNotification

//--------------------------------------------------------------------------
bool LLAlertHandler::processNotification(const LLNotificationPtr& notification)
{
	if(mChannel.isDead())
	{
		return false;
	}

	// arrange a channel on a screen
	if(!mChannel.get()->getVisible())
	{
		initChannel();
	}

	if (notification->canLogToIM() && notification->hasFormElements())
	{
		const std::string name = LLHandlerUtil::getSubstitutionName(notification);

		LLUUID from_id = notification->getPayload()["from_id"];

// [RLVa:KB] - Checked: 2013-05-09 (RLVa-1.4.9)
		// Don't spawn an IM session for non-chat related events:
		//   - LLHandlerUtil::logToIMP2P() below will still be called with to_file_only == false
		//   - LLHandlerUtil::logToIM() will eventually be called as a result and without an open IM session it will log the
		//     same message as it would for an open session whereas to_file_only == true would take a different code path
		if ( (RlvActions::hasOpenP2PSession(from_id)) || (RlvActions::canStartIM(from_id)) )
		{
// [/RLVa:KB]
			// firstly create session...
			LLHandlerUtil::spawnIMSession(name, from_id);
// [RLVa:KB] - Checked: 2013-05-09 (RLVa-1.4.9)
		}
// [/RLVa:KB]

		// ...then log message to have IM Well notified about new message
		LLHandlerUtil::logToIMP2P(notification);
	}

	LLToastAlertPanel* alert_dialog = new LLToastAlertPanel(notification, mIsModal);
	LLToast::Params p;
	p.notif_id = notification->getID();
	p.notification = notification;
	p.panel = dynamic_cast<LLToastPanel*>(alert_dialog);
	p.enable_hide_btn = false;
	p.can_fade = false;
	p.is_modal = mIsModal;
	p.on_delete_toast = boost::bind(&LLAlertHandler::onDeleteToast, this, _1);

	// Show alert in middle of progress view (during teleport) (EXT-1093)
	LLProgressView* progress = gViewerWindow->getProgressView();
	LLRect rc = progress && progress->getVisible() ? progress->getRect() : gViewerWindow->getWorldViewRectScaled();
	mChannel.get()->updatePositionAndSize(rc);

	LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
	if(channel)
		channel->addToast(p);
	
	return false;
}
开发者ID:CaseyraeStarfinder,项目名称:Firestorm-Viewer,代码行数:59,代码来源:llnotificationalerthandler.cpp


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