Storyboard
List of all members
LayerManager Class Reference

This interface is used to access the layers within a given panel. More...

#include <layerManager.h>

Inheritance diagram for LayerManager:
Inheritance graph
[legend]
Collaboration diagram for LayerManager:
Collaboration graph
[legend]

Public Slots

Panel Layer Manipulation
int numberOfLayers (String &panelId)
 returns number of layers in a panel
 
bool addVectorLayer (String &panelId, int targetLayerIdx, bool before, String &suggestedName)
 Adds a vector Layer.
 
bool addBitmapLayer (String &panelId, int targetLayerIdx, bool before, String &suggestedName)
 Adds a bitmap Layer.
 
bool isVectorLayer (String &panelId, int index)
 Returns if layer is Vector.
 
bool is3DLayer (String &panelId, int index)
 Returns if layer is 3D.
 
bool isBitmapLayer (String &panelId, int index)
 Returns if layer is Bitmap.
 
bool deleteLayer (String &panelId, int index)
 Deletes a given layer.
 
bool renameLayer (String &panelId, int index, String &suggestedName)
 Renames a given layer.
 
String layerName (String &panelId, int index)
 Returns name of layer.
 
bool importImageAsLayer (String &panelId, String &fullPathAndFileName)
 Imports image and creates a new layer at index 0, returns if successful.
 
bool setLayerVisible (String &panelId, int index, bool visible)
 Set layers visiblility flag.
 
bool layerVisibility (String &panelId, int index)
 Get layers visiblility flag.
 
bool setLayerOpacity (String &panelId, int index, double opacity)
 Set layers opacity value.
 
double layerOpacity (String &panelId, int index)
 Get layers opacity value.
 
bool setLayerAlignment (String &panelId, int index, String &alignment)
 Set layers alignment value.
 
String layerAlignment (String &panelId, int index)
 Get layers Alignment value.
 
String getLayerDrawingName (String &panelId, int index, bool fullPath)
 Get the path to a layer's drawing.
 
int getLayerElementId (String &panelId, int index)
 Return the elementId of the layer. Useful for the element/Drawing interface.
 

Detailed Description

This interface is used to access the layers within a given panel.

The following examples are provided:

var lm = new LayerManager();
var sb = new StoryboardManager();
// get the first panel in the project.
var panelId = sb.panelInProject(0);
// Add 2 blank vector layers and 1 blank bitmap layer. Set the last one to invisible
lm.addVectorLayer( panelId, 0, false, "V-A");
lm.addVectorLayer( panelId, 1, false, "V-B");
lm.addBitmapLayer( panelId, 2, false, "B-A");
lm.setLayerVisible( panelId, 2, false);
// prepend a new layer by importing an image.
lm.importImageAsLayer(panelId, "/fullPath/Image.tga");

Member Function Documentation

bool LayerManager::addBitmapLayer ( String &  panelId,
int  targetLayerIdx,
bool  before,
String &  suggestedName 
)
slot

Adds a bitmap Layer.

Parameters
panelId- uniqueId of the panel
targetLayerIdx- index of sibling layer
before- whether new layer is before or after sibling layer
suggestedName- suggested Name
bool LayerManager::addVectorLayer ( String &  panelId,
int  targetLayerIdx,
bool  before,
String &  suggestedName 
)
slot

Adds a vector Layer.

Parameters
panelId- uniqueId of the panel
targetLayerIdx- index of sibling layer
before- whether new layer is before or after sibling layer
suggestedName- suggested Name
bool LayerManager::deleteLayer ( String &  panelId,
int  index 
)
slot

Deletes a given layer.

Parameters
panelId- uniqueId of the panel
index- index of layer
String LayerManager::getLayerDrawingName ( String &  panelId,
int  index,
bool  fullPath 
)
slot

Get the path to a layer's drawing.

Parameters
panelId- uniqueId of the panel
index- index of layer
fullPath- boolean to determinefileName or fullPath and fileName
int LayerManager::getLayerElementId ( String &  panelId,
int  index 
)
slot

Return the elementId of the layer. Useful for the element/Drawing interface.

Parameters
panelId- uniqueId of the panel
index- index of layer
bool LayerManager::importImageAsLayer ( String &  panelId,
String &  fullPathAndFileName 
)
slot

Imports image and creates a new layer at index 0, returns if successful.

Parameters
panelId- uniqueId of the panel
fullPathAndFileName- absolute path to image file
bool LayerManager::is3DLayer ( String &  panelId,
int  index 
)
slot

Returns if layer is 3D.

Parameters
panelId- uniqueId of the panel
index- index of layer
bool LayerManager::isBitmapLayer ( String &  panelId,
int  index 
)
slot

Returns if layer is Bitmap.

Parameters
panelId- uniqueId of the panel
index- index of layer
bool LayerManager::isVectorLayer ( String &  panelId,
int  index 
)
slot

Returns if layer is Vector.

Parameters
panelId- uniqueId of the panel
index- index of layer
String LayerManager::layerAlignment ( String &  panelId,
int  index 
)
slot

Get layers Alignment value.

Parameters
panelId- uniqueId of the panel
index- index of layer
String LayerManager::layerName ( String &  panelId,
int  index 
)
slot

Returns name of layer.

Parameters
panelId- uniqueId of the panel
index- index of layer
double LayerManager::layerOpacity ( String &  panelId,
int  index 
)
slot

Get layers opacity value.

Parameters
panelId- uniqueId of the panel
index- index of layer
bool LayerManager::layerVisibility ( String &  panelId,
int  index 
)
slot

Get layers visiblility flag.

Parameters
panelId- uniqueId of the panel
index- index of layer
int LayerManager::numberOfLayers ( String &  panelId)
slot

returns number of layers in a panel

Parameters
panelId- uniqueId of the panel
bool LayerManager::renameLayer ( String &  panelId,
int  index,
String &  suggestedName 
)
slot

Renames a given layer.

Parameters
panelId- uniqueId of the panel
index- index of layer
suggestedName- suggested Name
bool LayerManager::setLayerAlignment ( String &  panelId,
int  index,
String &  alignment 
)
slot

Set layers alignment value.

Parameters
panelId- uniqueId of the panel
index- index of layer
alignment- value between 0 and 100
bool LayerManager::setLayerOpacity ( String &  panelId,
int  index,
double  opacity 
)
slot

Set layers opacity value.

Parameters
panelId- uniqueId of the panel
index- index of layer
opacity- value between 0 and 100
bool LayerManager::setLayerVisible ( String &  panelId,
int  index,
bool  visible 
)
slot

Set layers visiblility flag.

Parameters
panelId- uniqueId of the panel
index- index of layer
visible- boolean flag

The documentation for this class was generated from the following file: