CBlendLayers Class Reference

#include <blendlayers.h>

Inheritance diagram for CBlendLayers:

Public Member Functions

 CBlendLayers ()
 
virtual BlendLayer * AllocObject () const
 
virtual void FreeObject (BlendLayer *&pObj) const
 
virtual BlendLayer * AllocObjectType (Int32 lID) const
 
BlendLayer * Add (LayerType t, Int32 lID, Bool bAppend=true)
 
void Remove (BlendLayer *pLayer, BaseList2D *pParent, BaseDocument *pDoc)
 
virtual void Free ()
 
BlendLayer * GetLayer (Int32 l)
 
Bool LinkLayer (BlendLayer *pMovedLayer, BlendLayer *pDestLayer, DragPosition pos)
 
void Unlink (BlendLayer *pLayer)
 
Bool ReadElementCreate (HyperFile *pFile, BlendLayer *&pLayer, Int32 lLevel)
 
Bool WriteElementHF (HyperFile *pFile, const BlendLayer *pElement) const
 
Int32 Compare (CBlendLayers *pLayers)
 
Int32 FindLayer (BlendLayer *pLayer)
 
Bool CopyTo (CBlendLayers *pDest, AliasTrans *pTrans)
 
void DeselectAll ()
 
BlendLayer * FindSelected ()
 
BlendLayer * SearchLayer (Int32 lLayerID)
 
Bool CompareStructure (CBlendLayers *p, Bool bCompareNames)
 
void ClearShaders (BaseList2D *pParent, BaseDocument *pDoc)
 
void UpdateShaderBitmaps (Int32 lMinHeight, BaseDocument *pDoc)
 
void UpdateFolderBitmaps (Int32 lMinHeight, BaseDocument *pDoc)
 
- Public Member Functions inherited from CDynObjectArray< BlendLayer >
 CDynObjectArray ()
 
virtual ~CDynObjectArray ()
 
BlendLayer * GetNextObject ()
 
BlendLayer * InsertAt (Int32 l)
 
BlendLayer * GetNextObjectType (Int32 lID)
 
BlendLayer * InsertAtType (Int32 lID, Int32 l)
 
Int32 GetObjectIndex (const BlendLayer *pObj) const
 
BlendLayer * GetObject (Int32 l) const
 
Int32 GetElementCount () const
 
Bool RemoveAt (Int32 l)
 
Bool RemoveObjectPointer (const BlendLayer *pObj)
 
const CDynArray< ArrayElementPtr > * GetArray () const
 
CDynArray< ArrayElementPtr > * GetArray ()
 
BlendLayer * operator[] (Int32 l) const
 
Bool IsEmpty () const
 
Bool IsEqual (const CDynObjectArray< BlendLayer > *pArray) const
 
Bool RemovePointer (Int32 lIndex)
 
Bool InsertObject (BlendLayer *pObj, Int32 lIndex)
 
Bool Init (const BlendLayer *const *ppObjects, Int32 lCount, AliasTrans *pTrans=nullptr, Bool bAppend=false)
 
Bool CopyTo (CDynObjectArray< BlendLayer > *pDest, AliasTrans *pTrans, Bool bAppend=false) const
 
Bool Alloc (Int32 lElementCount)
 
Bool Read (HyperFile *pFile, Bool bFlush=true)
 
Bool Write (HyperFile *pFile, Int32 lLevel) const
 
Bool ReadCreateObject (HyperFile *pFile, Bool bFlush=true)
 

Public Attributes

BlendLayer * m_pLayer
 

Private Attributes

CDynArray< BlendLayer * > m_arTransformLayers
 

Additional Inherited Members

- Public Types inherited from CDynObjectArray< BlendLayer >
typedef BlendLayer * ArrayElementPtr
 
- Protected Member Functions inherited from CDynObjectArray< BlendLayer >
virtual BlendLayer * AllocObject () const=0
 
virtual BlendLayer * GetClone (const BlendLayer *pObj, AliasTrans *pTrans) const
 
virtual Bool ReadElement (BaseFile *pFile, BlendLayer *pElement, Int32 lLevel)
 
virtual Bool WriteElement (BaseFile *pFile, const BlendLayer *pElement) const
 
virtual Bool ReadElementHF (HyperFile *pFile, BlendLayer *pElement, Int32 lLevel)
 
virtual Bool TestEqual (const BlendLayer *pObjA, const BlendLayer *pObjB) const
 
- Protected Attributes inherited from CDynObjectArray< BlendLayer >
CDynArray< ArrayElementPtr > m_Objects
 

Constructor & Destructor Documentation

◆ CBlendLayers()

Default constructor.

Member Function Documentation

◆ AllocObject()

virtual BlendLayer* AllocObject ( ) const
virtual

Private.

◆ FreeObject()

virtual void FreeObject ( BlendLayer *&  pObj) const
virtual

Private.

Implements CDynObjectArray< BlendLayer >.

◆ AllocObjectType()

virtual BlendLayer* AllocObjectType ( Int32  lID) const
virtual

Private.

Reimplemented from CDynObjectArray< BlendLayer >.

◆ Add()

BlendLayer* Add ( LayerType  t,
Int32  lID,
Bool  bAppend = true 
)

Adds a new layer to the layer array.

Parameters
[in]tThe layer type.
[in]lIDA unique ID for the layer.
[in]bAppendIf true the added layer is inserted at the end of the layer list, otherwise at the start of the layer list.
Returns
The added layer, or nullptr if it failed.

◆ Remove()

void Remove ( BlendLayer *  pLayer,
BaseList2D *  pParent,
BaseDocument *  pDoc 
)

Removes a layer.

Parameters
[in]pLayerThe layer to remove. The caller owns the pointed layer.
[in]pParentNot used. Pass nullptr.
[in]pDocNot used. Pass nullptr.

◆ Free()

virtual void Free ( )
virtual

Frees the layer array.

Reimplemented from CDynObjectArray< BlendLayer >.

◆ GetLayer()

BlendLayer* GetLayer ( Int32  l)

Gets the layer at the index l in the array.

Parameters
[in]lThe index of the layer.
Returns
The layer, or nullptr if it cannot be found.

◆ LinkLayer()

Bool LinkLayer ( BlendLayer *  pMovedLayer,
BlendLayer *  pDestLayer,
DragPosition  pos 
)

Private.

◆ Unlink()

void Unlink ( BlendLayer *  pLayer)

Private.

◆ ReadElementCreate()

Bool ReadElementCreate ( HyperFile *  pFile,
BlendLayer *&  pLayer,
Int32  lLevel 
)
virtual

Private.

Reimplemented from CDynObjectArray< BlendLayer >.

◆ WriteElementHF()

Bool WriteElementHF ( HyperFile *  pFile,
const BlendLayer *  pElement 
) const
virtual

Private.

Reimplemented from CDynObjectArray< BlendLayer >.

◆ Compare()

Int32 Compare ( CBlendLayers *  pLayers)

Compares the layer array with pLayers.

Parameters
[in]pLayersThe layer array to compare with. The caller owns the pointed layers array.
Returns
0 if the arrays are identical, otherwise 1.

◆ FindLayer()

Int32 FindLayer ( BlendLayer *  pLayer)

Finds a layer.

Parameters
[in]pLayerThe layer to search for. The caller owns the pointed layer.
Returns
The ID of the found layer.

◆ CopyTo()

Bool CopyTo ( CBlendLayers *  pDest,
AliasTrans *  pTrans 
)

Copies the layer to pDest.

Parameters
[in]pDestThe destination layer. The caller owns the pointed layer.
[in]pTransAn alias translator for the operation. Can be nullptr. The caller owns the pointed alias translator.
Returns
true if the layer was copied, otherwise false.

◆ DeselectAll()

void DeselectAll ( )

Deselects all layers.

◆ FindSelected()

BlendLayer* FindSelected ( )

Gets the selected layer.

Returns
The selected layer, or nullptr if no layer is selected.

◆ SearchLayer()

BlendLayer* SearchLayer ( Int32  lLayerID)

Searches a layer by ID.

Parameters
[in]lLayerIDA layer ID.
Returns
The found layer, or nullptr if no layer exists for the specified ID.

◆ CompareStructure()

Bool CompareStructure ( CBlendLayers *  p,
Bool  bCompareNames 
)

Private.

◆ ClearShaders()

void ClearShaders ( BaseList2D *  pParent,
BaseDocument *  pDoc 
)

Clears all linked shaders of the layers in the array.

Parameters
[in]pParentNot used. Pass nullptr.
[in]pDocNot used. Pass nullptr.

◆ UpdateShaderBitmaps()

void UpdateShaderBitmaps ( Int32  lMinHeight,
BaseDocument *  pDoc 
)

Private.

◆ UpdateFolderBitmaps()

void UpdateFolderBitmaps ( Int32  lMinHeight,
BaseDocument *  pDoc 
)

Private.

Member Data Documentation

◆ m_pLayer

BlendLayer* m_pLayer

Private.

◆ m_arTransformLayers

CDynArray<BlendLayer*> m_arTransformLayers
private

Private. Contains all active layers that have the LAYER_FLAG_HAS_CHANGE_POINTS bit set for faster rendering.