Added some LayoutEngine skeleton code
[platform/core/uifw/dali-toolkit.git] / base / dali-toolkit / internal / controls / relayout-helper.h
1 #ifndef __DALI_TOOLKIT_INTERNAL_RELAYOUT_HELPER_H__
2 #define __DALI_TOOLKIT_INTERNAL_RELAYOUT_HELPER_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 // EXTERNAL INCLUDES
22 #include <dali/public-api/actors/actor.h>
23 #include <dali/public-api/math/vector3.h>
24
25 namespace Dali
26 {
27
28 namespace Toolkit
29 {
30
31 namespace Internal
32 {
33
34 namespace RelayoutHelper
35 {
36
37 /**
38  * Gets the natural size of the given actor.
39  *
40  * If the actor is a Control, it returns the natural size of the Control. @see Control::GetNaturalSize()
41  * If the actor is an ImageActor, it returns the size of the image.
42  * If the actor is a TextActor, it returns the size of the text. @see Font::MeasureText()
43  * Otherwise it returns the actor's current size. @see Actor::GetCurrentSize()
44  *
45  * @param[in] actor The actor.
46  *
47  * @return The natural size.
48  */
49 Vector3 GetNaturalSize( Actor actor );
50
51 /**
52  * Gets the actor's height for the given width.
53  *
54  * If the actor is a Control it returns the height for width. @see Control::GetHeightForWidth()
55  * If the actor is an ImageActor or a TextActor it scales the natural size to fit the given width. @see GetNaturalSize()
56  * Otherwise it returns the actor's current size. @see Actor::GetCurrentSize()
57  *
58  * @param[in] actor The actor.
59  * @param[in] width The width.
60  *
61  * @return The actor's height for given width.
62  */
63 float GetHeightForWidth( Actor actor, float width );
64
65 } // namespace RelayoutHelper
66
67 } // namespace Internal
68
69 } // namespace Toolkit
70
71 } // namespace Dali
72
73 #endif // __DALI_TOOLKIT_INTERNAL_RELAYOUT_HELPER_H__