Fixes TextView's includes.
[platform/core/uifw/dali-toolkit.git] / base / dali-toolkit / internal / controls / text-view / relayout-utilities.cpp
index f24190c..17c9534 100644 (file)
  */
 
 // FILE HEADER
-#include "relayout-utilities.h"
+#include <dali-toolkit/internal/controls/text-view/relayout-utilities.h>
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/internal/controls/text-view/text-view-processor-helper-functions.h>
 
 // EXTERNAL INCLUDES
 #include <cmath>
 
-// INTERNAL INCLUDES
-#include <dali/dali.h>
-#include <dali-toolkit/public-api/controls/text-view/text-view.h>
-#include "text-view-line-processor.h"
-#include "text-view-word-processor.h"
-#include "text-view-processor-helper-functions.h"
-#include "text-view-processor-dbg.h"
-
 namespace Dali
 {
 
@@ -1708,7 +1703,7 @@ void CalculateUnderlineInfo( TextView::RelayoutData& relayoutData, TextViewRelay
             ++textUnderlineStatus.mLineGlobalIndex; // If it's a new line, point to the next one.
           }
 
-          if( characterGroup.mStyledText.mStyle.GetUnderline() )
+          if( characterGroup.mStyledText.mStyle.IsUnderlineEnabled() )
           {
             if( !textUnderlineStatus.mCurrentUnderlineStatus || // Current character is underlined but previous one it wasn't.
                 isNewLine )                                     // Current character is underlined and is the first of current laid-out line.
@@ -1825,7 +1820,7 @@ void SetUnderlineInfo( TextView::RelayoutData& relayoutData )
             }
           }
 
-          if( characterGroup.mStyledText.mStyle.GetUnderline() )
+          if( characterGroup.mStyledText.mStyle.IsUnderlineEnabled() )
           {
             if( textUnderlineStatus.mCurrentUnderlineStatus )
             {
@@ -1845,15 +1840,12 @@ void SetUnderlineInfo( TextView::RelayoutData& relayoutData )
 
             textUnderlineStatus.mCurrentUnderlineStatus = true;
 
-            // Sets the underline's thickness.
-            characterGroup.mStyledText.mStyle.SetUnderlineThickness( underlineInfo.mMaxThickness );
-
             // Before setting the position it needs to be adjusted to match the base line.
             const float bearingOffset = ( currentLineHeight - currentLineAscender ) - ( characterGroup.mSize.height - characterGroup.mAscender );
             const float positionOffset = ( underlineInfo.mMaxHeight - characterGroup.mSize.height ) - bearingOffset;
 
-            // Sets the underline's position.
-            characterGroup.mStyledText.mStyle.SetUnderlinePosition( underlineInfo.mPosition - positionOffset );
+            // Sets the underline's parameters.
+            characterGroup.mStyledText.mStyle.SetUnderline( true, underlineInfo.mMaxThickness, underlineInfo.mPosition - positionOffset );
 
             // Mark the group of characters to be set the new style into the text-actor.
             characterGroup.mSetStyle = true;
@@ -1985,7 +1977,8 @@ RenderableActor CreateGlyphActor( const Text& text, const TextStyle& style, Text
   else
   {
     // The text-actor cache is empty. Create a new one.
-    textActor = TextActor::New( text, style, false, true );
+    TextActorParameters parameters( style, TextActorParameters::FONT_DETECTION_OFF );
+    textActor = TextActor::New( text, parameters );
   }
 
   return textActor;