X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=dali-toolkit%2Finternal%2Fvisuals%2Fvisual-base-impl.h;h=6105867d20391803be5f196bd083316bf08dc0a6;hb=HEAD;hp=20b0bd99eaefe42ff9b4db4ba251394f8b687d56;hpb=38f0ea9fcdf1dc5037144fa19c8a52316c8af763;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/visuals/visual-base-impl.h b/dali-toolkit/internal/visuals/visual-base-impl.h index 20b0bd9..c5662ed 100644 --- a/dali-toolkit/internal/visuals/visual-base-impl.h +++ b/dali-toolkit/internal/visuals/visual-base-impl.h @@ -2,7 +2,7 @@ #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. @@ -92,14 +92,6 @@ public: 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); @@ -141,6 +133,16 @@ public: 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 @@ -256,6 +258,42 @@ public: 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. @@ -363,6 +401,14 @@ protected: 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() @@ -422,6 +468,11 @@ private: 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.