-#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) 2022 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.
#include <string>
// INTERNAL INCLUDES
+#include <dali-toolkit/internal/text/anchor.h>
+#include <dali-toolkit/internal/text/bounded-paragraph-run.h>
+#include <dali-toolkit/internal/text/character-spacing-character-run.h>
#include <dali-toolkit/internal/text/color-run.h>
+#include <dali-toolkit/internal/text/embedded-item.h>
+#include <dali-toolkit/internal/text/font-description-run.h>
+#include <dali-toolkit/internal/text/strikethrough-character-run.h>
+#include <dali-toolkit/internal/text/underlined-character-run.h>
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( Vector<ColorRun>& colorRuns )
- : colorRuns( colorRuns ),
+ MarkupProcessData(Vector<ColorRun>& colorRuns,
+ Vector<FontDescriptionRun>& fontRuns,
+ Vector<EmbeddedItem>& items,
+ Vector<Anchor>& anchors,
+ Vector<UnderlinedCharacterRun>& underlinedCharacterRuns,
+ Vector<ColorRun>& backgroundColorRuns,
+ Vector<StrikethroughCharacterRun>& strikethroughCharacterRuns,
+ Vector<BoundedParagraphRun>& boundedParagraphRuns,
+ Vector<CharacterSpacingCharacterRun>& characterSpacingCharacterRuns)
+ : colorRuns(colorRuns),
+ fontRuns(fontRuns),
+ items(items),
+ anchors(anchors),
+ underlinedCharacterRuns(underlinedCharacterRuns),
+ backgroundColorRuns(backgroundColorRuns),
+ strikethroughCharacterRuns(strikethroughCharacterRuns),
+ boundedParagraphRuns(boundedParagraphRuns),
+ characterSpacingCharacterRuns(characterSpacingCharacterRuns),
markupProcessedText()
- {}
+ {
+ }
- Vector<ColorRun>& colorRuns;
+ Vector<ColorRun>& colorRuns; ///< The color runs.
+ Vector<FontDescriptionRun>& fontRuns; ///< The font description runs.
+ Vector<EmbeddedItem>& items; ///< The embedded items.
+ Vector<Anchor>& anchors; ///< The anchors.
+ Vector<UnderlinedCharacterRun>& underlinedCharacterRuns; ///< The underlined character runs.
+ Vector<ColorRun>& backgroundColorRuns; ///< The background color runs.
+ Vector<StrikethroughCharacterRun>& strikethroughCharacterRuns; ///< The strikethrough character runs.
+ Vector<BoundedParagraphRun>& boundedParagraphRuns; ///< The bounded paragraph runs
+ Vector<CharacterSpacingCharacterRun>& characterSpacingCharacterRuns; ///< The character-spacing runs
- std::string markupProcessedText;
+ std::string markupProcessedText; ///< The mark-up string.
};
/**
* @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
} // namespace Dali
-#endif // __DALI_TOOLKIT_TEXT_MARKUP_PROCESSOR_H__
+#endif // DALI_TOOLKIT_TEXT_MARKUP_PROCESSOR_H