2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://floralicense.org/license/
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file HmIPageControlItemProvider.h
19 * @brief Keeps declaration of the IPageControlItemProvider
20 * The class keeps necessary methods which can be used for creating items for the Page data control.
23 #ifndef _HM_IPAGE_CONTROL_ITEM_PROVIDER_H_
24 #define _HM_IPAGE_CONTROL_ITEM_PROVIDER_H_
29 * @class IPageControlItemProvider
30 * @brief declares of the IPageControlItemProvider
31 * The class keeps necessary methods which can be used for creating items for the PageControl.
33 class IPageControlItemProvider
37 * This polymorphic destructor should be overridden if required.
38 * This way, the destructors of the derived classes are called when the destructor of this interface is called.
40 virtual ~IPageControlItemProvider(void) {}
43 * Returns the actual item pointer, at the mentioned position
45 * @return HomeItemInfo*, The actual item's pointer
46 * @param[in] pageNumber, page number in which the item to be located
47 * @param[in] index, The index for which the item to be retrieved
49 virtual HomeItemInfo* GetItem(int pageNumber, int index) = 0;
52 * Returns the number of items, which belongs to the mentioned page
54 * @return int, The number of items in the page
55 * @param[in] pageNumber, Page number
57 virtual int GetItemCount(int pageNumber) = 0;
60 * Returns the total number of pages
62 * @return int, the number of pages
64 virtual int GetPageCount(void) = 0;
67 * Rearranges the items within a page, across page and moved icons.
69 * @param[in] pMovedAppInfo, The HomeItemInfo's pointer, which has to be moved
70 * @param[in] newPageNumber, New Page number, where the icon has to be placed
71 * @param[in] newIndex, The index to which the mentioned application to be placed
73 virtual void RearrangeItems(HomeItemInfo* pMovedAppInfo, int newPageNumber, int newIndex) = 0;
76 #endif // _HM_IPAGE_CONTROL_ITEM_PROVIDER_H_