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 HmCustomIconListProvider.h
19 * @brief This is the class declaration for the IconListItemProviderCustom class
20 * This class contains the functions which are required managing the IconListView's items
23 #ifndef _HM_CUSTOM_ICON_LIST_ITEM_PROVIDER_H_
24 #define _HM_CUSTOM_ICON_LIST_ITEM_PROVIDER_H_
28 #include "HmIPageControlItemProvider.h"
31 * @class CustomIconListProvider
32 * @brief Provider implementation for the HmCustomIconListViews in pagging control
34 class CustomIconListProvider
35 : public Tizen::Base::Object
36 , public Tizen::Ui::Controls::IIconListViewItemProvider
42 CustomIconListProvider(int index);
47 ~CustomIconListProvider(void);
50 * Gets the value of edit mode
52 bool GetEditMode(void) const;
55 * Returns the item, which is getting moved currently
57 Tizen::Ui::Controls::IconListViewItem* GetMovingItem(void) const;
60 * Returns the Moving Item's index
62 int GetMovingItemIndex() const;
65 * Returns the item provider instance.
67 IPageControlItemProvider* GetPageControlItemProvider(void);
70 * Sets the value of edit mode
72 void SetEditMode(bool editMode);
75 * Sets the index of this provider object.
77 void SetIndex(int index);
80 * Sets the maximum number of icons in a page.
82 void SetMaxCountOfIcons(int iconCount);
85 * Sets the Moving items instance
87 void SetMovingItem(Tizen::Ui::Controls::IconListViewItem* pMovedItem);
90 * Set the index of moving item, for projecting the expected project.
92 void SetMovingItemIndex(int movedIndex);
95 * Sets the item Provider for this panel.
97 void SetPageControlItemProvider(IPageControlItemProvider* pItemProvider);
100 * Sets the moving item to be egnored while drawing, as this is an invalid item now
102 void SetProjectedItemInvalid(bool isInvalid);
104 // from IIconListViewItemProvider
105 virtual Tizen::Ui::Controls::IconListViewItem* CreateItem(int index);
106 virtual bool DeleteItem(int index, Tizen::Ui::Controls::IconListViewItem* pItem);
107 virtual int GetItemCount(void);
111 * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
113 CustomIconListProvider(const CustomIconListProvider&);
116 * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
118 CustomIconListProvider& operator =(const CustomIconListProvider&);
121 bool __editMode; // keeps the value of editmode
122 bool __isProjectedItemInvalid; // Is the projection item to be egnored
123 int __index; // keeps track of index
124 int __iconsPerPage; // number of icons per page
125 int __currentIndex; // the index of current projected item
126 IPageControlItemProvider* __pPageItemProvider; // item provider instance
127 Tizen::Ui::Controls::IconListViewItem* __pMovementItem; //The item pointer to be projected in expected position
128 Tizen::Graphics::Bitmap* __pOverayBitmap; //The close button bitmap
133 #endif //_HM_CUSTOM_ICON_LIST_ITEM_PROVIDER_H_