TextView - Merges the TextActor initialization and update in one function.
[platform/core/uifw/dali-toolkit.git] / base / dali-toolkit / internal / controls / text-view / relayout-utilities.h
index ad288ce..79fdc36 100644 (file)
@@ -87,7 +87,7 @@ struct RelayoutParameters
   Size                               mLineSize;                 ///< Current line's size.
   Size                               mWordSize;                 ///< Current word's size.
   Size                               mCharacterSize;            ///< Current character's size.
-  TextViewProcessor::TextInfoIndices mIndices;                  ///< Current indices to line, group of words, word and character.
+  TextViewProcessor::TextInfoIndices mIndices;                  ///< Current indices to line, word and character.
   std::size_t                        mCharacterGlobalIndex;     ///< Index to a single character within the whole text.
   bool                               mIsFirstCharacter:1;       ///< Whether is the first character of the whole text.
   bool                               mIsFirstCharacterOfWord:1; ///< Whether is the first character of the word.
@@ -251,7 +251,7 @@ struct SubLineLayoutInfo
  * Calculates the layout info of the portion of the line which fits on the text-view width.
  *
  * @param[in] parentWidth Text-view width
- * @param[in] indices Indices to the word group, word and character.
+ * @param[in] indices Indices to the word and character.
  * @param[in] lineLayoutInfo Layout info for the line.
  * @param[in] splitPolicy Whether a line is wraped by word, by character or by word and character.
  * @param[in] shrinkFactor Shrink factor used.
@@ -342,13 +342,14 @@ void CalculateBearing( TextViewProcessor::CharacterLayoutInfo& characterLayoutIn
  * This table is used to pass the size, the position and other layout info to other controls/actors.
  *
  * @param[in,out] minMaxXY The boundary box of the whole text.
+ * @param[in,out] wordLayoutInfo Word layout info.
  * @param[in,out] characterLayoutInfo Character layout info.
+ * @param[in,out] relayoutParameters Temporary layout parameters.
  * @param[in,out] relayoutData The text-view's data structures.
  */
 void UpdateLayoutInfoTable( Vector4& minMaxXY,
-                            TextViewProcessor::WordGroupLayoutInfo& wordGroupLayoutInfo,
                             TextViewProcessor::WordLayoutInfo& wordLayoutInfo,
-                            TextViewProcessor::CharacterLayoutInfo& characterGroupLayoutInfo,
+                            TextViewProcessor::CharacterLayoutInfo& characterLayoutInfo,
                             RelayoutParameters& relayoutParameters,
                             TextView::RelayoutData& relayoutData );
 
@@ -435,13 +436,16 @@ void UpdateVisibility( const TextView::LayoutParameters& layoutParameters,
                        TextView::RelayoutData& relayoutData );
 
 /**
- * Traverse all text updating text-actor handles with new size, position, ...
+ * Traverse all text initializing all non initialized text-actor handles
+ * and updating text-actor handles with new size, position, ...
  *
  * @param[in] visualParameters Some visual parameters (fade, sort modifier and blending).
  * @param[in,out] relayoutData Natural size (metrics), layout, text-actor info.
+ * @param[in] createGlyphActors Whether to create RenderableActor for text-actors or emojis.
  */
 void UpdateTextActorInfo( const TextView::VisualParameters& visualParameters,
-                          TextView::RelayoutData& relayoutData );
+                          TextView::RelayoutData& relayoutData,
+                          bool createGlyphActors );
 
 /**
  * Traverses the whole text and for each piece of underlined text,
@@ -469,14 +473,12 @@ void RemoveGlyphActors( Actor textView,
                         const std::vector<RenderableActor>& glyphActors );
 
 /**
- * Inserts the text-actors into the text-view and/or the text-actor's list.
+ * Inserts the text-actors into the text-view and the text-actor's list.
  *
- * @param[in] relayoutOperationMask Whether the text-actors should be added into the text-view, the list of text-actors or in both.
  * @param[in,out] textView The text-view.
  * @param[in,out] relayoutData The text-view's data structures.
  */
-void InsertToTextView( TextView::RelayoutOperationMask relayoutOperationMask,
-                       Actor textView,
+void InsertToTextView( Actor textView,
                        TextView::RelayoutData& relayoutData );
 
 /**