2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://floralicense.org/license/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FUiCtrl_Scroll.h
20 * @brief This is the header file for the _Scroll class.
22 * This header file contains the declarations of the %_Scroll class.
25 #ifndef _FUICTRL_INTERNAL_SCROLL_H_
26 #define _FUICTRL_INTERNAL_SCROLL_H_
28 #include "FUi_Control.h"
30 namespace Tizen { namespace Ui { namespace Controls
33 class _ScrollPresenter;
34 class _IScrollEventListener;
38 SCROLL_DIRECTION_VERTICAL = 0,
39 SCROLL_DIRECTION_HORIZONTAL
43 : public Tizen::Ui::_Control
44 , virtual public Tizen::Base::Runtime::IEventListener
45 , virtual public _IUiEventListener
46 , virtual public _IUiEventPreviewer
49 virtual ~_Scroll(void);
50 static _Scroll* CreateScrollN(Tizen::Ui::_Control& parentCtrl,
51 _ScrollDirection scrollDir,
52 bool enableFadeEffect,
60 result SetScrollDirection(_ScrollDirection scrollDir);
61 _ScrollDirection GetScrollDirection(void) const;
62 result SetScrollRange(int viewRange, int scrollRange);
63 void GetScrollRange(int* pViewRange, int* pScrollRange) const;
64 result SetScrollPosition(int scrollPosition);
65 int GetScrollPosition(void) const;
67 void EnableFadeEffect(bool enable);
68 bool IsEnabledFadeEffect(void) const;
69 bool IsOnFadeEffect(void) const;
70 void EnableScrollingEffect(bool enable);
71 bool IsEnabledScrollingEffect(void) const;
72 void EnableOverScrollingEffect(bool enable);
73 bool IsEnabledOverScrollingEffect(void) const;
74 void SetParentUsingViewport(bool useViewport);
75 bool IsParentUsingViewport(void) const;
76 result SetScrollVisibility(bool visibility);
77 bool GetScrollVisibility(void) const;
78 void CancelFadeEffect(void);
79 result SetScrollingEffectVisibility(bool visibility);
82 result EnableJumpToTop(bool enable);
83 bool IsEnabledJumpToTop(void) const;
85 result EnableHandler(bool enable);
86 bool IsEnabledHandler(void) const;
88 void AddScrollEventListener(const Tizen::Ui::Controls::_IScrollEventListener& listener);
89 void RemoveScrollEventListener(const Tizen::Ui::Controls::_IScrollEventListener& listener);
91 void OnParentBoundsChanged(void);
93 virtual void OnDraw(void);
94 virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo);
95 virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo);
96 virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo);
97 virtual Tizen::Ui::Animations::HitTestResult HitTest(const Tizen::Graphics::FloatPoint& point);
100 _Scroll(const _Scroll& rhs);
101 _Scroll& operator =(const _Scroll& rhs);
104 result Construct(Tizen::Ui::_Control& parentCtrl,
105 _ScrollDirection scrollDir,
106 bool enableFadeEffect,
107 bool enableJumpToTop,
114 void SetPresenter(_ScrollPresenter& scrollPresenter);
115 _ScrollPresenter& GetPresenter(void) const;
119 _ScrollPresenter* __pPresenter;
123 }}} // Tizen::Ui::Controls
125 #endif //_FUICTRL_INTERNAL_SCROLL_H_