Line wrap mode property is added. 71/139571/5
authorJinho, Lee <jeano.lee@samsung.com>
Wed, 19 Jul 2017 06:39:45 +0000 (15:39 +0900)
committerJinho, Lee <jeano.lee@samsung.com>
Thu, 20 Jul 2017 11:59:02 +0000 (20:59 +0900)
When a text line is too long and needs to be moved to the next line, it decides whether to move text to next line word by word or character by character.

Change-Id: I502327ab7f7680570b7c3712c7e6f519c92d05a4

15 files changed:
automated-tests/src/dali-toolkit-internal/dali-toolkit-test-utils/toolkit-text-utils.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Layout.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp
dali-toolkit/devel-api/controls/text-controls/text-editor-devel.h
dali-toolkit/devel-api/controls/text-controls/text-label-devel.h
dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp
dali-toolkit/internal/controls/text-controls/text-label-impl.cpp
dali-toolkit/internal/text/layouts/layout-engine.cpp
dali-toolkit/internal/text/layouts/layout-parameters.h
dali-toolkit/internal/text/layouts/layout-wrap-mode.h [new file with mode: 0644]
dali-toolkit/internal/text/text-controller.cpp
dali-toolkit/internal/text/text-controller.h
dali-toolkit/internal/text/text-model.cpp
dali-toolkit/internal/text/text-model.h

index 74ac7b5b9a07bd456d7a4dbdf108322d509dac90..43fc5ac32bc17698dd209e5d506d5627a3e2648f 100644 (file)
@@ -281,7 +281,8 @@ void CreateTextModel( const std::string& text,
                                        charactersToGlyph.Begin(),
                                        glyphsPerCharacter.Begin(),
                                        numberOfGlyphs,
-                                       Layout::HORIZONTAL_ALIGN_BEGIN );
+                                       Layout::HORIZONTAL_ALIGN_BEGIN,
+                                       Layout::LineWrap::WORD );
 
   Vector<LineRun>& lines = visualModel->mLines;
 
index 5f0885357e1ebe4f542394a8014cd99b4af5736a..3f6a9a62b64ad58e46f431e6cc563b54137abf41 100644 (file)
@@ -169,7 +169,8 @@ bool LayoutTextTest( const LayoutTextData& data )
                                        visualModel->mCharactersToGlyph.Begin(),
                                        visualModel->mGlyphsPerCharacter.Begin(),
                                        totalNumberOfGlyphs,
-                                       Layout::HORIZONTAL_ALIGN_BEGIN );
+                                       Layout::HORIZONTAL_ALIGN_BEGIN,
+                                       Layout::LineWrap::WORD );
 
   layoutParameters.isLastNewParagraph = isLastNewParagraph;
 
@@ -384,7 +385,8 @@ bool ReLayoutRightToLeftLinesTest( const ReLayoutRightToLeftLinesData& data )
                                        visualModel->mCharactersToGlyph.Begin(),
                                        visualModel->mGlyphsPerCharacter.Begin(),
                                        visualModel->mGlyphs.Count(),
-                                       Layout::HORIZONTAL_ALIGN_BEGIN  );
+                                       Layout::HORIZONTAL_ALIGN_BEGIN,
+                                       Layout::LineWrap::WORD );
 
   layoutParameters.numberOfBidirectionalInfoRuns = logicalModel->mBidirectionalLineInfo.Count();
   layoutParameters.lineBidirectionalInfoRunsBuffer = logicalModel->mBidirectionalLineInfo.Begin();
index 70e229ca10ca38e1b37af4c545aa97cb0a5be149..cca54144196e5b0fb5294f341f75ca5779e02d55 100644 (file)
@@ -2187,3 +2187,37 @@ int utcDaliTextEditorScrollStateChangedSignalTest(void)
 
   END_TEST;
 }
+int UtcDaliToolkitTextEditorTextWarpMode(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextEditorTextWarpMode");
+
+  int lineCount =0 ;
+
+  TextEditor editor = TextEditor::New();
+  editor.SetSize( 150.0f, 300.f );
+  editor.SetProperty( TextEditor::Property::TEXT, "Hello world Hello world" );
+
+  Stage::GetCurrent().Add( editor );
+
+  editor.SetProperty( DevelTextEditor::Property::LINE_WRAP_MODE, "WORD" );
+
+  application.SendNotification();
+  application.Render();
+
+  lineCount =  editor.GetProperty<int>( DevelTextEditor::Property::LINE_COUNT );
+  DALI_TEST_EQUALS( lineCount, 4, TEST_LOCATION );
+
+
+
+  editor.SetProperty( DevelTextEditor::Property::LINE_WRAP_MODE, "CHARACTER" );
+
+  application.SendNotification();
+  application.Render();
+
+
+  lineCount =  editor.GetProperty<int>( DevelTextEditor::Property::LINE_COUNT );
+  DALI_TEST_EQUALS( lineCount, 3, TEST_LOCATION );
+
+  END_TEST;
+}
index 4e1fd0f6b9028b19e8d463404a839163359b7101..6972fb1b10f9515a7f2a33591958abcaa6ee0f56 100644 (file)
@@ -920,3 +920,42 @@ int UtcDaliToolkitTextlabelEllipsis(void)
 
   END_TEST;
 }
+
+int UtcDaliToolkitTextlabelTextWarpMode(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextlabelTextWarpMode");
+
+  int lineCount =0 ;
+
+  TextLabel label = TextLabel::New();
+  label.SetSize( 300.0f, 300.f );
+  label.SetProperty( TextLabel::Property::TEXT, "Hello world Hello world" );
+  label.SetProperty( TextLabel::Property::MULTI_LINE, true );
+
+
+
+  //label.SetProperty( TextLabel::Property::POINT_SIZE, 18 );
+  Stage::GetCurrent().Add( label );
+
+  label.SetProperty( DevelTextLabel::Property::LINE_WRAP_MODE, "WRAP_MODE_WORD" );
+
+  application.SendNotification();
+  application.Render();
+
+  lineCount =  label.GetProperty<int>( DevelTextLabel::Property::LINE_COUNT );
+  DALI_TEST_EQUALS( lineCount, 4, TEST_LOCATION );
+
+
+
+  label.SetProperty( DevelTextLabel::Property::LINE_WRAP_MODE, "WRAP_MODE_CHARACTER" );
+
+  application.SendNotification();
+  application.Render();
+
+
+  lineCount =  label.GetProperty<int>( DevelTextLabel::Property::LINE_COUNT );
+  DALI_TEST_EQUALS( lineCount, 3, TEST_LOCATION );
+
+  END_TEST;
+}
index e09207cac446c8ae865012a7cf7f7ef8e062404f..e76a4435bad94d6ec8692ae03a6662ee60174054 100644 (file)
@@ -160,7 +160,13 @@ namespace Property
        *
        * @details name "placeholder", type MAP
        */
-      PLACEHOLDER
+      PLACEHOLDER,
+
+      /**
+       * @brief line wrap mode when the text lines over layout width.
+       * @details name "lineWrapMode", type string.
+       */
+      LINE_WRAP_MODE
   };
 } // namespace Property
 
index 2721dc122ae84c259bb839a53f0cb4b1520cfcc6..2b53fc54e2bea76eaa773eee2e4bff28695c14fd 100644 (file)
@@ -92,7 +92,13 @@ namespace Property
        * @details name "lineCount", type int
        * @node this property is read-only.
        */
-      LINE_COUNT = OUTLINE + 5
+      LINE_COUNT = OUTLINE + 5,
+
+      /**
+       * @brief line wrap mode when the text lines over layout width.
+       * @details name "lineWrapMode", type string.
+       */
+      LINE_WRAP_MODE = OUTLINE + 6
   };
 } // namespace Property
 
index 1e4d168491f1c7503781d420ea55e8c205957abf..d340cf42573e17e21414a62f9748e13c53e3dc73 100644 (file)
@@ -76,6 +76,14 @@ const Scripting::StringEnum HORIZONTAL_ALIGNMENT_STRING_TABLE[] =
 };
 const unsigned int HORIZONTAL_ALIGNMENT_STRING_TABLE_COUNT = sizeof( HORIZONTAL_ALIGNMENT_STRING_TABLE ) / sizeof( HORIZONTAL_ALIGNMENT_STRING_TABLE[0] );
 
+
+const Scripting::StringEnum LINE_WRAP_MODE_STRING_TABLE[] =
+{
+  { "WORD",      Toolkit::Text::Layout::LineWrap::WORD      },
+  { "CHARACTER", Toolkit::Text::Layout::LineWrap::CHARACTER }
+};
+const unsigned int LINE_WRAP_MODE_STRING_TABLE_COUNT = sizeof( LINE_WRAP_MODE_STRING_TABLE ) / sizeof( LINE_WRAP_MODE_STRING_TABLE[0] );
+
 const char* const SCROLL_BAR_POSITION("sourcePosition");
 const char* const SCROLL_BAR_POSITION_MIN("sourcePositionMin");
 const char* const SCROLL_BAR_POSITION_MAX("sourcePositionMax");
@@ -141,6 +149,7 @@ DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextEditor, "placeholderText",
 DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextEditor, "placeholderTextColor",           VECTOR4,   PLACEHOLDER_TEXT_COLOR               )
 DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextEditor, "enableSelection",                BOOLEAN,   ENABLE_SELECTION                     )
 DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextEditor, "placeholder",                    MAP,       PLACEHOLDER                          )
+DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextEditor, "lineWrapMode",                   STRING,    LINE_WRAP_MODE                       )
 
 DALI_SIGNAL_REGISTRATION( Toolkit, TextEditor, "textChanged",        SIGNAL_TEXT_CHANGED )
 DALI_SIGNAL_REGISTRATION( Toolkit, TextEditor, "inputStyleChanged",  SIGNAL_INPUT_STYLE_CHANGED )
@@ -712,6 +721,21 @@ void TextEditor::SetProperty( BaseObject* object, Property::Index index, const P
         }
         break;
       }
+      case Toolkit::DevelTextEditor::Property::LINE_WRAP_MODE:
+      {
+        const std::string& wrapModeStr = value.Get< std::string >();
+        DALI_LOG_INFO( gLogFilter, Debug::General, "TextEditor %p LINE_WRAP_MODE %s\n", impl.mController.Get(), wrapModeStr.c_str() );
+
+        Layout::LineWrap::Mode lineWrapMode( Layout::LineWrap::WORD );
+        if( Scripting::GetEnumeration< Layout::LineWrap::Mode >( wrapModeStr.c_str(),
+                                                                 LINE_WRAP_MODE_STRING_TABLE,
+                                                                 LINE_WRAP_MODE_STRING_TABLE_COUNT,
+                                                                 lineWrapMode ) )
+        {
+          impl.mController->SetLineWrapMode( lineWrapMode );
+        }
+        break;
+      }
     } // switch
   } // texteditor
 }
@@ -1088,6 +1112,13 @@ Property::Value TextEditor::GetProperty( BaseObject* object, Property::Index ind
         value = map;
         break;
       }
+      case Toolkit::DevelTextEditor::Property::LINE_WRAP_MODE:
+      {
+        if( impl.mController )
+        {
+          value = impl.mController->GetLineWrapMode();
+        }
+      }
     } //switch
   }
 
index 784a5c89a937cc88fef72cf3fda8d61edc18c9b4..f484bbf35f2980f9d64c41424bd8c1c7225845ea 100644 (file)
@@ -81,6 +81,13 @@ const Scripting::StringEnum VERTICAL_ALIGNMENT_STRING_TABLE[] =
 };
 const unsigned int VERTICAL_ALIGNMENT_STRING_TABLE_COUNT = sizeof( VERTICAL_ALIGNMENT_STRING_TABLE ) / sizeof( VERTICAL_ALIGNMENT_STRING_TABLE[0] );
 
+const Scripting::StringEnum LINE_WRAP_MODE_STRING_TABLE[] =
+{
+  { "WRAP_MODE_WORD",      Toolkit::Text::Layout::LineWrap::WORD  },
+  { "WRAP_MODE_CHARACTER", Toolkit::Text::Layout::LineWrap::CHARACTER }
+};
+const unsigned int LINE_WRAP_MODE_STRING_TABLE_COUNT = sizeof( LINE_WRAP_MODE_STRING_TABLE ) / sizeof( LINE_WRAP_MODE_STRING_TABLE[0] );
+
 // Type registration
 BaseHandle Create()
 {
@@ -119,6 +126,7 @@ DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextLabel, "ellipsis",            BOO
 DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextLabel, "autoScrollLoopDelay", FLOAT,   AUTO_SCROLL_LOOP_DELAY )
 DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextLabel, "autoScrollStopMode",  STRING,  AUTO_SCROLL_STOP_MODE  )
 DALI_DEVEL_PROPERTY_REGISTRATION_READ_ONLY( Toolkit, TextLabel, "lineCount", INTEGER, LINE_COUNT             )
+DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextLabel, "lineWrapMode",        STRING,  LINE_WRAP_MODE         )
 
 DALI_TYPE_REGISTRATION_END()
 
@@ -486,6 +494,21 @@ void TextLabel::SetProperty( BaseObject* object, Property::Index index, const Pr
         }
         break;
       }
+      case Toolkit::DevelTextLabel::Property::LINE_WRAP_MODE:
+      {
+        const std::string& wrapModeStr = value.Get< std::string >();
+        DALI_LOG_INFO( gLogFilter, Debug::General, "TextLabel %p LINE_WRAP_MODE %s\n", impl.mController.Get(), wrapModeStr.c_str() );
+
+        Layout::LineWrap::Mode lineWrapMode( Layout::LineWrap::WORD );
+        if( Scripting::GetEnumeration< Layout::LineWrap::Mode >( wrapModeStr.c_str(),
+                                                                 LINE_WRAP_MODE_STRING_TABLE,
+                                                                 LINE_WRAP_MODE_STRING_TABLE_COUNT,
+                                                                 lineWrapMode ) )
+        {
+          impl.mController->SetLineWrapMode( lineWrapMode );
+        }
+        break;
+      }
     }
   }
 }
@@ -737,6 +760,14 @@ Property::Value TextLabel::GetProperty( BaseObject* object, Property::Index inde
         }
         break;
       }
+      case Toolkit::DevelTextLabel::Property::LINE_WRAP_MODE:
+      {
+        if( impl.mController )
+        {
+          value = impl.mController->GetLineWrapMode();
+        }
+        break;
+      }
       case Toolkit::DevelTextLabel::Property::LINE_COUNT:
       {
         if( impl.mController )
index 17e9f58fd4436e0f52a89c17ec14f0cdf7f3dc12..12f20e44635a62cd7f8bc9b4b9cdbfaec6b7bd1d 100644 (file)
@@ -198,6 +198,7 @@ struct Engine::Impl
     LineLayout tmpLineLayout;
 
     const bool isMultiline = mLayout == MULTI_LINE_BOX;
+    const bool isWordLaidOut = parameters.lineWrapMode == Layout::LineWrap::WORD;
 
     // The last glyph to be laid-out.
     const GlyphIndex lastGlyphOfParagraphPlusOne = parameters.startGlyphIndex + parameters.numberOfGlyphs;
@@ -447,7 +448,7 @@ struct Engine::Impl
       if( isMultiline &&
           ( TextAbstraction::WORD_BREAK == wordBreakInfo ) )
       {
-        oneWordLaidOut = true;
+        oneWordLaidOut = isWordLaidOut;
         DALI_LOG_INFO( gLogFilter, Debug::Verbose, "  One word laid-out\n" );
 
         // Current glyph is the last one of the current word.
index f62191fd9c9d8043574bdb2ff2a167cc63da79b2..fa33087626b43d83338f022e9cd7532645a2a2b1 100644 (file)
@@ -23,6 +23,7 @@
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/text/text-definitions.h>
+#include <dali-toolkit/internal/text/layouts/layout-wrap-mode.h>
 
 namespace Dali
 {
@@ -58,6 +59,7 @@ struct Parameters
    * @param[in] glyphsPerCharacterBuffer Vector with the number of glyphs shaped from the character.
    * @param[in] totalNumberOfGlyphs The number of glyphs.
    * @param[in] horizontalAlignment The horizontal alignment.
+   * @param[in] lineWrapMode The text wrap mode.
    */
   Parameters( const Vector2& boundingBox,
               const Character* const textBuffer,
@@ -70,7 +72,8 @@ struct Parameters
               const GlyphIndex* const charactersToGlyphsBuffer,
               const Length* const glyphsPerCharacterBuffer,
               Length totalNumberOfGlyphs,
-              HorizontalAlignment horizontalAlignment )
+              HorizontalAlignment horizontalAlignment,
+              LineWrap::Mode lineWrapMode )
   : boundingBox( boundingBox ),
     textBuffer( textBuffer ),
     lineBreakInfoBuffer( lineBreakInfoBuffer ),
@@ -89,6 +92,7 @@ struct Parameters
     horizontalAlignment( horizontalAlignment ),
     startLineIndex( 0u ),
     estimatedNumberOfLines( 0u ),
+    lineWrapMode( lineWrapMode ),
     isLastNewParagraph( false )
   {}
 
@@ -110,6 +114,7 @@ struct Parameters
   HorizontalAlignment             horizontalAlignment;             ///< The horizontal alignment.
   LineIndex                       startLineIndex;                  ///< The line index where to insert the new lines.
   Length                          estimatedNumberOfLines;          ///< The estimated number of lines.
+  LineWrap::Mode                  lineWrapMode;                    ///< The line wrap mode for moving to next line.
   bool                            isLastNewParagraph;              ///< Whether the last character is a new paragraph character.
 };
 
diff --git a/dali-toolkit/internal/text/layouts/layout-wrap-mode.h b/dali-toolkit/internal/text/layouts/layout-wrap-mode.h
new file mode 100644 (file)
index 0000000..1e313fd
--- /dev/null
@@ -0,0 +1,68 @@
+#ifndef DALI_TOOLKIT_TEXT_LAYOUT_WRAPMODE_H
+#define DALI_TOOLKIT_TEXT_LAYOUT_WRAPMODE_H
+
+/*
+ * Copyright (c) 2017 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace Text
+{
+
+namespace Layout
+{
+
+/**
+ * @brief Unit of wrapping for moving to next line
+ *
+ * If layout width too short to show full text,
+ * WRAP_MODE_WORD mode will move word to next line,
+ * +---------+
+ * |HELLO    |
+ * |WORLLD   |
+ * +---------+
+ *
+ * but WRAP_MODE_CHARACTER mode will move character by character to next line
+ * +---------+
+ * |HELLO WOR|
+ * |LD       |
+ * +---------+
+ */
+
+namespace LineWrap {
+
+enum Mode
+{
+  WORD,
+  CHARACTER
+};
+
+} // namespace LineWrap
+
+} // namespace Layout
+
+} // namespace Text
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // DALI_TOOLKIT_TEXT_LAYOUT_WRAPMODE_H
index a0daf14259dc0a03e3a1d2ae8cbb71831f0ce613..7f190e22c95af9793372a944eb4b71b04c458ffc 100644 (file)
@@ -391,6 +391,34 @@ Layout::VerticalAlignment Controller::GetVerticalAlignment() const
   return mImpl->mModel->mVerticalAlignment;
 }
 
+void Controller::SetLineWrapMode( Layout::LineWrap::Mode lineWrapMode )
+{
+  if( lineWrapMode != mImpl->mModel->mLineWrapMode )
+  {
+    // Set the text wrap mode.
+    mImpl->mModel->mLineWrapMode = lineWrapMode;
+
+
+    // Update Text layout for applying wrap mode
+    mImpl->mOperationsPending = static_cast<OperationsMask>( mImpl->mOperationsPending |
+                                                             ALIGN                     |
+                                                             LAYOUT                    |
+                                                             UPDATE_LAYOUT_SIZE        |
+                                                             REORDER                   );
+    mImpl->mTextUpdateInfo.mCharacterIndex = 0u;
+    mImpl->mTextUpdateInfo.mNumberOfCharactersToRemove = mImpl->mTextUpdateInfo.mPreviousNumberOfCharacters;
+    mImpl->mTextUpdateInfo.mNumberOfCharactersToAdd = mImpl->mModel->mLogicalModel->mText.Count();
+
+    // Request relayout
+    mImpl->RequestRelayout();
+  }
+}
+
+Layout::LineWrap::Mode Controller::GetLineWrapMode() const
+{
+  return mImpl->mModel->mLineWrapMode;
+}
+
 void Controller::SetTextElideEnabled( bool enabled )
 {
   mImpl->mModel->mElideEnabled = enabled;
@@ -3205,7 +3233,8 @@ bool Controller::DoRelayout( const Size& size,
                                          charactersToGlyphBuffer,
                                          glyphsPerCharacterBuffer,
                                          totalNumberOfGlyphs,
-                                         mImpl->mModel->mHorizontalAlignment );
+                                         mImpl->mModel->mHorizontalAlignment,
+                                         mImpl->mModel->mLineWrapMode );
 
     // Resize the vector of positions to have the same size than the vector of glyphs.
     Vector<Vector2>& glyphPositions = mImpl->mModel->mVisualModel->mGlyphPositions;
index 9c80fc7c7574d2392e834ae03a2494eac1feb5d5..054c1f3bcea97e642b2aaf1ae26898f2da9a2522 100644 (file)
 #include <dali-toolkit/devel-api/controls/text-controls/text-selection-popup-callback-interface.h>
 #include <dali-toolkit/internal/text/decorator/text-decorator.h>
 #include <dali-toolkit/internal/text/layouts/layout-engine.h>
+#include <dali-toolkit/internal/text/layouts/layout-wrap-mode.h>
 #include <dali-toolkit/internal/text/hidden-text.h>
 #include <dali-toolkit/internal/text/text-model-interface.h>
 
+
 namespace Dali
 {
 
@@ -342,6 +344,18 @@ public: // Configure the text controller.
    */
   Layout::VerticalAlignment GetVerticalAlignment() const;
 
+  /**
+   * @brief Sets the text's wrap mode
+   * @param[in] text wrap mode The unit of wrapping
+   */
+  void SetLineWrapMode( Layout::LineWrap::Mode textWarpMode );
+
+  /**
+   * @brief Retrieve text wrap mode previously set.
+   * @return text wrap mode
+   */
+  Layout::LineWrap::Mode GetLineWrapMode() const;
+
   /**
    * @brief Enable or disable the text elide.
    *
index 7eae0e1c8f35e6760b59fc8d6e31dc32421aabd9..f158dae8752af397dbb6c69abb78b0c5a58c5801 100644 (file)
@@ -109,6 +109,7 @@ Model::Model()
   mScrollPositionLast(),
   mHorizontalAlignment( Layout::HORIZONTAL_ALIGN_BEGIN ),
   mVerticalAlignment( Layout::VERTICAL_ALIGN_TOP ),
+  mLineWrapMode( Layout::LineWrap::WORD ),
   mAlignmentOffset( 0.0f ),
   mElideEnabled( false )
 {
index 26b9f08ebc9f1e65423670e3a956a7336b8cfe4a..418989a599c8a4931171d7acbbb38fcbbe213b5b 100644 (file)
@@ -23,6 +23,7 @@
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/text/layouts/layout-alignment.h>
+#include <dali-toolkit/internal/text/layouts/layout-wrap-mode.h>
 #include <dali-toolkit/internal/text/logical-model-impl.h>
 #include <dali-toolkit/internal/text/text-model-interface.h>
 #include <dali-toolkit/internal/text/visual-model-impl.h>
@@ -159,6 +160,7 @@ public:
   Vector2                     mScrollPositionLast;  ///< The last offset value of mScrollPosition
   Layout::HorizontalAlignment mHorizontalAlignment; ///< The layout's horizontal alignment.
   Layout::VerticalAlignment   mVerticalAlignment;   ///< The layout's vertical alignment.
+  Layout::LineWrap::Mode      mLineWrapMode;        ///< The text wrap mode
   float                       mAlignmentOffset;     ///< The alignment offset.
   bool                        mElideEnabled:1;      ///< Whether the text's elide is enabled.
 };