X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Fbuttons%2Fbutton.cpp;h=02adab4c97d1bf730e3f646c3ebb68362da050a3;hp=89aefc564bf71b629a20f7f5650a7d557d02f59d;hb=refs%2Fchanges%2F77%2F239777%2F2;hpb=57869973578f6a0b0f836d396c7232ddb8302c6b diff --git a/dali-toolkit/public-api/controls/buttons/button.cpp b/dali-toolkit/public-api/controls/buttons/button.cpp index 89aefc5..02adab4 100644 --- a/dali-toolkit/public-api/controls/buttons/button.cpp +++ b/dali-toolkit/public-api/controls/buttons/button.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. @@ -16,12 +16,16 @@ */ // CLASS HEADER - #include -// INTERNAL INCLUDES +// EXTERNAL INCLUDES +#include +#include +// INTERNAL INCLUDES #include +#include +#include namespace Dali { @@ -29,25 +33,16 @@ namespace Dali namespace Toolkit { -const char* const Button::SIGNAL_CLICKED = "clicked"; -const char* const Button::SIGNAL_STATE_CHANGED = "state-changed"; - Button::Button() {} -Button::Button( const Button& button ) -: Control( button ) -{ -} +Button::Button( const Button& button ) = default; -Button& Button::operator=( const Button& button ) -{ - if( &button != this ) - { - Control::operator=( button ); - } - return *this; -} +Button::Button( Button&& rhs ) = default; + +Button& Button::operator=( const Button& button ) = default; + +Button& Button::operator=( Button&& rhs ) = default; Button::~Button() { @@ -58,32 +53,22 @@ Button Button::DownCast( BaseHandle handle ) return Control::DownCast(handle); } -void Button::SetDisabled( bool disabled ) -{ - Dali::Toolkit::GetImplementation( *this ).SetDisabled( disabled ); -} - -bool Button::IsDisabled() const -{ - return Dali::Toolkit::GetImplementation( *this ).IsDisabled(); -} - -void Button::SetAnimationTime( float animationTime ) +Button::ButtonSignalType& Button::PressedSignal() { - Dali::Toolkit::GetImplementation( *this ).SetAnimationTime( animationTime ); + return Dali::Toolkit::GetImplementation( *this ).PressedSignal(); } -float Button::GetAnimationTime() const +Button::ButtonSignalType& Button::ReleasedSignal() { - return Dali::Toolkit::GetImplementation( *this ).GetAnimationTime(); + return Dali::Toolkit::GetImplementation( *this ).ReleasedSignal(); } -Button::ClickedSignalType& Button::ClickedSignal() +Button::ButtonSignalType& Button::ClickedSignal() { return Dali::Toolkit::GetImplementation( *this ).ClickedSignal(); } -Button::StateChangedSignalType& Button::StateChangedSignal() +Button::ButtonSignalType& Button::StateChangedSignal() { return Dali::Toolkit::GetImplementation( *this ).StateChangedSignal(); }