Dali 3D User Interface Engine
List of all members | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes
Dali::Internal::LayerList Class Reference

An ordered list of layers. More...

#include <layer-list.h>

Collaboration diagram for Dali::Internal::LayerList:
Collaboration graph
[legend]

Public Member Functions

 ~LayerList ()
 Non-virtual destructor; not suitable as a base class. More...
 
unsigned int GetLayerCount () const
 Query the number of layers. More...
 
LayerGetLayer (unsigned int depth) const
 Retrieve the layer at a specified depth. More...
 
unsigned int GetDepth (const Layer *layer) const
 Gets the depth of a given layer. More...
 
void RegisterLayer (Layer &layer)
 Register a layer with the stage. More...
 
void UnregisterLayer (Layer &layer)
 Unregister a layer from the stage. More...
 
void RaiseLayer (Layer &layer)
 Increment the depth of the layer inside the stage. More...
 
void LowerLayer (Layer &layer)
 Decrement the depth of the layer inside the stage. More...
 
void RaiseLayerToTop (const Layer &layer)
 Raises the layer to the top of the stage. More...
 
void LowerLayerToBottom (const Layer &layer)
 Lowers the layer to the bottom of the stage. More...
 
void MoveLayerAbove (const Layer &layer, const Layer &target)
 Moves the layer above the target layer on the stage. More...
 
void MoveLayerBelow (const Layer &layer, const Layer &target)
 Moves the layer below the target layer on the stage. More...
 

Static Public Member Functions

static LayerListNew (SceneGraph::UpdateManager &updateManager, bool systemLevel)
 Create a new list of layers. More...
 

Private Types

typedef std::vector< Layer * > LayerContainer
 

Private Member Functions

 LayerList (SceneGraph::UpdateManager &updateManager, bool systemLevel)
 Protected constructor; see also LayerList::New(). More...
 
void SetLayerDepths ()
 A private helper method to set the depth for each layer. More...
 

Private Attributes

SceneGraph::UpdateManagermUpdateManager
 
bool mIsSystemLevel
 True if the layers are added via the SystemOverlay API. More...
 
LayerContainer mLayers
 

Detailed Description

An ordered list of layers.

Layers are not owned by the LayerList; each layer is responsible for registering & unregistering. This is used by the Stage, to keep track of layer depths. A separate LayerList is maintained for actors added via the SystemOverlay::Add().

Definition at line 43 of file layer-list.h.

Member Typedef Documentation

typedef std::vector<Layer*> Dali::Internal::LayerList::LayerContainer
private

Definition at line 156 of file layer-list.h.

Constructor & Destructor Documentation

Dali::Internal::LayerList::~LayerList ( )

Non-virtual destructor; not suitable as a base class.

Definition at line 68 of file layer-list.cpp.

Dali::Internal::LayerList::LayerList ( SceneGraph::UpdateManager updateManager,
bool  systemLevel 
)
private

Protected constructor; see also LayerList::New().

Parameters
[in]updateManagerto send messages.
[in]systemLevelTrue if the layers are added via the SystemOverlay API.

Definition at line 237 of file layer-list.cpp.

Referenced by New().

Here is the caller graph for this function:

Member Function Documentation

unsigned int Dali::Internal::LayerList::GetDepth ( const Layer layer) const

Gets the depth of a given layer.

Parameters
layerwhich depth to check

Definition at line 84 of file layer-list.cpp.

References mLayers.

Referenced by Dali::Internal::Layer::GetDepth().

Here is the caller graph for this function:

Layer * Dali::Internal::LayerList::GetLayer ( unsigned int  depth) const

Retrieve the layer at a specified depth.

Precondition
depth is less than layer count; see GetLayerCount().
Parameters
[in]depthThe depth.
Returns
The layer found at the given depth.

Definition at line 77 of file layer-list.cpp.

References DALI_ASSERT_ALWAYS, and mLayers.

Referenced by Dali::Internal::HitTestAlgorithm::anonymous_namespace{hit-test-algorithm-impl.cpp}::HitTestRenderTask().

Here is the caller graph for this function:

unsigned int Dali::Internal::LayerList::GetLayerCount ( ) const

Query the number of layers.

Returns
The number of layers.

Definition at line 72 of file layer-list.cpp.

References mLayers.

Referenced by Dali::Internal::HitTestAlgorithm::anonymous_namespace{hit-test-algorithm-impl.cpp}::HitTestRenderTask().

Here is the caller graph for this function:

void Dali::Internal::LayerList::LowerLayer ( Layer layer)

Decrement the depth of the layer inside the stage.

Precondition
layer is on stage

Definition at line 132 of file layer-list.cpp.

References Dali::Internal::anonymous_namespace{layer-list.cpp}::Find(), mLayers, and SetLayerDepths().

Referenced by Dali::Internal::Layer::Lower().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::LayerList::LowerLayerToBottom ( const Layer layer)

Lowers the layer to the bottom of the stage.

Precondition
layer is on stage
Parameters
layerto move

Definition at line 164 of file layer-list.cpp.

References Dali::Internal::anonymous_namespace{layer-list.cpp}::Find(), mLayers, and SetLayerDepths().

Referenced by Dali::Internal::Layer::LowerToBottom().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::LayerList::MoveLayerAbove ( const Layer layer,
const Layer target 
)

Moves the layer above the target layer on the stage.

Precondition
layer is on stage
target is on stage
Parameters
layerto move
targetto move above of

Definition at line 180 of file layer-list.cpp.

References DALI_ASSERT_DEBUG, Dali::Internal::anonymous_namespace{layer-list.cpp}::Find(), Dali::Internal::Layer::GetDepth(), mLayers, and SetLayerDepths().

Referenced by Dali::Internal::Layer::MoveAbove().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::LayerList::MoveLayerBelow ( const Layer layer,
const Layer target 
)

Moves the layer below the target layer on the stage.

Precondition
layer is on stage
target is on stage
Parameters
layerto move
targetto move below of

Definition at line 213 of file layer-list.cpp.

References DALI_ASSERT_DEBUG, Dali::Internal::anonymous_namespace{layer-list.cpp}::Find(), Dali::Internal::Layer::GetDepth(), mLayers, and SetLayerDepths().

Referenced by Dali::Internal::Layer::MoveBelow().

Here is the call graph for this function:

Here is the caller graph for this function:

LayerList * Dali::Internal::LayerList::New ( SceneGraph::UpdateManager updateManager,
bool  systemLevel 
)
static

Create a new list of layers.

Parameters
[in]updateManagerA reference to the update manager.
[in]systemLevelTrue if the layers are added via the SystemOverlay API.

Definition at line 63 of file layer-list.cpp.

References LayerList().

Referenced by Dali::Internal::Stage::Initialize().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::LayerList::RaiseLayer ( Layer layer)

Increment the depth of the layer inside the stage.

Precondition
layer is on stage

Definition at line 116 of file layer-list.cpp.

References Dali::Internal::anonymous_namespace{layer-list.cpp}::Find(), mLayers, and SetLayerDepths().

Referenced by Dali::Internal::Layer::Raise().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::LayerList::RaiseLayerToTop ( const Layer layer)

Raises the layer to the top of the stage.

Precondition
layer is on stage
Parameters
layerto move

Definition at line 148 of file layer-list.cpp.

References Dali::Internal::anonymous_namespace{layer-list.cpp}::Find(), mLayers, and SetLayerDepths().

Referenced by Dali::Internal::Layer::RaiseToTop().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::LayerList::RegisterLayer ( Layer layer)

Register a layer with the stage.

The stage determines the relative depth of each layer.

Definition at line 96 of file layer-list.cpp.

References DALI_ASSERT_DEBUG, Dali::Internal::anonymous_namespace{layer-list.cpp}::Find(), mLayers, and SetLayerDepths().

Referenced by Dali::Internal::Layer::NewRoot(), and Dali::Internal::Layer::OnStageConnectionInternal().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::LayerList::SetLayerDepths ( )
private

A private helper method to set the depth for each layer.

Layers have depth which is the same as their ordinal number in the stage container This method propagates any changes in the layer depths onto the scene graph side

Definition at line 243 of file layer-list.cpp.

References mIsSystemLevel, mLayers, mUpdateManager, and Dali::Internal::SceneGraph::SetLayerDepthsMessage().

Referenced by LowerLayer(), LowerLayerToBottom(), MoveLayerAbove(), MoveLayerBelow(), RaiseLayer(), RaiseLayerToTop(), RegisterLayer(), and UnregisterLayer().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::LayerList::UnregisterLayer ( Layer layer)

Unregister a layer from the stage.

Definition at line 104 of file layer-list.cpp.

References DALI_ASSERT_DEBUG, Dali::Internal::anonymous_namespace{layer-list.cpp}::Find(), mLayers, and SetLayerDepths().

Referenced by Dali::Internal::Layer::OnStageDisconnectionInternal().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

bool Dali::Internal::LayerList::mIsSystemLevel
private

True if the layers are added via the SystemOverlay API.

Definition at line 154 of file layer-list.h.

Referenced by SetLayerDepths().

LayerContainer Dali::Internal::LayerList::mLayers
private
SceneGraph::UpdateManager& Dali::Internal::LayerList::mUpdateManager
private

Definition at line 152 of file layer-list.h.

Referenced by SetLayerDepths().


The documentation for this class was generated from the following files:
Dali Docs Home
Read more about Dali