// Clear the old highlight.
if(oldHighlightedActor)
{
- auto oldHighlightObject = dynamic_cast<Dali::Accessibility::Component*>(Internal::Control::Impl::GetAccessibilityObject(oldHighlightedActor));
- if(oldHighlightObject)
+ auto oldHighlightedObject = Dali::Accessibility::Component::DownCast(Accessible::Get(oldHighlightedActor));
+ if(oldHighlightedObject)
{
- oldHighlightObject->ClearHighlight();
+ oldHighlightedObject->ClearHighlight();
}
}
GetControlImplementation(control).mAccessibilityRelations.clear();
}
-void SetAccessibilityConstructor(Dali::Actor control, std::function<std::unique_ptr<Dali::Accessibility::Accessible>(Dali::Actor)> constructor)
+void SetAccessibilityConstructor(Dali::Actor control, std::function<std::unique_ptr<Toolkit::DevelControl::ControlAccessible>(Dali::Actor)> constructor)
{
GetControlImplementation(Toolkit::Control::DownCast(control)).mAccessibilityConstructor = constructor;
}
bool ClearAccessibilityHighlight(Toolkit::Control control)
{
- auto* accessible = Dali::Accessibility::Component::DownCast(GetControlImplementation(control).GetAccessibilityObject());
-
- return accessible ? accessible->ClearHighlight() : false;
+ return GetControlImplementation(control).GetAccessibleObject()->ClearHighlight();
}
bool GrabAccessibilityHighlight(Toolkit::Control control)
{
- auto* accessible = Dali::Accessibility::Component::DownCast(GetControlImplementation(control).GetAccessibilityObject());
-
- return accessible ? accessible->GrabHighlight() : false;
+ return GetControlImplementation(control).GetAccessibleObject()->GrabHighlight();
}
Dali::Accessibility::States GetAccessibilityStates(Toolkit::Control control)
{
- auto* accessible = GetControlImplementation(control).GetAccessibilityObject();
-
- return accessible->GetStates();
+ return GetControlImplementation(control).GetAccessibleObject()->GetStates();
}
void NotifyAccessibilityStateChange(Toolkit::Control control, Dali::Accessibility::States states, bool recurse)
{
- GetControlImplementation(control).GetAccessibilityObject()->NotifyAccessibilityStateChange(std::move(states), recurse);
+ GetControlImplementation(control).GetAccessibleObject()->NotifyAccessibilityStateChange(std::move(states), recurse);
}
} // namespace DevelControl
*
* Possible usage can be as follows:
* @code
- * SetAccessibilityConstructor( []( Dali::Actor actor ) {
- return std::unique_ptr< Dali::Accessibility::Accessible >(
- new ControlAccessible( actor, Dali::Accessibility::Role::DIALOG, true ) );
- } );
+ * SetAccessibilityConstructor([](Dali::Actor actor) {
+ return std::make_unique<ControlAccessible>(actor, Dali::Accessibility::Role::DIALOG, true));
+ });
* @endcode
*
* param constructor callback creating Accessible object
*/
-DALI_TOOLKIT_API void SetAccessibilityConstructor(Dali::Actor control, std::function<std::unique_ptr<Dali::Accessibility::Accessible>(Dali::Actor)> constructor);
+DALI_TOOLKIT_API void SetAccessibilityConstructor(Dali::Actor control, std::function<std::unique_ptr<Toolkit::DevelControl::ControlAccessible>(Dali::Actor)> constructor);
} // namespace DevelControl
void Alignment::OnInitialize()
{
DevelControl::SetAccessibilityConstructor(Self(), [](Dali::Actor actor) {
- return std::unique_ptr<Dali::Accessibility::Accessible>(
- new DevelControl::ControlAccessible(actor, Dali::Accessibility::Role::FILLER));
+ return std::make_unique<DevelControl::ControlAccessible>(actor, Dali::Accessibility::Role::FILLER);
});
}
SetupProperties();
DevelControl::SetAccessibilityConstructor(Self(), [](Dali::Actor actor) {
- return std::unique_ptr<Dali::Accessibility::Accessible>(
- new DevelControl::ControlAccessible(actor, Dali::Accessibility::Role::ANIMATION));
+ return std::make_unique<DevelControl::ControlAccessible>(actor, Dali::Accessibility::Role::ANIMATION);
});
}
void CheckBoxButton::OnStateChange(State newState)
{
// TODO: replace it with OnPropertySet hook once Button::Property::SELECTED will be consistently used
- if(Dali::Accessibility::IsUp() && (Dali::Accessibility::Accessible::GetCurrentlyHighlightedActor() == Self())
- && (newState == SELECTED_STATE || newState == UNSELECTED_STATE))
+ if((Dali::Accessibility::Accessible::GetCurrentlyHighlightedActor() == Self()) && (newState == SELECTED_STATE || newState == UNSELECTED_STATE))
{
- Dali::Accessibility::Accessible::Get(Self())->EmitStateChanged(Dali::Accessibility::State::CHECKED, newState == SELECTED_STATE ? 1 : 0, 0);
+ GetAccessibleObject()->EmitStateChanged(Dali::Accessibility::State::CHECKED, newState == SELECTED_STATE ? 1 : 0, 0);
}
}
void PushButton::OnStateChange(State newState)
{
// TODO: replace it with OnPropertySet hook once Button::Property::SELECTED will be consistently used
- if(Dali::Accessibility::IsUp() && (Dali::Accessibility::Accessible::GetCurrentlyHighlightedActor() == Self())
- && (newState == SELECTED_STATE || newState == UNSELECTED_STATE))
+ if((Dali::Accessibility::Accessible::GetCurrentlyHighlightedActor() == Self()) && (newState == SELECTED_STATE || newState == UNSELECTED_STATE))
{
- Dali::Accessibility::Accessible::Get(Self())->EmitStateChanged(Dali::Accessibility::State::PRESSED, newState == SELECTED_STATE ? 1 : 0, 0);
+ auto* accessible = GetAccessibleObject();
+
+ accessible->EmitStateChanged(Dali::Accessibility::State::PRESSED, newState == SELECTED_STATE ? 1 : 0, 0);
if(Self().GetProperty<bool>(Toolkit::Button::Property::TOGGLABLE))
{
- Dali::Accessibility::Accessible::Get(Self())->EmitStateChanged(Dali::Accessibility::State::CHECKED, newState == SELECTED_STATE ? 1 : 0, 0);
+ accessible->EmitStateChanged(Dali::Accessibility::State::CHECKED, newState == SELECTED_STATE ? 1 : 0, 0);
}
}
}
}
// TODO: replace it with OnPropertySet hook once Button::Property::SELECTED will be consistently used
- if(Dali::Accessibility::IsUp() && (Dali::Accessibility::Accessible::GetCurrentlyHighlightedActor() == Self())
- && (newState == SELECTED_STATE || newState == UNSELECTED_STATE))
+ if((Dali::Accessibility::Accessible::GetCurrentlyHighlightedActor() == Self()) && (newState == SELECTED_STATE || newState == UNSELECTED_STATE))
{
- Dali::Accessibility::Accessible::Get(Self())->EmitStateChanged(Dali::Accessibility::State::CHECKED, newState == SELECTED_STATE ? 1 : 0, 0);
+ GetAccessibleObject()->EmitStateChanged(Dali::Accessibility::State::CHECKED, newState == SELECTED_STATE ? 1 : 0, 0);
}
}
void ToggleButton::OnStateChange(State newState)
{
// TODO: replace it with OnPropertySet hook once Button::Property::SELECTED will be consistently used
- if(Dali::Accessibility::IsUp() && (Self() == Dali::Accessibility::Accessible::GetCurrentlyHighlightedActor())
- && (newState == SELECTED_STATE || newState == UNSELECTED_STATE))
+ if((Self() == Dali::Accessibility::Accessible::GetCurrentlyHighlightedActor()) && (newState == SELECTED_STATE || newState == UNSELECTED_STATE))
{
- Dali::Accessibility::Accessible::Get(Self())->EmitStateChanged(Dali::Accessibility::State::CHECKED, mCurrentToggleIndex ? 1 : 0, 0);
- Dali::Accessibility::Accessible::Get(Self())->Emit(Dali::Accessibility::ObjectPropertyChangeEvent::DESCRIPTION);
+ auto* accessible = GetAccessibleObject();
+
+ accessible->EmitStateChanged(Dali::Accessibility::State::CHECKED, mCurrentToggleIndex ? 1 : 0, 0);
+ accessible->Emit(Dali::Accessibility::ObjectPropertyChangeEvent::DESCRIPTION);
}
}
Dali::Toolkit::Control handle(GetOwner());
DevelControl::SetAccessibilityConstructor(Self(), [](Dali::Actor actor) {
- return std::unique_ptr<Dali::Accessibility::Accessible>(
- new DevelControl::ControlAccessible(actor, Dali::Accessibility::Role::IMAGE));
+ return std::make_unique<DevelControl::ControlAccessible>(actor, Dali::Accessibility::Role::IMAGE);
});
Adaptor::Get().RegisterProcessor(*this, true);
return rect.width > 0 && rect.height > 0;
}
+Dali::Accessibility::Accessible* ExternalAccessibleGetter(Dali::Actor actor)
+{
+ auto control = Toolkit::Control::DownCast(actor);
+ if (!control)
+ {
+ return nullptr;
+ }
+
+ auto& controlImpl = Toolkit::Internal::GetImplementation(control);
+
+ return controlImpl.GetAccessibleObject();
+}
+
} // unnamed namespace
// clang-format off
mNeedToEmitResourceReady(false),
mDispatchKeyEvents(true)
{
- Dali::Accessibility::Accessible::RegisterExternalAccessibleGetter(
- [](Dali::Actor actor) -> Dali::Accessibility::Accessible* {
- return Control::Impl::GetAccessibilityObject(actor);
- });
+ Dali::Accessibility::Accessible::RegisterExternalAccessibleGetter(&ExternalAccessibleGetter);
- mAccessibilityConstructor = [](Dali::Actor actor) -> std::unique_ptr<Dali::Accessibility::Accessible> {
- return std::unique_ptr<Dali::Accessibility::Accessible>(new DevelControl::ControlAccessible(actor, Dali::Accessibility::Role::UNKNOWN));
+ mAccessibilityConstructor = [](Dali::Actor actor) {
+ return std::make_unique<DevelControl::ControlAccessible>(actor, Dali::Accessibility::Role::UNKNOWN);
};
}
void Control::Impl::CheckHighlightedObjectGeometry()
{
- auto accessible = dynamic_cast<Dali::Toolkit::DevelControl::ControlAccessible*>(mAccessibilityObject.get());
- if(!accessible)
- {
- DALI_LOG_ERROR("accessible is not a pointer to a DevelControl::ControlAccessible type");
- return;
- }
-
+ auto accessible = GetAccessibleObject();
auto lastPosition = accessible->GetLastPosition();
auto accessibleRect = accessible->GetExtents(Dali::Accessibility::CoordinateType::WINDOW);
auto rect = GetShowingGeometry(accessibleRect, accessible);
// notify AT-clients on outgoing moves only
if(mAccessibilityLastScreenRelativeMoveType != Dali::Accessibility::ScreenRelativeMoveType::INSIDE)
{
- mAccessibilityObject.get()->EmitMovedOutOfScreen(mAccessibilityLastScreenRelativeMoveType);
+ accessible->EmitMovedOutOfScreen(mAccessibilityLastScreenRelativeMoveType);
}
break;
}
{
controlImpl.mImpl->mAccessibilityHidden = hidden;
- auto* accessible = controlImpl.mImpl->GetAccessibilityObject();
+ auto* accessible = controlImpl.GetAccessibleObject();
auto* parent = dynamic_cast<Dali::Accessibility::ActorAccessible*>(accessible->GetParent());
if (parent)
{
mIdleCallback = nullptr;
}
-Dali::Accessibility::Accessible* Control::Impl::GetAccessibilityObject()
+Toolkit::DevelControl::ControlAccessible* Control::Impl::GetAccessibleObject()
{
- if(!mAccessibilityObject)
+ if(!mAccessibleObject)
{
- mAccessibilityObject = mAccessibilityConstructor(mControlImpl.Self());
+ mAccessibleObject = mAccessibilityConstructor(mControlImpl.Self());
}
- return mAccessibilityObject.get();
-}
-Dali::Accessibility::Accessible* Control::Impl::GetAccessibilityObject(Dali::Actor actor)
-{
- if(actor)
- {
- auto control = Dali::Toolkit::Control::DownCast(actor);
- if(control)
- {
- auto controlImpl = static_cast<Internal::Control*>(&control.GetImplementation());
- return controlImpl->mImpl->GetAccessibilityObject();
- }
- }
- return nullptr;
+ return mAccessibleObject.get();
}
} // namespace Internal
void UpdateVisualProperties(const std::vector<std::pair<Dali::Property::Index, Dali::Property::Map>>& properties);
/**
- * @brief Gets the current control's accessible object.
- *
- * @return The handle to Accessible object
- */
- Dali::Accessibility::Accessible* GetAccessibilityObject();
-
- /**
- * @brief Gets Accessible object handle.
- *
- * The method acquires Accessible handle from Actor object
- * @param actor Actor object
- * @return The handle to Accessible object
+ * @copydoc Dali::Toolkit::Internal::Control::GetAccessibleObject()
*/
- static Dali::Accessibility::Accessible* GetAccessibilityObject(Dali::Actor actor);
+ Toolkit::DevelControl::ControlAccessible* GetAccessibleObject();
private:
/**
Dali::Accessibility::Role mAccessibilityRole = Dali::Accessibility::Role::UNKNOWN;
std::map<Dali::Accessibility::RelationType, std::set<Accessibility::Accessible*>> mAccessibilityRelations;
- std::function<std::unique_ptr<Dali::Accessibility::Accessible>(Actor)> mAccessibilityConstructor;
- std::unique_ptr<Dali::Accessibility::Accessible> mAccessibilityObject;
+ std::function<std::unique_ptr<Toolkit::DevelControl::ControlAccessible>(Actor)> mAccessibilityConstructor;
+ std::unique_ptr<Toolkit::DevelControl::ControlAccessible> mAccessibleObject;
// Gesture Detection
PinchGestureDetector mPinchGestureDetector;
self.Add(mChildrenRoot);
DevelControl::SetAccessibilityConstructor(self, [](Dali::Actor actor) {
- return std::unique_ptr<Dali::Accessibility::Accessible>(
- new DevelControl::ControlAccessible(actor, Dali::Accessibility::Role::FILLER));
+ return std::make_unique<DevelControl::ControlAccessible>(actor, Dali::Accessibility::Role::FILLER);
});
}
SetAsKeyboardFocusGroup(true);
DevelControl::SetAccessibilityConstructor(self, [](Dali::Actor actor) {
- return std::unique_ptr<Dali::Accessibility::Accessible>(
- new DevelControl::ControlAccessible(actor, Dali::Accessibility::Role::FILLER));
+ return std::make_unique<DevelControl::ControlAccessible>(actor, Dali::Accessibility::Role::FILLER);
});
}
mInternalRoot.Add(mRenderDownsampledCamera);
DevelControl::SetAccessibilityConstructor(Self(), [](Dali::Actor actor) {
- return std::unique_ptr<Dali::Accessibility::Accessible>(
- new DevelControl::ControlAccessible(actor, Dali::Accessibility::Role::FILLER));
+ return std::make_unique<DevelControl::ControlAccessible>(actor, Dali::Accessibility::Role::FILLER);
});
}
handle.ResourceReadySignal().Connect(this, &ImageView::OnResourceReady);
DevelControl::SetAccessibilityConstructor(Self(), [](Dali::Actor actor) {
- return std::unique_ptr<Dali::Accessibility::Accessible>(
- new DevelControl::ControlAccessible(actor, Dali::Accessibility::Role::IMAGE));
+ return std::make_unique<DevelControl::ControlAccessible>(actor, Dali::Accessibility::Role::IMAGE);
});
}
constraint.Apply();
DevelControl::SetAccessibilityConstructor(self, [](Dali::Actor actor) {
- return std::unique_ptr<Dali::Accessibility::Accessible>(
- new DevelControl::ControlAccessible(actor, Dali::Accessibility::Role::FILLER));
+ return std::make_unique<DevelControl::ControlAccessible>(actor, Dali::Accessibility::Role::FILLER);
});
}
mRenderer = Renderer::New(mesh, shader);
DevelControl::SetAccessibilityConstructor(Self(), [](Dali::Actor actor) {
- return std::unique_ptr<Dali::Accessibility::Accessible>(
- new DevelControl::ControlAccessible(actor, Dali::Accessibility::Role::IMAGE));
+ return std::make_unique<DevelControl::ControlAccessible>(actor, Dali::Accessibility::Role::IMAGE);
});
}
void NavigationView::OnInitialize()
{
DevelControl::SetAccessibilityConstructor(Self(), [](Dali::Actor actor) {
- return std::unique_ptr<Dali::Accessibility::Accessible>(
- new DevelControl::ControlAccessible(actor, Dali::Accessibility::Role::FILLER));
+ return std::make_unique<DevelControl::ControlAccessible>(actor, Dali::Accessibility::Role::FILLER);
});
}
EnableGestureDetection(GestureType::Value(GestureType::PAN));
DevelControl::SetAccessibilityConstructor(Self(), [](Dali::Actor actor) {
- return std::unique_ptr<Dali::Accessibility::Accessible>(
- new DevelControl::ControlAccessible(actor, Dali::Accessibility::Role::PAGE_TAB_LIST));
+ return std::make_unique<DevelControl::ControlAccessible>(actor, Dali::Accessibility::Role::PAGE_TAB_LIST);
});
}
mValueChangedSignal.Emit(self, mProgressValue, mSecondaryProgressValue);
if(Self() == Dali::Accessibility::Accessible::GetCurrentlyHighlightedActor())
{
- Control::Impl::GetAccessibilityObject(Self())->Emit(Dali::Accessibility::ObjectPropertyChangeEvent::VALUE);
+ GetAccessibleObject()->Emit(Dali::Accessibility::ObjectPropertyChangeEvent::VALUE);
}
RelayoutRequest();
}
mScrollPositionIntervalReachedSignal.Emit(scrollableHandle.GetCurrentProperty<float>(mPropertyScrollPosition));
if(Self() == Dali::Accessibility::Accessible::GetCurrentlyHighlightedActor())
{
- Control::Impl::GetAccessibilityObject(Self())->Emit(Dali::Accessibility::ObjectPropertyChangeEvent::VALUE);
+ GetAccessibleObject()->Emit(Dali::Accessibility::ObjectPropertyChangeEvent::VALUE);
}
}
}
blurStrengthConstraint.Apply();
DevelControl::SetAccessibilityConstructor(Self(), [](Dali::Actor actor) {
- return std::unique_ptr<Dali::Accessibility::Accessible>(
- new DevelControl::ControlAccessible(actor, Dali::Accessibility::Role::FILLER));
+ return std::make_unique<DevelControl::ControlAccessible>(actor, Dali::Accessibility::Role::FILLER);
});
}
DisplayValue(mValue, true);
if(Self() == Dali::Accessibility::Accessible::GetCurrentlyHighlightedActor())
{
- Control::Impl::GetAccessibilityObject(Self())->Emit(Dali::Accessibility::ObjectPropertyChangeEvent::VALUE);
+ GetAccessibleObject()->Emit(Dali::Accessibility::ObjectPropertyChangeEvent::VALUE);
}
}
mBlurStrengthPropertyIndex = self.RegisterUniqueProperty("blurStrength", 0.f);
DevelControl::SetAccessibilityConstructor(self, [](Dali::Actor actor) {
- return std::unique_ptr<Dali::Accessibility::Accessible>(
- new DevelControl::ControlAccessible(actor, Dali::Accessibility::Role::FILLER));
+ return std::make_unique<DevelControl::ControlAccessible>(actor, Dali::Accessibility::Role::FILLER);
});
}
SetAsKeyboardFocusGroup(true);
DevelControl::SetAccessibilityConstructor(self, [](Dali::Actor actor) {
- return std::unique_ptr<Dali::Accessibility::Accessible>(
- new DevelControl::ControlAccessible(actor, Dali::Accessibility::Role::TABLE));
+ return std::make_unique<DevelControl::ControlAccessible>(actor, Dali::Accessibility::Role::TABLE);
});
}
Dali::Accessibility::Accessible* TextAnchor::TextAnchorAccessible::GetAnchorAccessible(int32_t anchorIndex) const
{
- return Control::Impl::GetAccessibilityObject(Self());
+ return const_cast<TextAnchorAccessible*>(this);
}
std::string TextAnchor::TextAnchorAccessible::GetAnchorUri(int32_t anchorIndex) const
void TextEditor::TextInserted(unsigned int position, unsigned int length, const std::string& content)
{
- if(Accessibility::IsUp())
- {
- Control::Impl::GetAccessibilityObject(Self())->EmitTextInserted(position, length, content);
- }
+ GetAccessibleObject()->EmitTextInserted(position, length, content);
}
void TextEditor::TextDeleted(unsigned int position, unsigned int length, const std::string& content)
{
- if(Accessibility::IsUp())
- {
- Control::Impl::GetAccessibilityObject(Self())->EmitTextDeleted(position, length, content);
- }
+ GetAccessibleObject()->EmitTextDeleted(position, length, content);
}
void TextEditor::CursorPositionChanged(unsigned int oldPosition, unsigned int newPosition)
{
- if(Accessibility::IsUp())
- {
- Control::Impl::GetAccessibilityObject(Self())->EmitTextCursorMoved(newPosition);
- }
+ GetAccessibleObject()->EmitTextCursorMoved(newPosition);
if((oldPosition != newPosition) && !mCursorPositionChanged)
{
void TextField::TextInserted(unsigned int position, unsigned int length, const std::string& content)
{
- if(Accessibility::IsUp())
- {
- Control::Impl::GetAccessibilityObject(Self())->EmitTextInserted(position, length, content);
- }
+ GetAccessibleObject()->EmitTextInserted(position, length, content);
}
void TextField::TextDeleted(unsigned int position, unsigned int length, const std::string& content)
{
- if(Accessibility::IsUp())
- {
- Control::Impl::GetAccessibilityObject(Self())->EmitTextDeleted(position, length, content);
- }
+ GetAccessibleObject()->EmitTextDeleted(position, length, content);
}
void TextField::CursorPositionChanged(unsigned int oldPosition, unsigned int newPosition)
{
- if(Accessibility::IsUp())
- {
- Control::Impl::GetAccessibilityObject(Self())->EmitTextCursorMoved(newPosition);
- }
+ GetAccessibleObject()->EmitTextCursorMoved(newPosition);
if((oldPosition != newPosition) && !mCursorPositionChanged)
{
self.SetProperty(Actor::Property::COLOR_ALPHA, 0.0f);
DevelControl::SetAccessibilityConstructor(Self(), [](Dali::Actor actor) {
- return std::unique_ptr<Dali::Accessibility::Accessible>(
- new DevelControl::ControlAccessible(actor, Dali::Accessibility::Role::DIALOG, true));
+ return std::make_unique<DevelControl::ControlAccessible>(actor, Dali::Accessibility::Role::DIALOG, true);
});
//Enable highightability
SetUp();
DevelControl::SetAccessibilityConstructor(Self(), [](Dali::Actor actor) {
- return std::unique_ptr<Dali::Accessibility::Accessible>(
- new DevelControl::ControlAccessible(actor, Dali::Accessibility::Role::TOOL_BAR));
+ return std::make_unique<DevelControl::ControlAccessible>(actor, Dali::Accessibility::Role::TOOL_BAR);
});
}
mLayout.SetRelativeWidth(1, mRightRelativeSpace);
DevelControl::SetAccessibilityConstructor(Self(), [](Dali::Actor actor) {
- return std::unique_ptr<Dali::Accessibility::Accessible>(
- new DevelControl::ControlAccessible(actor, Dali::Accessibility::Role::TOOL_BAR));
+ return std::make_unique<DevelControl::ControlAccessible>(actor, Dali::Accessibility::Role::TOOL_BAR);
});
}
mVideoPlayer.FinishedSignal().Connect(this, &VideoView::EmitSignalFinish);
DevelControl::SetAccessibilityConstructor(self, [](Dali::Actor actor) {
- return std::unique_ptr<Dali::Accessibility::Accessible>(
- new DevelControl::ControlAccessible(actor, Dali::Accessibility::Role::VIDEO));
+ return std::make_unique<DevelControl::ControlAccessible>(actor, Dali::Accessibility::Role::VIDEO);
});
//Enable highightability
RelayoutRequest();
}
+Toolkit::DevelControl::ControlAccessible* Control::GetAccessibleObject()
+{
+ return mImpl->GetAccessibleObject();
+}
+
void Control::EnableGestureDetection(GestureType::Value type)
{
if((type & GestureType::PINCH) && !mImpl->mPinchGestureDetector)
if(Accessibility::IsUp())
{
- auto self = mImpl->GetAccessibilityObject(Self());
+ auto self = GetAccessibleObject();
self->EmitFocused(focusGained);
auto parent = self->GetParent();
if(parent && !self->GetStates()[Dali::Accessibility::State::MANAGES_DESCENDANTS])
}
case Actor::Property::VISIBLE:
{
- if(Dali::Accessibility::IsUp() && !Self().GetProperty<bool>(Toolkit::DevelControl::Property::ACCESSIBILITY_HIDDEN))
- {
- Dali::Accessibility::Accessible::Get(Self())->EmitVisible(Self().GetProperty(Actor::Property::VISIBLE).Get<bool>());
- }
+ GetAccessibleObject()->EmitVisible(Self().GetProperty<bool>(Actor::Property::VISIBLE));
break;
}
}
class StyleManager;
+namespace DevelControl
+{
+class ControlAccessible;
+
+} // namespace DevelControl
+
namespace Internal
{
*/
void ClearBackground();
+ // Accessibility
+
+ /**
+ * @brief Gets the Accessible object that represents this control.
+ *
+ * This method creates the Accessible object if necessary, so a non-null return is expected.
+ *
+ * @return The Accessible object
+ */
+ Toolkit::DevelControl::ControlAccessible* GetAccessibleObject();
+
// Gesture Detection
/**