X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fpublic-api%2Factors%2Flayer.cpp;h=3da33655effd5078bdaa4087509c2becf85df6fd;hb=f24c14c80919972c2f41235f0ed5989d776b14a1;hp=bfaa85e0ef0c5024200f1faf4be66c4afdae1489;hpb=7c6f8ed43521c52d6cc46a7e3e3e40069514f818;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/public-api/actors/layer.cpp b/dali/public-api/actors/layer.cpp index bfaa85e..3da3365 100644 --- a/dali/public-api/actors/layer.cpp +++ b/dali/public-api/actors/layer.cpp @@ -1,5 +1,5 @@ /* - * 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. @@ -20,19 +20,11 @@ // INTERNAL INCLUDES #include -#include namespace Dali { - using Dali::Layer; -const char* const Layer::ACTION_RAISE = "raise"; -const char* const Layer::ACTION_LOWER = "lower"; -const char* const Layer::ACTION_RAISE_TO_TOP = "raise-to-top"; -const char* const Layer::ACTION_LOWER_TO_BOTTOM = "lower-to-bottom"; - - Layer::Layer() { } @@ -44,19 +36,22 @@ Layer Layer::New() return Layer(internal.Get()); } -Layer Layer::DownCast( BaseHandle handle ) +Layer Layer::DownCast(BaseHandle handle) { - return Layer( dynamic_cast(handle.GetObjectPtr()) ); + return Layer(dynamic_cast(handle.GetObjectPtr())); } Layer::~Layer() { } -unsigned int Layer::GetDepth() const -{ - return GetImplementation(*this).GetDepth(); -} +Layer::Layer(const Layer& copy) = default; + +Layer& Layer::operator=(const Layer& rhs) = default; + +Layer::Layer(Layer&& rhs) = default; + +Layer& Layer::operator=(Layer&& rhs) = default; void Layer::Raise() { @@ -68,14 +63,14 @@ void Layer::Lower() GetImplementation(*this).Lower(); } -void Layer::RaiseAbove( Layer target ) +void Layer::RaiseAbove(Layer target) { - GetImplementation(*this).RaiseAbove( GetImplementation( target ) ); + GetImplementation(*this).RaiseAbove(GetImplementation(target)); } -void Layer::LowerBelow( Layer target ) +void Layer::LowerBelow(Layer target) { - GetImplementation(*this).LowerBelow( GetImplementation( target ) ); + GetImplementation(*this).LowerBelow(GetImplementation(target)); } void Layer::RaiseToTop() @@ -88,54 +83,14 @@ void Layer::LowerToBottom() GetImplementation(*this).LowerToBottom(); } -void Layer::MoveAbove( Layer target ) -{ - GetImplementation(*this).MoveAbove( GetImplementation( target ) ); -} - -void Layer::MoveBelow( Layer target ) -{ - GetImplementation(*this).MoveBelow( GetImplementation( target ) ); -} - -void Layer::SetClipping(bool enabled) -{ - GetImplementation(*this).SetClipping(enabled); -} - -bool Layer::IsClipping() const -{ - return GetImplementation(*this).IsClipping(); -} - -void Layer::SetClippingBox(int x, int y, int width, int height) +void Layer::MoveAbove(Layer target) { - GetImplementation(*this).SetClippingBox(x, y, width, height); + GetImplementation(*this).MoveAbove(GetImplementation(target)); } -void Layer::SetClippingBox(ClippingBox box) +void Layer::MoveBelow(Layer target) { - GetImplementation(*this).SetClippingBox(box.x, box.y, box.width, box.height); -} - -ClippingBox Layer::GetClippingBox() const -{ - return GetImplementation(*this).GetClippingBox(); -} - -void Layer::SetDepthTestDisabled( bool disable ) -{ - GetImplementation(*this).SetDepthTestDisabled( disable ); -} - -bool Layer::IsDepthTestDisabled() const -{ - return GetImplementation(*this).IsDepthTestDisabled(); -} - -float Layer::ZValue(const Vector3& position, float sortModifier) -{ - return Internal::Layer::ZValue( position, sortModifier ); + GetImplementation(*this).MoveBelow(GetImplementation(target)); } void Layer::SetSortFunction(SortFunctionType function) @@ -143,20 +98,9 @@ void Layer::SetSortFunction(SortFunctionType function) GetImplementation(*this).SetSortFunction(function); } -void Layer::SetTouchConsumed( bool consume ) -{ - GetImplementation( *this ).SetTouchConsumed( consume ); -} - -bool Layer::IsTouchConsumed() const -{ - return GetImplementation( *this ).IsTouchConsumed(); -} - Layer::Layer(Internal::Layer* internal) : Actor(internal) { } } // namespace Dali -