Merge "Support the underline and its attributes in span tag" into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / text-controller.cpp
index 5f75cf9..9de7dba 100644 (file)
@@ -826,6 +826,42 @@ float Controller::GetUnderlineHeight() const
   return mImpl->mModel->mVisualModel->GetUnderlineHeight();
 }
 
+void Controller::SetUnderlineType(Text::Underline::Type type)
+{
+  mImpl->mModel->mVisualModel->SetUnderlineType(type);
+
+  mImpl->RequestRelayout();
+}
+
+Text::Underline::Type Controller::GetUnderlineType() const
+{
+  return mImpl->mModel->mVisualModel->GetUnderlineType();
+}
+
+void Controller::SetDashedUnderlineWidth(float width)
+{
+  mImpl->mModel->mVisualModel->SetDashedUnderlineWidth(width);
+
+  mImpl->RequestRelayout();
+}
+
+float Controller::GetDashedUnderlineWidth() const
+{
+  return mImpl->mModel->mVisualModel->GetDashedUnderlineWidth();
+}
+
+void Controller::SetDashedUnderlineGap(float gap)
+{
+  mImpl->mModel->mVisualModel->SetDashedUnderlineGap(gap);
+
+  mImpl->RequestRelayout();
+}
+
+float Controller::GetDashedUnderlineGap() const
+{
+  return mImpl->mModel->mVisualModel->GetDashedUnderlineGap();
+}
+
 void Controller::SetOutlineColor(const Vector4& color)
 {
   mImpl->mModel->mVisualModel->SetOutlineColor(color);
@@ -912,6 +948,16 @@ float Controller::GetDefaultLineSize() const
   return mImpl->mLayoutEngine.GetDefaultLineSize();
 }
 
+bool Controller::SetRelativeLineSize(float relativeLineSize)
+{
+  return mImpl->SetRelativeLineSize(relativeLineSize);
+}
+
+float Controller::GetRelativeLineSize() const
+{
+  return mImpl->GetRelativeLineSize();
+}
+
 void Controller::SetInputColor(const Vector4& color)
 {
   InputProperties::SetInputColor(*this, color);
@@ -1304,6 +1350,19 @@ void Controller::SetEllipsisPosition(Toolkit::DevelText::EllipsisPosition::Type
   mImpl->mModel->mVisualModel->SetEllipsisPosition(ellipsisPosition);
 }
 
+void Controller::SetCharacterSpacing(float characterSpacing)
+{
+  mImpl->mModel->mVisualModel->SetCharacterSpacing(characterSpacing);
+
+  mImpl->RelayoutAllCharacters();
+  mImpl->RequestRelayout();
+}
+
+const float Controller::GetCharacterSpacing() const
+{
+  return mImpl->mModel->mVisualModel->GetCharacterSpacing();
+}
+
 Controller::UpdateTextType Controller::Relayout(const Size& size, Dali::LayoutDirection::Type layoutDirection)
 {
   return Relayouter::Relayout(*this, size, layoutDirection);
@@ -1472,11 +1531,11 @@ void Controller::GetTargetSize(Vector2& targetSize)
   targetSize = mImpl->mModel->mVisualModel->mControlSize;
 }
 
-void Controller::AddDecoration(Actor& actor, bool needsClipping)
+void Controller::AddDecoration(Actor& actor, DecorationType type, bool needsClipping)
 {
   if(mImpl->mEditableControlInterface)
   {
-    mImpl->mEditableControlInterface->AddDecoration(actor, needsClipping);
+    mImpl->mEditableControlInterface->AddDecoration(actor, type, needsClipping);
   }
 }
 
@@ -1561,7 +1620,7 @@ bool Controller::ShouldClearFocusOnEscape() const
 
 Actor Controller::CreateBackgroundActor()
 {
-  return CreateControllerBackgroundActor(mImpl->mView, mImpl->mModel->mVisualModel, mImpl->mShaderBackground);
+  return CreateControllerBackgroundActor(mImpl->mView, mImpl->mModel->mVisualModel, mImpl->mModel->mLogicalModel, mImpl->mShaderBackground);
 }
 
 void Controller::GetAnchorActors(std::vector<Toolkit::TextAnchor>& anchorActors)