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


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

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


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

示例1: modifyToastByNotificationID

//--------------------------------------------------------------------------
void LLScreenChannel::modifyToastByNotificationID(LLUUID id, LLPanel* panel)
{
	std::vector<ToastElem>::iterator it = find(mToastList.begin(), mToastList.end(), id);
	
	if( it != mToastList.end() && panel)
	{
		LLToast* toast = it->getToast();
		if (toast)
		{
			LLPanel* old_panel = toast->getPanel();
			toast->removeChild(old_panel);
			delete old_panel;
			toast->insertPanel(panel);
			toast->startTimer();
		}
		redrawToasts();
	}
}
开发者ID:JohnMcCaffery,项目名称:Armadillo-Phoenix,代码行数:19,代码来源:llscreenchannel.cpp

示例2: 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();
}
开发者ID:JohnMcCaffery,项目名称:Armadillo-Phoenix,代码行数:22,代码来源:llscreenchannel.cpp

示例3: 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->getToast();
	if (toast)
	{
		if(toast->getVisible())
		{
			// toast is already in channel
			return;
		}

		toast->setIsHidden(false);
		toast->startTimer();
		mToastList.push_back(*it);
	}

	redrawToasts();
}
开发者ID:JohnMcCaffery,项目名称:Armadillo-Phoenix,代码行数:24,代码来源:llscreenchannel.cpp

示例4: addNotification

void LLNearbyChatScreenChannel::addNotification(LLSD& notification)
{
	//look in pool. if there is any message
	if(mStopProcessing)
		return;

	/*
    find last toast and check ID
	*/

	if(m_active_toasts.size())
	{
		LLUUID fromID = notification["from_id"].asUUID();		// agent id or object id
		std::string from = notification["from"].asString();
		LLToast* toast = m_active_toasts[0].get();
		if (toast)
		{
			LLNearbyChatToastPanel* panel = dynamic_cast<LLNearbyChatToastPanel*>(toast->getPanel());
  
			if(panel && panel->messageID() == fromID && panel->getFromName() == from && panel->canAddText())
			{
				panel->addMessage(notification);
				reshapePanel(panel);
				toast->reshapeToPanel();
				toast->startTimer();
	  
				arrangeToasts();
				return;
			}
		}
	}
	

	
	if(m_toast_pool.empty())
	{
		//"pool" is empty - create one more panel
		LL_DEBUGS("NearbyChat") << "Empty pool" << llendl;
		if(!createPoolToast())//created toast will go to pool. so next call will find it
			return;
		addNotification(notification);
		return;
	}

	int chat_type = notification["chat_type"].asInteger();
	
	if( ((EChatType)chat_type == CHAT_TYPE_DEBUG_MSG))
	{
		if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE) 
			return;
		if(gSavedSettings.getS32("ShowScriptErrorsLocation")== 1)
			return;
	}
		

	//take 1st element from pool, (re)initialize it, put it in active toasts

	LL_DEBUGS("NearbyChat") << "Getting toast from pool" << llendl;
	LLToast* toast = m_toast_pool.back().get();

	m_toast_pool.pop_back();


	LLToastPanelBase* panel = dynamic_cast<LLToastPanelBase*>(toast->getPanel());
	if(!panel)
		return;
	panel->init(notification);

	reshapePanel(panel);
	toast->reshapeToPanel();
	toast->startTimer();
	
	m_active_toasts.push_back(toast->getHandle());

	arrangeToasts();
}
开发者ID:wish-ds,项目名称:firestorm-ds,代码行数:76,代码来源:llnearbychathandler.cpp


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