Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_ExpandableListData.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 /**
19  * @file        FUiCtrl_ExpandableListData.h
20  * @brief       This is the header file for the _ExpandableListData class.
21  *
22  * This header file contains the declarations of the _MainItem, _SubItem &  _ExpandableListItemDataProvider class.
23  */
24
25 #ifndef _FUI_CTRL_INTERNAL_EXPANDABLELIST_DATA_H_
26 #define _FUI_CTRL_INTERNAL_EXPANDABLELIST_DATA_H_
27
28 #include <FBaseObject.h>
29 #include <FBaseTypes.h>
30 #include <FUiControls.h>
31 #include <FUiCtrlListItemBase.h>
32
33 namespace Tizen { namespace Ui { namespace Controls
34 {
35
36 class _CustomItemData;
37 class _ExpandableListImpl;
38
39 class _MainItem
40         : public Tizen::Base::Object
41 {
42 public:
43         _MainItem(void);
44         ~_MainItem(void);
45
46 private:
47         _MainItem(const _MainItem& rhs);
48         _MainItem& operator =(const _MainItem& rhs);
49
50 public:
51         bool isExpanded;
52         bool isEnabled;
53         int checkCount;
54         Tizen::Base::Collection::ArrayList subItemList;
55         Tizen::Base::Collection::ArrayList actualSubItemList;
56         _CustomItemData* pCustomItemData;
57 }; //_MainItem
58
59
60 class _SubItem
61         : public Tizen::Base::Object
62 {
63 public:
64         _SubItem(bool removeItemData = false);
65         ~_SubItem(void);
66
67 private:
68         _SubItem(const _SubItem& rhs);
69         _SubItem& operator =(const _SubItem& rhs);
70
71 public:
72         bool isEnabled;
73         _CustomItemData* pCustomItemData;
74         bool isDeleteNeeded;
75 }; //_SubItem
76
77
78 class _ExpandableListItemDataProvider
79         : public Tizen::Ui::Controls::IListViewItemProvider
80 {
81 public:
82         _ExpandableListItemDataProvider(_ExpandableListImpl* pList);
83         virtual ~_ExpandableListItemDataProvider(void);
84         int GetItemCount(void);
85         Tizen::Ui::Controls::ListItemBase* CreateItem(int index, int itemWidth);
86         bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth);
87
88 private:
89         _ExpandableListItemDataProvider(const _ExpandableListItemDataProvider& rhs);
90         _ExpandableListItemDataProvider& operator =(const _ExpandableListItemDataProvider& rhs);
91
92 private:
93         _ExpandableListImpl* __pList;
94 }; //_ExpandableListItemDataProvider
95
96 }}} // Tizen::Ui::Controls
97
98
99 #endif //_FUI_CTRL_INTERNAL_EXPANDABLELIST_DATA_H_