2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 // http://www.apache.org/licenses/LICENSE-2.0/
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_FastScroll.h
20 * @brief This is the header file for the _FastScroll class.
22 * This header file contains the declarations of the %_FastScroll class.
25 #ifndef _FUICTRL_INTERNAL_FASTSCROLL_H_
26 #define _FUICTRL_INTERNAL_FASTSCROLL_H_
28 #include "FUi_Control.h"
29 #include "FUiCtrl_IFastScrollListener.h"
30 #include "FUiCtrl_FastScrollPresenter.h"
31 #include "FUiCtrl_FastScrollIndex.h"
33 namespace Tizen { namespace Ui { namespace Controls
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
43 virtual ~_FastScroll(void);
45 static _FastScroll* CreateFastScrollN(Tizen::Ui::_Control& parentCtrl);
47 result SetIndex(_FastScrollIndex* pIndex);
48 _FastScrollIndex* GetIndex(void) const;
49 result UpdateIndex(void);
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);
58 void AddFastScrollEventListener(const Tizen::Ui::Controls::_IUiFastScrollListener& listener);
59 void RemoveFastScrollEventListener(const Tizen::Ui::Controls::_IUiFastScrollListener& listener);
61 void OnParentBoundsChanged(void);
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);
76 _FastScroll(const _FastScroll& rhs);
77 _FastScroll& operator =(const _FastScroll& rhs);
80 result Construct(Tizen::Ui::_Control& parentCtrl);
82 void SetPresenter(_FastScrollPresenter& fastScrollPresenter);
83 _FastScrollPresenter& GetPresenter(void) const;
86 _FastScrollPresenter* __pPresenter;
89 }}} // Tizen::Ui::Controls
91 #endif //_FUICTRL_INTERNAL_FASTSCROLL_H_