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


C++ CDesignType::FireGetGlobalDockScreen方法代码示例

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


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

示例1: FireGetGlobalDockScreen

bool CDesignCollection::FireGetGlobalDockScreen (CSpaceObject *pObj, CString *retsScreen, int *retiPriority)

//	FireGetGlobalDockScreen
//
//	Allows types to override the dock screen for an object

	{
	int i;
	int iBestPriority = -1;
	CString sBestScreen;

	//	Loop over all types and get the highest priority screen

	for (i = 0; i < m_EventsCache[evtGetGlobalDockScreen]->GetCount(); i++)
		{
		SEventHandlerDesc Event;
		CDesignType *pType = m_EventsCache[evtGetGlobalDockScreen]->GetEntry(i, &Event);

		int iPriority;
		CString sScreen;
		if (pType->FireGetGlobalDockScreen(Event, pObj, &sScreen, &iPriority)
				&& iPriority > iBestPriority)
			{
			iBestPriority = iPriority;
			sBestScreen = sScreen;
			}
		}

	//	If none found, then we're done

	if (iBestPriority == -1)
		return false;

	//	Otherwise, return screen

	if (retsScreen)
		*retsScreen = sBestScreen;

	if (retiPriority)
		*retiPriority = iBestPriority;

	return true;
	}
开发者ID:Sdw195,项目名称:Transcendence,代码行数:43,代码来源:CDesignCollection.cpp

示例2: FireGetGlobalDockScreen

bool CDesignCollection::FireGetGlobalDockScreen (CSpaceObject *pObj, CString *retsScreen, ICCItem **retpData, int *retiPriority)

//	FireGetGlobalDockScreen
//
//	Allows types to override the dock screen for an object.
//	NOTE: If we return TRUE, callers must discard *retpData.

	{
	int i;
	CCodeChain &CC = g_pUniverse->GetCC();

	int iBestPriority = -1;
	CString sBestScreen;
	ICCItem *pBestData = NULL;

	//	Loop over all types and get the highest priority screen

	for (i = 0; i < m_EventsCache[evtGetGlobalDockScreen]->GetCount(); i++)
		{
		SEventHandlerDesc Event;
		CDesignType *pType = m_EventsCache[evtGetGlobalDockScreen]->GetEntry(i, &Event);

		int iPriority;
		CString sScreen;
		ICCItem *pData;
		if (pType->FireGetGlobalDockScreen(Event, pObj, &sScreen, &pData, &iPriority))
			{
			if (iPriority > iBestPriority)
				{
				iBestPriority = iPriority;
				sBestScreen = sScreen;

				if (pBestData)
					pBestData->Discard(&CC);

				pBestData = pData;
				}
			else
				{
				if (pData)
					pData->Discard(&CC);
				}
			}
		}

	//	If none found, then we're done

	if (iBestPriority == -1)
		return false;

	//	Otherwise, return screen

	if (retsScreen)
		*retsScreen = sBestScreen;

	if (retiPriority)
		*retiPriority = iBestPriority;

	if (retpData)
		*retpData = pBestData;
	else
		{
		if (pBestData)
			pBestData->Discard(&CC);
		}

	return true;
	}
开发者ID:bmer,项目名称:Mammoth,代码行数:68,代码来源:CDesignCollection.cpp


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