#define DALI_TOOLKIT_INTERNAL_VISUAL_H
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
void SetTransformAndSize(const Property::Map& transform, Size controlSize);
/**
- * @brief Performs an action on the visual with the given action id and attributes.
- *
- * @param[in] actionId The id of the action to perform this API only takes an Index
- * @param[in] attributes The list of attributes for the action. ( optional for this data structure to have content )
- */
- void DoAction(const Dali::Property::Index actionId, const Dali::Property::Value attributes);
-
- /**
* @copydoc Toolkit::Visual::Base::GetHeightForWidth
*/
virtual float GetHeightForWidth(float width);
void CreatePropertyMap(Property::Map& map) const;
/**
+ * @copydoc Toolkit::Visual::Base::DoAction
+ */
+ void DoAction(const Dali::Property::Index actionId, const Dali::Property::Value& attributes);
+
+ /**
+ * @copydoc Toolkit::Visual::Base::DoActionExtension
+ */
+ void DoActionExtension(const Dali::Property::Index actionId, const Dali::Any& attributes);
+
+ /**
* @brief Create a property map containing per-instance visual properties.
*
* This will enable creation of new visuals on control state change with
FittingMode GetFittingMode() const;
/**
+ * @brief Set the fitting mode for the visual
+ *
+ * @param[in] fittingMode The fitting mode for the visual
+ */
+ void SetFittingMode(FittingMode fittingMode);
+
+ /**
+ * @brief Query whether the fittingMode is ignored.
+ *
+ * @return Returns true if the fittingMode is ignored, false otherwise.
+ */
+ bool IsIgnoreFittingMode() const;
+
+ /**
+ * @brief Query whether the pixel area is set by fitting mode.
+ */
+ bool IsPixelAreaSetForFittingMode() const;
+
+ /**
+ * @brief Set the pixel area of the visual.
+ *
+ * @param[in] pixelArea The pixel area of the visual.
+ */
+ void SetPixelAreaForFittingMode(const Vector4& pixelArea);
+
+ /**
+ * @brief Checks whether the trasformMap is being used in the FittingMode situation.
+ */
+ bool IsTransformMapSetForFittingMode() const;
+
+ /**
+ * @brief Set the flag to use transformMap in the FittingMode.
+ */
+ void SetTransformMapUsageForFittingMode(bool used);
+
+ /**
* @brief Get the actual Visual Object.
* @return The actual visual object
* @note Should be overridden by deriving controls if they are acting as a proxy to other visual objects.
virtual void OnDoAction(const Property::Index actionId, const Property::Value& attributes);
/**
+ * @brief Called by DoActionExtension() allowing sub classes to do the given action.
+ *
+ * @param[in] actionId The action to perform
+ * @param[in] attributes The list of attributes for the action. ( optional for this data structure to have content )
+ */
+ virtual void OnDoActionExtension(const Property::Index actionId, const Dali::Any& attributes);
+
+ /**
* @brief Update the shader when some properties are changed.
*/
virtual void UpdateShader()
void RegisterMixColor();
/**
+ * Register the uniform on the DecoratedVisualRenderer and store the property index if necessary.
+ */
+ void RegisterDecoration();
+
+ /**
* Find the matching property on the renderer or shader. If it's a shader
* property, register it on the renderer in order to animate it for this
* visual independently.