#include <dali-toolkit/internal/visuals/transition-data-impl.h>
#include <dali-toolkit/internal/visuals/visual-factory-cache.h>
#include <dali-toolkit/devel-api/direction-enums.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
namespace Dali
{
void SetTransformAndSize( const Property::Map& transform, Size controlSize );
/**
+ * @brief Performs an action on the visual with the given action name and attributes.
+ *
+ * @param[in] actionName The name 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 );
+
+ /**
* @copydoc Toolkit::Visual::Base::GetHeightForWidth
*/
virtual float GetHeightForWidth( float width );
/**
* @brief Called when the visuals resources are loaded / ready
*/
- void ResourceReady();
+ void ResourceReady( Toolkit::Visual::ResourceStatus resourceStatus );
/**
* @brief Called when the visuals resources are loaded / ready
* @return true if ready, false otherwise
*/
- bool IsResourceReady() const;
+ virtual bool IsResourceReady() const;
+
+ /**
+ * @brief Get the loading state of the visual resource
+ * @return Return the loading status (PREPARING, READY and FAILED) of visual resource
+ */
+ Toolkit::Visual::ResourceStatus GetResourceStatus() const;
protected:
*
* @param[in] actor The actor applying this visual.
*/
- virtual void DoSetOnStage( Actor& actor )=0;
+ virtual void DoSetOnStage( Actor& actor ) = 0;
/**
* @brief Called by SetOffStage() allowing sub classes to respond to the SetOffStage event
*/
virtual void DoSetOffStage( Actor& actor );
+ /**
+ * @brief Called by DoAction() 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 OnDoAction( const Property::Index actionId, const Property::Value& attributes );
+
protected:
/**