show OverlayRegion when FormActivated
[platform/framework/native/uifw.git] / inc / FUiCtrlIListViewItemProviderF.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0/
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        FUiCtrlIListViewItemProviderF.h
20  * @brief       This is the header file for the %IListViewItemProviderF interface.
21  *
22  * This header file contains the declarations of the %IListViewItemProviderF interface. @n
23  * If an event is generated, a method of this interface is called. @n
24  * So, if applications do jobs related to item events, use the methods of this interface.
25  *
26  */
27 #ifndef _FUI_CTRL_ILIST_VIEW_ITEM_PROVIDERF_H_
28 #define _FUI_CTRL_ILIST_VIEW_ITEM_PROVIDERF_H_
29
30 #include <FUiCtrlListItemBase.h>
31
32 namespace Tizen {namespace Ui { namespace Controls
33 {
34
35 /**
36  * @interface   IListViewItemProviderF
37  * @brief               This interface implements the listener for events on %ListView.
38  *
39  * @since               2.1
40  *
41  * The %IListViewItemProviderF interface is the interface for handling ListView items.
42  * The class that handles list items implements this interface, and the instance created using the ListView::Construct() method.
43  *
44  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_listviews.htm">ListViews</a>.
45  */
46 class _OSP_EXPORT_ IListViewItemProviderF
47 {
48 // Operation
49 public:
50         /**
51          * This polymorphic destructor should be overridden if required. @n
52          * This way, the destructors of the derived classes are called
53          * when the destructor of this interface is called.
54          *
55          * @since       2.1
56          */
57         virtual ~IListViewItemProviderF(void) {}
58
59         /**
60          * Gets the total number of items in a specified group.
61          *
62          * @since       2.1
63          *
64          * @return  The count of all items of the list
65          * @remarks  This method must be implemented so that it returns the number of total items in the list.
66          *
67          */
68         virtual int GetItemCount(void) = 0;
69
70         /**
71          * Creates a specified item.
72          *
73          * @since       2.1
74          *
75          * @return  An item of the ListView
76          * @param[in] index        The index of the item
77          * @param[in] itemWidth    The width of the item
78          * @remarks
79          *                      - The applications that use ListView must implement this method.
80          *                      - This method is expected to return an item which is allocated in a heap memory.
81          *                      - The returned item can be a SimpleItem or CustomItem.
82          *                      - The returned item should not be a null pointer.
83          *                      - Note that when the item becomes unnecessary, the %ListView calls IListViewItemProvider::DeleteItem() and the application is in charge of
84          *                              deallocating the item.
85          * @see     DeleteItem()
86          */
87         virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int index, float itemWidth) = 0;
88
89         /**
90          * Deletes a specified item.
91          *
92          * @since       2.1
93          *
94          * @return  @c true if the item is deallocated by this method, @n
95          *          else @c false
96          * @param[in] index        The index of the item
97          * @param[in] pItem        The pointer to the item to delete
98          * @param[in] itemWidth    The width of the item
99          * @remarks
100          *                      - Applications which use ListView must implement this method.
101          *                      - In this method, the applications have the chance of deallocating the item.
102          *                      - If the application deallocates the item, this method returns @c true, notifying the %ListView not to free the item. @n
103          *                      Otherwise, the item will be deallocated by %ListView.
104          * @see     CreateItem()
105          */
106         virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, float itemWidth) = 0;
107
108 protected:
109         //
110         // The following methods are reserved and may change its name at any time without prior notice.
111         //
112         virtual void IListViewItemProvider_Reserved1(void) {}
113         virtual void IListViewItemProvider_Reserved2(void) {}
114         virtual void IListViewItemProvider_Reserved3(void) {}
115 }; // IListViewItemProviderF
116
117 }}} // Tizen::Ui::Controls
118
119 #endif // _FUI_CTRL_ILIST_VIEW_ITEM_PROVIDERF_H_