X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fvisual-base-impl.h;h=0f57210de7e8d326ca1904b6e50a8e1361b3ca7c;hb=145f62f674d8ae90930470756889e2346f7aa118;hp=c95899260a5b5f31b1570c503c426d1be646c64f;hpb=d0b0cfa4a44953be9af9128885eb6ef5d83a214e;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 c958992..0f57210 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) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 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,12 +92,12 @@ public: void SetTransformAndSize(const Property::Map& transform, Size controlSize); /** - * @brief Performs an action on the visual with the given action name and attributes. + * @brief Performs an action on the visual with the given action id and attributes. * - * @param[in] actionName The name of the action to perform this API only takes an Index + * @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 actionName, const Dali::Property::Value attributes); + void DoAction(const Dali::Property::Index actionId, const Dali::Property::Value attributes); /** * @copydoc Toolkit::Visual::Base::GetHeightForWidth @@ -186,6 +186,13 @@ public: Renderer GetRenderer(); /** + * Convert all string keys to int keys + * @param[in] key The key to convert + * @return the index key supplied or matching, or INVALID_INDEX if no match + */ + static Property::Index GetIntKey(Property::Key key); + + /** * Sets the mix color ( including opacity ) of the visual. * @param[in] mixColor The new mix color */ @@ -363,6 +370,16 @@ protected: } /** + * @brief Generate a shader by the current properties from each sub classes's own shader-generate logic. + * @param[in] factoryCache The visual factory cache to store the generated shader. + * @return If the function defined, Generated shader by the current properties. Else, empty shader. + */ + virtual Dali::Shader GenerateShader() const + { + return Dali::Shader(); + } + + /** * @brief Called by GetPropertyObject() allowing sub classes to respond to the GetPropertyObject event * @note The derived class is required to register the given property. * @param[in] key The key of the visual's property. @@ -389,6 +406,13 @@ protected: */ bool IsRoundedCornerRequired() const; + /** + * @brief Query whether the borderline of the visual requires to be rendered. + * + * @return Returns true if the outline is required, false otherwise. + */ + bool IsBorderlineRequired() const; + private: /** * Register the mix color uniform on the Renderer and store the property index.