+bool ParseBackgroundProperties(const Property::Map& backgroundProperties,
+ bool& enabled,
+ bool& colorDefined,
+ Vector4& color)
+{
+ const unsigned int numberOfItems = backgroundProperties.Count();
+
+ // Parses and applies the style.
+ for(unsigned int index = 0u; index < numberOfItems; ++index)
+ {
+ const KeyValuePair& valueGet = backgroundProperties.GetKeyValue(index);
+
+ if((DevelText::Background::Property::ENABLE == valueGet.first.indexKey) || (ENABLE_KEY == valueGet.first.stringKey))
+ {
+ /// Enable key.
+ enabled = valueGet.second.Get<bool>();
+ }
+ else if((DevelText::Background::Property::COLOR == valueGet.first.indexKey) || (COLOR_KEY == valueGet.first.stringKey))
+ {
+ /// Color key.
+ colorDefined = true;
+ color = valueGet.second.Get<Vector4>();
+ }
+ }
+
+ return 0u == numberOfItems;
+}
+
+bool ParseStrikethroughProperties(const Property::Map& strikethroughPropertiesMap,
+ bool& enabled,
+ bool& colorDefined,
+ Vector4& color,
+ bool& heightDefined,
+ float& height)
+{
+ const unsigned int numberOfItems = strikethroughPropertiesMap.Count();
+
+ // Parses and applies the style.
+ for(unsigned int index = 0u; index < numberOfItems; ++index)
+ {
+ const KeyValuePair& valueGet = strikethroughPropertiesMap.GetKeyValue(index);
+
+ if((DevelText::Strikethrough::Property::ENABLE == valueGet.first.indexKey) || (ENABLE_KEY == valueGet.first.stringKey))
+ {
+ /// Enable key.
+ if(valueGet.second.GetType() == Dali::Property::STRING)
+ {
+ const std::string enableStr = valueGet.second.Get<std::string>();
+ enabled = Text::TokenComparison(TRUE_TOKEN, enableStr.c_str(), enableStr.size());
+ }
+ else
+ {
+ enabled = valueGet.second.Get<bool>();
+ }
+ }
+ else if((DevelText::Strikethrough::Property::COLOR == valueGet.first.indexKey) || (COLOR_KEY == valueGet.first.stringKey))
+ {
+ /// Color key.
+ colorDefined = true;
+
+ if(valueGet.second.GetType() == Dali::Property::STRING)
+ {
+ const std::string colorStr = valueGet.second.Get<std::string>();
+ Text::ColorStringToVector4(colorStr.c_str(), colorStr.size(), color);
+ }
+ else
+ {
+ color = valueGet.second.Get<Vector4>();
+ }
+ }
+ else if((DevelText::Strikethrough::Property::HEIGHT == valueGet.first.indexKey) || (HEIGHT_KEY == valueGet.first.stringKey))
+ {
+ /// Height key.
+ heightDefined = true;
+
+ if(valueGet.second.GetType() == Dali::Property::STRING)
+ {
+ const std::string heightStr = valueGet.second.Get<std::string>();
+ height = StringToFloat(heightStr.c_str());
+ }
+ else
+ {
+ height = valueGet.second.Get<float>();
+ }
+ }
+ }
+ return 0u == numberOfItems;
+}
+
+bool SetUnderlineProperties(ControllerPtr controller, const Property::Value& value, EffectStyle::Type type)