X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fpopup%2Fpopup-impl.cpp;h=430d98597b5721a2466699438933ec74413d17a3;hp=b95e648eb3395ba61d0b640c4ec6c0279448a813;hb=8a647e87a01c5c78451653c1264a9eea81ac9b20;hpb=04807c7be2d762bb23e3865fd2642ace1b3f1855 diff --git a/dali-toolkit/internal/controls/popup/popup-impl.cpp b/dali-toolkit/internal/controls/popup/popup-impl.cpp index b95e648..430d985 100644 --- a/dali-toolkit/internal/controls/popup/popup-impl.cpp +++ b/dali-toolkit/internal/controls/popup/popup-impl.cpp @@ -39,10 +39,10 @@ #include #include #include -#include #include #include #include +#include using namespace Dali; @@ -271,6 +271,11 @@ Popup::Popup() mTailDownImage = imageDirPath + DEFAULT_TAIL_DOWN_IMAGE_FILE_NAME; mTailLeftImage = imageDirPath + DEFAULT_TAIL_LEFT_IMAGE_FILE_NAME; mTailRightImage = imageDirPath + DEFAULT_TAIL_RIGHT_IMAGE_FILE_NAME; + + DevelControl::SetAccessibilityConstructor( Self(), []( Dali::Actor actor ) { + return std::unique_ptr< Dali::Accessibility::Accessible >( + new Control::Impl::AccessibleImpl( actor, Dali::Accessibility::Role::DIALOG, true ) ); + } ); } void Popup::OnInitialize() @@ -342,6 +347,8 @@ void Popup::OnInitialize() Popup::~Popup() { + if( DevelControl::GetBoundAccessibilityObject( Self() ) ) + Accessibility::Bridge::GetCurrentBridge()->RemovePopup( DevelControl::GetBoundAccessibilityObject( Self() ) ); mEntryAnimationData.Clear(); mExitAnimationData.Clear(); } @@ -1565,12 +1572,21 @@ bool Popup::OnDialogTouched( Actor actor, const TouchEvent& touch ) return false; } +void Popup::OnSceneDisconnection() +{ + auto p = Dali::Accessibility::Accessible::Get(Self()); + Accessibility::Bridge::GetCurrentBridge()->RemovePopup( p ); + Control::OnSceneDisconnection(); +} + void Popup::OnSceneConnection( int depth ) { mLayoutDirty = true; RelayoutRequest(); Control::OnSceneConnection( depth ); + auto p = Dali::Accessibility::Accessible::Get(Self()); + Accessibility::Bridge::GetCurrentBridge()->AddPopup( p ); } void Popup::OnChildAdd( Actor& child )