X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Fmarkup-processor.h;h=e84b892afcb3e68d9743500bef871b44040cd3af;hp=86ec1a6fec489226b922f7a6129b8b8e8625d97f;hb=00758f1301dd0bfbf6dc87659a6db9d0ba2c6816;hpb=69669144df0027a66725f167fd1b99e12b8860ad diff --git a/dali-toolkit/internal/text/markup-processor.h b/dali-toolkit/internal/text/markup-processor.h index 86ec1a6..e84b892 100644 --- a/dali-toolkit/internal/text/markup-processor.h +++ b/dali-toolkit/internal/text/markup-processor.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_TEXT_MARKUP_PROCESSOR_H__ -#define __DALI_TOOLKIT_TEXT_MARKUP_PROCESSOR_H__ +#ifndef DALI_TOOLKIT_TEXT_MARKUP_PROCESSOR_H +#define DALI_TOOLKIT_TEXT_MARKUP_PROCESSOR_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. @@ -19,27 +19,50 @@ */ // EXTERNAL INCLUDES +#include #include +// INTERNAL INCLUDES +#include +#include +#include +#include +#include + namespace Dali { - namespace Toolkit { - namespace Text { - /** * @brief Keeps the plain text and references to vectors from the model which stores runs with text styles. */ struct MarkupProcessData { - MarkupProcessData() - : markupProcessedText() - {} + MarkupProcessData(Vector& colorRuns, + Vector& fontRuns, + Vector& items, + Vector& anchors, + Vector& underlinedCharacterRuns, + Vector& backgroundColorRuns) + : colorRuns(colorRuns), + fontRuns(fontRuns), + items(items), + anchors(anchors), + underlinedCharacterRuns(underlinedCharacterRuns), + backgroundColorRuns(backgroundColorRuns), + markupProcessedText() + { + } - std::string markupProcessedText; + Vector& colorRuns; ///< The color runs. + Vector& fontRuns; ///< The font description runs. + Vector& items; ///< The embedded items. + Vector& anchors; ///< The anchors. + Vector& underlinedCharacterRuns; ///< The underlined character runs. + Vector& backgroundColorRuns; ///< The background color runs. + std::string markupProcessedText; ///< The mark-up string. }; /** @@ -48,7 +71,7 @@ struct MarkupProcessData * @param[in] markupString The mark-up string. * @param[out] markupProcessData The plain text and the style. */ -void ProcessMarkupString( const std::string& markupString, MarkupProcessData& markupProcessData ); +void ProcessMarkupString(const std::string& markupString, MarkupProcessData& markupProcessData); } // namespace Text @@ -56,4 +79,4 @@ void ProcessMarkupString( const std::string& markupString, MarkupProcessData& ma } // namespace Dali -#endif // __DALI_TOOLKIT_TEXT_MARKUP_PROCESSOR_H__ +#endif // DALI_TOOLKIT_TEXT_MARKUP_PROCESSOR_H