X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Fsegmentation.h;h=305329f21c4b3998dc4f08f443b393df405bd0f7;hb=75fe6c4a2f784bd52ccf8eb16049317825338a6e;hp=949b1c9e9e3381db811824bde317ba03364d32e9;hpb=cd7d41bc8e0a0816da28401207091344fbbe0b2c;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/segmentation.h b/dali-toolkit/internal/text/segmentation.h index 949b1c9..305329f 100644 --- a/dali-toolkit/internal/text/segmentation.h +++ b/dali-toolkit/internal/text/segmentation.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_TEXT_SEGMENTATION_H__ -#define __DALI_TOOLKIT_TEXT_SEGMENTATION_H__ +#ifndef DALI_TOOLKIT_TEXT_SEGMENTATION_H +#define DALI_TOOLKIT_TEXT_SEGMENTATION_H /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 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. @@ -26,13 +26,10 @@ namespace Dali { - namespace Toolkit { - namespace Text { - class LogicalModel; /** @@ -45,28 +42,14 @@ class LogicalModel; * - 2 is a LINE_NO_BREAK. Text can't be broken into a new line. * * @param[in] text Vector of UTF-32 characters. + * @param[in] startIndex The character from where the break info is set. + * @param[in] numberOfCharacters The number of characters. * @param[out] lineBreakInfo The line break info */ -void SetLineBreakInfo( const Vector& text, - Vector& lineBreakInfo ); - -/** - * Replaces line break info. - * - * @pre The @p model needs to have a text set. - * - * If the @p numberOfCharactersToRemove is zero, this operation is like an insert. - * If the @p numberOfCharactersToInsert is zero, this operation is like a remove. - * - * @param[in,out] model The text's logical model. - * @param[in] characterIndex Index to the first character. - * @param[in] numberOfCharactersToRemove The number of characters removed from the text. - * @param[in] numberOfCharactersToInsert The number of characters inserted in the text. - */ -void ReplaceLineBreakInfo( LogicalModel& model, - CharacterIndex characterIndex, - Length numberOfCharactersToRemove, - Length numberOfCharactersToInsert ); +void SetLineBreakInfo(const Vector& text, + CharacterIndex startIndex, + Length numberOfCharacters, + Vector& lineBreakInfo); /** * Sets word break info. @@ -75,28 +58,14 @@ void ReplaceLineBreakInfo( LogicalModel& model, * - 1 is a WORD_NO_BREAK. Text can't be broken into a new word. * * @param[in] text Vector of UTF-32 characters. + * @param[in] startIndex The character from where the break info is set. + * @param[in] numberOfCharacters The number of characters. * @param[out] wordBreakInfo The word break info. */ -void SetWordBreakInfo( const Vector& text, - Vector& wordBreakInfo ); - -/** - * Replaces word break info. - * - * @pre The @p model needs to have a text set. - * - * If the @p numberOfCharactersToRemove is zero, this operation is like an insert. - * If the @p numberOfCharactersToInsert is zero, this operation is like a remove. - * - * @param[in,out] model The text's logical model. - * @param[in] characterIndex Index to the first character. - * @param[in] numberOfCharactersToRemove The number of characters removed from the text. - * @param[in] numberOfCharactersToInsert The number of characters inserted in the text. - */ -void ReplaceWordBreakInfo( LogicalModel& model, - CharacterIndex characterIndex, - Length numberOfCharactersToRemove, - Length numberOfCharactersToInsert ); +void SetWordBreakInfo(const Vector& text, + CharacterIndex startIndex, + Length numberOfCharacters, + Vector& wordBreakInfo); } // namespace Text @@ -104,4 +73,4 @@ void ReplaceWordBreakInfo( LogicalModel& model, } // namespace Dali -#endif // __DALI_TOOLKIT_TEXT_SEGMENTATION_H__ +#endif // DALI_TOOLKIT_TEXT_SEGMENTATION_H