Merge "Add TOUCH_FOCUSABLE property" into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / accessible-impl.h
index ff31c1e..ab168c6 100644 (file)
@@ -46,10 +46,25 @@ struct DALI_TOOLKIT_API AccessibleImpl : public virtual Dali::Accessibility::Acc
                                          public virtual Dali::Accessibility::Collection,
                                          public virtual Dali::Accessibility::Action
 {
-  Dali::Actor self;
+protected:
+  Dali::WeakHandle<Dali::Actor> self;
   Dali::WeakHandle<Dali::Actor> currentHighlightActor;
   bool        modal = false, root = false;
 
+  Dali::Actor Self()
+  {
+    auto handle = self.GetHandle();
+
+    // Control::Impl holds a std::unique_ptr to the Accessible object,
+    // so that one does not outlive the other.
+    DALI_ASSERT_ALWAYS(handle);
+
+    return handle;
+  }
+
+  void ScrollToSelf();
+
+public:
   AccessibleImpl(Dali::Actor self, Dali::Accessibility::Role role, bool modal = false);
 
   /**
@@ -194,14 +209,9 @@ struct DALI_TOOLKIT_API AccessibleImpl : public virtual Dali::Accessibility::Acc
 
   /**
    * @brief Makes sure that a given child of this container (e.g. ItemView) is visible
+   * @return false if scrolling is not supported or child is already visible
    */
-  virtual void EnsureChildVisible(Actor child);
-
-  /**
-   * @brief Makes sure this actor is visible (when moving the highlight frame to an
-   * actor that is scrolled out of the viewport)
-   */
-  virtual void EnsureSelfVisible();
+  virtual bool ScrollToChild(Actor child);
 
   /**
    * @brief Returns the index of the property that represents this actor's name