From 87d2919a6a3f359a17c2567f2fe35e34e9db8144 Mon Sep 17 00:00:00 2001 From: Kimmo Hoikka Date: Mon, 17 Nov 2014 19:26:21 +0000 Subject: [PATCH] remove rotating selector as its dead code Change-Id: Iccb8f61096d3856c3bfe3a2d093548c6f06d4c21 --- .../src/dali-toolkit-unmanaged/CMakeLists.txt | 1 - .../utc-Dali-RotatingSelector.cpp | 257 ------------------- optional/dali-toolkit/dali-toolkit.h | 1 - .../controls/selectors/rotating-selector-impl.cpp | 280 --------------------- .../controls/selectors/rotating-selector-impl.h | 188 -------------- optional/dali-toolkit/internal/file.list | 1 - .../controls/selectors/rotating-selector.cpp | 121 --------- .../controls/selectors/rotating-selector.h | 161 ------------ optional/dali-toolkit/public-api/file.list | 4 - 9 files changed, 1014 deletions(-) delete mode 100644 automated-tests/src/dali-toolkit-unmanaged/utc-Dali-RotatingSelector.cpp delete mode 100644 optional/dali-toolkit/internal/controls/selectors/rotating-selector-impl.cpp delete mode 100644 optional/dali-toolkit/internal/controls/selectors/rotating-selector-impl.h delete mode 100644 optional/dali-toolkit/public-api/controls/selectors/rotating-selector.cpp delete mode 100644 optional/dali-toolkit/public-api/controls/selectors/rotating-selector.h diff --git a/automated-tests/src/dali-toolkit-unmanaged/CMakeLists.txt b/automated-tests/src/dali-toolkit-unmanaged/CMakeLists.txt index 457b71b..a41b335 100644 --- a/automated-tests/src/dali-toolkit-unmanaged/CMakeLists.txt +++ b/automated-tests/src/dali-toolkit-unmanaged/CMakeLists.txt @@ -28,7 +28,6 @@ SET(TC_SOURCES utc-Dali-PageTurnEffect.cpp utc-Dali-PageTurnView.cpp utc-Dali-RollLayout.cpp - utc-Dali-RotatingSelector.cpp utc-Dali-ScrollView.cpp utc-Dali-ShadowView.cpp utc-Dali-ShearEffect.cpp diff --git a/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-RotatingSelector.cpp b/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-RotatingSelector.cpp deleted file mode 100644 index 48a3af8..0000000 --- a/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-RotatingSelector.cpp +++ /dev/null @@ -1,257 +0,0 @@ -/* - * 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. - * - */ - -#include -#include -#include -#include -#include - - - -using namespace Dali; -using namespace Toolkit; - - -namespace -{ -static bool gObjectCreatedCallBackCalled; - -static void TestCallback(BaseHandle handle) -{ - gObjectCreatedCallBackCalled = true; -} - -static bool gSelectedSignalReceived = false; -static bool gSelected = false; - -const Dali::TouchPoint pointDownInside( 0, TouchPoint::Down, 240, 400 ); -const Dali::TouchPoint pointUpInside( 0, TouchPoint::Up, 240, 400 ); -} // namespace - - -void rotating_selector_startup(void) -{ - test_return_value = TET_UNDEF; -} - -void rotating_selector_cleanup(void) -{ - test_return_value = TET_PASS; -} - - -int UtcDaliRotatingSelectorNew(void) -{ - ToolkitTestApplication application; - - tet_infoline("UtcDaliRotatingSelectorNew"); - RotatingSelector selector; - - DALI_TEST_CHECK(!selector); - - Actor unSelectedActor = Actor::New(); - Actor selectedActor = Actor::New(); - - selector = RotatingSelector::New(unSelectedActor, selectedActor); - - DALI_TEST_CHECK(selector); - - //Additional check to ensure object is created by checking if it's registered - ObjectRegistry registry = Stage::GetCurrent().GetObjectRegistry(); - DALI_TEST_CHECK( registry ); - - gObjectCreatedCallBackCalled = false; - registry.ObjectCreatedSignal().Connect(&TestCallback); - { - RotatingSelector selector = RotatingSelector::New(unSelectedActor, selectedActor); - } - DALI_TEST_CHECK( gObjectCreatedCallBackCalled ); - END_TEST; -} - -namespace -{ - -// Callback test function -void OnSelectedSignal(RotatingSelector actor, bool selected) -{ - gSelectedSignalReceived = true; - gSelected = selected; -} - -} - - -int UtcDaliRotatingSelectorSetSelected(void) -{ - ToolkitTestApplication application; - - tet_infoline("UtcDaliRotatingSelectorSetSelected"); - - BitmapImage img = BitmapImage::New( 1,1 ); - ImageActor unSelectedActor = ImageActor::New( img ); - ImageActor selectedActor = ImageActor::New( img ); - - RotatingSelector selector = RotatingSelector::New(unSelectedActor, selectedActor); - - selector.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - selector.SetParentOrigin( ParentOrigin::TOP_LEFT ); - selector.SetPosition( 240, 400 ); - selector.SetSize( 100, 100 ); - - // connect to its selected signal - selector.SelectedSignal().Connect( &OnSelectedSignal ); - - Stage::GetCurrent().Add( selector ); - - gSelectedSignalReceived = false; - gSelected = false; - - selector.SetSelected(true); - application.SendNotification(); - application.Render(1000); - application.SendNotification(); - application.Render(1000); - application.SendNotification(); - application.Render(1000); - - DALI_TEST_CHECK( selector.IsSelected() ); - DALI_TEST_CHECK( gSelectedSignalReceived ); - DALI_TEST_CHECK( gSelected ); - - gSelectedSignalReceived = false; - gSelected = false; - - selector.SetSelected(false); - application.SendNotification(); - application.Render(1000); - application.SendNotification(); - application.Render(1000); - application.SendNotification(); - application.Render(1000); - - DALI_TEST_CHECK( gSelectedSignalReceived ); - DALI_TEST_CHECK( !gSelected ); - DALI_TEST_CHECK( !selector.IsSelected() ); - END_TEST; -} - -int UtcDaliRotatingSelectorSetSelectedAndUnSelectedActor(void) -{ - ToolkitTestApplication application; - - tet_infoline("UtcDaliRotatingSelectorSetSelectedAndUnSelectedActor"); - - BitmapImage img = BitmapImage::New( 1,1 ); - ImageActor actor1 = ImageActor::New( img ); - ImageActor actor2 = ImageActor::New( img ); - - RotatingSelector selector = RotatingSelector::New(actor1, actor2); - Stage::GetCurrent().Add( selector ); - - ImageActor unSelectedActor = ImageActor::New( img ); - ImageActor selectedActor = ImageActor::New( img ); - - selector.SetSelectedActor(selectedActor); - - Actor actor3 = selector.GetSelectedActor(); - DALI_TEST_CHECK( selectedActor == actor3 ); - - selector.SetUnSelectedActor(unSelectedActor); - - Actor actor4 = selector.GetUnSelectedActor(); - DALI_TEST_CHECK( unSelectedActor == actor4 ); - - END_TEST; -} - - -int UtcDaliRotatingSelectorSetSelectable(void) -{ - ToolkitTestApplication application; - - tet_infoline("UtcDaliRotatingSelectorSetSelectable"); - - BitmapImage img = BitmapImage::New( 1,1 ); - ImageActor unSelectedActor = ImageActor::New( img ); - ImageActor selectedActor = ImageActor::New( img ); - - RotatingSelector selector = RotatingSelector::New(unSelectedActor, selectedActor); - - selector.SetSelectable(true); - DALI_TEST_CHECK( selector.IsSelectable() ); - - selector.SetSelectable(false); - DALI_TEST_CHECK( !selector.IsSelectable() ); - END_TEST; -} - -int UtcDaliRotatingSelectorSignalSelected(void) -{ - ToolkitTestApplication application; - - tet_infoline("UtcDaliRotatingSelectorSignalSelected"); - - BitmapImage img = BitmapImage::New( 1,1 ); - ImageActor unSelectedActor = ImageActor::New( img ); - ImageActor selectedActor = ImageActor::New( img ); - - RotatingSelector selector = RotatingSelector::New(unSelectedActor, selectedActor); - - selector.SetAnchorPoint( AnchorPoint::TOP_LEFT ); - selector.SetParentOrigin( ParentOrigin::TOP_LEFT ); - selector.SetPosition( 240, 400 ); - selector.SetSize( 100, 100 ); - - // connect to its selected signal - selector.SelectedSignal().Connect( &OnSelectedSignal ); - - Stage::GetCurrent().Add( selector ); - - DALI_TEST_CHECK( !selector.IsSelected() ); - - gSelectedSignalReceived = false; - gSelected = false; - - application.SendNotification(); - application.Render(1000); - application.SendNotification(); - application.Render(1000); - - //Test using touch event simulation - Dali::Integration::TouchEvent event; - - event = Dali::Integration::TouchEvent(); - event.AddPoint( pointDownInside ); - application.ProcessEvent( event ); - - event = Dali::Integration::TouchEvent(); - event.AddPoint( pointUpInside ); - application.ProcessEvent( event ); - - application.SendNotification(); - application.Render(1000); - application.SendNotification(); - application.Render(1000); - - DALI_TEST_CHECK( selector.IsSelected() ); - DALI_TEST_CHECK( gSelectedSignalReceived ); - DALI_TEST_CHECK( gSelected ); - - END_TEST; -} diff --git a/optional/dali-toolkit/dali-toolkit.h b/optional/dali-toolkit/dali-toolkit.h index b0a7a40..c738f5a 100644 --- a/optional/dali-toolkit/dali-toolkit.h +++ b/optional/dali-toolkit/dali-toolkit.h @@ -94,7 +94,6 @@ #include #include #include -#include #include #include #include diff --git a/optional/dali-toolkit/internal/controls/selectors/rotating-selector-impl.cpp b/optional/dali-toolkit/internal/controls/selectors/rotating-selector-impl.cpp deleted file mode 100644 index a95ee7c..0000000 --- a/optional/dali-toolkit/internal/controls/selectors/rotating-selector-impl.cpp +++ /dev/null @@ -1,280 +0,0 @@ -/* - * 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 -#include - -// EXTERNAL INCLUDES -#include -#include -#include -#include - -// INTERNAL INCLUDES -#include - -namespace -{ -const float TOUCH_OPACITY_THRESHOLD = 0.1f; -} // namespace - -namespace Dali -{ - -namespace Toolkit -{ - -namespace Internal -{ -namespace -{ -//Type registration -BaseHandle Create() -{ - // empty handle, as RotatingSelector takes children during construction - return Toolkit::RotatingSelector(); -} -TypeRegistration mType( typeid(Toolkit::RotatingSelector), typeid(Toolkit::Control), Create ); - -const Quaternion ROTATION_ANGLE(0.0f, Vector3(1.0f, 0.0f, 0.0f)); -} - -Dali::Toolkit::RotatingSelector RotatingSelector::New(Actor& unSelectedActor, Actor& selectedActor) -{ - // Create the implementation, temporarily owned on stack - IntrusivePtr< RotatingSelector > customCheckActor = new RotatingSelector; - - // Pass ownership to CustomActor - Dali::Toolkit::RotatingSelector handle( *customCheckActor ); - - // Second-phase init of the implementation - // This can only be done after the CustomActor connection has been made... - customCheckActor->Initialize(); - - customCheckActor->SetSelectedActor(selectedActor); - customCheckActor->SetUnSelectedActor(unSelectedActor); - - return handle; -} - -void RotatingSelector::OnInitialize() -{ - mContainer = Actor::New(); - mContainer.SetName("Selector Container"); - mUnSelectedActor = Actor::New(); - mSelectedActor = Actor::New(); - - mRotateAnimation = Animation::New(0.5f); - mRotateAnimation.FinishedSignal().Connect(this, &RotatingSelector::AnimationCompleted); - - mUnSelectedActor.SetParentOrigin(ParentOrigin::CENTER); - mUnSelectedActor.SetAnchorPoint(AnchorPoint::CENTER); - - mSelectedActor.SetParentOrigin(ParentOrigin::CENTER); - mSelectedActor.SetAnchorPoint(AnchorPoint::CENTER); - - mContainer.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION_PLUS_LOCAL_POSITION ); - - Constraint constraint = Constraint::New( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ); - mSelectedActor.ApplyConstraint(constraint); - mUnSelectedActor.ApplyConstraint(constraint); - mContainer.ApplyConstraint(constraint); - - mContainer.Add(mUnSelectedActor); - mSelectedActor.SetRotation(Radian(Math::PI), Vector3::XAXIS ); - - mUnSelectedActor.SetName("RotatingSelector : UnSelectedActor"); - mSelectedActor.SetName("RotatingSelector : SelectedActor"); - - Self().Add(mContainer); - Self().SetLeaveRequired(true); - - mRotateAnimation.RotateBy(mContainer, Radian(Math::PI), Vector3(1.0f, 0.0f, 0.0f)); -} - -RotatingSelector::RotatingSelector() -: Control( REQUIRES_TOUCH_EVENTS ), - mSelected(false), - mSelectable(true), - mPressed(false), - mIsAnimating(false) -{ -} - -RotatingSelector::~RotatingSelector() -{ - mRotateAnimation.Reset(); -} - -void RotatingSelector::SetSelected( bool toggle ) -{ - if(toggle != mSelected) - { - if( mSelectable ) - { - ToggleAndAnimateSelection(); - } - } -} - -void RotatingSelector::SetSelectedActor( Actor& selectedActor ) -{ - unsigned int numChildren = mSelectedActor.GetChildCount(); - for( unsigned int i=0; i TOUCH_OPACITY_THRESHOLD) - { - mPressed = true; - } - break; - case TouchPoint::Leave: - mPressed = false; - break; - case TouchPoint::Up: - { - if(mSelectable && mPressed) - { - ToggleAndAnimateSelection(); - } - mPressed = false; - break; - } - default: - break; - } - } - - return false; // dont consume -} - -void RotatingSelector::ToggleAndAnimateSelection() -{ - if(!mIsAnimating) - { - mSelected = !mSelected; - if(mSelected) - { - //The checked image (i.e mSelectedActor should be in front) - mSelectedActor.SetPosition(0.0f, 0.0f, -1.0f); - mContainer.Add(mSelectedActor); - } - else - { - //The un checked image (i.e mUnSelectedActor should be in front) - mUnSelectedActor.SetPosition(0.0f, 0.0f, 1.0f); - mContainer.Add(mUnSelectedActor); - } - - mIsAnimating = true; - mRotateAnimation.Play(); - } -} - -void RotatingSelector::AnimationCompleted( Animation& animation ) -{ - if(mSelected) - { - //The checked image (i.e mSelectedActor should be in front) - mSelectedActor.SetPosition(0.0f, 0.0f, 0.0f); - mContainer.Remove(mUnSelectedActor); - - } - else - { - //The un checked image (i.e mUnSelectedActor should be in front) - mContainer.Remove(mSelectedActor); - mUnSelectedActor.SetPosition(0.0f, 0.0f, 0.0f); - } - - mIsAnimating = false; - - //Emit signal. - Dali::Toolkit::RotatingSelector handle( GetOwner() ); - mCheckedSignalV2.Emit( handle, mSelected ); -} - -} // namespace Internal - -} // namespace Toolkit - -} // namespace Dali diff --git a/optional/dali-toolkit/internal/controls/selectors/rotating-selector-impl.h b/optional/dali-toolkit/internal/controls/selectors/rotating-selector-impl.h deleted file mode 100644 index e4ce4f1..0000000 --- a/optional/dali-toolkit/internal/controls/selectors/rotating-selector-impl.h +++ /dev/null @@ -1,188 +0,0 @@ -#ifndef __DALI_TOOLKIT_INTERNAL_CUSTOM_CHECK_ACTOR_H__ -#define __DALI_TOOLKIT_INTERNAL_CUSTOM_CHECK_ACTOR_H__ - -/* - * 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. - * - */ - -// EXTERNAL INCLUDES -#include - -// INTERNAL INCLUDES -#include -#include - -namespace Dali -{ - -namespace Toolkit -{ - -namespace Internal -{ - -class RotatingSelector; - - -/** - * RotatingSelector is a custom control for text aligning and multiline support - */ -class RotatingSelector : public Control -{ -public: - - /** - * Create a new RotatingSelector. - * @return A smart-pointer to the newly allocated RotatingSelector. - */ - static Dali::Toolkit::RotatingSelector New(Actor& unSelectedActor, Actor& selectedActor); - - /** - * @copydoc Dali::Toolkit::RotatingSelector::SetSelected() - */ - void SetSelected( bool toggle ); - - /** - * @copydoc Dali::Toolkit::RotatingSelector::IsSelected() - */ - bool IsSelected() const {return mSelected;} - - /** - * @copydoc Dali::Toolkit::RotatingSelector::SetSelectedActor() - */ - void SetSelectedActor( Actor& selectedActor ); - - /** - * @copydoc Dali::Toolkit::RotatingSelector::GetSelectedActor() - */ - Actor GetSelectedActor(); - - /** - * @copydoc Dali::Toolkit::RotatingSelector::SetUnSelectedActor() - */ - void SetUnSelectedActor( Actor& unSelectedActor ); - - /** - * @copydoc Dali::Toolkit::RotatingSelector::GetUnSelectedActor() - */ - Actor GetUnSelectedActor(); - - /** - * @copydoc Dali::Toolkit::RotatingSelector::SetSelectable() - */ - void SetSelectable( bool selectable ); - - /** - * @copydoc Dali::Toolkit::RotatingSelector::IsSelectable() - */ - bool IsSelectable()const {return mSelectable;} - - /** - * @copydoc Dali::Toolkit::RotatingSelector::SelectedSignal() - */ - Toolkit::RotatingSelector::SelectedSignalV2& SelectedSignal(); - - /** - * Connects a callback function with the object's signals. - * @param[in] object The object providing the signal. - * @param[in] tracker Used to disconnect the signal. - * @param[in] signalName The signal to connect to. - * @param[in] functor A newly allocated FunctorDelegate. - * @return True if the signal was connected. - * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor. - */ - static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor ); - -private: // From Control - - /** - * @copydoc Toolkit::Control::OnInitialize() - */ - virtual void OnInitialize(); - - /** - * @copydoc Toolkit::Control::OnTouchEvent(const TouchEvent& event) - */ - virtual bool OnTouchEvent( const TouchEvent& event ); - -protected: - - /** - * Construct a new RotatingSelector. - */ - RotatingSelector(); - - /** - * A reference counted object may only be deleted by calling Unreference() - */ - virtual ~RotatingSelector(); - -private: - - // Undefined - RotatingSelector(const RotatingSelector&); - - // Undefined - RotatingSelector& operator=(const RotatingSelector& rhs); - - void ToggleAndAnimateSelection(); - void AnimationCompleted( Animation& animation ); - - -private: - - Actor mContainer; - bool mSelected; - bool mSelectable; - - Actor mUnSelectedActor; - Actor mSelectedActor; - bool mPressed; - - Animation mRotateAnimation; - - bool mIsAnimating; - - Toolkit::RotatingSelector::SelectedSignalV2 mCheckedSignalV2; -}; - -} // namespace Internal - -// Helpers for public-api forwarding methods - -inline Toolkit::Internal::RotatingSelector& GetImpl(Toolkit::RotatingSelector& RotatingSelector) -{ - DALI_ASSERT_ALWAYS(RotatingSelector); - - Dali::RefObject& handle = RotatingSelector.GetImplementation(); - - return static_cast(handle); -} - -inline const Toolkit::Internal::RotatingSelector& GetImpl(const Toolkit::RotatingSelector& RotatingSelector) -{ - DALI_ASSERT_ALWAYS(RotatingSelector); - - const Dali::RefObject& handle = RotatingSelector.GetImplementation(); - - return static_cast(handle); -} - -} // namespace Toolkit - -} // namespace Dali - -#endif // __DALI_TOOLKIT_INTERNAL_ITEM_VIEW_H__ diff --git a/optional/dali-toolkit/internal/file.list b/optional/dali-toolkit/internal/file.list index 797c08b..31280cf 100644 --- a/optional/dali-toolkit/internal/file.list +++ b/optional/dali-toolkit/internal/file.list @@ -11,7 +11,6 @@ toolkit_optional_src_files = \ $(toolkit_optional_src_dir)/controls/page-turn-view/page-turn-view-impl.cpp \ $(toolkit_optional_src_dir)/controls/page-turn-view/page-turn-portrait-view-impl.cpp \ $(toolkit_optional_src_dir)/controls/page-turn-view/page-turn-landscape-view-impl.cpp \ - $(toolkit_optional_src_dir)/controls/selectors/rotating-selector-impl.cpp \ $(toolkit_optional_src_dir)/controls/shadow-view/shadow-view-impl.cpp \ $(toolkit_optional_src_dir)/controls/slider/slider-impl.cpp \ $(toolkit_optional_src_dir)/controls/super-blur-view/super-blur-view-impl.cpp \ diff --git a/optional/dali-toolkit/public-api/controls/selectors/rotating-selector.cpp b/optional/dali-toolkit/public-api/controls/selectors/rotating-selector.cpp deleted file mode 100644 index 6e73cfa..0000000 --- a/optional/dali-toolkit/public-api/controls/selectors/rotating-selector.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/* - * 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. - * - */ - -#include -#include - -namespace Dali -{ - -namespace Toolkit -{ - -const char* const RotatingSelector::SIGNAL_CHECKED = "checked"; - -RotatingSelector::RotatingSelector() -{ -} - -RotatingSelector::RotatingSelector( const RotatingSelector& rotatingSelector ) -: Control( rotatingSelector ) -{ -} - -RotatingSelector& RotatingSelector::operator=( const RotatingSelector& rotatingSelector ) -{ - if( &rotatingSelector != this ) - { - Control::operator=( rotatingSelector ); - } - - return *this; -} - - -RotatingSelector::~RotatingSelector() -{ -} - -RotatingSelector RotatingSelector::New(Actor& unSelectedActor, Actor& selectedActor) -{ - return Internal::RotatingSelector::New(unSelectedActor, selectedActor); -} - -RotatingSelector RotatingSelector::DownCast( BaseHandle handle ) -{ - return Control::DownCast(handle); -} - -void RotatingSelector::SetSelected( bool checked ) -{ - Dali::Toolkit::GetImpl( *this ).SetSelected( checked ); -} - -bool RotatingSelector::IsSelected() const -{ - return Dali::Toolkit::GetImpl( *this ).IsSelected(); -} - -void RotatingSelector::SetSelectedActor( Actor& selectedActor ) -{ - Dali::Toolkit::GetImpl( *this ).SetSelectedActor( selectedActor ); -} - -Actor RotatingSelector::GetSelectedActor() -{ - return Dali::Toolkit::GetImpl( *this ).GetSelectedActor(); -} - -void RotatingSelector::SetUnSelectedActor( Actor& unSelectedActor ) -{ - Dali::Toolkit::GetImpl( *this ).SetUnSelectedActor( unSelectedActor ); -} - -Actor RotatingSelector::GetUnSelectedActor() -{ - return Dali::Toolkit::GetImpl( *this ).GetUnSelectedActor(); -} - -void RotatingSelector::SetSelectable( bool selectable ) -{ - Dali::Toolkit::GetImpl( *this ).SetSelectable( selectable ); -} - -bool RotatingSelector::IsSelectable()const -{ - return Dali::Toolkit::GetImpl( *this ).IsSelectable(); -} - -RotatingSelector::SelectedSignalV2& RotatingSelector::SelectedSignal() -{ - return Dali::Toolkit::GetImpl( *this ).SelectedSignal(); -} - -RotatingSelector::RotatingSelector( Internal::RotatingSelector& implementation ) -: Control(implementation) -{ -} - -RotatingSelector::RotatingSelector( Dali::Internal::CustomActor* internal ) -: Control( internal ) -{ - VerifyCustomActorPointer(internal); -} - -} // namespace Toolkit - -} // namespace Dali diff --git a/optional/dali-toolkit/public-api/controls/selectors/rotating-selector.h b/optional/dali-toolkit/public-api/controls/selectors/rotating-selector.h deleted file mode 100644 index b751427..0000000 --- a/optional/dali-toolkit/public-api/controls/selectors/rotating-selector.h +++ /dev/null @@ -1,161 +0,0 @@ -#ifndef __DALI_TOOLKIT_CUSTOM_CHECK_ACTOR_H__ -#define __DALI_TOOLKIT_CUSTOM_CHECK_ACTOR_H__ - -/* - * 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. - * - */ - -// INTERNAL INCLUDES -#include - -namespace Dali -{ - -namespace Toolkit -{ - -namespace Internal DALI_INTERNAL -{ -class RotatingSelector; -} - -/** - * RotatingSelector is a simple control to switch between two states (selected/unselected). A signal is emitted when the selector switches between - * the two states. The control has two faces one behind the other, The control is rotated while switching between the two states - */ -class DALI_IMPORT_API RotatingSelector : public Control -{ -public: - //Signal Names - static const char* const SIGNAL_CHECKED; - -public: - - /** - * Create an uninitialized RotatingSelector; this can be initialized with RotatingSelector::New() - * Calling member functions with an uninitialized Dali::Object is not allowed. - */ - RotatingSelector(); - - /** - * Copy constructor. - */ - RotatingSelector( const RotatingSelector& rotatingSelector ); - - /** - * Assignment operator. - */ - RotatingSelector& operator=( const RotatingSelector& rotatingSelector ); - - /** - * @brief Destructor - * - * This is non-virtual since derived Handle types must not contain data or virtual methods. - */ - ~RotatingSelector(); - - /** - * Create an initialized RotatingSelector. - * @return A handle to a newly allocated Dali resource. - */ - static RotatingSelector New(Actor& unSelectedActor, Actor& selectedActor); - - /** - * Downcast an Object handle to RotatingSelector. If handle points to a RotatingSelector the - * downcast produces valid handle. If not the returned handle is left uninitialized. - * @param[in] handle Handle to an object - * @return handle to a RotatingSelector or an uninitialized handle - */ - static RotatingSelector DownCast( BaseHandle handle ); - - /** - * Toggles the selection status of the selector. - * @param[in] toggle true for selected and false for un selected. - */ - void SetSelected( bool toggle ); - - /** - * Queries the selection status of the selector. - * @return true if the selector is selected otherwise false - */ - bool IsSelected() const; - - /** - * Sets the actor to be displayed by the selector when it is in selected state - * @param[in] selectedActor The actor to display - */ - void SetSelectedActor( Actor& selectedActor ); - - /** - * Gets the actor to be displayed by the selector when it is in selected state - * @return A handle to the selected actor. If the selected actor has not been set, this handle will be invalid. - */ - Actor GetSelectedActor(); - - /** - * Sets the actor to be displayed by the selector when it is in unselected state - * @param[in] unSelectedActor The actor to display - */ - void SetUnSelectedActor( Actor& unSelectedActor ); - - /** - * Gets the actor to be displayed by the selector when it is in unselected state - * @return A handle to Actor. If the unselected actor has not been set, this handle will be invalid. - */ - Actor GetUnSelectedActor(); - - /** - * Sets whether the Selector is selectable - * @param[in] selectable true to be able to toggle the selector false otherwise - */ - void SetSelectable( bool selectable ); - - /** - * Queries whether the Selector is selectable - * @return true if the selector is selectable, false otherwise - */ - bool IsSelectable()const; - -public: //Signals - - // RotatingSelector Toggled - typedef SignalV2< void( RotatingSelector, bool ) > SelectedSignalV2; - - /** - * Signal emitted when the rotating selector is in switched to a selected state. - */ - SelectedSignalV2& SelectedSignal(); - -public: // Not intended for application developers - - /** - * Creates a handle using the Toolkit::Internal implementation. - * @param[in] implementation The Control implementation. - */ - DALI_INTERNAL RotatingSelector( Internal::RotatingSelector& implementation ); - - /** - * Allows the creation of this Control from an Internal::CustomActor pointer. - * @param[in] internal A pointer to the internal CustomActor. - */ - explicit DALI_INTERNAL RotatingSelector( Dali::Internal::CustomActor* internal ); -}; - -} // namespace Toolkit - -} // namespace Dali - -#endif // __DALI_TOOLKIT_CUSTOM_CHECK_ACTOR_H__ diff --git a/optional/dali-toolkit/public-api/file.list b/optional/dali-toolkit/public-api/file.list index 31ea4c7..eb41f50 100755 --- a/optional/dali-toolkit/public-api/file.list +++ b/optional/dali-toolkit/public-api/file.list @@ -13,7 +13,6 @@ public_api_optional_src_files = \ $(public_api_optional_src_dir)/controls/page-turn-view/page-factory.cpp \ $(public_api_optional_src_dir)/controls/page-turn-view/page-turn-portrait-view.cpp \ $(public_api_optional_src_dir)/controls/page-turn-view/page-turn-landscape-view.cpp \ - $(public_api_optional_src_dir)/controls/selectors/rotating-selector.cpp \ $(public_api_optional_src_dir)/controls/shadow-view/shadow-view.cpp \ $(public_api_optional_src_dir)/controls/slider/slider.cpp \ $(public_api_optional_src_dir)/controls/super-blur-view/super-blur-view.cpp \ @@ -94,9 +93,6 @@ public_api_optional_page_turn_view_header_files = \ public_api_optional_slider_header_files = \ $(public_api_optional_src_dir)/controls/slider/slider.h -public_api_optional_selectors_header_files = \ - $(public_api_optional_src_dir)/controls/selectors/rotating-selector.h - public_api_optional_shadow_view_header_files = \ $(public_api_optional_src_dir)/controls/shadow-view/shadow-view.h -- 2.7.4