Add GetCharacterIndexAtPosition API
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / text-controls / text-label-impl.cpp
index cb60705..fb41c56 100644 (file)
@@ -1214,8 +1214,8 @@ void TextLabel::OnAccessibilityStatusChanged()
   CommonTextUtils::SynchronizeTextAnchorsInParent(Self(), mController, mAnchorActors);
 }
 
-TextLabel::TextLabel(ControlBehaviour additionalBehavior)
-: Control(ControlBehaviour(CONTROL_BEHAVIOUR_DEFAULT | additionalBehavior)),
+TextLabel::TextLabel(ControlBehaviour additionalBehaviour)
+: Control(ControlBehaviour(CONTROL_BEHAVIOUR_DEFAULT | additionalBehaviour)),
   mRenderingBackend(DEFAULT_RENDERING_BACKEND),
   mTextUpdateNeeded(false),
   mLastAutoScrollEnabled(false)
@@ -1246,6 +1246,16 @@ Rect<float> TextLabel::GetCharacterBoundingRectangle(const uint32_t charIndex) c
   return mController->GetCharacterBoundingRectangle(charIndex);
 }
 
+int TextLabel::GetCharacterIndexAtPosition(float visualX, float visualY) const
+{
+  return mController->GetCharacterIndexAtPosition(visualX, visualY);
+}
+
+void TextLabel::SetSpannedText(const Text::Spanned& spannedText)
+{
+  mController->SetSpannedText(spannedText);
+}
+
 std::string TextLabel::TextLabelAccessible::GetNameRaw() const
 {
   return GetWholeText();