Dali 3D User Interface Engine
layer-list.h
Go to the documentation of this file.
1 #ifndef __DALI_INTERNAL_LAYER_LIST_H__
2 #define __DALI_INTERNAL_LAYER_LIST_H__
3 
4 /*
5  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20 
21 // INTERNAL INCLUDES
23 
24 namespace Dali
25 {
26 
27 namespace Internal
28 {
29 
30 namespace SceneGraph
31 {
32 class UpdateManager;
33 }
34 
35 class Layer;
36 
43 class LayerList
44 {
45 public:
46 
52  static LayerList* New( SceneGraph::UpdateManager& updateManager, bool systemLevel );
53 
57  ~LayerList();
58 
63  unsigned int GetLayerCount() const;
64 
71  Layer* GetLayer( unsigned int depth ) const;
72 
77  unsigned int GetDepth( const Layer* layer ) const;
78 
83  void RegisterLayer( Layer& layer );
84 
88  void UnregisterLayer(Layer& layer);
89 
94  void RaiseLayer(Layer& layer);
95 
100  void LowerLayer(Layer& layer);
101 
107  void RaiseLayerToTop( const Layer& layer );
108 
114  void LowerLayerToBottom( const Layer& layer );
115 
123  void MoveLayerAbove( const Layer& layer, const Layer& target );
124 
132  void MoveLayerBelow( const Layer& layer, const Layer& target );
133 
134 private:
135 
141  LayerList( SceneGraph::UpdateManager& updateManager, bool systemLevel );
142 
148  void SetLayerDepths();
149 
150 private:
151 
153 
155 
156  typedef std::vector<Layer*> LayerContainer;
157 
158  // Layers are not owned by the LayerList.
159  // Each layer is responsible for registering & unregistering before the end of its life-time.
161 };
162 
163 } // namespace Internal
164 
165 } // namespace Dali
166 
167 #endif // __DALI_INTERNAL_LAYER_LIST_H__
Dali Docs Home
Read more about Dali