// EXTERNAL INCLUDES
#include <dali/devel-api/adaptor-framework/accessibility-impl.h>
#include <dali/devel-api/adaptor-framework/accessibility.h>
+#include <dali/public-api/object/weak-handle.h>
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/dali-toolkit-common.h>
public virtual Dali::Accessibility::Collection,
public virtual Dali::Accessibility::Action
{
- Dali::Actor self;
- bool modal = false, root = false;
+protected:
+ Dali::WeakHandle<Dali::Actor> mSelf;
+ Dali::WeakHandle<Dali::Actor> mCurrentHighlightActor;
+ bool mIsModal = false;
+ bool mIsRoot = false;
+ Dali::Actor Self()
+ {
+ auto handle = mSelf.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);
/**
Dali::Accessibility::Role GetRole() override;
/**
+ * @copydoc Dali::Accessibility::Accessible::GetLocalizedRoleName()
+ */
+ std::string GetLocalizedRoleName() override;
+
+ /**
* @copydoc Dali::Accessibility::Accessible::GetStates()
*/
Dali::Accessibility::States GetStates() override;
/**
* @copydoc Dali::Accessibility::Component::GetExtents()
*/
- Dali::Rect<> GetExtents(Dali::Accessibility::CoordType ctype) override;
+ Dali::Rect<> GetExtents(Accessibility::CoordinateType type) override;
/**
* @copydoc Dali::Accessibility::Component::GetLayer()
/**
* @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