Reverting fixed FastScroll.
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_FastScroll.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0/
10 //
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.
16 //
17
18 /**
19  * @file                FUiCtrl_FastScroll.h
20  * @brief               This is the header file for the _FastScroll class.
21  *
22  * This header file contains the declarations of the %_FastScroll class.
23  */
24
25 #ifndef _FUICTRL_INTERNAL_FASTSCROLL_H_
26 #define _FUICTRL_INTERNAL_FASTSCROLL_H_
27
28 #include "FUi_Control.h"
29 #include "FUiCtrl_IFastScrollListener.h"
30 #include "FUiCtrl_FastScrollPresenter.h"
31 #include "FUiCtrl_FastScrollIndex.h"
32
33 namespace Tizen { namespace Ui { namespace Controls
34 {
35
36 class _OSP_EXPORT_ _FastScroll
37         : public Tizen::Ui::_Control
38         , virtual public Tizen::Base::Runtime::IEventListener
39         , virtual public _IUiEventListener
40         , virtual public _IUiEventPreviewer
41 {
42 public:
43         virtual ~_FastScroll(void);
44
45         static _FastScroll* CreateFastScrollN(Tizen::Ui::_Control& parentCtrl);
46
47         result SetIndex(_FastScrollIndex* pIndex);
48         _FastScrollIndex* GetIndex(void) const;
49         result UpdateIndex(void);
50
51         void EnableFadeEffect(bool enable);
52         bool IsEnabledFadeEffect(void) const;
53         bool IsOnFadeEffect(void) const;
54         result SetScrollVisibility(bool visibility);
55         bool GetScrollVisibility(void) const;
56         void CancelFadeEffect(void);
57
58         void AddFastScrollEventListener(const Tizen::Ui::Controls::_IUiFastScrollListener& listener);
59         void RemoveFastScrollEventListener(const Tizen::Ui::Controls::_IUiFastScrollListener& listener);
60
61         void OnParentBoundsChanged(void);
62
63         virtual void OnDraw(void);
64         virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo);
65         virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo);
66         virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo);
67         virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo);
68         virtual void OnAncestorVisibleStateChanged(const _Control& control);
69         virtual void OnAncestorEnableStateChanged(const _Control& control);
70         virtual void OnAncestorInputEnableStateChanged(const _Control& control);
71         virtual void OnFontChanged(Tizen::Graphics::Font* pFont);
72         virtual void OnFontInfoRequested(unsigned long& style, float& size);
73         virtual Tizen::Ui::Animations::HitTestResult HitTest(const Tizen::Graphics::FloatPoint& point);
74
75 private:
76         _FastScroll(const _FastScroll& rhs);
77         _FastScroll& operator =(const _FastScroll& rhs);
78
79         _FastScroll(void);
80         result Construct(Tizen::Ui::_Control& parentCtrl);
81
82         void SetPresenter(_FastScrollPresenter& fastScrollPresenter);
83         _FastScrollPresenter& GetPresenter(void) const;
84
85 private:
86         _FastScrollPresenter* __pPresenter;
87 };
88
89 }}} // Tizen::Ui::Controls
90
91 #endif //_FUICTRL_INTERNAL_FASTSCROLL_H_