else
{
// if its not a string then get a Property::Map from the property if possible.
- Property::Map *map = value.GetMap();
+ const Property::Map *map = value.GetMap();
if( map && !map->Empty() ) // Empty map results in current visual removal.
{
DALI_LOG_INFO( gLogButtonFilter, Debug::Verbose, "CreateVisualsForComponent Using Map(%d)\n", index );
mTapDetector.DetectedSignal().Connect(this, &Button::OnTap);
self.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
+ self.SetProperty( Toolkit::DevelControl::Property::ACCESSIBILITY_HIGHLIGHTABLE, true );
- self.TouchSignal().Connect( this, &Button::OnTouch );
+ self.TouchedSignal().Connect( this, &Button::OnTouch );
}
bool Button::OnAccessibilityActivated()
else
{
// Get a Property::Map from the property if possible.
- Property::Map* setPropertyMap = value.GetMap();
+ const Property::Map* setPropertyMap = value.GetMap();
if( setPropertyMap )
{
- TextVisual::ConvertStringKeysToIndexKeys( *setPropertyMap );
- GetImplementation( button ).MergeWithExistingLabelProperties( *setPropertyMap, outTextVisualProperties );
+ Property::Map indexKeys = TextVisual::ConvertStringKeysToIndexKeys( *setPropertyMap );
+ GetImplementation( button ).MergeWithExistingLabelProperties( indexKeys, outTextVisualProperties );
}
}
return mForegroundPadding;
}
+std::string Button::AccessibleImpl::GetNameRaw()
+{
+ std::string labelText;
+ auto slf = Toolkit::Button::DownCast( self );
+ Property::Map labelMap = slf.GetProperty<Property::Map>( Toolkit::Button::Property::LABEL );
+
+ Property::Value* textPropertyPtr = labelMap.Find( Toolkit::TextVisual::Property::TEXT );
+ if ( textPropertyPtr )
+ {
+ textPropertyPtr->Get( labelText );
+ }
+
+ return labelText;
+}
+
+
+Property::Index Button::AccessibleImpl::GetNamePropertyIndex()
+{
+ Property::Index label = Toolkit::Button::Property::LABEL;
+ Property::Map labelMap = self.GetProperty<Property::Map>(label);
+
+ if (MapContainsTextString(labelMap))
+ return label;
+ else
+ return Property::INVALID_INDEX;
+}
+
+Dali::Accessibility::States Button::AccessibleImpl::CalculateStates()
+{
+ auto tmp = Control::Impl::AccessibleImpl::CalculateStates();
+ tmp[Dali::Accessibility::State::SELECTABLE] = true;
+ auto slf = Toolkit::Button::DownCast( self );
+ tmp[Dali::Accessibility::State::ENABLED] = !slf.GetProperty<bool>( Toolkit::Button::Property::DISABLED );
+ tmp[Dali::Accessibility::State::CHECKED] = slf.GetProperty<bool>( Toolkit::Button::Property::SELECTED );
+ return tmp;
+}
+
} // namespace Internal
} // namespace Toolkit