-//
-// 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) 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.
+ * 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 <dali-toolkit/public-api/controls/scrollable/scrollable.h>
#include <dali-toolkit/internal/controls/scrollable/scrollable-impl.h>
+#include <dali-toolkit/public-api/controls/scrollable/scrollable.h>
using namespace Dali;
namespace Dali
{
-
namespace Toolkit
{
-
-const std::string Scrollable::SCROLL_RELATIVE_POSITION_PROPERTY_NAME( "scroll-relative-position" );
-const std::string Scrollable::SCROLL_POSITION_MIN_PROPERTY_NAME( "scroll-position-min" );
-const std::string Scrollable::SCROLL_POSITION_MAX_PROPERTY_NAME( "scroll-position-max" );
-const std::string Scrollable::SCROLL_DIRECTION_PROPERTY_NAME( "scroll-direction" );
-
-const char* const Scrollable::SIGNAL_SCROLL_STARTED = "scroll-started";
-const char* const Scrollable::SIGNAL_SCROLL_COMPLETED = "scroll-completed";
-const char* const Scrollable::SIGNAL_SCROLL_UPDATED = "scroll-updated";
-const char* const Scrollable::SIGNAL_SCROLL_CLAMPED = "scroll-clamped";
-
Scrollable::Scrollable()
{
}
{
}
-Scrollable::Scrollable( Dali::Internal::CustomActor* internal )
-: Control( internal )
+Scrollable::Scrollable(Dali::Internal::CustomActor* internal)
+: Control(internal)
{
VerifyCustomActorPointer<Internal::Scrollable>(internal);
}
-Scrollable::Scrollable( const Scrollable& handle )
-: Control( handle )
-{
-}
+Scrollable::Scrollable(const Scrollable& handle) = default;
-Scrollable& Scrollable::operator=( const Scrollable& handle )
-{
- if( &handle != this )
- {
- Control::operator=( handle );
- }
- return *this;
-}
+Scrollable::Scrollable(Scrollable&& rhs) noexcept = default;
+
+Scrollable& Scrollable::operator=(const Scrollable& handle) = default;
+
+Scrollable& Scrollable::operator=(Scrollable&& rhs) noexcept = default;
Scrollable::~Scrollable()
{
}
-Scrollable Scrollable::DownCast( BaseHandle handle )
+Scrollable Scrollable::DownCast(BaseHandle handle)
{
return Control::DownCast<Scrollable, Internal::Scrollable>(handle);
}
-Scrollable::ScrollStartedSignalV2& Scrollable::ScrollStartedSignal()
+Scrollable::ScrollStartedSignalType& Scrollable::ScrollStartedSignal()
{
return GetImpl(*this).ScrollStartedSignal();
}
-Scrollable::ScrollUpdatedSignalV2& Scrollable::ScrollUpdatedSignal()
+Scrollable::ScrollUpdatedSignalType& Scrollable::ScrollUpdatedSignal()
{
return GetImpl(*this).ScrollUpdatedSignal();
}
-Scrollable::ScrollCompletedSignalV2& Scrollable::ScrollCompletedSignal()
+Scrollable::ScrollCompletedSignalType& Scrollable::ScrollCompletedSignal()
{
return GetImpl(*this).ScrollCompletedSignal();
}
-Scrollable::ScrollClampedSignalV2& Scrollable::ScrollClampedSignal()
+bool Scrollable::IsOvershootEnabled() const
+{
+ return GetImpl(*this).IsOvershootEnabled();
+}
+
+void Scrollable::SetOvershootEnabled(bool enable)
+{
+ GetImpl(*this).SetOvershootEnabled(enable);
+}
+
+void Scrollable::SetOvershootEffectColor(const Vector4& color)
{
- return GetImpl(*this).ScrollClampedSignal();
+ GetImpl(*this).SetOvershootEffectColor(color);
}
-bool Scrollable::IsScrollComponentEnabled(Scrollable::ScrollComponentType indicator) const
+Vector4 Scrollable::GetOvershootEffectColor() const
{
- return GetImpl(*this).IsScrollComponentEnabled(indicator);
+ return GetImpl(*this).GetOvershootEffectColor();
}
-void Scrollable::EnableScrollComponent(Scrollable::ScrollComponentType indicator)
+void Scrollable::SetOvershootAnimationSpeed(float pixelsPerSecond)
{
- GetImpl(*this).EnableScrollComponent(indicator);
+ GetImpl(*this).SetOvershootAnimationSpeed(pixelsPerSecond);
}
-void Scrollable::DisableScrollComponent(Scrollable::ScrollComponentType indicator)
+float Scrollable::GetOvershootAnimationSpeed() const
{
- GetImpl(*this).DisableScrollComponent(indicator);
+ return GetImpl(*this).GetOvershootAnimationSpeed();
}
} // namespace Toolkit