-#ifndef __DALI_INTERNAL_CUSTOM_ACTOR_H__
-#define __DALI_INTERNAL_CUSTOM_ACTOR_H__
+#ifndef DALI_INTERNAL_CUSTOM_ACTOR_H
+#define DALI_INTERNAL_CUSTOM_ACTOR_H
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
#include <dali/internal/event/actors/actor-impl.h>
#include <dali/internal/event/actors/actor-declarations.h>
#include <dali/public-api/actors/custom-actor.h>
+#include <dali/public-api/animation/animation.h>
namespace Dali
{
return *mImpl;
}
+ /**
+ * Get the type info associated with this object.
+ *
+ * @return The type info
+ */
+ Dali::TypeInfo GetTypeInfo();
+
protected:
/**
private:
/**
- * @copydoc Internal::Actor::OnStageConnectionExternal
+ * @copydoc Internal::Actor::OnSceneConnectionExternal
*/
- virtual void OnStageConnectionExternal()
+ virtual void OnSceneConnectionExternal( int32_t depth )
{
- mImpl->OnStageConnection();
+ mImpl->OnSceneConnection( depth );
}
/**
- * @copydoc Internal::Actor::OnStageDisconnectionExternal
+ * @copydoc Internal::Actor::OnSceneDisconnectionExternal
*/
- virtual void OnStageDisconnectionExternal()
+ virtual void OnSceneDisconnectionExternal()
{
- mImpl->OnStageDisconnection();
+ mImpl->OnSceneDisconnection();
}
/**
/**
* @copydoc Internal::Actor::OnPropertySet
*/
- virtual void OnPropertySet( Property::Index index, Property::Value propertyValue )
+ virtual void OnPropertySet( Property::Index index, const Property::Value& propertyValue )
{
mImpl->OnPropertySet(index, propertyValue);
}
}
/**
- * @copydoc Internal::Actor::OnTouchEvent
+ * @copydoc Internal::Actor::OnRelayout
*/
- virtual bool OnTouchEvent(const TouchEvent& event)
+ virtual void OnRelayout( const Vector2& size, RelayoutContainer& container )
{
- return mImpl->OnTouchEvent(event);
+ mImpl->OnRelayout( size, container );
}
/**
- * @copydoc Internal::Actor::OnKeyEvent
+ * @copydoc Internal::Actor::OnSetResizePolicy
*/
- virtual bool OnKeyEvent(const KeyEvent& event)
+ virtual void OnSetResizePolicy( ResizePolicy::Type policy, Dimension::Type dimension )
{
- return mImpl->OnKeyEvent(event);
+ mImpl->OnSetResizePolicy( policy, dimension );
}
/**
- * @copydoc Internal::Actor::OnMouseWheelEvent
+ * @copydoc Internal::Actor::GetNaturalSize
*/
- virtual bool OnMouseWheelEvent(const MouseWheelEvent& event)
+ virtual Vector3 GetNaturalSize() const
{
- return mImpl->OnMouseWheelEvent(event);
+ return mImpl->GetNaturalSize();
}
/**
- * @copydoc Internal::Actor::GetChildByAlias
+ * @copydoc Internal::Actor::CalculateChildSize
*/
- virtual Dali::Actor GetChildByAlias(const std::string& actorAlias)
+ virtual float CalculateChildSize( const Dali::Actor& child, Dimension::Type dimension )
{
- return mImpl->GetChildByAlias(actorAlias);
+ return mImpl->CalculateChildSize( child, dimension );
}
/**
- * Private constructor; see also CustomActor::New()
+ * @copydoc Internal::Actor::GetHeightForWidth
+ */
+ virtual float GetHeightForWidth( float width )
+ {
+ return mImpl->GetHeightForWidth( width );
+ }
+
+ /**
+ * @copydoc Internal::Actor::GetWidthForHeight
+ */
+ virtual float GetWidthForHeight( float height )
+ {
+ return mImpl->GetWidthForHeight( height );
+ }
+
+ /**
+ * @copydoc Internal::Actor::RelayoutDependentOnChildren
+ */
+ virtual bool RelayoutDependentOnChildren( Dimension::Type dimension = Dimension::ALL_DIMENSIONS )
+ {
+ return mImpl->RelayoutDependentOnChildren( dimension );
+ }
+
+ /**
+ * @copydoc Internal::Actor::OnCalculateRelayoutSize
*/
- CustomActor(CustomActorImpl& extension);
+ virtual void OnCalculateRelayoutSize( Dimension::Type dimension )
+ {
+ return mImpl->OnCalculateRelayoutSize( dimension );
+ }
- // Undefined
- CustomActor(const CustomActor&);
+ /**
+ * @copydoc Internal::Actor::OnLayoutNegotiated
+ */
+ virtual void OnLayoutNegotiated( float size, Dimension::Type dimension )
+ {
+ return mImpl->OnLayoutNegotiated( size, dimension );
+ }
- // Undefined
- CustomActor& operator=(const CustomActor& rhs);
+ /**
+ * Private constructor; see also CustomActor::New()
+ */
+ CustomActor( const SceneGraph::Node& node, CustomActorImpl& extension );
+
+ // no default or copy constructor or assignment
+ CustomActor() = delete;
+ CustomActor( const CustomActor& ) = delete;
+ CustomActor& operator=( const CustomActor& rhs ) = delete;
protected:
CustomActorImplPtr mImpl;
+
};
} // namespace Internal
} // namespace Dali
-#endif // __DALI_INTERNAL_CUSTOM_ACTOR_H__
+#endif // DALI_INTERNAL_CUSTOM_ACTOR_H