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