X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Fbuttons%2Fcheck-box-button.cpp;h=720b5954f52e2922b9f4e0d24edd3c09bb62042d;hb=HEAD;hp=de1c2b0092e5ee83a338c38e8f100e3b64dfb968;hpb=68106e2cbb8541c18a77f39770ea7759f44e02a0;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/public-api/controls/buttons/check-box-button.cpp b/dali-toolkit/public-api/controls/buttons/check-box-button.cpp index de1c2b0..720b595 100644 --- a/dali-toolkit/public-api/controls/buttons/check-box-button.cpp +++ b/dali-toolkit/public-api/controls/buttons/check-box-button.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 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. @@ -22,32 +22,23 @@ // INTERNAL INCLUDES #include -#include namespace Dali { - namespace Toolkit { - CheckBoxButton::CheckBoxButton() : Button() { } -CheckBoxButton::CheckBoxButton( const CheckBoxButton& checkBox ) -: Button( checkBox ) -{ -} +CheckBoxButton::CheckBoxButton(const CheckBoxButton& checkBox) = default; -CheckBoxButton& CheckBoxButton::operator=( const CheckBoxButton& checkBox ) -{ - if( &checkBox != this ) - { - Button::operator=( checkBox ); - } - return *this; -} +CheckBoxButton::CheckBoxButton(CheckBoxButton&& rhs) noexcept = default; + +CheckBoxButton& CheckBoxButton::operator=(const CheckBoxButton& checkBox) = default; + +CheckBoxButton& CheckBoxButton::operator=(CheckBoxButton&& rhs) noexcept = default; CheckBoxButton::~CheckBoxButton() { @@ -58,78 +49,18 @@ CheckBoxButton CheckBoxButton::New() return Internal::CheckBoxButton::New(); } -CheckBoxButton CheckBoxButton::DownCast( BaseHandle handle ) +CheckBoxButton CheckBoxButton::DownCast(BaseHandle handle) { return Control::DownCast(handle); } -void CheckBoxButton::SetBackgroundImage( Image image ) -{ - Dali::Toolkit::GetImplementation( *this ).SetBackgroundImage( ImageActor::New( image ) ); -} - -void CheckBoxButton::SetBackgroundImage( Actor image ) -{ - Dali::Toolkit::GetImplementation( *this ).SetBackgroundImage( image ); -} - -Actor CheckBoxButton::GetBackgroundImage() const -{ - return Dali::Toolkit::GetImplementation( *this ).GetBackgroundImage(); -} - -void CheckBoxButton::SetSelectedImage( Image image ) -{ - Dali::Toolkit::GetImplementation( *this ).SetSelectedImage( ImageActor::New( image ) ); -} - -void CheckBoxButton::SetSelectedImage( Actor image ) -{ - Dali::Toolkit::GetImplementation( *this ).SetSelectedImage( image ); -} - -Actor CheckBoxButton::GetSelectedImage() const -{ - return Dali::Toolkit::GetImplementation( *this ).GetSelectedImage(); -} - -void CheckBoxButton::SetDisabledBackgroundImage( Image image ) -{ - Dali::Toolkit::GetImplementation( *this ).SetDisabledBackgroundImage( ImageActor::New( image ) ); -} - -void CheckBoxButton::SetDisabledBackgroundImage( Actor image ) -{ - Dali::Toolkit::GetImplementation( *this ).SetDisabledBackgroundImage( image ); -} - -Actor CheckBoxButton::GetDisabledBackgroundImage() const -{ - return Dali::Toolkit::GetImplementation( *this ).GetDisabledBackgroundImage(); -} - -void CheckBoxButton::SetDisabledSelectedImage( Image image ) -{ - Dali::Toolkit::GetImplementation( *this ).SetDisabledSelectedImage( ImageActor::New( image ) ); -} - -void CheckBoxButton::SetDisabledSelectedImage( Actor image ) -{ - Dali::Toolkit::GetImplementation( *this ).SetDisabledSelectedImage( image ); -} - -Actor CheckBoxButton::GetDisabledSelectedImage() const -{ - return Dali::Toolkit::GetImplementation( *this ).GetDisabledSelectedImage(); -} - -CheckBoxButton::CheckBoxButton( Internal::CheckBoxButton& implementation ) -: Button( implementation ) +CheckBoxButton::CheckBoxButton(Internal::CheckBoxButton& implementation) +: Button(implementation) { } -CheckBoxButton::CheckBoxButton( Dali::Internal::CustomActor* internal ) -: Button( internal ) +CheckBoxButton::CheckBoxButton(Dali::Internal::CustomActor* internal) +: Button(internal) { VerifyCustomActorPointer(internal); }