Changed indicator bg color.
[platform/framework/native/uifw.git] / src / ui / controls / FUiCtrl_ScrollPanelModel.cpp
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0/
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_ScrollPanelModel.cpp
20  * @brief       This is the implementation file for the %_ScrollPanelModel class.
21  *
22  */
23
24 #include <FGrpFloatPoint.h>
25 #include <FGrpFloatDimension.h>
26 #include <FGrpFloatRectangle.h>
27 #include "FUiCtrl_ScrollPanelModel.h"
28
29 using namespace Tizen::Graphics;
30
31 namespace Tizen { namespace Ui { namespace Controls
32 {
33
34 _ScrollPanelModel::_ScrollPanelModel(void)
35         : __currentScrollPosition(FloatPoint(0.0f, 0.0f))
36         , __scrollAreaBounds(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f))
37 {
38         // nothing
39 }
40
41 _ScrollPanelModel::~_ScrollPanelModel(void)
42 {
43         // nothing
44 }
45
46 void
47 _ScrollPanelModel::SetCurrentScrollPosition(float currentScrollHorizontalPosition, float currentScrollVerticalPosition)
48 {
49         SetCurrentHorizontalScrollPosition(currentScrollHorizontalPosition);
50         SetCurrentVerticalScrollPosition(currentScrollVerticalPosition);
51 }
52
53 void
54 _ScrollPanelModel::SetCurrentScrollPosition(FloatPoint& currentScrollPosition)
55 {
56         __currentScrollPosition = currentScrollPosition;
57 }
58
59 FloatPoint
60 _ScrollPanelModel::GetCurrentScrollPosition(void) const
61 {
62         return __currentScrollPosition;
63 }
64
65 void
66 _ScrollPanelModel::SetCurrentVerticalScrollPosition(float currentVerticalScrollPosition)
67 {
68         __currentScrollPosition.y = currentVerticalScrollPosition;
69 }
70
71 float
72 _ScrollPanelModel::GetCurrentVerticalScrollPosition(void) const
73 {
74         return __currentScrollPosition.y;
75 }
76
77 void
78 _ScrollPanelModel::SetCurrentHorizontalScrollPosition(float currentHorizontalScrollPosition)
79 {
80         __currentScrollPosition.x = currentHorizontalScrollPosition;
81 }
82
83 float
84 _ScrollPanelModel::GetCurrentHorizontalScrollPosition(void) const
85 {
86         return __currentScrollPosition.x;
87 }
88
89 void
90 _ScrollPanelModel::SetScrollAreaBounds(FloatRectangle& areaBounds)
91 {
92         __scrollAreaBounds = areaBounds;
93 }
94
95 FloatRectangle
96 _ScrollPanelModel::GetScrollAreaBounds(void) const
97 {
98         return __scrollAreaBounds;
99 }
100
101 }}} // Tizen::Ui::Controls
102