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


C++ Layer::FindNextLayer方法代码示例

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


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

示例1: ReadSpreadLayerDetails

BOOL LayerManager::ReadSpreadLayerDetails() 
{
	ENSURE(CurrentSpread != NULL, "Trying to read the details of a NULL current spread"); 
	ENSURE(LyrDetList.IsEmpty(), "Layer details list not empty"); 

	LyrDetails* LayerDet; 

	Layer* Current = CurrentSpread->FindFirstLayer(); 
	while (Current != NULL) 
	{
		// Found a layer so record the details 
		LayerDet = new LyrDetails(); 
		if (LayerDet == NULL)
		{
			// Inform an error - The error will already be set by new
			InformError();
			return FALSE; 
		}
		LayerDet->Status = (Current)->GetLayerStatus(); // record the layer status  
		LayerDet->m_pLayer = Current; 
		LayerDet->New = FALSE; 
		LayerDet->Deleted = FALSE; 

		LyrDetList.AddTail(LayerDet); // Add the layers details to the tail of the layer 
									   // detail list, so preserving the correct z-order. 
		Current = Current->FindNextLayer(); 
	}
	ENSURE(!LyrDetList.IsEmpty(), "No layers found on the current spread"); 
	return TRUE; 
}
开发者ID:Amadiro,项目名称:xara-cairo,代码行数:30,代码来源:layermgr.cpp

示例2: LayerDetailsChanged

BOOL LayerManager::LayerDetailsChanged()
{
	LyrDetails* CurrentLyrDet = (LyrDetails*)LyrDetList.GetHead(); 	  
	Layer* CurrentLyr = CurrentSpread->FindFirstLayer(); // Get the first layer node 
	
	ENSURE(CurrentLyrDet != NULL, "There are no layer details on the layer details list"); 
	ENSURE(CurrentLyr != NULL, "The LayerManager's current spread has no layers"); 
	
	while (CurrentLyrDet != NULL) 
	{
		// We ignore deleted new layers because they don't change anything 
		if (!(CurrentLyrDet->New && CurrentLyrDet->Deleted)) 	
		{		
			if (CurrentLyr != CurrentLyrDet->m_pLayer) // z-order change 
			{
				return TRUE; 
			}									
			else if ((CurrentLyrDet->New) || (CurrentLyrDet->Deleted)) 
			{
				return TRUE; // New layer created or existing layer deleted 
			}
			else if (!(CurrentLyrDet->Status == CurrentLyr->GetLayerStatus()))
			{	
				// The layer's status has changed 
				return TRUE; 
			}  
			CurrentLyrDet =  (LyrDetails*)(LyrDetList.GetNext(CurrentLyrDet));
			CurrentLyr = (CurrentLyr->FindNextLayer()); 
		}	
		else 	
			CurrentLyrDet = (LyrDetails*)(LyrDetList.GetNext(CurrentLyrDet)); 
	}	   
	// Sanity check 
	ENSURE (CurrentLyr == NULL, "CurrentLyr ptr should be NULL"); 
	return FALSE; // Nothing has changed 	
}
开发者ID:Amadiro,项目名称:xara-cairo,代码行数:36,代码来源:layermgr.cpp


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