1 #ifndef __DALI_TOOLKIT_INTERNAL_RELAYOUT_HELPER_H__
2 #define __DALI_TOOLKIT_INTERNAL_RELAYOUT_HELPER_H__
5 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali/public-api/actors/actor.h>
23 #include <dali/public-api/math/vector3.h>
34 namespace RelayoutHelper
38 * Gets the natural size of the given actor.
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()
45 * @param[in] actor The actor.
47 * @return The natural size.
49 Vector3 GetNaturalSize( Actor actor );
52 * Gets the actor's height for the given width.
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()
58 * @param[in] actor The actor.
59 * @param[in] width The width.
61 * @return The actor's height for given width.
63 float GetHeightForWidth( Actor actor, float width );
65 } // namespace RelayoutHelper
67 } // namespace Internal
69 } // namespace Toolkit
73 #endif // __DALI_TOOLKIT_INTERNAL_RELAYOUT_HELPER_H__