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=70377b3003219d53158311f4809c5ce575a39531;hp=aa03116180291802132606c2e0f241f2075fe89a;hb=4e284359dc32cfcb20c49068406fb341afed833b;hpb=e2eda444afbe82e9591fe198eef339227f90a616 diff --git a/dali-toolkit/public-api/controls/buttons/button.cpp b/dali-toolkit/public-api/controls/buttons/button.cpp index aa03116..70377b3 100644 --- a/dali-toolkit/public-api/controls/buttons/button.cpp +++ b/dali-toolkit/public-api/controls/buttons/button.cpp @@ -1,26 +1,32 @@ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Flora License, Version 1.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://floralicense.org/license/ -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an AS IS BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// +/* + * Copyright (c) 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // CLASS HEADER - #include -// INTERNAL INCLUDES +// EXTERNAL INCLUDES +#include +#include +#include +// INTERNAL INCLUDES #include +#include +#include namespace Dali { @@ -28,9 +34,6 @@ namespace Dali namespace Toolkit { -const char* const Button::SIGNAL_CLICKED = "clicked"; -const char* const Button::PROPERTY_DIMMED = "dimmed"; - Button::Button() {} @@ -57,29 +60,24 @@ Button Button::DownCast( BaseHandle handle ) return Control::DownCast(handle); } -void Button::SetDimmed( bool dimmed ) +Button::ButtonSignalType& Button::PressedSignal() { - Dali::Toolkit::GetImplementation( *this ).SetDimmed( dimmed ); + return Dali::Toolkit::GetImplementation( *this ).PressedSignal(); } -bool Button::IsDimmed() const +Button::ButtonSignalType& Button::ReleasedSignal() { - return Dali::Toolkit::GetImplementation( *this ).IsDimmed(); + return Dali::Toolkit::GetImplementation( *this ).ReleasedSignal(); } -void Button::SetAnimationTime( float animationTime ) +Button::ButtonSignalType& Button::ClickedSignal() { - Dali::Toolkit::GetImplementation( *this ).SetAnimationTime( animationTime ); -} - -float Button::GetAnimationTime() const -{ - return Dali::Toolkit::GetImplementation( *this ).GetAnimationTime(); + return Dali::Toolkit::GetImplementation( *this ).ClickedSignal(); } -Button::ClickedSignalV2& Button::ClickedSignal() +Button::ButtonSignalType& Button::StateChangedSignal() { - return Dali::Toolkit::GetImplementation( *this ).ClickedSignal(); + return Dali::Toolkit::GetImplementation( *this ).StateChangedSignal(); } Button::Button( Internal::Button& implementation )