LayerSetInterface Class Reference

#include <layerset.h>

Detailed Description

Class to choose layers or alphas from an image.

Public Types

using LayerHash = HashSet< String, LayerSetCompare >
 

Public Member Functions

MAXON_METHOD Result< void > SetSelectedLayers (const LayerHash &layers)
 
MAXON_METHOD const LayerHashGetSelectedLayers () const
 
MAXON_METHOD void SetSelectedImage (const String &image)
 
MAXON_METHOD String GetSelectedImage () const
 
MAXON_METHOD void SetMode (LAYERSETMODE mode)
 
MAXON_METHOD LAYERSETMODE GetMode () const
 
MAXON_METHOD void SetCalculateAlpha (Bool calcAlpha)
 
MAXON_METHOD Bool GetCalculateAlpha () const
 
MAXON_METHOD Bool IsEqual (const LayerSetInterface *other) const
 
MAXON_METHOD HashInt GetHashCode () const
 
MAXON_FUNCTION void FlushLayers ()
 
MAXON_FUNCTION Bool HasLayerSelection () const
 
MAXON_FUNCTION Bool IsLayerEnabled (const String &name) const
 
MAXON_FUNCTION Bool HasMultiImageSelection () const
 
MAXON_FUNCTION Bool IsMultiImageEnabled (const String &name) const
 
MAXON_FUNCTION Result< void > RemoveLayer (const String &layer)
 
MAXON_FUNCTION Result< void > AddLayer (const String &layer)
 

Static Public Member Functions

static MAXON_METHOD Result< void > DescribeIO (const DataSerializeInterface &stream)
 

Private Member Functions

 MAXON_INTERFACE_NONVIRTUAL (LayerSetInterface, MAXON_REFERENCE_COPY_ON_WRITE, "net.maxon.interface.layerset")
 

Member Typedef Documentation

◆ LayerHash

Member Function Documentation

◆ MAXON_INTERFACE_NONVIRTUAL()

MAXON_INTERFACE_NONVIRTUAL ( LayerSetInterface  ,
MAXON_REFERENCE_COPY_ON_WRITE  ,
"net.maxon.interface.layerset"   
)
private

◆ SetSelectedLayers()

MAXON_METHOD Result<void> SetSelectedLayers ( const LayerHash layers)

Sets the selected layers.

Parameters
[in]layersThe layers to set.
Returns
OK on success.

◆ GetSelectedLayers()

MAXON_METHOD const LayerHash& GetSelectedLayers ( ) const

Gets the selected layers.

Returns
The layers.

◆ SetSelectedImage()

MAXON_METHOD void SetSelectedImage ( const String image)

Sets the selected image.

Parameters
[in]imageThe image to set.

◆ GetSelectedImage()

MAXON_METHOD String GetSelectedImage ( ) const

Gets the selected image.

Returns
The image.

◆ SetMode()

MAXON_METHOD void SetMode ( LAYERSETMODE  mode)

Sets the mode.

Parameters
[in]modeThe mode to set.

◆ GetMode()

MAXON_METHOD LAYERSETMODE GetMode ( ) const

Gets the mode.

Returns
The mode.

◆ SetCalculateAlpha()

MAXON_METHOD void SetCalculateAlpha ( Bool  calcAlpha)

Sets the alpha calculation mode.

Parameters
[in]calcAlphaThe mode to set.

◆ GetCalculateAlpha()

MAXON_METHOD Bool GetCalculateAlpha ( ) const

Gets the alpha calculation mode.

Returns
The mode.

◆ IsEqual()

MAXON_METHOD Bool IsEqual ( const LayerSetInterface other) const

Compares this LayerSet with another one if both are identical.

Parameters
[in]otherThe other LayerSet to compare this object to.
Returns
True if the object is identical.

◆ GetHashCode()

MAXON_METHOD HashInt GetHashCode ( ) const

◆ FlushLayers()

MAXON_FUNCTION void FlushLayers ( )

◆ HasLayerSelection()

MAXON_FUNCTION Bool HasLayerSelection ( ) const

◆ IsLayerEnabled()

MAXON_FUNCTION Bool IsLayerEnabled ( const String name) const

◆ HasMultiImageSelection()

MAXON_FUNCTION Bool HasMultiImageSelection ( ) const

◆ IsMultiImageEnabled()

MAXON_FUNCTION Bool IsMultiImageEnabled ( const String name) const

◆ RemoveLayer()

MAXON_FUNCTION Result<void> RemoveLayer ( const String layer)

◆ AddLayer()

MAXON_FUNCTION Result<void> AddLayer ( const String layer)

◆ DescribeIO()

static MAXON_METHOD Result<void> DescribeIO ( const DataSerializeInterface stream)
static

Describe all elements of this class for I/O operations.

Parameters
[in]streamThe stream that is used to register the class members.
Returns
OK on success.