本文整理汇总了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;
}
示例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
}