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_ScrollPanelImpl.h
20 * @brief This is the header file for the _ScrollPanelImpl class.
22 * This header file contains the declarations of the _ScrollPanelImpl class.
25 #ifndef _FUI_CTRL_INTERNAL_SCROLL_PANEL_IMPL_H_
26 #define _FUI_CTRL_INTERNAL_SCROLL_PANEL_IMPL_H_
28 #include <FUiCtrlScrollPanel.h>
29 #include "FUiCtrl_IScrollEventListener.h"
30 #include "FUiCtrl_PanelImpl.h"
31 #include "FUiCtrl_ScrollPanel.h"
33 namespace Tizen { namespace Ui { namespace Controls
38 class _ScrollPanelImpl
40 , public _IScrollEventListener
41 , virtual public Tizen::Base::Runtime::IEventListener
45 virtual ~_ScrollPanelImpl(void);
49 static _ScrollPanelImpl* CreateScrollPanelImplN(ScrollPanel* pPublic, const Tizen::Graphics::Rectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable, Layout* pPublicPortraitLayout = null, Layout* pPublicLandscapeLayout = null);
52 int GetScrollPosition(void) const;
53 void SetScrollPosition(int position, bool withAnimation);
55 void ScrollToBottom(void) const;
56 void ScrollToTop(void) const;
58 // scroll event listener
59 void AddScrollEventListener(IScrollEventListener& listener);
60 void RemoveScrollEventListener(IScrollEventListener& listener);
62 // scroll event listener
63 virtual void OnScrollEndReached(_Control& source, ScrollEndEvent type);
64 virtual void OnScrollPositionChanged(_Control& source, int scrollPosition);
65 virtual void OnScrollStopped(_Control& source);
67 Tizen::Graphics::Rectangle GetClientAreaBounds(void) const;
68 result SetClientAreaHeight(int height);
69 result SetClientAreaWidth(int width);
71 ScrollPanelScrollDirection GetScrollDirection(void) const;
73 bool IsScrollAreaAutoResizingEnabled(void) const;
75 void SetPageScrollEnabled(bool enable);
76 bool IsPageScrollEnabled(void) const;
78 void SetScrollBarVisible(bool visible);
79 bool IsScrollBarVisible(void) const;
81 void SetScrollInputMode(ScrollInputMode mode);
82 ScrollInputMode GetScrollInputMode(void) const;
84 // dirty function for OSP 2.0
85 result CloseOverlayWindow(void); // deprecate on Tizen 2.0
89 static const _ScrollPanelImpl* GetInstance(const ScrollPanel& scrollPanel);
90 static _ScrollPanelImpl* GetInstance(ScrollPanel& scrollPanel);
92 virtual const char* GetPublicClassName(void) const;
93 virtual const ScrollPanel& GetPublic(void) const;
94 virtual ScrollPanel& GetPublic(void);
95 virtual const _ScrollPanel& GetCore(void) const;
96 virtual _ScrollPanel& GetCore(void);
100 _ScrollPanelImpl(Control* pPublic, _Control* pCore, Layout* pPublicPortraitLayout = null, Layout* pPublicLandscapeLayout = null);
103 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
104 _ScrollPanelImpl(const _ScrollPanelImpl& rhs);
106 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
107 _ScrollPanelImpl& operator =(const _ScrollPanelImpl& rhs);
111 _ScrollEvent* __pScrollEvent;
113 }; // _ScrollPanelImpl
115 }}} // Tizen::Ui::Controls
117 #endif //_FUI_CTRL_INTERNAL_SCROLL_PANEL_IMPL_H_