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);
812 * Sets the second index list of the scroll by text.
814 * @brief <i> [Deprecated] </i>
815 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
818 * @return An error code
819 * @param[in] text The text of the second index @n
820 * Each second index of the first index has to be separated by ','
821 * @param[in] indexDigit The index digit count
822 * @exception E_SUCCESS The method is successful.
823 * @exception E_SYSTEM A system error has occurred.
824 * @remarks The sub-index of fast scroll does not support SCROLL_INDEX_DIGIT_NUM_2. Therefore, when SCROLL_INDEX_DIGIT_NUM_2 is passed to
825 * @c indexDigit, this method returns E_SYSTEM.
828 result SetFastScrollSubIndex(const Tizen::Base::String& text, FastScrollIndexDigit indexDigit = SCROLL_INDEX_DIGIT_NUM_1);
832 * Sets the background color of this control.
834 * @brief <i> [Deprecated] </i>
835 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
838 * @param[in] color The background color
841 void SetBackgroundColor(const Tizen::Graphics::Color& color);
845 * Sets the text of the empty list.
847 * @brief <i> [Deprecated] </i>
848 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
851 * @param[in] text The text of the empty list
854 void SetTextOfEmptyList(const Tizen::Base::String& text);
858 * Sets the color of the text to be displayed in the absence of a %SlidableGroupedList item.
860 * @brief <i> [Deprecated] </i>
861 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
864 * @param[in] color The color of the text to be displayed
867 void SetTextColorOfEmptyList(const Tizen::Graphics::Color& color);
871 * Gets the color of the text to be displayed in the absence of a %SlidableGroupedList item.
873 * @brief <i> [Deprecated] </i>
874 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
877 * @return The color of the text to be displayed
880 Tizen::Graphics::Color GetTextColorOfEmptyList(void) const;
884 * Sets the contents of the item in the specified group.
886 * @brief <i> [Deprecated] </i>
887 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
890 * @return An error code
891 * @param[in] groupIndex The group index
892 * @param[in] itemIndex The %CustomListItem object
893 * @param[in] item The item
894 * @param[in] itemId The item ID
895 * @exception E_SUCCESS The method is successful.
896 * @exception E_INVALID_ARG A specified input parameter is invalid.
897 * @exception E_SYSTEM A system error has occurred.
898 * @remarks Do not add, insert, or set an item, that already belongs to %SlidableGroupedList.
901 result SetItemAt(int groupIndex, int itemIndex, const Tizen::Ui::Controls::CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
905 * Adds the specified listener instance.
906 * The added listener can listen to events on the context of the given event dispatcher when they are fired.
908 * @brief <i> [Deprecated] </i>
909 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
912 * @param[in] listener The event listener to be added
915 void AddFastScrollEventListener(Tizen::Ui::IFastScrollEventListener& listener);
919 * Adds the specified group to the %SlidableGroupedList control.
921 * @brief <i> [Deprecated] </i>
922 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
925 * @return An error code
926 * @param[in] text The string of the group to be appended
927 * @param[in] pBackgroundBitmap The background bitmap of the group
928 * @param[in] itemCount The number of items of the group
929 * @param[in] groupHeight The total height of the items of the group
930 * @param[in] groupId The group ID
931 * @exception E_SUCCESS The method is successful.
932 * @exception E_SYSTEM A system error has occurred.
935 result AddGroup(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int itemCount, int groupHeight, int groupId = LIST_ITEM_UNSPECIFIED_ID);
939 * Adds the specified listener instance.
940 * The added listener can listen to events on the context of the given event dispatcher when they are fired.
942 * @brief <i> [Deprecated] </i>
943 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
946 * @param[in] listener The event listener to be added
949 void AddGroupedItemEventListener(Tizen::Ui::IGroupedItemEventListener& listener);
954 * Adds the item to the specified group.
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[in] groupIndex The group index
962 * @param[in] item The CustomListItem object
963 * @param[in] itemId The item ID
964 * @exception E_SUCCESS The method is successful.
965 * @exception E_INVALID_ARG A specified input parameter is invalid.
966 * @exception E_SYSTEM A system error has occurred.
967 * @remarks The added item is deleted automatically when the list is destroyed.
968 * Do not add, insert, or set an item that already belongs to %SlidableGroupedList.
971 result AddItem(int groupIndex, const Tizen::Ui::Controls::CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
975 * Gets the index of the current bottom drawn item.
977 * @brief <i> [Deprecated] </i>
978 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
981 * @return An error code
982 * @param[out] groupIndex The group index
983 * @param[out] itemIndex The item index
984 * @exception E_SUCCESS The method is successful.
985 * @exception E_SYSTEM A system error has occurred.
988 result GetBottomDrawnItemIndex(int& groupIndex, int& itemIndex) const;
993 * Gets the index of the first checked list item.
995 * @brief <i> [Deprecated] </i>
996 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
999 * @return An error code
1000 * @param[out] groupIndex The group index
1001 * @param[out] itemIndex The item index
1002 * @exception E_SUCCESS The method is successful.
1003 * @exception E_SYSTEM A system error has occurred.
1006 result GetFirstCheckedItemIndex(int& groupIndex, int& itemIndex) const;
1011 * Gets the group ID from the specified group index.
1013 * @brief <i> [Deprecated] </i>
1014 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1017 * @return The group ID
1018 * @param[in] groupIndex The group index
1021 int GetGroupIdAt(int groupIndex) const;
1026 * Gets the group index from the specified group ID.
1028 * @brief <i> [Deprecated] </i>
1029 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1032 * @return The group index
1033 * @param[in] groupId The group ID
1036 int GetGroupIndexFromGroupId(int groupId) const;
1041 * Gets the index of the last checked item.
1043 * @brief <i> [Deprecated] </i>
1044 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1047 * @return An error code
1048 * @param[out] groupIndex The group index
1049 * @param[out] itemIndex The item index
1050 * @exception E_SUCCESS The method is successful.
1051 * @exception E_SYSTEM A system error has occurred.
1054 result GetLastCheckedItemIndex(int& groupIndex, int& itemIndex) const;
1058 * Gets the index of the next checked item after the specified item.
1060 * @brief <i> [Deprecated] </i>
1061 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1064 * @return An error code
1065 * @param[in,out] groupIndex The group index
1066 * @param[in,out] itemIndex The item index
1067 * @exception E_SUCCESS The method is successful.
1068 * @exception E_SYSTEM A system error has occurred.
1071 result GetNextCheckedItemIndexAfter(int& groupIndex, int& itemIndex) const;
1075 * Gets the index of the current top drawn item.
1077 * @brief <i> [Deprecated] </i>
1078 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1081 * @return An error code
1082 * @param[out] groupIndex The group index
1083 * @param[out] itemIndex The item index
1084 * @exception E_SUCCESS The method is successful.
1085 * @exception E_SYSTEM A system error has occurred.
1088 result GetTopDrawnItemIndex(int& groupIndex, int& itemIndex) const;
1092 * Gets the index of the item at the specified item position.
1094 * @brief <i> [Deprecated] </i>
1095 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1098 * @return An error code
1099 * @param[in] x The x position of the point
1100 * @param[in] y The y position of the point
1101 * @param[out] groupIndex The index of the group, that the item belongs to
1102 * @param[out] itemIndex The index of the item
1103 * @exception E_SUCCESS The method is successful.
1104 * @exception E_SYSTEM A system error has occurred. @n
1105 * There is no item at the specified position.
1108 result GetItemIndexFromPosition(int x, int y, int& groupIndex, int& itemIndex) const;
1112 * Gets the index of the item at the specified item position.
1114 * @brief <i> [Deprecated] </i>
1115 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1118 * @return An error code
1119 * @param[in] position The position of the point
1120 * @param[out] groupIndex The index of the group, that the item belongs to
1121 * @param[out] itemIndex The index of the item
1122 * @exception E_SUCCESS The method is successful.
1123 * @exception E_SYSTEM A system error has occurred. @n
1124 * There is no item at the specified position.
1127 result GetItemIndexFromPosition(const Tizen::Graphics::Point& position, int& groupIndex, int& itemIndex) const;
1131 * Inserts the group at the specified group index.
1133 * @brief <i> [Deprecated] </i>
1134 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1137 * @return An error code
1138 * @param[in] groupIndex The group index
1139 * @param[in] text The string of the group to be appended
1140 * @param[in] pBackgroundBitmap The background bitmap of the group
1141 * @param[in] itemCount The count of all the items in the group
1142 * @param[in] groupHeight The total height of all the items in the group
1143 * @param[in] groupId The group ID
1144 * @exception E_SUCCESS The method is successful.
1145 * @exception E_INVALID_ARG A specified input parameter is invalid.
1146 * @exception E_SYSTEM A system error has occurred.
1149 result InsertGroupAt(int groupIndex, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int itemCount, int groupHeight, int groupId = LIST_ITEM_UNSPECIFIED_ID);
1153 * Checks whether the item at the specified index is checked.
1155 * @brief <i> [Deprecated] </i>
1156 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1159 * @return @c true if the item is checked, @n
1161 * @param[in] groupIndex The group index
1162 * @param[in] itemIndex The item index
1164 * @remarks This method can only be used when the style of the list allows selection.
1167 bool IsItemChecked(int groupIndex, int itemIndex) const;
1171 * Checks whether the item at the specified index is enabled.
1173 * @brief <i> [Deprecated] </i>
1174 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1177 * @return @c true if the item is enabled, @n
1179 * @param[in] groupIndex The group index
1180 * @param[in] itemIndex The item index
1183 bool IsLoadedItemEnabled(int groupIndex, int itemIndex) const;
1188 * Checks whether the item at the specified index is currently loaded to the slidable list.
1190 * @brief <i> [Deprecated] </i>
1191 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1194 * @return @c true if the item is loaded, @n
1196 * @param[in] groupIndex The group index
1197 * @param[in] itemIndex The item index
1200 bool IsItemLoaded(int groupIndex, int itemIndex) const;
1205 * Removes all the groups of the %SlidableGroupedList control.
1207 * @brief <i> [Deprecated] </i>
1208 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1211 * @return An error code
1212 * @exception E_SUCCESS The method is successful.
1213 * @exception E_SYSTEM A system error has occurred.
1214 * @remarks When the specified group is removed, all the items in the group are also removed.
1215 * @remarks The removed list items are deleted from the memory.
1216 * @remarks After the items have been removed, the ISlidableGroupedListEventListener::OnListPropertyRequested() method is called.
1219 result RemoveAllGroups(void);
1223 * Gets the count of all the groups of the %SlidableGroupedList control.
1225 * @brief <i> [Deprecated] </i>
1226 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1229 * @return The count of all the groups
1232 int GetGroupCount(void) const;
1236 * Inserts the item to the specified group and item indices.
1238 * @brief <i> [Deprecated] </i>
1239 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1242 * @return An error code
1243 * @param[in] groupIndex The group index
1244 * @param[in] itemIndex The item index
1245 * @param[in] item The CustomListItem object
1246 * @param[in] itemId The item ID
1247 * @exception E_SUCCESS The method is successful.
1248 * @exception E_SYSTEM A system error has occurred.
1249 * @remarks The inserted item is deleted automatically when the list is destroyed.
1250 * Do not add, insert, or set an item, that already belongs to %SlidableGroupedList.
1253 result InsertItemAt(int groupIndex, int itemIndex, const Tizen::Ui::Controls::CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
1258 * Gets the count of all the items in the specified group.
1260 * @brief <i> [Deprecated] </i>
1261 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1264 * @return The count of all the items in the specified group
1265 * @param[in] groupIndex The group index
1268 int GetItemCountAt(int groupIndex) const;
1272 * Draws and shows the specified item of %SlidableGroupedList.
1274 * @brief <i> [Deprecated] </i>
1275 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1278 * @return An error code
1279 * @param[in] groupIndex The group index
1280 * @param[in] itemIndex The item index
1281 * @exception E_SUCCESS The method is successful.
1282 * @exception E_INVALID_ARG The specified @c groupIndex or @c itemIndex is invalid.
1283 * @exception E_INVALID_OPERATION The item has never been drawn before calling this method.
1284 * @exception E_SYSTEM A system error has occurred.
1287 result RefreshItem(int groupIndex, int itemIndex);
1291 * Draws and shows the specified group of %SlidableGroupedList.
1293 * @brief <i> [Deprecated] </i>
1294 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1297 * @return An error code
1298 * @param[in] groupIndex The group index
1299 * @exception E_SUCCESS The method is successful.
1300 * @exception E_INVALID_ARG The specified @c groupIndex is invalid.
1301 * @exception E_SYSTEM A system error has occurred.
1304 result RefreshGroup(int groupIndex);
1308 friend class _SlidableGroupedListImpl;
1311 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
1313 SlidableGroupedList(const SlidableGroupedList& rhs);
1316 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
1318 SlidableGroupedList& operator =(const SlidableGroupedList& rhs);
1320 }; //SlidableGroupedList
1322 }}} // Tizen::Ui::Controls
1324 #endif // _FUI_CTRL_SLIDABLE_GROUPED_LIST_H_