/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2015 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/public-api/actors/layer.h>
#include <dali/public-api/animation/constraint.h>
#include <dali/public-api/common/dali-common.h>
-#include <dali/public-api/math/degree.h>
#include <dali/public-api/math/radian.h>
#include <dali/public-api/math/vector2.h>
#include <dali/internal/event/actors/actor-impl.h>
#include <dali/internal/event/actors/layer-impl.h>
-#include <dali/internal/event/actor-attachments/actor-attachment-impl.h>
+#include <dali/internal/event/rendering/renderer-impl.h>
#include <dali/internal/event/animation/constraint-impl.h>
#include <dali/internal/event/size-negotiation/relayout-controller-impl.h>
GetImplementation(*this).Add(GetImplementation(actor));
}
-void Actor::Insert(unsigned int index, Actor actor)
-{
- GetImplementation(*this).Insert(index, GetImplementation(actor));
-}
-
void Actor::Remove(Actor actor)
{
GetImplementation(*this).Remove(GetImplementation(actor));
Actor Actor::GetChildAt(unsigned int index) const
{
- return GetImplementation(*this).GetChildAt(index);
+ Internal::ActorPtr child = GetImplementation(*this).GetChildAt( index );
+ return Actor( child.Get() );
}
Actor Actor::FindChildByName(const std::string& actorName)
{
- Internal::ActorPtr child = GetImplementation(*this).FindChildByName(actorName);
- return Actor(child.Get());
+ Internal::ActorPtr child = GetImplementation(*this).FindChildByName( actorName );
+ return Actor( child.Get() );
}
Actor Actor::FindChildById(const unsigned int id)
{
- Internal::ActorPtr child = GetImplementation(*this).FindChildById(id);
- return Actor(child.Get());
+ Internal::ActorPtr child = GetImplementation(*this).FindChildById( id );
+ return Actor( child.Get() );
}
Actor Actor::GetParent() const
void Actor::SetPositionInheritanceMode( PositionInheritanceMode mode )
{
+ DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: SetPositionInheritanceMode() is deprecated and will be removed from next release. Use SetInheritPosition() instead.\n" );
+
GetImplementation(*this).SetPositionInheritanceMode( mode );
}
PositionInheritanceMode Actor::GetPositionInheritanceMode() const
{
- return GetImplementation(*this).GetPositionInheritanceMode();
-}
+ DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: GetPositionInheritanceMode() is deprecated and will be removed from next release. Use IsPositionInherited() instead.\n" );
-void Actor::SetOrientation(const Degree& angle, const Vector3& axis)
-{
- GetImplementation(*this).SetOrientation(Radian(angle), axis);
+ return GetImplementation(*this).GetPositionInheritanceMode();
}
void Actor::SetOrientation(const Radian& angle, const Vector3& axis)
GetImplementation(*this).SetOrientation(orientation);
}
-void Actor::RotateBy(const Degree& angle, const Vector3& axis)
-{
- GetImplementation(*this).RotateBy(Radian(angle), axis);
-}
-
void Actor::RotateBy(const Radian& angle, const Vector3& axis)
{
GetImplementation(*this).RotateBy(angle, axis);
return GetImplementation(*this).IsKeyboardFocusable();
}
-void Actor::SetRelayoutEnabled( bool enabled )
-{
- GetImplementation(*this).SetRelayoutEnabled( enabled );
-}
-
-bool Actor::IsRelayoutEnabled() const
-{
- return GetImplementation(*this).IsRelayoutEnabled();
-}
-
void Actor::SetResizePolicy( ResizePolicy::Type policy, Dimension::Type dimension )
{
GetImplementation(*this).SetResizePolicy( policy, dimension );
return GetImplementation(*this).GetRelayoutSize( dimension );
}
-void Actor::RelayoutRequestTree()
-{
- GetImplementation(*this).RelayoutRequestTree();
-}
-
-void Actor::PropagateRelayoutFlags()
-{
- GetImplementation(*this).PropagateRelayoutFlags();
-}
-
void Actor::SetPadding( const Padding& padding )
{
Internal::Actor& impl = GetImplementation(*this);
return Vector2( impl.GetMaximumSize( Dimension::WIDTH ), impl.GetMaximumSize( Dimension::HEIGHT ) );
}
+int Actor::GetHierarchyDepth()
+{
+ return GetImplementation(*this).GetHierarchyDepth();
+}
+
Actor::TouchSignalType& Actor::TouchedSignal()
{
+ DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: TouchedSignal() is deprecated and will be removed from next release. Use TouchSignal() instead.\n" );
+
return GetImplementation(*this).TouchedSignal();
}
+Actor::TouchDataSignalType& Actor::TouchSignal()
+{
+ return GetImplementation( *this ).TouchSignal();
+}
+
Actor::HoverSignalType& Actor::HoveredSignal()
{
return GetImplementation(*this).HoveredSignal();
}
-Actor::MouseWheelEventSignalType& Actor::MouseWheelEventSignal()
+Actor::WheelEventSignalType& Actor::WheelEventSignal()
{
- return GetImplementation(*this).MouseWheelEventSignal();
+ return GetImplementation(*this).WheelEventSignal();
}
Actor::OnStageSignalType& Actor::OnStageSignal()
return GetImplementation(*this).OffStageSignal();
}
+unsigned int Actor::AddRenderer( Renderer& renderer )
+{
+ return GetImplementation(*this).AddRenderer( GetImplementation( renderer ) );
+}
+
+unsigned int Actor::GetRendererCount() const
+{
+ return GetImplementation(*this).GetRendererCount();
+}
+
+Renderer Actor::GetRendererAt( unsigned int index )
+{
+ Internal::RendererPtr renderer = GetImplementation(*this).GetRendererAt( index );
+ return Renderer( renderer.Get() );
+}
+
+void Actor::RemoveRenderer( Renderer& renderer )
+{
+ GetImplementation(*this).RemoveRenderer( GetImplementation( renderer ) );
+}
+
+void Actor::RemoveRenderer( unsigned int index )
+{
+ GetImplementation(*this).RemoveRenderer( index );
+}
+
Actor::OnRelayoutSignalType& Actor::OnRelayoutSignal()
{
return GetImplementation(*this).OnRelayoutSignal();
{
}
-void UnparentAndReset( Actor& actor )
-{
- if( actor )
- {
- actor.Unparent();
- actor.Reset();
- }
-}
-
} // namespace Dali