-#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.
return *mImpl;
}
+ /**
+ * Get the type info associated with this object.
+ *
+ * @return The type info
+ */
+ Dali::TypeInfo GetTypeInfo();
+
protected:
/**
* A reference counted object may only be deleted by calling Unreference()
*/
- virtual ~CustomActor();
+ ~CustomActor() override;
private:
/**
- * @copydoc Internal::Actor::OnStageConnectionExternal
+ * @copydoc Internal::Actor::OnSceneConnectionExternal
*/
- virtual void OnStageConnectionExternal()
+ void OnSceneConnectionExternal( int32_t depth ) override
{
- mImpl->OnStageConnection();
+ mImpl->OnSceneConnection( depth );
}
/**
- * @copydoc Internal::Actor::OnStageDisconnectionExternal
+ * @copydoc Internal::Actor::OnSceneDisconnectionExternal
*/
- virtual void OnStageDisconnectionExternal()
+ void OnSceneDisconnectionExternal() override
{
- mImpl->OnStageDisconnection();
+ mImpl->OnSceneDisconnection();
}
/**
* @copydoc Internal::Actor::OnChildAdd
*/
- virtual void OnChildAdd(Actor& child)
+ void OnChildAdd(Actor& child) override
{
Dali::Actor handle(&child);
mImpl->OnChildAdd(handle);
/**
* @copydoc Internal::Actor::OnChildRemove
*/
- virtual void OnChildRemove(Actor& child)
+ void OnChildRemove(Actor& child) override
{
Dali::Actor handle(&child);
mImpl->OnChildRemove(handle);
/**
* @copydoc Internal::Actor::OnPropertySet
*/
- virtual void OnPropertySet( Property::Index index, Property::Value propertyValue )
+ void OnPropertySet( Property::Index index, const Property::Value& propertyValue ) override
{
mImpl->OnPropertySet(index, propertyValue);
}
/**
* @copydoc Internal::Actor::OnSizeSet
*/
- virtual void OnSizeSet(const Vector3& targetSize)
+ void OnSizeSet(const Vector3& targetSize) override
{
mImpl->OnSizeSet(targetSize);
}
/**
* @copydoc Internal::Actor::OnSizeAnimation
*/
- virtual void OnSizeAnimation(Animation& animation, const Vector3& targetSize)
+ void OnSizeAnimation(Animation& animation, const Vector3& targetSize) override
{
Dali::Animation animationHandle(&animation);
mImpl->OnSizeAnimation(animationHandle, targetSize);
}
/**
- * @copydoc Internal::Actor::OnTouchEvent
- */
- virtual bool OnTouchEvent(const TouchEvent& event)
- {
- return mImpl->OnTouchEvent(event);
- }
-
- /**
- * @copydoc Internal::Actor::OnHoverEvent
- */
- virtual bool OnHoverEvent(const HoverEvent& event)
- {
- return mImpl->OnHoverEvent(event);
- }
-
- /**
- * @copydoc Internal::Actor::OnKeyEvent
- */
- virtual bool OnKeyEvent(const KeyEvent& event)
- {
- return mImpl->OnKeyEvent(event);
- }
-
- /**
- * @copydoc Internal::Actor::OnMouseWheelEvent
- */
- virtual bool OnMouseWheelEvent(const MouseWheelEvent& event)
- {
- return mImpl->OnMouseWheelEvent(event);
- }
-
- /**
* @copydoc Internal::Actor::OnRelayout
*/
- virtual void OnRelayout( const Vector2& size, RelayoutContainer& container )
+ void OnRelayout( const Vector2& size, RelayoutContainer& container ) override
{
mImpl->OnRelayout( size, container );
}
/**
* @copydoc Internal::Actor::OnSetResizePolicy
*/
- virtual void OnSetResizePolicy( ResizePolicy policy, Dimension dimension )
+ void OnSetResizePolicy( ResizePolicy::Type policy, Dimension::Type dimension ) override
{
mImpl->OnSetResizePolicy( policy, dimension );
}
/**
* @copydoc Internal::Actor::GetNaturalSize
*/
- virtual Vector3 GetNaturalSize() const
+ Vector3 GetNaturalSize() const override
{
return mImpl->GetNaturalSize();
}
/**
* @copydoc Internal::Actor::CalculateChildSize
*/
- virtual float CalculateChildSize( const Dali::Actor& child, Dimension dimension )
+ float CalculateChildSize( const Dali::Actor& child, Dimension::Type dimension ) override
{
return mImpl->CalculateChildSize( child, dimension );
}
/**
* @copydoc Internal::Actor::GetHeightForWidth
*/
- virtual float GetHeightForWidth( float width )
+ float GetHeightForWidth( float width ) override
{
return mImpl->GetHeightForWidth( width );
}
/**
* @copydoc Internal::Actor::GetWidthForHeight
*/
- virtual float GetWidthForHeight( float height )
+ float GetWidthForHeight( float height ) override
{
return mImpl->GetWidthForHeight( height );
}
/**
* @copydoc Internal::Actor::RelayoutDependentOnChildren
*/
- virtual bool RelayoutDependentOnChildren( Dimension dimension = ALL_DIMENSIONS )
+ bool RelayoutDependentOnChildren( Dimension::Type dimension = Dimension::ALL_DIMENSIONS ) override
{
return mImpl->RelayoutDependentOnChildren( dimension );
}
/**
* @copydoc Internal::Actor::OnCalculateRelayoutSize
*/
- virtual void OnCalculateRelayoutSize( Dimension dimension )
+ void OnCalculateRelayoutSize( Dimension::Type dimension ) override
{
return mImpl->OnCalculateRelayoutSize( dimension );
}
/**
* @copydoc Internal::Actor::OnLayoutNegotiated
*/
- virtual void OnLayoutNegotiated( float size, Dimension dimension )
+ void OnLayoutNegotiated( float size, Dimension::Type dimension ) override
{
return mImpl->OnLayoutNegotiated( size, dimension );
}
/**
* Private constructor; see also CustomActor::New()
*/
- CustomActor(CustomActorImpl& extension);
-
- // Undefined
- CustomActor(const CustomActor&);
+ CustomActor( const SceneGraph::Node& node, CustomActorImpl& extension );
- // Undefined
- CustomActor& operator=(const CustomActor& rhs);
+ // 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