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