2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 // http://floralicense.org/license/
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.
19 * @file FUiCtrl_TableViewItemProvider.h
20 * @brief This file defines the _TableViewItemProvider class.
23 * This header file contains the declarations of the _TableViewItemProvider class.
26 #ifndef _FUI_CTRL_INTERNAL_TABLE_VIEW_ITEM_PROVIDER_H_
27 #define _FUI_CTRL_INTERNAL_TABLE_VIEW_ITEM_PROVIDER_H_
29 #include <FUiCtrlTableViewTypes.h>
30 #include "FUiCtrl_TableView.h"
31 #include "FUi_Control.h"
33 namespace Tizen { namespace Ui { namespace Controls
36 class TableViewGroupItem;
37 class ITableViewItemProvider;
38 class IGroupedTableViewItemProvider;
39 class ISectionTableViewItemProvider;
40 struct TableViewItemTag;
42 class _TableViewItemProvider
45 virtual ~_TableViewItemProvider(void);
47 static _TableViewItemProvider* CreateTableViewItemProviderN(TableViewStyle style);
49 result SetSimpleStyleItemProvider(ITableViewItemProvider* pProvider);
50 result SetGroupedStyleItemProvider(IGroupedTableViewItemProvider* pProvider);
51 result SetSectionStyleItemProvider(ISectionTableViewItemProvider* pProvider);
53 int GetGroupCount(void);
54 int GetItemCount(int groupIndex);
55 int GetGroupItemHeight(int groupIndex);
56 int GetItemHeight(const TableViewItemTag& itemTag);
57 TableViewGroupItem* CreateGroupItem(int groupIndex, int itemWidth);
58 bool DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem);
59 TableViewItem* CreateItem(const TableViewItemTag& itemTag, int itemWidth);
60 bool DeleteItem(const TableViewItemTag& itemTag, TableViewItem* pItem);
61 bool UpdateItem(const TableViewItemTag& itemTag, TableViewItem *pItem);
62 bool UpdateGroupItem(int groupIndex, TableViewGroupItem *pItem);
63 Tizen::Base::String GetSectionHeader(int groupIndex);
64 bool HasSectionHeader(int groupIndex);
65 Tizen::Base::String GetSectionFooter(int groupIndex);
66 bool HasSectionFooter(int groupIndex);
67 int GetDefaultItemHeight(void);
68 int GetDefaultGroupItemHeight(void);
69 bool IsReorderable(int groupIndexFrom, int groupIndexTo);
70 bool IsOnProcessing();
73 _TableViewItemProvider(TableViewStyle style);
76 _TableViewItemProvider(_TableViewItemProvider& rhs);
77 _TableViewItemProvider& operator =(_TableViewItemProvider& rhs);
81 ITableViewItemProvider* __pSimpleProvider;
82 IGroupedTableViewItemProvider* __pGroupedProvider;
83 ISectionTableViewItemProvider* __pSectionProvider;
84 TableViewStyle __style;
87 }; // _TableViewItemProvider
89 }}} // Tizen::Ui::Controls
91 #endif // _FUI_CTRL_INTERNAL_TABLE_VIEW_ITEM_PROVIDER_H_