X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Fcontrol.cpp;h=245bdd5e889691645147bf2a05bde6fdb6cfc35a;hb=cef6d2324d9ecca71abf3c9e63db8e371a636b8a;hp=d9b2f8f1c5bf84f8b194aca58267d23cbe990d96;hpb=4af8225dd04de11ab0085f2cab0e55f43eddf275;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/public-api/controls/control.cpp b/dali-toolkit/public-api/controls/control.cpp index d9b2f8f..245bdd5 100644 --- a/dali-toolkit/public-api/controls/control.cpp +++ b/dali-toolkit/public-api/controls/control.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 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. @@ -22,45 +22,42 @@ #include // INTERNAL INCLUDES -#include #include +#include namespace Dali { - namespace Toolkit { - Control Control::New() { - return Internal::Control::New(); + return Toolkit::Internal::Control::New(); } -Control::Control() +Control Control::New(ControlBehaviour additionalBehaviour) { + return Toolkit::Internal::Control::New(static_cast(additionalBehaviour)); } -Control::Control( const Control& uiControl ) -: CustomActor( uiControl ) +Control::Control() { } +Control::Control(const Control& uiControl) = default; + +Control::Control(Control&& rhs) = default; + Control::~Control() { } -Control& Control::operator=( const Control& handle ) -{ - if( &handle != this ) - { - CustomActor::operator=( handle ); - } - return *this; -} +Control& Control::operator=(const Control& handle) = default; + +Control& Control::operator=(Control&& rhs) = default; -Control Control::DownCast( BaseHandle handle ) +Control Control::DownCast(BaseHandle handle) { - return DownCast< Control, Internal::Control >(handle); + return DownCast(handle); } void Control::SetKeyInputFocus() @@ -98,9 +95,9 @@ LongPressGestureDetector Control::GetLongPressGestureDetector() const return Internal::GetImplementation(*this).GetLongPressGestureDetector(); } -void Control::SetStyleName( const std::string& styleName ) +void Control::SetStyleName(const std::string& styleName) { - Internal::GetImplementation(*this).SetStyleName( styleName ); + Internal::GetImplementation(*this).SetStyleName(styleName); } const std::string& Control::GetStyleName() const @@ -108,9 +105,9 @@ const std::string& Control::GetStyleName() const return Internal::GetImplementation(*this).GetStyleName(); } -void Control::SetBackgroundColor( const Vector4& color ) +void Control::SetBackgroundColor(const Vector4& color) { - Internal::GetImplementation(*this).SetBackgroundColor( color ); + Internal::GetImplementation(*this).SetBackgroundColor(color); } void Control::ClearBackground() @@ -120,17 +117,17 @@ void Control::ClearBackground() bool Control::IsResourceReady() const { - const Internal::Control& internalControl = Toolkit::Internal::GetImplementation( *this ); - const Internal::Control::Impl& controlDataImpl = Internal::Control::Impl::Get( internalControl ); + const Internal::Control& internalControl = Toolkit::Internal::GetImplementation(*this); + const Internal::Control::Impl& controlDataImpl = Internal::Control::Impl::Get(internalControl); return controlDataImpl.IsResourceReady(); } -Toolkit::Visual::ResourceStatus Control::GetVisualResourceStatus( Dali::Property::Index index ) +Toolkit::Visual::ResourceStatus Control::GetVisualResourceStatus(Dali::Property::Index index) { - const Internal::Control& internalControl = Toolkit::Internal::GetImplementation( *this ); - const Internal::Control::Impl& controlDataImpl = Internal::Control::Impl::Get( internalControl ); - return controlDataImpl.GetVisualResourceStatus( index ); + const Internal::Control& internalControl = Toolkit::Internal::GetImplementation(*this); + const Internal::Control::Impl& controlDataImpl = Internal::Control::Impl::Get(internalControl); + return controlDataImpl.GetVisualResourceStatus(index); } Control::KeyEventSignalType& Control::KeyEventSignal() @@ -148,10 +145,10 @@ Control::KeyInputFocusSignalType& Control::KeyInputFocusLostSignal() return Internal::GetImplementation(*this).KeyInputFocusLostSignal(); } -Control::ResourceReadySignalType& Control::ResourceReadySignal() +Control::ResourceReadySignalType& Control::ResourceReadySignal() { - Internal::Control& internalControl = Toolkit::Internal::GetImplementation( *this ); - Internal::Control::Impl& controlImpl = Internal::Control::Impl::Get( internalControl ); + Internal::Control& internalControl = Toolkit::Internal::GetImplementation(*this); + Internal::Control::Impl& controlImpl = Internal::Control::Impl::Get(internalControl); return controlImpl.mResourceReadySignal; }