Text segmentation interface 60/33860/8
authorVictor Cebollada <v.cebollada@samsung.com>
Thu, 15 Jan 2015 17:11:22 +0000 (17:11 +0000)
committerVictor Cebollada <v.cebollada@samsung.com>
Tue, 3 Mar 2015 16:16:29 +0000 (16:16 +0000)
Change-Id: Ic886d7192f6552f8a16c4722cf516c2082c3d0ac
Signed-off-by: Victor Cebollada <v.cebollada@samsung.com>
dali-toolkit/public-api/text/segmentation.cpp
dali-toolkit/public-api/text/segmentation.h

index db4e7ae..91a2e5d 100644 (file)
@@ -48,6 +48,13 @@ void SetLineBreakInfo( const Vector<Character>& text,
                                                               lineBreakInfo.Begin() );
 }
 
+void ReplaceLineBreakInfo( LogicalModel& model,
+                           CharacterIndex characterIndex,
+                           Length numberOfCharactersToRemove,
+                           Length numberOfCharactersToInsert )
+{
+}
+
 void SetWordBreakInfo( const Vector<Character>& text,
                        Vector<WordBreakInfo>& wordBreakInfo )
 {
@@ -66,6 +73,13 @@ void SetWordBreakInfo( const Vector<Character>& text,
                                                               wordBreakInfo.Begin() );
 }
 
+void ReplaceWordBreakInfo( LogicalModel& model,
+                           CharacterIndex characterIndex,
+                           Length numberOfCharactersToRemove,
+                           Length numberOfCharactersToInsert )
+{
+}
+
 } // namespace Text
 
 } // namespace Toolkit
index fa95ff9..1c0c489 100644 (file)
@@ -31,6 +31,8 @@ namespace Toolkit
 namespace Text
 {
 
+class LogicalModel;
+
 /**
  * Sets line break info.
  *
@@ -47,6 +49,24 @@ void SetLineBreakInfo( const Vector<Character>& text,
                        Vector<LineBreakInfo>& 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 );
+
+/**
  * Sets word break info.
  *
  * - 0 is a WORD_BREAK.    Text can be broken into a new word.
@@ -58,6 +78,24 @@ void SetLineBreakInfo( const Vector<Character>& text,
 void SetWordBreakInfo( const Vector<Character>& text,
                        Vector<WordBreakInfo>& 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 );
+
 } // namespace Text
 
 } // namespace Toolkit