Changed indicator bg color.
[platform/framework/native/uifw.git] / src / ui / controls / FUiCtrl_TabModel.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_TabModel.cpp
20  * @brief               This is the implementation file for the _TabModel class.
21  */
22
23
24 #include <FBaseErrorDefine.h>
25 #include <FBaseSysLog.h>
26 #include "FUiCtrl_TabModel.h"
27
28 namespace Tizen { namespace Ui { namespace Controls {
29
30 _TabModel::_TabModel(void)
31         : __selectedItemIndex(0)
32         , __pressedItemIndex(-1)
33         , __firstDrawnItemIndex(-1)
34         , __isEditModeEnabled(true)
35 {
36 }
37
38
39 _TabModel::~_TabModel(void)
40 {
41 }
42
43
44 result
45 _TabModel::Construct(void)
46 {
47         ClearLastResult();
48
49         return E_SUCCESS;
50 }
51
52
53 void
54 _TabModel::SetSelectedItemIndex(int index)
55 {
56         __selectedItemIndex = index;
57 }
58
59
60 int
61 _TabModel::GetSelectedItemIndex(void) const
62 {
63         return __selectedItemIndex;
64 }
65
66
67 void
68 _TabModel::SetPressedItemIndex(int index)
69 {
70         __pressedItemIndex = index;
71 }
72
73
74 int
75 _TabModel::GetPressedItemIndex(void) const
76 {
77         return __pressedItemIndex;
78 }
79
80
81 void
82 _TabModel::SetFirstDrawnItemIndex(int index)
83 {
84         __firstDrawnItemIndex = index;
85 }
86
87
88 int
89 _TabModel::GetFirstDrawnItemIndex(void) const
90 {
91         return __firstDrawnItemIndex;
92 }
93
94
95 void
96 _TabModel::SetEditModeEnabled(bool enable)
97 {
98         __isEditModeEnabled = enable;
99 }
100
101
102 bool
103 _TabModel::IsEditModeEnabled(void) const
104 {
105         return __isEditModeEnabled;
106 }
107
108 }}} // Tizen::Ui::Controls