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_ScrollPanelModel.cpp
20 * @brief This is the implementation file for the %_ScrollPanelModel class.
24 #include <FGrpPoint.h>
25 #include <FGrpDimension.h>
26 #include <FGrpRectangle.h>
27 #include "FUiCtrl_ScrollPanelModel.h"
29 using namespace Tizen::Graphics;
31 namespace Tizen { namespace Ui { namespace Controls
34 _ScrollPanelModel::_ScrollPanelModel(void)
35 : __currentScrollPosition(Point(0, 0))
36 , __scrollAreaBounds(Rectangle(0, 0, 0, 0))
41 _ScrollPanelModel::~_ScrollPanelModel(void)
47 _ScrollPanelModel::SetCurrentScrollPosition(int currentScrollHorizontalPosition, int currentScrollVerticalPosition)
49 SetCurrentHorizontalScrollPosition(currentScrollHorizontalPosition);
50 SetCurrentVerticalScrollPosition(currentScrollVerticalPosition);
54 _ScrollPanelModel::SetCurrentScrollPosition(Point& currentScrollPosition)
56 __currentScrollPosition = currentScrollPosition;
60 _ScrollPanelModel::GetCurrentScrollPosition(void) const
62 return __currentScrollPosition;
66 _ScrollPanelModel::SetCurrentVerticalScrollPosition(int currentVerticalScrollPosition)
68 __currentScrollPosition.y = currentVerticalScrollPosition;
72 _ScrollPanelModel::GetCurrentVerticalScrollPosition(void) const
74 return __currentScrollPosition.y;
78 _ScrollPanelModel::SetCurrentHorizontalScrollPosition(int currentHorizontalScrollPosition)
80 __currentScrollPosition.x = currentHorizontalScrollPosition;
84 _ScrollPanelModel::GetCurrentHorizontalScrollPosition(void) const
86 return __currentScrollPosition.x;
90 _ScrollPanelModel::SetScrollAreaBounds(Rectangle& areaBounds)
92 __scrollAreaBounds = areaBounds;
96 _ScrollPanelModel::GetScrollAreaBounds(void) const
98 return __scrollAreaBounds;
101 }}} // Tizen::Ui::Controls