+ /**
+ * @brief Create a new text visual.
+ *
+ * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object
+ * @param[in] properties A Property::Map containing settings for this visual
+ * @return A smart-pointer to the newly allocated visual.
+ */
+ static TextVisualPtr New(VisualFactoryCache& factoryCache, const Property::Map& properties);
+
+ /**
+ * @brief Converts all strings keys in property map to index keys. Property Map can then be merged correctly.
+ * @param[in] propertyMap containing string keys or a mix of strings and indexes.
+ * @return Property::Map containing index keys.
+ */
+ static Property::Map ConvertStringKeysToIndexKeys(const Property::Map& propertyMap);
+
+ /**
+ * @brief Retrieve the text's controller.
+ * @param[in] visual The text visual.
+ * @return The text controller
+ */
+ static Text::ControllerPtr GetController(Toolkit::Visual::Base visual)
+ {
+ return GetVisualObject(visual).mController;
+ };
+
+ /**
+ * @brief Set the index of the animatable text color property.
+ * @param[in] visual The text visual.
+ * @param[in] animatablePropertyIndex The index of the animatable property
+ */
+ static void SetAnimatableTextColorProperty(Toolkit::Visual::Base visual, Property::Index animatablePropertyIndex)
+ {
+ GetVisualObject(visual).mAnimatableTextColorPropertyIndex = animatablePropertyIndex;
+ };
+
+ /**
+ * @brief Set the flag to trigger the textures to be initialized and renderer to be added to the control.
+ * @param[in] visual The text visual.
+ */
+ static void EnableRendererUpdate(Toolkit::Visual::Base visual)
+ {
+ GetVisualObject(visual).mRendererUpdateNeeded = true;
+ };
+
+ /**
+ * @brief Instantly updates the renderer
+ * @param[in] visual The text visual.
+ */
+ static void UpdateRenderer(Toolkit::Visual::Base visual)
+ {
+ GetVisualObject(visual).UpdateRenderer();
+ };
+
+public: // from Visual::Base
+ /**
+ * @copydoc Visual::Base::GetHeightForWidth()
+ */
+ float GetHeightForWidth(float width) override;
+
+ /**
+ * @copydoc Visual::Base::GetNaturalSize()
+ */
+ void GetNaturalSize(Vector2& naturalSize) override;
+
+ /**
+ * @copydoc Visual::Base::CreatePropertyMap()
+ */
+ void DoCreatePropertyMap(Property::Map& map) const override;
+
+ /**
+ * @copydoc Visual::Base::CreateInstancePropertyMap
+ */
+ void DoCreateInstancePropertyMap(Property::Map& map) const override;