case Toolkit::DummyControl::Property::FOCUS_VISUAL:
case Toolkit::DummyControl::Property::LABEL_VISUAL:
{
- Property::Map* map = value.GetMap();
+ const Property::Map* map = value.GetMap();
if( map != NULL )
{
VisualFactory visualFactory = VisualFactory::Get();
{
if( value.GetType() == Property::MAP )
{
- Property::Map* map = value.GetMap();
+ const Property::Map* map = value.GetMap();
const Property::Map& mapref = *map;
NewAnimator( mapref, element ); // Merge the map into element
}
const Property::Value& value = array.GetElementAt(i);
if( value.GetType() == Property::MAP )
{
- Property::Map* map = value.GetMap();
+ const Property::Map* map = value.GetMap();
NewAnimator( *map, *element );
outputAnimationData.Add( element );
}
{
if( value.GetType() == Property::MAP )
{
- Property::Map* valueMap = value.GetMap();
+ const Property::Map* valueMap = value.GetMap();
buttonImpl.mPressTransitionData.Clear();
NewAnimation( *valueMap, buttonImpl.mPressTransitionData );
}
else if( value.GetType() == Property::ARRAY )
{
- Property::Array* valueArray = value.GetArray();
+ const Property::Array* valueArray = value.GetArray();
buttonImpl.mPressTransitionData.Clear();
NewAnimation( *valueArray, buttonImpl.mPressTransitionData );
}
tet_infoline( "Ensure first value is a map and contains the right item" );
const Property::Value mapValue1 = contentArray->GetElementAt( 0 );
- Property::Map* map1 = mapValue1.GetMap();
+ const Property::Map* map1 = mapValue1.GetMap();
DALI_TEST_CHECK( map1 );
Property::Value* urlValue = map1->Find( ImageVisual::Property::URL );
DALI_TEST_CHECK( urlValue );
tet_infoline( "Ensure second value is a map and contains the right item" );
const Property::Value mapValue2 = contentArray->GetElementAt( 1 );
- Property::Map* map2 = mapValue2.GetMap();
+ const Property::Map* map2 = mapValue2.GetMap();
DALI_TEST_CHECK( map2 );
Property::Value* textValue = map2->Find( TextVisual::Property::TEXT );
DALI_TEST_CHECK( textValue );
}
else
{
- Property::Array* array = value.GetArray();
+ const Property::Array* array = value.GetArray();
if(array)
{
const unsigned int arraySize = array->Size();
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 );
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 );
}
}
}
case Toolkit::ToggleButton::Property::TOOLTIPS:
{
- Property::Array* tipArray = value.GetArray();
+ const Property::Array* tipArray = value.GetArray();
if( tipArray )
{
std::vector<std::string> tips;
{
bool withTransitions=true;
const Property::Value* valuePtr=&value;
- Property::Map* map = value.GetMap();
+ const Property::Map* map = value.GetMap();
if(map)
{
Property::Value* value2 = map->Find("withTransitions");
case Toolkit::ImageView::Property::IMAGE:
{
std::string imageUrl;
- Property::Map* map;
+ const Property::Map* map;
if( value.Get( imageUrl ) )
{
impl.SetImage( imageUrl, ImageDimensions() );
else // Does this code make text-visual can be accepted as visual?
{
// 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.
{
progressVisual = visualFactory.CreateVisual( *map );
}
case Toolkit::ScrollBar::Property::SCROLL_POSITION_INTERVALS:
{
- Property::Array* array = value.GetArray();
+ const Property::Array* array = value.GetArray();
if( array )
{
Dali::Vector<float> positions;
{
const Property::Value& element = layouts.GetElementAt( arrayIdx );
- Property::Map* layout = element.GetMap();
+ const Property::Map* layout = element.GetMap();
if( layout != NULL )
{
for( unsigned int mapIdx = 0, mapCount = (*layout).Count(); mapIdx < mapCount; ++mapIdx )
}
case Toolkit::ScrollView::Property::SCROLL_MODE:
{
- Property::Map* map = value.GetMap();
+ const Property::Map* map = value.GetMap();
if( map )
{
scrollViewImpl.SetScrollMode( *map );
void(TableView::*funcFit)(unsigned int),
const Property::Value& value )
{
- Property::Map* map = value.GetMap();
+ const Property::Map* map = value.GetMap();
if( map )
{
unsigned int index(0);
Toolkit::Control control = mControl.GetHandle();
if( control )
{
- Property::Map* properties = value.GetMap();
+ const Property::Map* properties = value.GetMap();
if( properties )
{
const Property::Map::SizeType count = properties->Count();
Property::Type type = value.GetType();
if( type == Property::MAP )
{
- Property::Map* map = value.GetMap();
+ const Property::Map* map = value.GetMap();
if( map )
{
mContentTextVisual.Merge( *map );
}
else if( type == Property::MAP )
{
- Property::Map* map = value.GetMap();
+ const Property::Map* map = value.GetMap();
if( map )
{
const Property::Map::SizeType count = map->Count();
}
else
{
- Property::Array* array = value.GetArray();
+ const Property::Array* array = value.GetArray();
if( array )
{
const unsigned int arraySize = array->Size();
}
case Toolkit::DevelImageVisual::Property::PLAY_RANGE:
{
- Property::Array* array = value.GetArray();
+ const Property::Array* array = value.GetArray();
if( array )
{
mAnimationData.playRange = *array;
}
case DevelAnimatedVectorImageVisual::Action::UPDATE_PROPERTY:
{
- Property::Map* map = attributes.GetMap();
+ const Property::Map* map = attributes.GetMap();
if( map )
{
DoSetProperties( *map );
{
case DevelArcVisual::Action::UPDATE_PROPERTY:
{
- Property::Map* map = attributes.GetMap();
+ const Property::Map* map = attributes.GetMap();
if( map )
{
DoSetProperties( *map );
{
case DevelColorVisual::Action::UPDATE_PROPERTY:
{
- Property::Map* map = attributes.GetMap();
+ const Property::Map* map = attributes.GetMap();
if( map )
{
DoSetProperties( *map );
}
case Property::ARRAY:
{
- Property::Array* offsetArray = value->GetArray();
+ const Property::Array* offsetArray = value->GetArray();
if( offsetArray )
{
unsigned int numStop = offsetArray->Count();
return TextVisualPtr;
}
-void TextVisual::ConvertStringKeysToIndexKeys( Property::Map& propertyMap )
+Property::Map TextVisual::ConvertStringKeysToIndexKeys( const Property::Map& propertyMap )
{
Property::Map outMap;
outMap.Insert( indexKey, keyValue.second );
}
- propertyMap = outMap;
+ return outMap;
}
float TextVisual::GetHeightForWidth( float width )
/**
* @brief Converts all strings keys in property map to index keys. Property Map can then be merged correctly.
- * @param[in,out] propertyMap containing string keys or a mix of strings and indexes. Will be changed to index keys.
+ * @param[in] propertyMap containing string keys or a mix of strings and indexes.
+ * @return Property::Map containing index keys.
*/
- static void ConvertStringKeysToIndexKeys( Property::Map& propertyMap );
+ static Property::Map ConvertStringKeysToIndexKeys( const Property::Map& propertyMap );
/**
* @brief Retrieve the text's controller.
const Property::Value& element = array.GetElementAt( arrayIdx );
// Expect each child to be an object representing an animator:
- Property::Map* map = element.GetMap();
+ const Property::Map* map = element.GetMap();
if( map != NULL )
{
TransitionData::Animator* animator = ConvertMap( *map );
{
bool valid = true;
Vector4 controlPoints;
- Property::Array *array = value.GetArray();
+ const Property::Array* array = value.GetArray();
if( array && array->Count() >= 4 )
{
for( size_t vecIdx = 0; vecIdx < 4; ++vecIdx )
{
- Property::Value& v = array->GetElementAt(vecIdx);
+ const Property::Value& v = array->GetElementAt(vecIdx);
if( v.GetType() == Property::FLOAT )
{
controlPoints[vecIdx] = v.Get<float>();
}
else
{
- Property::Array* array = value.GetArray();
+ const Property::Array* array = value.GetArray();
if( array && array->Size() == 2 )
{
Toolkit::Visual::Transform::Policy::Type xPolicy = static_cast< Toolkit::Visual::Transform::Policy::Type >( -1 ); // Assign an invalid value so definitely changes