Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_TabBarModel.h
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_TabBarModel.h
19  * @brief               This is the header file for the _TabBarModel class.
20  *
21  * This header file contains the declarations of the %_TabBarModel class.
22  */
23 #ifndef _FUI_CTRL_INTERNAL_TABBAR_MODEL_H_
24 #define _FUI_CTRL_INTERNAL_TABBAR_MODEL_H_
25
26
27 #include <FBaseObject.h>
28 #include <FBaseColArrayList.h>
29 #include "FUiCtrl_TabBarItem.h"
30 #include "FUi_ResourceManager.h"
31
32 namespace Tizen { namespace Ui { namespace Controls
33 {
34 /**
35  * @class _TabBarModel
36  * @brief
37  * @since 2.0
38  *
39  *
40  *
41  *
42  */
43 class _TabBarModel
44         : public Tizen::Base::Object
45 {
46 // Lifecycle
47 public:
48         _TabBarModel(void);
49         virtual ~_TabBarModel(void);
50
51 // Operations
52 public:
53         void SetSelectedItemIndex(int index);
54         int GetSelectedItemIndex(void) const;
55         void SetFirstDrawnItemIndex(int index);
56         int GetFirstDrawnItemIndex(void) const;
57         int GetItemCount(void) const;
58         int GetWidthOfAllItems(void) const;
59
60         result AddItem(const Tizen::Base::String& text, int actionId, _ControlOrientation orientation);
61         result InsertItemAt(int index, const Tizen::Base::String& text, int actionId, _ControlOrientation orientation);
62         result SetItemAt(int index, const Tizen::Base::String& text, int actionId, _ControlOrientation orientation);
63         result RemoveItemAt(int index, _ControlOrientation orientation);
64         void RemoveAllItems(void);
65
66         _TabBarItem* GetItemAt(int index) const;
67
68 private:
69         _TabBarModel(const _TabBarModel& rhs);
70         _TabBarModel& operator =(const _TabBarModel& rhs);
71         result ReCalculateItemPosition(int itemIndex, _ControlOrientation orientation);
72
73 // Attribute
74 private:
75         Tizen::Base::Collection::ArrayList __tabBarItems;
76
77         int __selectedItemIndex;
78         int __firstDrawnItemIndex;
79         int __widthOfAllItems;
80
81 }; // _TabBarModel
82
83 }}} // Tizen::Ui::Controls
84
85 #endif // _FUI_CTRL_INTERNAL_TABBAR_MODEL_H_