X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fpublic-api%2Factors%2Factor.cpp;h=88a1cd96bc0ebc19d311000593bc8aaea4150baa;hb=e08e2992259823c5f9832ad959ffa510b0445a6c;hp=38d0e75953aa11e81893c7803b719fe3b4c398b3;hpb=a1637dfc15bb3e701f612834d07bc474f0e0883c;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/public-api/actors/actor.cpp b/dali/public-api/actors/actor.cpp index 38d0e75..88a1cd9 100644 --- a/dali/public-api/actors/actor.cpp +++ b/dali/public-api/actors/actor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include @@ -75,7 +75,7 @@ void Actor::SetName(const std::string& name) GetImplementation(*this).SetName(name); } -unsigned int Actor::GetId() const +uint32_t Actor::GetId() const { return GetImplementation(*this).GetId(); } @@ -105,11 +105,6 @@ void Actor::Add(Actor actor) 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)); @@ -120,26 +115,27 @@ void Actor::Unparent() GetImplementation(*this).Unparent(); } -unsigned int Actor::GetChildCount() const +uint32_t Actor::GetChildCount() const { return GetImplementation(*this).GetChildCount(); } -Actor Actor::GetChildAt(unsigned int index) const +Actor Actor::GetChildAt( uint32_t 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) +Actor Actor::FindChildById( const uint32_t 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 @@ -249,16 +245,6 @@ Vector3 Actor::GetCurrentWorldPosition() const return GetImplementation(*this).GetCurrentWorldPosition(); } -void Actor::SetPositionInheritanceMode( PositionInheritanceMode mode ) -{ - GetImplementation(*this).SetPositionInheritanceMode( mode ); -} - -PositionInheritanceMode Actor::GetPositionInheritanceMode() const -{ - return GetImplementation(*this).GetPositionInheritanceMode(); -} - void Actor::SetOrientation(const Radian& angle, const Vector3& axis) { GetImplementation(*this).SetOrientation(angle, axis); @@ -444,6 +430,36 @@ bool Actor::IsKeyboardFocusable() const return GetImplementation(*this).IsKeyboardFocusable(); } +void Actor::Raise() +{ + GetImplementation( *this ).Raise(); +} + +void Actor::Lower() +{ + GetImplementation( *this ).Lower(); +} + +void Actor::RaiseToTop() +{ + GetImplementation( *this ).RaiseToTop(); +} + +void Actor::LowerToBottom() +{ + GetImplementation( *this ).LowerToBottom(); +} + +void Actor::RaiseAbove( Actor target ) +{ + GetImplementation( *this ).RaiseAbove( GetImplementation( target ) ); +} + +void Actor::LowerBelow( Actor target ) +{ + GetImplementation( *this ).LowerBelow( GetImplementation( target ) ); +} + void Actor::SetResizePolicy( ResizePolicy::Type policy, Dimension::Type dimension ) { GetImplementation(*this).SetResizePolicy( policy, dimension ); @@ -533,11 +549,23 @@ Vector2 Actor::GetMaximumSize() return Vector2( impl.GetMaximumSize( Dimension::WIDTH ), impl.GetMaximumSize( Dimension::HEIGHT ) ); } +int32_t 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(); @@ -558,23 +586,45 @@ Actor::OffStageSignalType& Actor::OffStageSignal() return GetImplementation(*this).OffStageSignal(); } +uint32_t Actor::AddRenderer( Renderer& renderer ) +{ + return GetImplementation(*this).AddRenderer( GetImplementation( renderer ) ); +} + +uint32_t Actor::GetRendererCount() const +{ + return GetImplementation(*this).GetRendererCount(); +} + +Renderer Actor::GetRendererAt( uint32_t 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( uint32_t index ) +{ + GetImplementation(*this).RemoveRenderer( index ); +} + Actor::OnRelayoutSignalType& Actor::OnRelayoutSignal() { return GetImplementation(*this).OnRelayoutSignal(); } -Actor::Actor(Internal::Actor* internal) -: Handle(internal) +Actor::LayoutDirectionChangedSignalType& Actor::LayoutDirectionChangedSignal() { + return GetImplementation( *this ).LayoutDirectionChangedSignal(); } -void UnparentAndReset( Actor& actor ) +Actor::Actor(Internal::Actor* internal) +: Handle(internal) { - if( actor ) - { - actor.Unparent(); - actor.Reset(); - } } } // namespace Dali