Merge "Text segmentation interface" into new_text
authorPaul Wisbey <p.wisbey@samsung.com>
Wed, 4 Mar 2015 10:34:40 +0000 (02:34 -0800)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Wed, 4 Mar 2015 10:34:41 +0000 (02:34 -0800)
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