}
}
+bool Accessible::IsHighlighted() const
+{
+ Dali::Actor self = GetInternalActor();
+
+ return self && self == GetCurrentlyHighlightedActor();
+}
+
Dali::Actor Accessible::GetHighlightActor()
{
return IsUp() ? Bridge::GetCurrentBridge()->mData->mHighlightActor : Dali::Actor{};
return false;
}
- auto self = Self();
- if(self != GetCurrentlyHighlightedActor())
+ if(!IsHighlighted())
{
return false;
}
SetCurrentlyHighlightedActor({});
- auto window = Dali::DevelWindow::Get(self);
+ auto window = Dali::DevelWindow::Get(Self());
Dali::Internal::Adaptor::Window& windowImpl = Dali::GetImplementation(window);
windowImpl.EmitAccessibilityHighlightSignal(false);
throw std::domain_error{"actor is not a child of its parent"};
}
-Dali::Actor ActorAccessible::GetInternalActor()
+Dali::Actor ActorAccessible::GetInternalActor() const
{
return Self();
}
/**
* @copydoc Dali::Accessibility::Accessible::GetInternalActor()
*/
- Dali::Actor GetInternalActor() final;
+ Dali::Actor GetInternalActor() const final;
/**
* @copydoc Dali::Accessibility::Component::GetLayer()
return {};
}
- Dali::Actor GetInternalActor() override
+ Dali::Actor GetInternalActor() const override
{
return Dali::Actor{};
}
*/
virtual bool IsProxy() const;
+ /**
+ * @brief Checks if this is highlighted
+ *
+ * @return True if highlighted, false otherwise
+ */
+ bool IsHighlighted() const;
+
/**
* @brief Gets unique address on accessibility bus.
*
*
* @return The internal Actor
*/
- virtual Dali::Actor GetInternalActor() = 0;
+ virtual Dali::Actor GetInternalActor() const = 0;
/**
* @brief Sets whether to listen for post render callback.
return {};
}
- Dali::Actor GetInternalActor() override
+ Dali::Actor GetInternalActor() const override
{
return Dali::Actor{};
}