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 FUiCtrlSlidableGroupedList.h
20 * @brief This is the header file for the %SlidableGroupedList class.
22 * This header file contains the declarations of the %SlidableGroupedList class and its helper classes.
24 #ifndef _FUI_CTRL_SLIDABLE_GROUPED_LIST_H_
25 #define _FUI_CTRL_SLIDABLE_GROUPED_LIST_H_
27 #include <FBaseObject.h>
28 #include <FBaseTypes.h>
29 #include <FGrpRectangle.h>
30 #include <FUiControl.h>
31 #include <FUiContainer.h>
32 #include <FUiCtrlGroupedList.h>
33 #include <FUiCtrlControlsTypes.h>
34 #include <FUiISlidableGroupedListEventListener.h>
35 #include <FUiCtrlCustomListItem.h>
37 namespace Tizen { namespace Base { namespace Runtime
42 namespace Tizen { namespace Ui { namespace Controls
47 * @class SlidableGroupedList
48 * @brief <i> [Deprecated] </i> This class defines the common behavior of the %SlidableGroupedList control.
50 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
53 * The %SlidableGroupedList class represents a list which loads grouped
54 * items on demand and unloads unused grouped items to save memory. Like GroupedList,
55 * the list items of GroupedList consist of groups and items. A group represents grouped
56 * items and is inserted into the first level just as items are inserted into List. Items
57 * which are from CustomListItems are inserted under related groups. So, items are uniquely
58 * identified with two indices: group index and item index.
60 * The operation of %SlidableGroupedList is the same as that of a GroupedList, except
61 * that a %SlidableGroupedList does not hold all items in the memory. Most of the item manipulations
62 * are available when they are loaded, but the check state is maintained for all items
63 * whether they are loaded or not.
64 * ISlidableGroupedListEventListener must be implemented so that an application can
65 * be notified when the items need to be loaded as the user scrolls through a list.
66 * If an application wants to perform tasks when the state of a list item is changed,
67 * it must implement IGroupedItemEventListener and register it to the slidable
68 * grouped list. It will then receive related events from %SlidableGroupedList.
70 * Note that CustomListItem and CustomListItemFormat need to be created on a heap. CustomListItems will be deleted automatically
71 * when the %SlidableGroupedList itself is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). CustomListItemFormat
72 * must be deleted by the application.
74 * Refer to CustomListItem and CustomListItemFormat.
78 * @image html ui_controls_slidablegroupedlist.png
80 * This is the simple UI application which uses a %SlidableGroupedList control.
83 // Sample code for SlidableGroupedListSample.h
86 class SlidableGroupedListSample
87 : public Tizen::Ui::Controls::Form
88 , public Tizen::Ui::IGroupedItemEventListener
89 , public Tizen::Ui::ISlidableGroupedListEventListener
92 SlidableGroupedListSample(void)
93 : __pSlidableGroupedList(null)
94 , __pCustomListItemFormat(null){}
96 bool Initialize(void);
97 virtual result OnInitializing(void);
98 virtual result OnTerminating(void);
100 Tizen::Ui::Controls::CustomListItem* LoadListItem(int itemId);
101 virtual void OnItemStateChanged(const Tizen::Ui::Control &source, int groupIndex, int itemIndex, int itemId, int elementId, Tizen::Ui::ItemStatus status);
102 virtual void OnItemStateChanged(const Tizen::Ui::Control &source, int groupIndex, int itemIndex, int itemId, Tizen::Ui::ItemStatus status);
103 virtual void OnListPropertyRequested(const Tizen::Ui::Control &source);
104 virtual void OnLoadToTopRequested(const Tizen::Ui::Control &source, int groupIndex, int itemIndex, int numItems);
105 virtual void OnLoadToBottomRequested(const Tizen::Ui::Control &source, int groupIndex, int itemIndex, int numItems);
106 virtual void OnUnloadItemRequested(const Tizen::Ui::Control& source, int groupIndex, int itemIndex);
109 static const int ID_LIST_TEXT = 101;
110 static const int ID_LIST_BITMAP = 102;
111 static const int ITEM_HEIGHT = 103;
112 static const int ITEM_COUNT = 104;
113 static const int ITEM_COUNT_GROUP1 = 10;
114 static const int ITEM_COUNT_GROUP2 = 20;
115 static const int ITEM_COUNT_GROUP3 = 30;
116 static const int ITEM_ID_LIMITS = 30;
118 Tizen::Ui::Controls::SlidableGroupedList* __pSlidableGroupedList;
119 Tizen::Ui::Controls::CustomListItemFormat* __pCustomListItemFormat;
124 // Sample code for SlidableGroupedListSample.cpp
126 #include <FGraphics.h>
128 #include "SlidableGroupedListSample.h"
130 using namespace Tizen::App;
131 using namespace Tizen::Base;
132 using namespace Tizen::Base::Collection;
133 using namespace Tizen::Graphics;
134 using namespace Tizen::Ui;
135 using namespace Tizen::Ui::Controls;
139 SlidableGroupedListSample::Initialize(void)
141 Construct(FORM_STYLE_NORMAL);
146 SlidableGroupedListSample::OnInitializing(void)
148 result r = E_SUCCESS;
150 // Creates an instance of SlidableGroupedList
151 __pSlidableGroupedList = new SlidableGroupedList();
152 __pSlidableGroupedList->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height), CUSTOM_LIST_STYLE_NORMAL);
153 __pSlidableGroupedList->AddGroupedItemEventListener(*this);
154 __pSlidableGroupedList->AddSlidableGroupedListEventListener(*this);
156 // Creates an instance of CustomListItemFormat
157 __pCustomListItemFormat = new CustomListItemFormat();
158 __pCustomListItemFormat->Construct();
159 __pCustomListItemFormat->AddElement(ID_LIST_TEXT, Rectangle(10, 25, 240, 80));
160 __pCustomListItemFormat->AddElement(ID_LIST_BITMAP, Rectangle(250, 10, 70, 80));
162 // Adds the groups to the slidable grouped list
163 __pSlidableGroupedList->AddGroup(L"Group1", null, ITEM_COUNT_GROUP1, ITEM_COUNT_GROUP1 * ITEM_HEIGHT);
164 __pSlidableGroupedList->AddGroup(L"Group2", null, ITEM_COUNT_GROUP2, ITEM_COUNT_GROUP2 * ITEM_HEIGHT);
165 __pSlidableGroupedList->AddGroup(L"Group3", null, ITEM_COUNT_GROUP3, ITEM_COUNT_GROUP3 * ITEM_HEIGHT);
167 // Adds the slidable grouped list to the form
168 AddControl(*__pSlidableGroupedList);
174 SlidableGroupedListSample::OnTerminating(void)
176 result r = E_SUCCESS;
178 // Deallocates the item format
179 delete __pCustomListItemFormat;
185 SlidableGroupedListSample::LoadListItem(int itemId)
187 // Gets instances of Bitmap
188 AppResource* pAppResource = Application::App::GetInstance()->GetAppResource();
189 Bitmap *pBitmapNormal = pAppResource->GetBitmapN(L"tizen.png");
190 Bitmap *pBitmapFocused = pAppResource->GetBitmapN(L"tizen.png");
192 // Creates an instance of String to set an item element
194 int groupIndex = itemId / ITEM_ID_LIMITS;
195 int itemIndex = itemId % ITEM_ID_LIMITS;
196 itemText.Format(128, L"ITEM %d-%d", groupIndex+1, itemIndex+1);
198 // Creates an instance of CustomListItem
199 CustomListItem* pItem = new CustomListItem();
200 pItem->Construct(ITEM_HEIGHT);
201 pItem->SetItemFormat(*__pCustomListItemFormat);
202 pItem->SetElement(ID_LIST_TEXT, itemText);
203 pItem->SetElement(ID_LIST_BITMAP, *pBitmapNormal, pBitmapFocused);
205 // Deallocates bitmaps
206 delete pBitmapNormal;
207 delete pBitmapFocused;
212 // IGroupedItemEventListener implementation
214 SlidableGroupedListSample::OnItemStateChanged(const Control &source, int groupIndex, int itemIndex, int itemId, ItemStatus status)
229 SlidableGroupedListSample::OnItemStateChanged(const Control &source, int groupIndex, int itemIndex, int itemId, int elementId, ItemStatus status)
253 // IFastScrollEventListener implementation
255 SlidableGroupedListSample::OnListPropertyRequested(const Control &source)
261 SlidableGroupedListSample::OnLoadToTopRequested(const Control &source, int groupIndex, int itemIndex, int numItems)
263 for(int i=0; i < numItems; ++i)
265 // Loads items upwards
266 int itemId = ITEM_ID_LIMITS * groupIndex + itemIndex;
268 CustomListItem* pItem = LoadListItem(itemId);
269 __pSlidableGroupedList->LoadItemToTop(*pItem, itemId);
274 SlidableGroupedListSample::OnLoadToBottomRequested (const Control &source, int groupIndex, int itemIndex, int numItems)
276 for(int i=0; i< numItems; ++i)
278 // Loads items downwards
279 int itemId = ITEM_ID_LIMITS * groupIndex + itemIndex + i;
281 CustomListItem* pItem = LoadListItem(itemId);
282 __pSlidableGroupedList->LoadItemToBottom(*pItem, itemId);
287 SlidableGroupedListSample::OnUnloadItemRequested(const Control& source, int groupIndex, int itemIndex)
289 // Releases resources of the specified item
295 class _OSP_EXPORT_ SlidableGroupedList
296 : public Tizen::Ui::Control
301 * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
303 * @brief <i> [Deprecated] </i>
304 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
308 SlidableGroupedList(void);
312 * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
314 * @brief <i> [Deprecated] </i>
315 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
319 virtual ~SlidableGroupedList(void);
324 * Initializes this instance of %SlidableGroupedList with the specified parameters.
326 * @brief <i> [Deprecated] </i>
327 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
330 * @return An error code
331 * @param[in] rect An instance of the Graphics::Rectangle class @n
332 * This instance represents the x and y coordinates of the top-left corner of the created %SlidableGroupedList along with
333 * the width and height.
334 * @param[in] style The style of the CustomListItem instances
335 * @param[in] itemDivider Set to @c true to display an item divider, @n
337 * @param[in] fastScroll Set to @c true to use fast scroll, @n
339 * @exception E_SUCCESS The method is successful.
340 * @exception E_INVALID_ARG A specified input parameter is invalid.
341 * @exception E_SYSTEM A system error has occurred.
342 * @remarks The size of the control must be within the range defined by the minimum size and the maximum size. @n
343 * @remarks The minimum size of this control is 274 x 148 on a WVGA screen, 180 x 96 on a HVGA screen and 137 x 74 on a WQVGA screen.
347 result Construct(const Tizen::Graphics::Rectangle& rect, CustomListStyle style, bool itemDivider = true, bool fastScroll = false);
351 * Adds the specified listener instance.
352 * The added listener can listen to the events on the context of the given event dispatcher when they are fired.
354 * @brief <i> [Deprecated] </i>
355 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
358 * @param[in] listener The event listener to be added
361 void AddSlidableGroupedListEventListener(Tizen::Ui::ISlidableGroupedListEventListener& listener);
365 * Removes the specified listener instance.
366 * The removed listener cannot listen to the events when they are fired.
368 * @brief <i> [Deprecated] </i>
369 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
372 * @param[in] listener The event listener to be removed
375 void RemoveSlidableGroupedListEventListener(Tizen::Ui::ISlidableGroupedListEventListener& listener);
379 * Loads the item to the top of the %SlidableGroupedList control.
381 * @brief <i> [Deprecated] </i>
382 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
385 * @return An error code
386 * @param[in] item The %CustomListItem instance
387 * @param[in] itemId The item ID
388 * @exception E_SUCCESS The method is successful.
389 * @exception E_SYSTEM A system error has occurred.
392 result LoadItemToTop(const Tizen::Ui::Controls::CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
396 * Loads the item to the end of the %SlidableGroupedList control.
398 * @brief <i> [Deprecated] </i>
399 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
402 * @return An error code
403 * @param[in] item The %CustomListItem object
404 * @param[in] itemId The item ID
405 * @exception E_SUCCESS The method is successful.
406 * @exception E_SYSTEM A system error has occurred.
409 result LoadItemToBottom(const Tizen::Ui::Controls::CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
413 * Unloads all the loaded items of the %SlidableGroupedList control.
415 * @brief <i> [Deprecated] </i>
416 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
419 * @return An error code
420 * @exception E_SUCCESS The method is successful.
421 * @exception E_SYSTEM A system error has occurred.
424 result UnloadAllItems(void);
429 * Removes all the items in the specified group. @n
430 * The group is not removed.
432 * @brief <i> [Deprecated] </i>
433 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
436 * @return An error code
437 * @param[in] groupIndex The group index
438 * @exception E_SUCCESS The method is successful.
439 * @exception E_INVALID_ARG A specified input parameter is invalid.
440 * @exception E_SYSTEM A system error has occurred.
441 * @remarks The removed list items are deleted from the memory.
444 result RemoveAllItemsAt(int groupIndex);
448 * Removes all the items in the list.
450 * @brief <i> [Deprecated] </i>
451 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
454 * @return An error code
455 * @exception E_SUCCESS The method is successful.
456 * @exception E_SYSTEM A system error has occurred.
457 * @remarks The removed list items are deleted from the memory.
458 * @remarks After the items have been removed, the ISlidableGroupedListEventListener::OnListPropertyRequested() method is called.
459 * @see ISlidableGroupedListEventListener
462 result RemoveAllItems(void);
466 * Removes the specified listener instance. @n
467 * The removed listener cannot listen to events when they are fired.
469 * @brief <i> [Deprecated] </i>
470 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
473 * @param[in] listener The event listener to be removed
476 void RemoveFastScrollEventListener(Tizen::Ui::IFastScrollEventListener& listener);
480 * Removes the specified listener instance. @n
481 * The removed listener cannot listen to events when they are fired.
483 * @brief <i> [Deprecated] </i>
484 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
487 * @param[in] listener The event listener to be removed
490 void RemoveGroupedItemEventListener(Tizen::Ui::IGroupedItemEventListener& listener);
494 * Scrolls to the bottom of the %SlidableGroupedList control.
496 * @brief <i> [Deprecated] </i>
497 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
501 void ScrollToBottom(void);
505 * Scrolls to the top of the %SlidableGroupedList control.
507 * @brief <i> [Deprecated] </i>
508 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
512 void ScrollToTop(void);
516 * Scrolls to the item at the specified index. @n
517 * The specified item is drawn at the top of the %SlidableGroupedList control.
519 * @brief <i> [Deprecated] </i>
520 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
523 * @return An error code
524 * @param[in] groupIndex The group index
525 * @param[in] itemIndex The item index
526 * @exception E_SUCCESS The method is successful.
527 * @exception E_INVALID_ARG A specified input parameter is invalid.
528 * @exception E_SYSTEM A system error has occurred.
531 result ScrollToTop(int groupIndex, int itemIndex);
535 * Scrolls to the group at the specified index. @n
536 * The specified group is drawn at the top of the %SlidableGroupedList control.
538 * @brief <i> [Deprecated] </i>
539 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
542 * @return An error code
543 * @param[in] groupIndex The group index
544 * @exception E_SUCCESS The method is successful.
545 * @exception E_INVALID_ARG The specified input parameter is invalid.
546 * @exception E_SYSTEM A system error has occurred.
549 result ScrollToTop(int groupIndex);
554 * Sets all the items at the specified group index.
556 * @brief <i> [Deprecated] </i>
557 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
560 * @param[in] groupIndex The group index
561 * @param[in] check Set to @c true to check the item, @n
562 * else @c false to uncheck
563 * @exception E_SUCCESS The method is successful.
564 * @exception E_INVALID_ARG A specified input parameter is invalid.
565 * @exception E_SYSTEM A system error has occurred.
568 result SetAllItemsChecked(int groupIndex, bool check);
572 * Sets the contents of the group of the %SlidableGroupedList control at the specified group index.
574 * @brief <i> [Deprecated] </i>
575 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
578 * @return An error code
579 * @param[in] groupIndex The group index
580 * @param[in] text The string of the group to be appended
581 * @param[in] pBackgroundBitmap The bitmap of the group
582 * @param[in] groupId The group ID
583 * @exception E_SUCCESS The method is successful.
584 * @exception E_SYSTEM A system error has occurred.
587 result SetGroupAt(int groupIndex, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int groupId = LIST_ITEM_UNSPECIFIED_ID);
591 * Sets the specified item as checked or unchecked.
593 * @brief <i> [Deprecated] </i>
594 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
597 * @return An error code
598 * @param[in] groupIndex The group index of the item to be checked
599 * @param[in] itemIndex The index of the item to be checked
600 * @param[in] check Set to @c true to check the item, @n
601 * else @c false to uncheck it
602 * @exception E_SUCCESS The method is successful.
603 * @exception E_INVALID_ARG A specified input parameter is invalid.
604 * @exception E_SYSTEM A system error has occurred.
607 result SetItemChecked(int groupIndex, int itemIndex, bool check);
611 * Enables or disables the item at the specified index of the %SlidableGroupedList.
613 * @brief <i> [Deprecated] </i>
614 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
617 * @return An error code
618 * @param[in] groupIndex The group index of the item to be checked
619 * @param[in] itemIndex The index of the item to be checked
620 * @param[in] enable Set to @c true to enable the item, @n
621 * else @c false to disable it
622 * @exception E_SUCCESS The method is successful.
623 * @exception E_INVALID_ARG A specified input parameter is invalid.
624 * @exception E_SYSTEM A system error has occurred.
627 result SetLoadedItemEnabled(int groupIndex, int itemIndex, bool enable);
631 * Removes all the checked items from the group.
633 * @brief <i> [Deprecated] </i>
634 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
637 * @return An error code
638 * @param[in] groupIndex The group index
639 * @param[in] height The estimated/real height of the items of the group
640 * @exception E_SUCCESS The method is successful.
641 * @exception E_INVALID_ARG A specified input parameter is invalid.
642 * @exception E_SYSTEM A system error has occurred.
645 result RemoveAllCheckedItemsAt(int groupIndex, int height);
649 * Removes the specified item from the group.
651 * @brief <i> [Deprecated] </i>
652 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
655 * @return An error code
656 * @param[in] groupIndex The group index
657 * @param[in] itemIndex The item index
658 * @param[in] height The estimated/real height of the item
659 * @exception E_SUCCESS The method is successful.
660 * @exception E_INVALID_ARG A specified input parameter is invalid.
661 * @exception E_SYSTEM A system error has occurred.
662 * @remarks The removed list item is deleted from the memory.
665 result RemoveItemAt(int groupIndex, int itemIndex, int height);
670 * Removes the group of the %SlidableGroupedList control at the group index.
672 * @brief <i> [Deprecated] </i>
673 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
676 * @return An error code
677 * @param[in] groupIndex The group index
678 * @exception E_SUCCESS The method is successful.
679 * @exception E_INVALID_ARG The specified input parameter is invalid.
680 * @exception E_SYSTEM A system error has occurred.
681 * @remarks When the specified group is removed, all the items in the group are also removed.
682 * @remarks The removed list items are deleted from the memory.
685 result RemoveGroupAt(int groupIndex);
690 * Gets the item at the specified indexes if the item is currently loaded.
692 * @brief <i> [Deprecated] </i>
693 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
696 * @return A pointer to the loaded item, @n
697 * else @c null if the specified item is not currently loaded
698 * @param[in] groupIndex The group index
699 * @param[in] itemIndex The item index
702 const Tizen::Ui::Controls::CustomListItem* GetLoadedItemAt(int groupIndex, int itemIndex) const;
707 * Gets the item ID at the specified index if the item is currently loaded.
709 * @brief <i> [Deprecated] </i>
710 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
713 * @return The item ID, @n
714 * else LIST_ITEM_UNSPECIFIED_ID if the specified item is not currently loaded
715 * @param[in] groupIndex The group index
716 * @param[in] itemIndex The item index
719 int GetLoadedItemIdAt(int groupIndex, int itemIndex) const;
724 * Gets the item index from the specified item ID.
726 * @brief <i> [Deprecated] </i>
727 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
730 * @return An error code, @n
731 * else @c -1 if the specified item is not currently loaded
732 * @param[in] itemId The item ID
733 * @param[out] groupIndex The group index
734 * @param[out] itemIndex The item index
735 * @exception E_SUCCESS The method is successful.
736 * @exception E_SYSTEM A system error has occurred.
739 result GetLoadedItemIndexFromItemId(int itemId, int& groupIndex, int& itemIndex) const;
743 * Removes all the checked items of the %SlidableGroupedList control.
745 * @brief <i> [Deprecated] </i>
746 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
749 * @return An error code
750 * @param[in] height The height of the item to be deleted
751 * @exception E_SUCCESS The method is successful.
752 * @exception E_SYSTEM A system error has occurred.
753 * @remarks The removed list items are deleted from the memory.
754 * @remarks This method can only be used when the style of the list allows multiple selections.
757 result RemoveAllCheckedItems(int height);
761 * Gets the index of the first loaded item.
763 * @brief <i> [Deprecated] </i>
764 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
767 * @return An error code
768 * @param[out] groupIndex The group index
769 * @param[out] itemIndex The item index
770 * @exception E_SUCCESS The method is successful.
771 * @exception E_SYSTEM A system error has occurred.
774 result GetFirstLoadedItemIndex(int& groupIndex, int& itemIndex) const;
778 * Gets the index of the last loaded item.
780 * @brief <i> [Deprecated] </i>
781 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
784 * @return An error code
785 * @param[out] groupIndex The group index
786 * @param[out] itemIndex The item index
787 * @exception E_SUCCESS The method is successful.
788 * @exception E_SYSTEM A system error has occurred.
791 result GetLastLoadedItemIndex(int& groupIndex, int& itemIndex) const;
795 * Sets the first index list of the scroll by text.
797 * @brief <i> [Deprecated] </i>
798 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
801 * @return An error code
802 * @param[in] text The text of the first index
803 * @exception E_SUCCESS The method is successful.
804 * @exception E_SYSTEM A system error has occurred.
807 result SetFastScrollMainIndex(const Tizen::Base::String& text);
811 * Sets the background color of this control.
813 * @brief <i> [Deprecated] </i>
814 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
817 * @param[in] color The background color
820 void SetBackgroundColor(const Tizen::Graphics::Color& color);
824 * Sets the text of the empty list.
826 * @brief <i> [Deprecated] </i>
827 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
830 * @param[in] text The text of the empty list
833 void SetTextOfEmptyList(const Tizen::Base::String& text);
837 * Sets the color of the text to be displayed in the absence of a %SlidableGroupedList item.
839 * @brief <i> [Deprecated] </i>
840 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
843 * @param[in] color The color of the text to be displayed
846 void SetTextColorOfEmptyList(const Tizen::Graphics::Color& color);
850 * Gets the color of the text to be displayed in the absence of a %SlidableGroupedList item.
852 * @brief <i> [Deprecated] </i>
853 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
856 * @return The color of the text to be displayed
859 Tizen::Graphics::Color GetTextColorOfEmptyList(void) const;
863 * Sets the contents of the item in the specified group.
865 * @brief <i> [Deprecated] </i>
866 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
869 * @return An error code
870 * @param[in] groupIndex The group index
871 * @param[in] itemIndex The %CustomListItem object
872 * @param[in] item The item
873 * @param[in] itemId The item ID
874 * @exception E_SUCCESS The method is successful.
875 * @exception E_INVALID_ARG A specified input parameter is invalid.
876 * @exception E_SYSTEM A system error has occurred.
877 * @remarks Do not add, insert, or set an item, that already belongs to %SlidableGroupedList.
880 result SetItemAt(int groupIndex, int itemIndex, const Tizen::Ui::Controls::CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
884 * Adds the specified listener instance.
885 * The added listener can listen to events on the context of the given event dispatcher when they are fired.
887 * @brief <i> [Deprecated] </i>
888 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
891 * @param[in] listener The event listener to be added
894 void AddFastScrollEventListener(Tizen::Ui::IFastScrollEventListener& listener);
898 * Adds the specified group to the %SlidableGroupedList control.
900 * @brief <i> [Deprecated] </i>
901 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
904 * @return An error code
905 * @param[in] text The string of the group to be appended
906 * @param[in] pBackgroundBitmap The background bitmap of the group
907 * @param[in] itemCount The number of items of the group
908 * @param[in] groupHeight The total height of the items of the group
909 * @param[in] groupId The group ID
910 * @exception E_SUCCESS The method is successful.
911 * @exception E_SYSTEM A system error has occurred.
914 result AddGroup(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int itemCount, int groupHeight, int groupId = LIST_ITEM_UNSPECIFIED_ID);
918 * Adds the specified listener instance.
919 * The added listener can listen to events on the context of the given event dispatcher when they are fired.
921 * @brief <i> [Deprecated] </i>
922 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
925 * @param[in] listener The event listener to be added
928 void AddGroupedItemEventListener(Tizen::Ui::IGroupedItemEventListener& listener);
933 * Adds the item to the specified group.
935 * @brief <i> [Deprecated] </i>
936 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
939 * @return An error code
940 * @param[in] groupIndex The group index
941 * @param[in] item The CustomListItem object
942 * @param[in] itemId The item ID
943 * @exception E_SUCCESS The method is successful.
944 * @exception E_INVALID_ARG A specified input parameter is invalid.
945 * @exception E_SYSTEM A system error has occurred.
946 * @remarks The added item is deleted automatically when the list is destroyed.
947 * Do not add, insert, or set an item that already belongs to %SlidableGroupedList.
950 result AddItem(int groupIndex, const Tizen::Ui::Controls::CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
954 * Gets the index of the current bottom drawn item.
956 * @brief <i> [Deprecated] </i>
957 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
960 * @return An error code
961 * @param[out] groupIndex The group index
962 * @param[out] itemIndex The item index
963 * @exception E_SUCCESS The method is successful.
964 * @exception E_SYSTEM A system error has occurred.
967 result GetBottomDrawnItemIndex(int& groupIndex, int& itemIndex) const;
972 * Gets the index of the first checked list item.
974 * @brief <i> [Deprecated] </i>
975 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
978 * @return An error code
979 * @param[out] groupIndex The group index
980 * @param[out] itemIndex The item index
981 * @exception E_SUCCESS The method is successful.
982 * @exception E_SYSTEM A system error has occurred.
985 result GetFirstCheckedItemIndex(int& groupIndex, int& itemIndex) const;
990 * Gets the group ID from the specified group index.
992 * @brief <i> [Deprecated] </i>
993 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
996 * @return The group ID
997 * @param[in] groupIndex The group index
1000 int GetGroupIdAt(int groupIndex) const;
1005 * Gets the group index from the specified group ID.
1007 * @brief <i> [Deprecated] </i>
1008 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1011 * @return The group index
1012 * @param[in] groupId The group ID
1015 int GetGroupIndexFromGroupId(int groupId) const;
1020 * Gets the index of the last checked item.
1022 * @brief <i> [Deprecated] </i>
1023 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1026 * @return An error code
1027 * @param[out] groupIndex The group index
1028 * @param[out] itemIndex The item index
1029 * @exception E_SUCCESS The method is successful.
1030 * @exception E_SYSTEM A system error has occurred.
1033 result GetLastCheckedItemIndex(int& groupIndex, int& itemIndex) const;
1037 * Gets the index of the next checked item after the specified item.
1039 * @brief <i> [Deprecated] </i>
1040 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1043 * @return An error code
1044 * @param[in,out] groupIndex The group index
1045 * @param[in,out] itemIndex The item index
1046 * @exception E_SUCCESS The method is successful.
1047 * @exception E_SYSTEM A system error has occurred.
1050 result GetNextCheckedItemIndexAfter(int& groupIndex, int& itemIndex) const;
1054 * Gets the index of the current top drawn item.
1056 * @brief <i> [Deprecated] </i>
1057 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1060 * @return An error code
1061 * @param[out] groupIndex The group index
1062 * @param[out] itemIndex The item index
1063 * @exception E_SUCCESS The method is successful.
1064 * @exception E_SYSTEM A system error has occurred.
1067 result GetTopDrawnItemIndex(int& groupIndex, int& itemIndex) const;
1071 * Gets the index of the item at the specified item position.
1073 * @brief <i> [Deprecated] </i>
1074 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1077 * @return An error code
1078 * @param[in] x The x position of the point
1079 * @param[in] y The y position of the point
1080 * @param[out] groupIndex The index of the group, that the item belongs to
1081 * @param[out] itemIndex The index of the item
1082 * @exception E_SUCCESS The method is successful.
1083 * @exception E_SYSTEM A system error has occurred. @n
1084 * There is no item at the specified position.
1087 result GetItemIndexFromPosition(int x, int y, int& groupIndex, int& itemIndex) const;
1091 * Gets the index of the item at the specified item position.
1093 * @brief <i> [Deprecated] </i>
1094 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1097 * @return An error code
1098 * @param[in] position The position of the point
1099 * @param[out] groupIndex The index of the group, that the item belongs to
1100 * @param[out] itemIndex The index of the item
1101 * @exception E_SUCCESS The method is successful.
1102 * @exception E_SYSTEM A system error has occurred. @n
1103 * There is no item at the specified position.
1106 result GetItemIndexFromPosition(const Tizen::Graphics::Point& position, int& groupIndex, int& itemIndex) const;
1110 * Inserts the group at the specified group index.
1112 * @brief <i> [Deprecated] </i>
1113 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1116 * @return An error code
1117 * @param[in] groupIndex The group index
1118 * @param[in] text The string of the group to be appended
1119 * @param[in] pBackgroundBitmap The background bitmap of the group
1120 * @param[in] itemCount The count of all the items in the group
1121 * @param[in] groupHeight The total height of all the items in the group
1122 * @param[in] groupId The group ID
1123 * @exception E_SUCCESS The method is successful.
1124 * @exception E_INVALID_ARG A specified input parameter is invalid.
1125 * @exception E_SYSTEM A system error has occurred.
1128 result InsertGroupAt(int groupIndex, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int itemCount, int groupHeight, int groupId = LIST_ITEM_UNSPECIFIED_ID);
1132 * Checks whether the item at the specified index is checked.
1134 * @brief <i> [Deprecated] </i>
1135 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1138 * @return @c true if the item is checked, @n
1140 * @param[in] groupIndex The group index
1141 * @param[in] itemIndex The item index
1143 * @remarks This method can only be used when the style of the list allows selection.
1146 bool IsItemChecked(int groupIndex, int itemIndex) const;
1150 * Checks whether the item at the specified index is enabled.
1152 * @brief <i> [Deprecated] </i>
1153 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1156 * @return @c true if the item is enabled, @n
1158 * @param[in] groupIndex The group index
1159 * @param[in] itemIndex The item index
1162 bool IsLoadedItemEnabled(int groupIndex, int itemIndex) const;
1167 * Checks whether the item at the specified index is currently loaded to the slidable list.
1169 * @brief <i> [Deprecated] </i>
1170 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1173 * @return @c true if the item is loaded, @n
1175 * @param[in] groupIndex The group index
1176 * @param[in] itemIndex The item index
1179 bool IsItemLoaded(int groupIndex, int itemIndex) const;
1184 * Removes all the groups of the %SlidableGroupedList control.
1186 * @brief <i> [Deprecated] </i>
1187 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1190 * @return An error code
1191 * @exception E_SUCCESS The method is successful.
1192 * @exception E_SYSTEM A system error has occurred.
1193 * @remarks When the specified group is removed, all the items in the group are also removed.
1194 * @remarks The removed list items are deleted from the memory.
1195 * @remarks After the items have been removed, the ISlidableGroupedListEventListener::OnListPropertyRequested() method is called.
1198 result RemoveAllGroups(void);
1202 * Gets the count of all the groups of the %SlidableGroupedList control.
1204 * @brief <i> [Deprecated] </i>
1205 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1208 * @return The count of all the groups
1211 int GetGroupCount(void) const;
1215 * Inserts the item to the specified group and item indices.
1217 * @brief <i> [Deprecated] </i>
1218 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1221 * @return An error code
1222 * @param[in] groupIndex The group index
1223 * @param[in] itemIndex The item index
1224 * @param[in] item The CustomListItem object
1225 * @param[in] itemId The item ID
1226 * @exception E_SUCCESS The method is successful.
1227 * @exception E_SYSTEM A system error has occurred.
1228 * @remarks The inserted item is deleted automatically when the list is destroyed.
1229 * Do not add, insert, or set an item, that already belongs to %SlidableGroupedList.
1232 result InsertItemAt(int groupIndex, int itemIndex, const Tizen::Ui::Controls::CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
1237 * Gets the count of all the items in the specified group.
1239 * @brief <i> [Deprecated] </i>
1240 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1243 * @return The count of all the items in the specified group
1244 * @param[in] groupIndex The group index
1247 int GetItemCountAt(int groupIndex) const;
1251 * Draws and shows the specified item of %SlidableGroupedList.
1253 * @brief <i> [Deprecated] </i>
1254 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1257 * @return An error code
1258 * @param[in] groupIndex The group index
1259 * @param[in] itemIndex The item index
1260 * @exception E_SUCCESS The method is successful.
1261 * @exception E_INVALID_ARG The specified @c groupIndex or @c itemIndex is invalid.
1262 * @exception E_INVALID_OPERATION The item has never been drawn before calling this method.
1263 * @exception E_SYSTEM A system error has occurred.
1266 result RefreshItem(int groupIndex, int itemIndex);
1270 * Draws and shows the specified group of %SlidableGroupedList.
1272 * @brief <i> [Deprecated] </i>
1273 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1276 * @return An error code
1277 * @param[in] groupIndex The group index
1278 * @exception E_SUCCESS The method is successful.
1279 * @exception E_INVALID_ARG The specified @c groupIndex is invalid.
1280 * @exception E_SYSTEM A system error has occurred.
1283 result RefreshGroup(int groupIndex);
1287 friend class _SlidableGroupedListImpl;
1290 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
1292 SlidableGroupedList(const SlidableGroupedList& rhs);
1295 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
1297 SlidableGroupedList& operator =(const SlidableGroupedList& rhs);
1299 }; //SlidableGroupedList
1301 }}} // Tizen::Ui::Controls
1303 #endif // _FUI_CTRL_SLIDABLE_GROUPED_LIST_H_