X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Fbuttons%2Fcheck-box-button.cpp;h=179304d03125390480da138278b7011761795f16;hb=refs%2Ftags%2Fdali_1.0.38;hp=591a1e4c3ad1a07c3146de966815fb843c545a2c;hpb=e2eda444afbe82e9591fe198eef339227f90a616;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 591a1e4..179304d 100644 --- a/dali-toolkit/public-api/controls/buttons/check-box-button.cpp +++ b/dali-toolkit/public-api/controls/buttons/check-box-button.cpp @@ -1,18 +1,19 @@ -// -// 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) 2014 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 @@ -21,6 +22,7 @@ // INTERNAL INCLUDES #include +#include namespace Dali { @@ -28,12 +30,6 @@ namespace Dali namespace Toolkit { -const char* const CheckBoxButton::ACTION_CHECK_BOX_BUTTON_CLICK = "check-box-button-click"; - -const std::string CheckBoxButton::USE_FADE_ANIMATION_PROPERTY_NAME( "use-fade-animation" ); -const std::string CheckBoxButton::USE_CHECK_ANIMATION_PROPERTY_NAME( "use-check-animation" ); - - CheckBoxButton::CheckBoxButton() : Button() { @@ -67,19 +63,9 @@ CheckBoxButton CheckBoxButton::DownCast( BaseHandle handle ) return Control::DownCast(handle); } -void CheckBoxButton::SetChecked( bool checked ) -{ - Dali::Toolkit::GetImplementation( *this ).SetChecked( checked ); -} - -bool CheckBoxButton::IsChecked() const -{ - return Dali::Toolkit::GetImplementation( *this ).IsChecked(); -} - void CheckBoxButton::SetBackgroundImage( Image image ) { - Dali::Toolkit::GetImplementation( *this ).SetBackgroundImage( image ); + Dali::Toolkit::GetImplementation( *this ).SetBackgroundImage( ImageActor::New( image ) ); } void CheckBoxButton::SetBackgroundImage( Actor image ) @@ -92,50 +78,49 @@ Actor CheckBoxButton::GetBackgroundImage() const return Dali::Toolkit::GetImplementation( *this ).GetBackgroundImage(); } -void CheckBoxButton::SetCheckedImage( Image image ) +void CheckBoxButton::SetSelectedImage( Image image ) { - Dali::Toolkit::GetImplementation( *this ).SetCheckedImage( image ); + Dali::Toolkit::GetImplementation( *this ).SetSelectedImage( ImageActor::New( image ) ); } -void CheckBoxButton::SetCheckedImage( Actor image ) +void CheckBoxButton::SetSelectedImage( Actor image ) { - Dali::Toolkit::GetImplementation( *this ).SetCheckedImage( image ); + Dali::Toolkit::GetImplementation( *this ).SetSelectedImage( image ); } - -Actor CheckBoxButton::GetCheckedImage() const +Actor CheckBoxButton::GetSelectedImage() const { - return Dali::Toolkit::GetImplementation( *this ).GetCheckedImage(); + return Dali::Toolkit::GetImplementation( *this ).GetSelectedImage(); } -void CheckBoxButton::SetDimmedBackgroundImage( Image image ) +void CheckBoxButton::SetDisabledBackgroundImage( Image image ) { - Dali::Toolkit::GetImplementation( *this ).SetDimmedBackgroundImage( image ); + Dali::Toolkit::GetImplementation( *this ).SetDisabledBackgroundImage( ImageActor::New( image ) ); } -void CheckBoxButton::SetDimmedBackgroundImage( Actor image ) +void CheckBoxButton::SetDisabledBackgroundImage( Actor image ) { - Dali::Toolkit::GetImplementation( *this ).SetDimmedBackgroundImage( image ); + Dali::Toolkit::GetImplementation( *this ).SetDisabledBackgroundImage( image ); } -Actor CheckBoxButton::GetDimmedBackgroundImage() const +Actor CheckBoxButton::GetDisabledBackgroundImage() const { - return Dali::Toolkit::GetImplementation( *this ).GetDimmedBackgroundImage(); + return Dali::Toolkit::GetImplementation( *this ).GetDisabledBackgroundImage(); } -void CheckBoxButton::SetDimmedCheckedImage( Image image ) +void CheckBoxButton::SetDisabledSelectedImage( Image image ) { - Dali::Toolkit::GetImplementation( *this ).SetDimmedCheckedImage( image ); + Dali::Toolkit::GetImplementation( *this ).SetDisabledSelectedImage( ImageActor::New( image ) ); } -void CheckBoxButton::SetDimmedCheckedImage( Actor image ) +void CheckBoxButton::SetDisabledSelectedImage( Actor image ) { - Dali::Toolkit::GetImplementation( *this ).SetDimmedCheckedImage( image ); + Dali::Toolkit::GetImplementation( *this ).SetDisabledSelectedImage( image ); } -Actor CheckBoxButton::GetDimmedCheckedImage() const +Actor CheckBoxButton::GetDisabledSelectedImage() const { - return Dali::Toolkit::GetImplementation( *this ).GetDimmedCheckedImage(); + return Dali::Toolkit::GetImplementation( *this ).GetDisabledSelectedImage(); } CheckBoxButton::CheckBoxButton( Internal::CheckBoxButton& implementation )