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.
18 #include <dali-toolkit/internal/controls/scroll-component/scroll-component-impl.h>
19 #include <dali-toolkit/internal/controls/scroll-component/scroll-bar.h>
34 // empty handle as we cannot create ScrollComponent
35 return Toolkit::ScrollComponent::New();
38 TypeRegistration mType( typeid(Toolkit::ScrollComponent), typeid(Toolkit::Control), Create );
42 ScrollComponent::ScrollComponent()
43 : ControlImpl(true/*requires touch*/)
48 ScrollComponent::~ScrollComponent()
52 Toolkit::ScrollComponent ScrollComponent::New(Toolkit::Scrollable& scrollable, Toolkit::Scrollable::ScrollComponentType type)
54 Toolkit::ScrollComponent instance;
58 case Toolkit::Scrollable::VerticalScrollBar:
60 instance = static_cast<Toolkit::ScrollComponent>(Toolkit::ScrollBar::New(scrollable, true));
63 case Toolkit::Scrollable::HorizontalScrollBar:
65 instance = static_cast<Toolkit::ScrollComponent>(Toolkit::ScrollBar::New(scrollable, false));
70 DALI_ASSERT_ALWAYS(true && "Unrecognized component type");
78 } // namespace Internal
80 } // namespace Toolkit