X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fvisual-base-impl.h;h=02419d22794b23e37223b1b95dd4b98d714de920;hp=b9cf7e911ce9bed77cda5eacfe3c27e4653598bc;hb=8641983679bb074a9951c2df9fff7ac6cbf5f5f2;hpb=4365dab5fd64788ab0c1215ac6f14619cfb9a67d diff --git a/dali-toolkit/internal/visuals/visual-base-impl.h b/dali-toolkit/internal/visuals/visual-base-impl.h index b9cf7e9..02419d2 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) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 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. @@ -33,6 +33,7 @@ #include #include #include +#include namespace Dali { @@ -48,6 +49,8 @@ namespace Visual class ResourceObserver; +using FittingMode = DevelVisual::FittingMode; + /** * Base class for all Control rendering logic. A control may have multiple visuals. * @@ -86,7 +89,7 @@ public: /** * @copydoc Toolkit::Visual::Base::GetName */ - const std::string& GetName(); + const std::string& GetName() const; /** * @copydoc Toolkit::Visual::Base::SetSize @@ -214,6 +217,9 @@ public: * If the visual isn't staged (i.e. it doesn't have a renderer), * then this will not add an animation. * + * If the animator is valid and the transition handle is empty - it will + * be created. + * * @param[in] transition The animation to create or attach to * @param[in] animator The animation parameters of the property. */ @@ -249,14 +255,26 @@ public: */ Toolkit::Visual::ResourceStatus GetResourceStatus() const; -protected: + /** + * @brief Get the fitting mode for the visual + */ + FittingMode GetFittingMode() const; + + /** + * @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 Base& GetVisualObject(); + + protected: /** * @brief Constructor. * * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object */ - Base( VisualFactoryCache& factoryCache ); + Base( VisualFactoryCache& factoryCache, FittingMode fittingMode ); /** * @brief A reference counted object may only be deleted by calling Unreference().