Fix key event propagation in text controller
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / markup-processor.h
index 0c43300..f751843 100644 (file)
@@ -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) 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,
-                   Vector<FontDescriptionRun>& fontRuns )
-  : colorRuns( colorRuns ),
-    fontRuns( fontRuns ),
+  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;           ///< The color runs.
-  Vector<FontDescriptionRun>& fontRuns;            ///< The font description runs.
+  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; ///< The mark-up string.
+  std::string markupProcessedText; ///< The mark-up string.
 };
 
 /**
@@ -59,7 +84,7 @@ MarkupProcessData( Vector<ColorRun>& colorRuns,
  * @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
 
@@ -67,4 +92,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