X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Frelayout-helper.h;h=c7f2372592e2b1d4fe971025f6fc7bb92c54795b;hb=d011049f576aaf534d52180829398b917e08de04;hp=1f61406f87fb98875f331be7b59144ec573ae87b;hpb=e2eda444afbe82e9591fe198eef339227f90a616;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/controls/relayout-helper.h b/dali-toolkit/internal/controls/relayout-helper.h index 1f61406..c7f2372 100644 --- a/dali-toolkit/internal/controls/relayout-helper.h +++ b/dali-toolkit/internal/controls/relayout-helper.h @@ -1,25 +1,26 @@ #ifndef __DALI_TOOLKIT_INTERNAL_RELAYOUT_HELPER_H__ #define __DALI_TOOLKIT_INTERNAL_RELAYOUT_HELPER_H__ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Flora License, Version 1.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://floralicense.org/license/ -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an AS IS BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// INTERNAL INCLUDES -#include +/* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +// EXTERNAL INCLUDES +#include +#include namespace Dali { @@ -34,12 +35,30 @@ namespace RelayoutHelper { /** + * Gets the natural size of the given actor. * + * If the actor is a Control, it returns the natural size of the Control. @see Control::GetNaturalSize() + * If the actor is an ImageActor, it returns the size of the image. + * If the actor is a TextActor, it returns the size of the text. @see Font::MeasureText() + * Otherwise it returns the actor's current size. @see Actor::GetCurrentSize() + * + * @param[in] actor The actor. + * + * @return The natural size. */ Vector3 GetNaturalSize( Actor actor ); /** + * Gets the actor's height for the given width. + * + * If the actor is a Control it returns the height for width. @see Control::GetHeightForWidth() + * If the actor is an ImageActor or a TextActor it scales the natural size to fit the given width. @see GetNaturalSize() + * Otherwise it returns the actor's current size. @see Actor::GetCurrentSize() + * + * @param[in] actor The actor. + * @param[in] width The width. * + * @return The actor's height for given width. */ float GetHeightForWidth( Actor actor, float width );