2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://floralicense.org/license/
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
17 #include <dali-toolkit/public-api/controls/scrollable/scrollable.h>
18 #include <dali-toolkit/internal/controls/scrollable/scrollable-impl.h>
28 const std::string Scrollable::SCROLL_RELATIVE_POSITION_PROPERTY_NAME( "scroll-relative-position" );
29 const std::string Scrollable::SCROLL_POSITION_MIN_PROPERTY_NAME( "scroll-position-min" );
30 const std::string Scrollable::SCROLL_POSITION_MAX_PROPERTY_NAME( "scroll-position-max" );
31 const std::string Scrollable::SCROLL_DIRECTION_PROPERTY_NAME( "scroll-direction" );
33 const char* const Scrollable::SIGNAL_SCROLL_STARTED = "scroll-started";
34 const char* const Scrollable::SIGNAL_SCROLL_COMPLETED = "scroll-completed";
35 const char* const Scrollable::SIGNAL_SCROLL_UPDATED = "scroll-updated";
36 const char* const Scrollable::SIGNAL_SCROLL_CLAMPED = "scroll-clamped";
38 Scrollable::Scrollable()
42 Scrollable::Scrollable(Internal::Scrollable& implementation)
43 : Control(implementation)
47 Scrollable::Scrollable( Dali::Internal::CustomActor* internal )
50 VerifyCustomActorPointer<Internal::Scrollable>(internal);
53 Scrollable::Scrollable( const Scrollable& handle )
58 Scrollable& Scrollable::operator=( const Scrollable& handle )
62 Control::operator=( handle );
67 Scrollable::~Scrollable()
71 Scrollable Scrollable::DownCast( BaseHandle handle )
73 return Control::DownCast<Scrollable, Internal::Scrollable>(handle);
76 Scrollable::ScrollStartedSignalV2& Scrollable::ScrollStartedSignal()
78 return GetImpl(*this).ScrollStartedSignal();
81 Scrollable::ScrollUpdatedSignalV2& Scrollable::ScrollUpdatedSignal()
83 return GetImpl(*this).ScrollUpdatedSignal();
86 Scrollable::ScrollCompletedSignalV2& Scrollable::ScrollCompletedSignal()
88 return GetImpl(*this).ScrollCompletedSignal();
91 Scrollable::ScrollClampedSignalV2& Scrollable::ScrollClampedSignal()
93 return GetImpl(*this).ScrollClampedSignal();
96 bool Scrollable::IsScrollComponentEnabled(Scrollable::ScrollComponentType indicator) const
98 return GetImpl(*this).IsScrollComponentEnabled(indicator);
101 void Scrollable::EnableScrollComponent(Scrollable::ScrollComponentType indicator)
103 GetImpl(*this).EnableScrollComponent(indicator);
106 void Scrollable::DisableScrollComponent(Scrollable::ScrollComponentType indicator)
108 GetImpl(*this).DisableScrollComponent(indicator);
111 } // namespace Toolkit