+void Popup::SetupTouch()
+{
+ if( ! mTouchTransparent )
+ {
+ // Connect all the signals and set us up to consume all touch events
+ mBacking.TouchedSignal().Connect( this, &Popup::OnBackingTouched );
+ mPopupBackgroundImage.TouchedSignal().Connect( this, &Popup::OnDialogTouched );
+ mPopupLayout.TouchedSignal().Connect( this, &Popup::OnDialogTouched );
+ mLayer.SetProperty( Layer::Property::CONSUMES_TOUCH, true );
+ }
+ else
+ {
+ // We are touch transparent so disconnect all signals and ensure our layer does not consumed all touch events
+ mBacking.TouchedSignal().Disconnect( this, &Popup::OnBackingTouched );
+ mPopupBackgroundImage.TouchedSignal().Disconnect( this, &Popup::OnDialogTouched );
+ mPopupLayout.TouchedSignal().Disconnect( this, &Popup::OnDialogTouched );
+ mLayer.SetProperty( Layer::Property::CONSUMES_TOUCH, false );
+ }
+}
+
+std::string Popup::AccessibleImpl::GetNameRaw()
+{
+ auto popup = Toolkit::Popup::DownCast( self );
+ std::string title;
+ Actor popupTitle = popup.GetTitle();
+ if (popupTitle)
+ {
+ std::string titleText = popupTitle.GetProperty<std::string>(Toolkit::TextLabel::Property::TEXT);
+ title = titleText;
+ }
+ else
+ {
+ Actor popupContent = popup.GetContent();
+ if (popupContent)
+ {
+ std::string contentText = popupContent.GetProperty<std::string>(Toolkit::TextLabel::Property::TEXT);
+ title = contentText;
+ }
+ }
+ return title;
+}
+
+Dali::Accessibility::States Popup::AccessibleImpl::CalculateStates()
+{
+ auto states = Control::Impl::AccessibleImpl::CalculateStates();
+ auto popup = Toolkit::Popup::DownCast(self);
+ auto displayState = popup.GetProperty<std::string>(Toolkit::Popup::Property::DISPLAY_STATE);
+
+ states[Dali::Accessibility::State::SHOWING] = (displayState == "SHOWN" || displayState == "SHOWING");
+
+ return states;
+}