Add ApplyCustomFragmentPrefix
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / text-controls / text-label-impl.cpp
index 2e8c7ae..52f9c29 100644 (file)
@@ -19,6 +19,7 @@
 #include <dali-toolkit/internal/controls/text-controls/text-label-impl.h>
 
 // EXTERNAL INCLUDES
+#include <dali/devel-api/actors/actor-devel.h>
 #include <dali/devel-api/adaptor-framework/image-loading.h>
 #include <dali/devel-api/adaptor-framework/window-devel.h>
 #include <dali/devel-api/common/stage.h>
@@ -839,6 +840,9 @@ void TextLabel::OnTap(const TapGesture& gesture)
   padding                   = Self().GetProperty<Extents>(Toolkit::Control::Property::PADDING);
   const Vector2& localPoint = gesture.GetLocalPoint();
   mController->AnchorEvent(localPoint.x - padding.start, localPoint.y - padding.top);
+
+  // parents can also listen for tap gesture events
+  Dali::DevelActor::SetNeedGesturePropagation(Self(), true);
 }
 
 void TextLabel::AnchorClicked(const std::string& href)
@@ -1057,7 +1061,7 @@ TextLabel::~TextLabel()
 
 std::string TextLabel::AccessibleImpl::GetNameRaw()
 {
-  auto slf = Toolkit::TextLabel::DownCast(self);
+  auto slf = Toolkit::TextLabel::DownCast(Self());
   return slf.GetProperty(Toolkit::TextLabel::Property::TEXT).Get<std::string>();
 }
 
@@ -1072,7 +1076,7 @@ std::string TextLabel::AccessibleImpl::GetText(size_t startOffset,
   if(endOffset <= startOffset)
     return {};
 
-  auto slf = Toolkit::TextLabel::DownCast(self);
+  auto slf = Toolkit::TextLabel::DownCast(Self());
   auto txt =
     slf.GetProperty(Toolkit::TextLabel::Property::TEXT).Get<std::string>();
 
@@ -1084,7 +1088,7 @@ std::string TextLabel::AccessibleImpl::GetText(size_t startOffset,
 
 size_t TextLabel::AccessibleImpl::GetCharacterCount()
 {
-  auto slf = Toolkit::TextLabel::DownCast(self);
+  auto slf = Toolkit::TextLabel::DownCast(Self());
   auto txt =
     slf.GetProperty(Toolkit::TextLabel::Property::TEXT).Get<std::string>();
 
@@ -1104,7 +1108,7 @@ bool TextLabel::AccessibleImpl::SetCaretOffset(size_t offset)
 Dali::Accessibility::Range TextLabel::AccessibleImpl::GetTextAtOffset(
   size_t offset, Dali::Accessibility::TextBoundary boundary)
 {
-  auto slf      = Toolkit::TextLabel::DownCast(self);
+  auto slf      = Toolkit::TextLabel::DownCast(Self());
   auto txt      = slf.GetProperty(Toolkit::TextLabel::Property::TEXT).Get<std::string>();
   auto txt_size = txt.size();
 
@@ -1184,7 +1188,7 @@ TextLabel::AccessibleImpl::GetSelection(size_t selectionNum)
   if(selectionNum > 0)
     return {};
 
-  auto        slf  = Toolkit::TextLabel::DownCast(self);
+  auto        slf  = Toolkit::TextLabel::DownCast(Self());
   auto        ctrl = Dali::Toolkit::GetImpl(slf).getController();
   std::string ret;
   ctrl->RetrieveSelection(ret);
@@ -1199,7 +1203,7 @@ bool TextLabel::AccessibleImpl::RemoveSelection(size_t selectionNum)
   if(selectionNum > 0)
     return false;
 
-  auto slf = Toolkit::TextLabel::DownCast(self);
+  auto slf = Toolkit::TextLabel::DownCast(Self());
   Dali::Toolkit::GetImpl(slf).getController()->SetSelection(0, 0);
   return true;
 }
@@ -1212,7 +1216,7 @@ bool TextLabel::AccessibleImpl::SetSelection(size_t selectionNum,
   if(selectionNum > 0)
     return false;
 
-  auto slf = Toolkit::TextLabel::DownCast(self);
+  auto slf = Toolkit::TextLabel::DownCast(Self());
   Dali::Toolkit::GetImpl(slf).getController()->SetSelection(startOffset,
                                                             endOffset);
   return true;