Tizen 2.1 base
[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 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
8 //
9 //     http://floralicense.org/license/
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 #include "FUi_IAccessibilityListener.h"
33 #include "FUi_AccessibilityContainer.h"
34 #include "FUi_AccessibilityElement.h"
35 #include "FUi_AccessibilityManager.h"
36
37 namespace Tizen { namespace Ui { namespace Controls
38 {
39
40 class _OSP_EXPORT_ _FastScroll
41         : public Tizen::Ui::_Control
42         , virtual public Tizen::Base::Runtime::IEventListener
43         , virtual public _IUiEventListener
44         , virtual public _IUiEventPreviewer
45 {
46 public:
47         virtual ~_FastScroll(void);
48
49         static _FastScroll* CreateFastScrollN(Tizen::Ui::_Control& parentCtrl);
50
51         result SetIndex(_FastScrollIndex* pIndex);
52         _FastScrollIndex* GetIndex(void) const;
53         result UpdateIndex(void);
54
55         void EnableFadeEffect(bool enable);
56         bool IsEnabledFadeEffect(void) const;
57         bool IsOnFadeEffect(void) const;
58         result SetScrollVisibility(bool visibility);
59         bool GetScrollVisibility(void) const;
60         void CancelFadeEffect(void);
61         result InitializeAccessibility(void);
62         result AddAccessibilityElement(const Tizen::Ui::_AccessibilityContainer& control, bool onAccessibility);
63
64         void AddFastScrollEventListener(const Tizen::Ui::Controls::_IUiFastScrollListener& listener);
65         void RemoveFastScrollEventListener(const Tizen::Ui::Controls::_IUiFastScrollListener& listener);
66
67         void OnParentBoundsChanged(void);
68
69         virtual result OnAttachedToMainTree(void);
70         virtual void OnDraw(void);
71         virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo);
72         virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo);
73         virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo);
74         virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo);
75         virtual void OnFontChanged(Tizen::Graphics::Font* pFont);
76         virtual void OnFontInfoRequested(unsigned long& style, int& size);
77         virtual Tizen::Ui::Animations::HitTestResult HitTest(const Tizen::Graphics::FloatPoint& point);
78
79 private:
80         _FastScroll(const _FastScroll& rhs);
81         _FastScroll& operator =(const _FastScroll& rhs);
82
83         _FastScroll(void);
84         result Construct(Tizen::Ui::_Control& parentCtrl);
85
86         void SetPresenter(_FastScrollPresenter& fastScrollPresenter);
87         _FastScrollPresenter& GetPresenter(void) const;
88
89 private:
90         _FastScrollPresenter* __pPresenter;
91         Tizen::Ui::_IAccessibilityListener* __pAccessibilityListener;
92 };
93
94 }}} // Tizen::Ui::Controls
95
96 #endif //_FUICTRL_INTERNAL_FASTSCROLL_H_