X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Ftext-view%2Ftext-view-processor-helper-functions.h;h=c543e32b55ddf1b1c2d63a478dbbb8b193f04668;hp=1798758dea0ffc0682020da57e2e2faa48d10238;hb=2ddfbb9e23a7c3fc30e604236c41e0ef6d2ed6a2;hpb=e2eda444afbe82e9591fe198eef339227f90a616 diff --git a/dali-toolkit/internal/controls/text-view/text-view-processor-helper-functions.h b/dali-toolkit/internal/controls/text-view/text-view-processor-helper-functions.h index 1798758..c543e32 100644 --- a/dali-toolkit/internal/controls/text-view/text-view-processor-helper-functions.h +++ b/dali-toolkit/internal/controls/text-view/text-view-processor-helper-functions.h @@ -1,24 +1,26 @@ #ifndef __DALI_TOOLKIT_INTERNAL_TEXT_VIEW_PROCESSOR_HELPER_FUNCTIONS_H__ #define __DALI_TOOLKIT_INTERNAL_TEXT_VIEW_PROCESSOR_HELPER_FUNCTIONS_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. -// +/* + * 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. + * + */ // INTERNAL INCLUDES -#include "text-view-processor-types.h" +#include +#include namespace Dali { @@ -44,9 +46,9 @@ enum SizeGrowType }; /** - * Updates the size of a group of characters, word, group of words, line or the whole text with a given size. + * Updates the size of a character, word, line or the whole text with a given size. * - * For group of characters, words, groups of words and lines the new height will be the maximum of both sizes + * For characters, words, and lines the new height will be the maximum of both sizes * and the new width will be the sum of both. * * For the whole text, the new height will be the sum of both and the new width the max of both. @@ -54,7 +56,7 @@ enum SizeGrowType * The \e type parameter speficies which type of update is required. * * @param[in,out] size1 The current size to be updated. - * @param[in] size2 The size of a group of characters, word, group of words or a line. + * @param[in] size2 The size of a character, word, or a line. * @param[in] type Type of update. */ void UpdateSize( Size& size1, const Size& size2, SizeGrowType type = GrowWidth ); @@ -69,16 +71,17 @@ void UpdateSize( Size& size1, const Size& size2, SizeGrowType type = GrowWidth ) TextSeparatorType GetTextSeparatorType( const Character& character ); /** - * Choose a suitable font family name for the given styled text. + * Choose a suitable font family name for the given character. * - * It may modify the text-style of the given text by setting a suitable font-family. + * It may modify the text-style of the given character by setting a suitable font-family. * - * @param[in,out] text Text with style. + * @param[in] character The character. + * @param[in,out] style The style of the character. */ -void ChooseFontFamilyName( MarkupProcessor::StyledText& text ); +void ChooseFontFamilyName( const Character& character, TextStyle& style ); /** - * Retrieves the line, word group, word and character indices for the given global character's index. + * Retrieves the line, word and character indices for the given global character's index. * * i.e. The retrieved indices for the character 18 (j) for the following text would be: 2, 0, 2, 0 * @@ -88,8 +91,8 @@ void ChooseFontFamilyName( MarkupProcessor::StyledText& text ); * m n o p * * @param[in] index The global character index. - * @param[in] textLayoutInfo Contains info about the number of characters per word, group and line. - * @param[out] indices Index to the line, group of words, word and character within the word where the given character is located. + * @param[in] textLayoutInfo Contains info about the number of characters per word, and line. + * @param[out] indices Index to the line, word and character within the word where the given character is located. */ void GetIndicesFromGlobalCharacterIndex( std::size_t index, const TextLayoutInfo& textLayoutInfo,