Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_IconListItemProviderAdaptor.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_IconListItemProviderAdaptor.h
20  * @brief               This is the header file for the _IconListItemProviderAdaptor class.
21  */
22
23 #ifndef _FUI_CTRL_INTERNAL_ICON_LIST_ITEM_PROVIDER_ADAPTOR_H_
24 #define _FUI_CTRL_INTERNAL_ICON_LIST_ITEM_PROVIDER_ADAPTOR_H_
25
26 #include <FUiCtrlIIconListViewItemProvider.h>
27
28 #include "FUiCtrl_IListItemProviderAdaptor.h"
29
30 namespace Tizen { namespace Ui
31 {
32
33 namespace Animations
34 {
35 class _VisualElement;
36 } // Tizen::Ui::Animations
37
38 namespace Controls
39 {
40
41 class _IconListItemProviderAdaptor
42         : public _IListItemProviderAdaptor
43 {
44 // Lifecycle
45 public:
46         _IconListItemProviderAdaptor(void);
47
48         virtual ~_IconListItemProviderAdaptor(void);
49
50 // Operation
51         _IListItemCommon* GetBlankItem(void) const;
52
53 // Accessor
54         virtual void SetItemProvider(void* pProvider);
55
56         virtual _IListItemCommon* LoadItem(int groupIndex, int itemIndex);
57
58         virtual result UnloadItem(_IListItemCommon* pListItem, int groupIndex, int itemIndex);
59
60         virtual int GetItemCount(int groupIndex = 0) const;
61
62         virtual int GetGroupCount(void) const;
63
64         virtual result DeleteItem(_IListItemCommon* pListItem, int groupIndex, int itemIndex);
65
66         void SetVisualElement(Tizen::Ui::Animations::_VisualElement* pRoot);
67
68 private:
69         _IconListItemProviderAdaptor(const _IconListItemProviderAdaptor& rhs);
70         _IconListItemProviderAdaptor& operator =(const _IconListItemProviderAdaptor& rhs);
71
72 // Attribute
73 private:
74         static const int DEFAULT_GROUP_INDEX = 0;
75         static const int DEFAULT_GROUP_COUNT = 1;
76         static const int GROUP_TITLE_INDEX = -1;
77
78         IIconListViewItemProvider* __pItemProvider;
79
80         _IListItemCommon* __pBlankItem;
81
82         Tizen::Ui::Animations::_VisualElement* __pRoot;
83
84 };  // _IconListItemProviderAdaptor
85
86 }}} // Tizen::Ui::Controls
87
88 #endif //_FUI_CTRL_INTERNAL_ICON_LIST_ITEM_PROVIDER_ADAPTOR_H_