2 * Copyright (c) 2022 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dali-toolkit/internal/text/text-effects-style.h>
22 #include <dali/public-api/math/math-utils.h>
25 #include <dali-toolkit/devel-api/controls/text-controls/text-style-properties-devel.h>
26 #include <dali-toolkit/internal/text/markup-processor/markup-processor-helper-functions.h>
27 #include <dali-toolkit/internal/text/property-string-parser.h>
28 #include <dali-toolkit/internal/text/text-enumerations-impl.h>
38 const char* COLOR_KEY = "color";
39 const char* OFFSET_KEY = "offset";
40 const char* BLUR_RADIUS_KEY = "blurRadius";
41 const char* WIDTH_KEY = "width";
42 const char* HEIGHT_KEY = "height";
43 const char* ENABLE_KEY = "enable";
44 const char* TYPE_KEY = "type";
45 const char* DASH_WIDTH_KEY = "dashWidth";
46 const char* DASH_GAP_KEY = "dashGap";
47 const char* TRUE_TOKEN = "true";
50 bool ParseShadowProperties(const Property::Map& shadowPropertiesMap,
55 bool& blurRadiusDefined,
58 const unsigned int numberOfItems = shadowPropertiesMap.Count();
60 // Parses and applies the style.
61 for(unsigned int index = 0u; index < numberOfItems; ++index)
63 const KeyValuePair& valueGet = shadowPropertiesMap.GetKeyValue(index);
65 if((DevelText::Shadow::Property::COLOR == valueGet.first.indexKey) || (COLOR_KEY == valueGet.first.stringKey))
70 if(valueGet.second.GetType() == Dali::Property::STRING)
72 const std::string colorStr = valueGet.second.Get<std::string>();
73 Text::ColorStringToVector4(colorStr.c_str(), colorStr.size(), color);
77 color = valueGet.second.Get<Vector4>();
80 else if((DevelText::Shadow::Property::OFFSET == valueGet.first.indexKey) || (OFFSET_KEY == valueGet.first.stringKey))
85 if(valueGet.second.GetType() == Dali::Property::STRING)
87 const std::string offsetStr = valueGet.second.Get<std::string>();
88 StringToVector2(offsetStr.c_str(), offsetStr.size(), offset);
92 offset = valueGet.second.Get<Vector2>();
95 else if((DevelText::Shadow::Property::BLUR_RADIUS == valueGet.first.indexKey) || (BLUR_RADIUS_KEY == valueGet.first.stringKey))
98 blurRadiusDefined = true;
100 if(valueGet.second.GetType() == Dali::Property::STRING)
102 const std::string blurRadiusStr = valueGet.second.Get<std::string>();
103 blurRadius = StringToFloat(blurRadiusStr.c_str());
107 blurRadius = valueGet.second.Get<float>();
112 return 0u == numberOfItems;
115 bool ParseUnderlineProperties(const Property::Map& underlinePropertiesMap,
122 Text::Underline::Type& type,
123 bool& dashWidthDefined,
125 bool& dashGapDefined,
128 const unsigned int numberOfItems = underlinePropertiesMap.Count();
130 // Parses and applies the style.
131 for(unsigned int index = 0u; index < numberOfItems; ++index)
133 const KeyValuePair& valueGet = underlinePropertiesMap.GetKeyValue(index);
135 if((DevelText::Underline::Property::ENABLE == valueGet.first.indexKey) || (ENABLE_KEY == valueGet.first.stringKey))
138 if(valueGet.second.GetType() == Dali::Property::STRING)
140 const std::string enableStr = valueGet.second.Get<std::string>();
141 enabled = Text::TokenComparison(TRUE_TOKEN, enableStr.c_str(), enableStr.size());
145 enabled = valueGet.second.Get<bool>();
148 else if((DevelText::Underline::Property::COLOR == valueGet.first.indexKey) || (COLOR_KEY == valueGet.first.stringKey))
153 if(valueGet.second.GetType() == Dali::Property::STRING)
155 const std::string colorStr = valueGet.second.Get<std::string>();
156 Text::ColorStringToVector4(colorStr.c_str(), colorStr.size(), color);
160 color = valueGet.second.Get<Vector4>();
163 else if((DevelText::Underline::Property::HEIGHT == valueGet.first.indexKey) || (HEIGHT_KEY == valueGet.first.stringKey))
166 heightDefined = true;
168 if(valueGet.second.GetType() == Dali::Property::STRING)
170 const std::string heightStr = valueGet.second.Get<std::string>();
171 height = StringToFloat(heightStr.c_str());
175 height = valueGet.second.Get<float>();
178 else if((DevelText::Underline::Property::TYPE == valueGet.first.indexKey) || (TYPE_KEY == valueGet.first.stringKey))
180 /// Underline Type key.
183 if(valueGet.second.GetType() == Dali::Property::STRING)
185 const std::string typeStr = valueGet.second.Get<std::string>();
186 Text::UnderlineTypeStringToTypeValue(typeStr.c_str(), typeStr.size(), type);
190 type = valueGet.second.Get<Text::Underline::Type>();
193 else if((DevelText::Underline::Property::DASH_WIDTH == valueGet.first.indexKey) || (DASH_WIDTH_KEY == valueGet.first.stringKey))
195 /// Dashed Underline Width key.
196 dashWidthDefined = true;
198 if(valueGet.second.GetType() == Dali::Property::STRING)
200 const std::string dashWidthStr = valueGet.second.Get<std::string>();
201 dashWidth = StringToFloat(dashWidthStr.c_str());
205 dashWidth = valueGet.second.Get<float>();
208 else if((DevelText::Underline::Property::DASH_GAP == valueGet.first.indexKey) || (DASH_GAP_KEY == valueGet.first.stringKey))
210 /// Dashed Underline Gap key.
211 dashGapDefined = true;
213 if(valueGet.second.GetType() == Dali::Property::STRING)
215 const std::string dashGapStr = valueGet.second.Get<std::string>();
216 dashGap = StringToFloat(dashGapStr.c_str());
220 dashGap = valueGet.second.Get<float>();
225 return 0u == numberOfItems;
228 bool ParseOutlineProperties(const Property::Map& underlinePropertiesMap,
235 bool& blurRadiusDefined,
238 const unsigned int numberOfItems = underlinePropertiesMap.Count();
240 // Parses and applies the style.
241 for(unsigned int index = 0u; index < numberOfItems; ++index)
243 const KeyValuePair& valueGet = underlinePropertiesMap.GetKeyValue(index);
245 if((DevelText::Outline::Property::COLOR == valueGet.first.indexKey) || (COLOR_KEY == valueGet.first.stringKey))
249 color = valueGet.second.Get<Vector4>();
251 else if((DevelText::Outline::Property::WIDTH == valueGet.first.indexKey) || (WIDTH_KEY == valueGet.first.stringKey))
255 width = static_cast<uint16_t>(valueGet.second.Get<float>());
257 else if((DevelText::Outline::Property::OFFSET == valueGet.first.indexKey) || (OFFSET_KEY == valueGet.first.stringKey))
260 offsetDefined = true;
262 if(valueGet.second.GetType() == Dali::Property::STRING)
264 const std::string offsetStr = valueGet.second.Get<std::string>();
265 StringToVector2(offsetStr.c_str(), offsetStr.size(), offset);
269 offset = valueGet.second.Get<Vector2>();
272 else if((DevelText::Outline::Property::BLUR_RADIUS == valueGet.first.indexKey) || (BLUR_RADIUS_KEY == valueGet.first.stringKey))
275 blurRadiusDefined = true;
277 if(valueGet.second.GetType() == Dali::Property::STRING)
279 const std::string blurRadiusStr = valueGet.second.Get<std::string>();
280 blurRadius = StringToFloat(blurRadiusStr.c_str());
284 blurRadius = valueGet.second.Get<float>();
289 return 0u == numberOfItems;
292 bool ParseBackgroundProperties(const Property::Map& backgroundProperties,
297 const unsigned int numberOfItems = backgroundProperties.Count();
299 // Parses and applies the style.
300 for(unsigned int index = 0u; index < numberOfItems; ++index)
302 const KeyValuePair& valueGet = backgroundProperties.GetKeyValue(index);
304 if((DevelText::Background::Property::ENABLE == valueGet.first.indexKey) || (ENABLE_KEY == valueGet.first.stringKey))
307 enabled = valueGet.second.Get<bool>();
309 else if((DevelText::Background::Property::COLOR == valueGet.first.indexKey) || (COLOR_KEY == valueGet.first.stringKey))
313 color = valueGet.second.Get<Vector4>();
317 return 0u == numberOfItems;
320 bool ParseStrikethroughProperties(const Property::Map& strikethroughPropertiesMap,
327 const unsigned int numberOfItems = strikethroughPropertiesMap.Count();
329 // Parses and applies the style.
330 for(unsigned int index = 0u; index < numberOfItems; ++index)
332 const KeyValuePair& valueGet = strikethroughPropertiesMap.GetKeyValue(index);
334 if((DevelText::Strikethrough::Property::ENABLE == valueGet.first.indexKey) || (ENABLE_KEY == valueGet.first.stringKey))
337 if(valueGet.second.GetType() == Dali::Property::STRING)
339 const std::string enableStr = valueGet.second.Get<std::string>();
340 enabled = Text::TokenComparison(TRUE_TOKEN, enableStr.c_str(), enableStr.size());
344 enabled = valueGet.second.Get<bool>();
347 else if((DevelText::Strikethrough::Property::COLOR == valueGet.first.indexKey) || (COLOR_KEY == valueGet.first.stringKey))
352 if(valueGet.second.GetType() == Dali::Property::STRING)
354 const std::string colorStr = valueGet.second.Get<std::string>();
355 Text::ColorStringToVector4(colorStr.c_str(), colorStr.size(), color);
359 color = valueGet.second.Get<Vector4>();
362 else if((DevelText::Strikethrough::Property::HEIGHT == valueGet.first.indexKey) || (HEIGHT_KEY == valueGet.first.stringKey))
365 heightDefined = true;
367 if(valueGet.second.GetType() == Dali::Property::STRING)
369 const std::string heightStr = valueGet.second.Get<std::string>();
370 height = StringToFloat(heightStr.c_str());
374 height = valueGet.second.Get<float>();
378 return 0u == numberOfItems;
381 bool SetUnderlineProperties(ControllerPtr controller, const Property::Value& value, EffectStyle::Type type)
389 case EffectStyle::DEFAULT:
391 const Property::Map& propertiesMap = value.Get<Property::Map>();
393 bool enabled = false;
394 bool colorDefined = false;
396 bool heightDefined = false;
398 bool typeDefined = false;
399 Text::Underline::Type type;
400 bool dashWidthDefined = false;
401 float dashWidth = 2.0f;
402 bool dashGapDefined = false;
403 float dashGap = 1.0f;
407 if(propertiesMap.Empty())
409 // Map empty so check if a string provided
410 const std::string propertyString = value.Get<std::string>();
412 if(!propertyString.empty())
414 Property::Map parsedStringMap;
415 Text::ParsePropertyString(propertyString, parsedStringMap);
417 empty = ParseUnderlineProperties(parsedStringMap,
430 controller->UnderlineSetByString(!empty);
435 empty = ParseUnderlineProperties(propertiesMap,
448 controller->UnderlineSetByString(false);
453 if(enabled != controller->IsUnderlineEnabled())
455 controller->SetUnderlineEnabled(enabled);
459 // Sets the default underline values.
460 if(colorDefined && (controller->GetUnderlineColor() != color))
462 controller->SetUnderlineColor(color);
466 if(heightDefined && (fabsf(controller->GetUnderlineHeight() - height) > Math::MACHINE_EPSILON_1000))
468 controller->SetUnderlineHeight(height);
472 if(typeDefined && (controller->GetUnderlineType() != type))
474 controller->SetUnderlineType(type);
478 if(dashWidthDefined && (fabsf(controller->GetDashedUnderlineWidth() - dashWidth) > Math::MACHINE_EPSILON_1000))
480 controller->SetDashedUnderlineWidth(dashWidth);
484 if(dashGapDefined && (fabsf(controller->GetDashedUnderlineGap() - dashGap) > Math::MACHINE_EPSILON_1000))
486 controller->SetDashedUnderlineGap(dashGap);
492 // Disable underline.
493 if(controller->IsUnderlineEnabled())
495 controller->SetUnderlineEnabled(false);
501 case EffectStyle::INPUT:
503 const std::string& underlineProperties = value.Get<std::string>();
505 controller->SetInputUnderlineProperties(underlineProperties);
509 } // if( controller )
514 void GetUnderlineProperties(ControllerPtr controller, Property::Value& value, EffectStyle::Type type)
520 case EffectStyle::DEFAULT:
522 const bool enabled = controller->IsUnderlineEnabled();
523 const Vector4& color = controller->GetUnderlineColor();
524 const float height = controller->GetUnderlineHeight();
525 const Text::Underline::Type type = controller->GetUnderlineType();
526 const float dashWidth = controller->GetDashedUnderlineWidth();
527 const float dashGap = controller->GetDashedUnderlineGap();
529 if(controller->IsUnderlineSetByString())
531 std::string underlineProperties = "{\"enable\":";
532 const std::string enabledStr = enabled ? "true" : "false";
533 underlineProperties += "\"" + enabledStr + "\",";
535 std::string colorStr;
536 Vector4ToColorString(color, colorStr);
537 underlineProperties += "\"color\":\"" + colorStr + "\",";
539 std::string heightStr;
540 FloatToString(height, heightStr);
541 underlineProperties += "\"height\":\"" + heightStr + "\",";
544 typeStr = GetUnderlineTypeToString(type);
545 underlineProperties += "\"type\":\"" + typeStr + "\",";
547 std::string dashWidthStr;
548 FloatToString(dashWidth, dashWidthStr);
549 underlineProperties += "\"dashWidth\":\"" + dashWidthStr + "\",";
551 std::string dashGapStr;
552 FloatToString(dashGap, dashGapStr);
553 underlineProperties += "\"dashGap\":\"" + dashGapStr + "\"}";
555 value = underlineProperties;
561 map.Insert(ENABLE_KEY, enabled);
562 map.Insert(COLOR_KEY, color);
563 map.Insert(HEIGHT_KEY, height);
564 map.Insert(TYPE_KEY, type);
565 map.Insert(DASH_WIDTH_KEY, dashWidth);
566 map.Insert(DASH_GAP_KEY, dashGap);
573 case EffectStyle::INPUT:
575 value = controller->GetInputUnderlineProperties();
582 bool SetShadowProperties(ControllerPtr controller, const Property::Value& value, EffectStyle::Type type)
590 case EffectStyle::DEFAULT:
592 const Property::Map& propertiesMap = value.Get<Property::Map>();
594 bool colorDefined = false;
596 bool offsetDefined = false;
598 bool blurRadiusDefined = false;
603 if(propertiesMap.Empty())
605 // Map empty so check if a string provided
606 const std::string propertyString = value.Get<std::string>();
608 Property::Map parsedStringMap;
609 Text::ParsePropertyString(propertyString, parsedStringMap);
611 empty = ParseShadowProperties(parsedStringMap,
619 controller->ShadowSetByString(!empty);
623 empty = ParseShadowProperties(propertiesMap,
631 controller->ShadowSetByString(false);
636 // Sets the default shadow values.
637 if(colorDefined && (controller->GetShadowColor() != color))
639 controller->SetShadowColor(color);
643 if(offsetDefined && (controller->GetShadowOffset() != offset))
645 controller->SetShadowOffset(offset);
649 if(blurRadiusDefined && (!Dali::Equals(controller->GetShadowBlurRadius(), blurRadius)))
651 controller->SetShadowBlurRadius(blurRadius);
658 if(Vector2::ZERO != controller->GetShadowOffset())
660 controller->SetShadowOffset(Vector2::ZERO);
665 case EffectStyle::INPUT:
667 const std::string& shadowString = value.Get<std::string>();
669 controller->SetInputShadowProperties(shadowString);
673 } // if( controller )
678 void GetShadowProperties(ControllerPtr controller, Property::Value& value, EffectStyle::Type type)
684 case EffectStyle::DEFAULT:
686 const Vector4& color = controller->GetShadowColor();
687 const Vector2& offset = controller->GetShadowOffset();
688 const float& blurRadius = controller->GetShadowBlurRadius();
690 if(controller->IsShadowSetByString())
692 std::string shadowProperties = "{";
694 std::string colorStr;
695 Vector4ToColorString(color, colorStr);
696 shadowProperties += "\"color\":\"" + colorStr + "\",";
698 std::string offsetStr;
699 Vector2ToString(offset, offsetStr);
700 shadowProperties += "\"offset\":\"" + offsetStr + "\",";
702 std::string blurRadiusStr;
703 FloatToString(blurRadius, blurRadiusStr);
704 shadowProperties += "\"blurRadius\":\"" + blurRadiusStr + "\"}";
706 value = shadowProperties;
712 map.Insert(COLOR_KEY, color);
713 map.Insert(OFFSET_KEY, offset);
714 map.Insert(BLUR_RADIUS_KEY, blurRadius);
720 case EffectStyle::INPUT:
722 value = controller->GetInputShadowProperties();
729 bool SetEmbossProperties(ControllerPtr controller, const Property::Value& value, EffectStyle::Type type)
735 const std::string properties = value.Get<std::string>();
739 case EffectStyle::DEFAULT:
741 // Stores the default emboss's properties string to be recovered by the GetEmbossProperties() function.
742 controller->SetDefaultEmbossProperties(properties);
745 case EffectStyle::INPUT:
747 // Stores the input emboss's properties string to be recovered by the GetEmbossProperties() function.
748 controller->SetInputEmbossProperties(properties);
757 void GetEmbossProperties(ControllerPtr controller, Property::Value& value, EffectStyle::Type type)
763 case EffectStyle::DEFAULT:
765 value = controller->GetDefaultEmbossProperties();
768 case EffectStyle::INPUT:
770 value = controller->GetInputEmbossProperties();
777 bool SetOutlineProperties(ControllerPtr controller, const Property::Value& value, EffectStyle::Type type)
785 case EffectStyle::DEFAULT:
787 const Property::Map& propertiesMap = value.Get<Property::Map>();
789 bool colorDefined = false;
791 bool widthDefined = false;
793 bool offsetDefined = false;
795 bool blurRadiusDefined = false;
800 if(propertiesMap.Empty())
802 // Map empty so check if a string provided
803 // This is purely to maintain backward compatibility, but we don't parse the string to be a property map.
804 const std::string propertyString = value.Get<std::string>();
806 // Stores the default outline's properties string to be recovered by the GetOutlineProperties() function.
807 controller->SetDefaultOutlineProperties(propertyString);
809 controller->OutlineSetByString(true);
813 empty = ParseOutlineProperties(propertiesMap,
823 controller->OutlineSetByString(false);
828 // Sets the default outline values.
829 if(colorDefined && (controller->GetOutlineColor() != color))
831 controller->SetOutlineColor(color);
835 if(widthDefined && (controller->GetOutlineWidth() != width))
837 controller->SetOutlineWidth(width);
841 if(offsetDefined && (controller->GetOutlineOffset() != offset))
843 controller->SetOutlineOffset(offset);
847 if(blurRadiusDefined && (!Dali::Equals(controller->GetOutlineBlurRadius(), blurRadius)))
849 controller->SetOutlineBlurRadius(blurRadius);
856 if(0u != controller->GetOutlineWidth())
858 controller->SetOutlineWidth(0u);
864 case EffectStyle::INPUT:
866 const std::string& outlineProperties = value.Get<std::string>();
868 controller->SetInputOutlineProperties(outlineProperties);
872 } // if( controller )
877 void GetOutlineProperties(ControllerPtr controller, Property::Value& value, EffectStyle::Type type)
883 case EffectStyle::DEFAULT:
885 if(controller->IsOutlineSetByString())
887 value = controller->GetDefaultOutlineProperties();
892 const Vector4& color = controller->GetOutlineColor();
893 const uint16_t width = controller->GetOutlineWidth();
894 const Vector2& offset = controller->GetOutlineOffset();
895 const float& blurRadius = controller->GetOutlineBlurRadius();
898 map.Insert(COLOR_KEY, color);
899 map.Insert(WIDTH_KEY, static_cast<int>(width));
900 map.Insert(OFFSET_KEY, offset);
901 map.Insert(BLUR_RADIUS_KEY, blurRadius);
908 case EffectStyle::INPUT:
910 value = controller->GetInputOutlineProperties();
917 bool SetBackgroundProperties(ControllerPtr controller, const Property::Value& value, EffectStyle::Type type)
925 case EffectStyle::DEFAULT:
927 const Property::Map& propertiesMap = value.Get<Property::Map>();
929 bool enabled = false;
930 bool colorDefined = false;
935 if(!propertiesMap.Empty())
937 empty = ParseBackgroundProperties(propertiesMap,
945 if(enabled != controller->IsBackgroundEnabled())
947 controller->SetBackgroundEnabled(enabled);
951 if(colorDefined && (controller->GetBackgroundColor() != color))
953 controller->SetBackgroundColor(color);
959 // Disable background.
960 if(controller->IsBackgroundEnabled())
962 controller->SetBackgroundEnabled(false);
968 case EffectStyle::INPUT:
970 // Text background is not supported while inputting yet
974 } // if( controller )
979 void GetBackgroundProperties(ControllerPtr controller, Property::Value& value, EffectStyle::Type type)
985 case EffectStyle::DEFAULT:
987 const bool enabled = controller->IsBackgroundEnabled();
988 const Vector4& color = controller->GetBackgroundColor();
991 map.Insert(ENABLE_KEY, enabled);
992 map.Insert(COLOR_KEY, color);
998 case EffectStyle::INPUT:
1000 // Text background is not supported while inputting yet
1007 bool SetStrikethroughProperties(ControllerPtr controller, const Property::Value& value, EffectStyle::Type type)
1009 bool update = false;
1015 case EffectStyle::DEFAULT:
1017 const Property::Map& propertiesMap = value.Get<Property::Map>();
1019 bool enabled = false;
1020 bool colorDefined = false;
1022 bool heightDefined = false;
1027 if(propertiesMap.Empty())
1029 // Map empty so check if a string provided
1030 const std::string propertyString = value.Get<std::string>();
1032 if(!propertyString.empty())
1034 Property::Map parsedStringMap;
1035 Text::ParsePropertyString(propertyString, parsedStringMap);
1037 empty = ParseStrikethroughProperties(parsedStringMap,
1044 controller->StrikethroughSetByString(!empty);
1049 empty = ParseStrikethroughProperties(propertiesMap,
1056 controller->StrikethroughSetByString(false);
1061 if(enabled != controller->IsStrikethroughEnabled())
1063 controller->SetStrikethroughEnabled(enabled);
1067 // Sets the default strikethrough values.
1068 if(colorDefined && (controller->GetStrikethroughColor() != color))
1070 controller->SetStrikethroughColor(color);
1073 if(heightDefined && (fabsf(controller->GetStrikethroughHeight() - height) > Math::MACHINE_EPSILON_1000))
1075 controller->SetStrikethroughHeight(height);
1081 // Disable strikethrough.
1082 if(controller->IsStrikethroughEnabled())
1084 controller->SetStrikethroughEnabled(false);
1090 case EffectStyle::INPUT:
1092 const std::string& strikethroughProperties = value.Get<std::string>();
1094 controller->SetInputStrikethroughProperties(strikethroughProperties);
1099 } // if( controller )
1104 void GetStrikethroughProperties(ControllerPtr controller, Property::Value& value, EffectStyle::Type type)
1110 case EffectStyle::DEFAULT:
1112 const bool enabled = controller->IsStrikethroughEnabled();
1113 const Vector4& color = controller->GetStrikethroughColor();
1114 const float height = controller->GetStrikethroughHeight();
1116 if(controller->IsStrikethroughSetByString())
1118 std::string strikethroughProperties = "{\"enable\":";
1119 const std::string enabledStr = enabled ? "true" : "false";
1120 strikethroughProperties += "\"" + enabledStr + "\",";
1122 std::string colorStr;
1123 Vector4ToColorString(color, colorStr);
1124 strikethroughProperties += "\"color\":\"" + colorStr + "\",";
1126 std::string heightStr;
1127 FloatToString(height, heightStr);
1128 strikethroughProperties += "\"height\":\"" + heightStr + "\"}";
1130 value = strikethroughProperties;
1136 map.Insert(ENABLE_KEY, enabled);
1137 map.Insert(COLOR_KEY, color);
1138 map.Insert(HEIGHT_KEY, height);
1145 case EffectStyle::INPUT:
1147 value = controller->GetInputStrikethroughProperties();
1154 Underline::Type StringToUnderlineType(const char* const underlineTypeStr)
1156 Underline::Type underlineType = Text::Underline::SOLID;
1157 Scripting::GetEnumeration<Underline::Type>(underlineTypeStr,
1158 UNDERLINE_TYPE_STRING_TABLE,
1159 UNDERLINE_TYPE_STRING_TABLE_COUNT,
1162 return underlineType;
1167 } // namespace Toolkit