2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 // http://www.apache.org/licenses/LICENSE-2.0/
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.
20 * @file FUiCtrlSlidableGroupedList.h
21 * @brief This is the header file for the %SlidableGroupedList class.
23 * This header file contains the declarations of the %SlidableGroupedList class and its helper classes.
26 #ifndef _FUI_CTRL_SLIDABLE_GROUPED_LIST_H_
27 #define _FUI_CTRL_SLIDABLE_GROUPED_LIST_H_
29 #include <FBaseObject.h>
30 #include <FBaseTypes.h>
31 #include <FGrpRectangle.h>
32 #include <FUiControl.h>
33 #include <FUiContainer.h>
34 #include <FUiCtrlGroupedList.h>
35 #include <FUiCtrlControlsTypes.h>
36 #include <FUiISlidableGroupedListEventListener.h>
37 #include <FUiCtrlCustomListItem.h>
39 namespace Tizen { namespace Base { namespace Runtime
44 namespace Tizen { namespace Ui { namespace Controls
49 * @class SlidableGroupedList
50 * @brief <i> [Deprecated] </i> This class defines the common behavior of the %SlidableGroupedList control.
52 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
55 * The %SlidableGroupedList class represents a list which loads grouped
56 * items on demand and unloads unused grouped items to save memory. Like GroupedList,
57 * the list items of GroupedList consist of groups and items. A group represents grouped
58 * items and is inserted into the first level just as items are inserted into List. Items
59 * which are from CustomListItems are inserted under related groups. So, items are uniquely
60 * identified with two indices: group index and item index.
62 * The operation of %SlidableGroupedList is the same as that of a GroupedList, except
63 * that a %SlidableGroupedList does not hold all items in the memory. Most of the item manipulations
64 * are available when they are loaded, but the check state is maintained for all items
65 * whether they are loaded or not.
66 * ISlidableGroupedListEventListener must be implemented so that an application can
67 * be notified when the items need to be loaded as the user scrolls through a list.
68 * If an application wants to perform tasks when the state of a list item is changed,
69 * it must implement IGroupedItemEventListener and register it to the slidable
70 * grouped list. It will then receive related events from %SlidableGroupedList.
72 * Note that CustomListItem and CustomListItemFormat need to be created on a heap. CustomListItems will be deleted automatically
73 * when the %SlidableGroupedList itself is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). CustomListItemFormat
74 * must be deleted by the application.
76 * Refer to CustomListItem and CustomListItemFormat.
80 * @image html ui_controls_slidablegroupedlist.png
82 * This is the simple UI application which uses a %SlidableGroupedList control.
85 // Sample code for SlidableGroupedListSample.h
88 class SlidableGroupedListSample
89 : public Tizen::Ui::Controls::Form
90 , public Tizen::Ui::IGroupedItemEventListener
91 , public Tizen::Ui::ISlidableGroupedListEventListener
94 SlidableGroupedListSample(void)
95 : __pSlidableGroupedList(null)
96 , __pCustomListItemFormat(null){}
98 bool Initialize(void);
99 virtual result OnInitializing(void);
100 virtual result OnTerminating(void);
102 Tizen::Ui::Controls::CustomListItem* LoadListItem(int itemId);
103 virtual void OnItemStateChanged(const Tizen::Ui::Control &source, int groupIndex, int itemIndex, int itemId, int elementId, Tizen::Ui::ItemStatus status);
104 virtual void OnItemStateChanged(const Tizen::Ui::Control &source, int groupIndex, int itemIndex, int itemId, Tizen::Ui::ItemStatus status);
105 virtual void OnListPropertyRequested(const Tizen::Ui::Control &source);
106 virtual void OnLoadToTopRequested(const Tizen::Ui::Control &source, int groupIndex, int itemIndex, int numItems);
107 virtual void OnLoadToBottomRequested(const Tizen::Ui::Control &source, int groupIndex, int itemIndex, int numItems);
108 virtual void OnUnloadItemRequested(const Tizen::Ui::Control& source, int groupIndex, int itemIndex);
111 static const int ID_LIST_TEXT = 101;
112 static const int ID_LIST_BITMAP = 102;
113 static const int ITEM_HEIGHT = 103;
114 static const int ITEM_COUNT = 104;
115 static const int ITEM_COUNT_GROUP1 = 10;
116 static const int ITEM_COUNT_GROUP2 = 20;
117 static const int ITEM_COUNT_GROUP3 = 30;
118 static const int ITEM_ID_LIMITS = 30;
120 Tizen::Ui::Controls::SlidableGroupedList* __pSlidableGroupedList;
121 Tizen::Ui::Controls::CustomListItemFormat* __pCustomListItemFormat;
126 // Sample code for SlidableGroupedListSample.cpp
128 #include <FGraphics.h>
130 #include "SlidableGroupedListSample.h"
132 using namespace Tizen::App;
133 using namespace Tizen::Base;
134 using namespace Tizen::Base::Collection;
135 using namespace Tizen::Graphics;
136 using namespace Tizen::Ui;
137 using namespace Tizen::Ui::Controls;
141 SlidableGroupedListSample::Initialize(void)
143 Construct(FORM_STYLE_NORMAL);
148 SlidableGroupedListSample::OnInitializing(void)
150 result r = E_SUCCESS;
152 // Creates an instance of SlidableGroupedList
153 __pSlidableGroupedList = new SlidableGroupedList();
154 __pSlidableGroupedList->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height), CUSTOM_LIST_STYLE_NORMAL);
155 __pSlidableGroupedList->AddGroupedItemEventListener(*this);
156 __pSlidableGroupedList->AddSlidableGroupedListEventListener(*this);
158 // Creates an instance of CustomListItemFormat
159 __pCustomListItemFormat = new CustomListItemFormat();
160 __pCustomListItemFormat->Construct();
161 __pCustomListItemFormat->AddElement(ID_LIST_TEXT, Rectangle(10, 25, 240, 80));
162 __pCustomListItemFormat->AddElement(ID_LIST_BITMAP, Rectangle(250, 10, 70, 80));
164 // Adds the groups to the slidable grouped list
165 __pSlidableGroupedList->AddGroup(L"Group1", null, ITEM_COUNT_GROUP1, ITEM_COUNT_GROUP1 * ITEM_HEIGHT);
166 __pSlidableGroupedList->AddGroup(L"Group2", null, ITEM_COUNT_GROUP2, ITEM_COUNT_GROUP2 * ITEM_HEIGHT);
167 __pSlidableGroupedList->AddGroup(L"Group3", null, ITEM_COUNT_GROUP3, ITEM_COUNT_GROUP3 * ITEM_HEIGHT);
169 // Adds the slidable grouped list to the form
170 AddControl(__pSlidableGroupedList);
176 SlidableGroupedListSample::OnTerminating(void)
178 result r = E_SUCCESS;
180 // Deallocates the item format
181 delete __pCustomListItemFormat;
187 SlidableGroupedListSample::LoadListItem(int itemId)
189 // Gets instances of Bitmap
190 AppResource* pAppResource = Application::App::GetInstance()->GetAppResource();
191 Bitmap *pBitmapNormal = pAppResource->GetBitmapN(L"tizen.png");
192 Bitmap *pBitmapFocused = pAppResource->GetBitmapN(L"tizen.png");
194 // Creates an instance of String to set an item element
196 int groupIndex = itemId / ITEM_ID_LIMITS;
197 int itemIndex = itemId % ITEM_ID_LIMITS;
198 itemText.Format(128, L"ITEM %d-%d", groupIndex+1, itemIndex+1);
200 // Creates an instance of CustomListItem
201 CustomListItem* pItem = new CustomListItem();
202 pItem->Construct(ITEM_HEIGHT);
203 pItem->SetItemFormat(*__pCustomListItemFormat);
204 pItem->SetElement(ID_LIST_TEXT, itemText);
205 pItem->SetElement(ID_LIST_BITMAP, *pBitmapNormal, pBitmapFocused);
207 // Deallocates bitmaps
208 delete pBitmapNormal;
209 delete pBitmapFocused;
214 // IGroupedItemEventListener implementation
216 SlidableGroupedListSample::OnItemStateChanged(const Control &source, int groupIndex, int itemIndex, int itemId, ItemStatus status)
231 SlidableGroupedListSample::OnItemStateChanged(const Control &source, int groupIndex, int itemIndex, int itemId, int elementId, ItemStatus status)
255 // IFastScrollEventListener implementation
257 SlidableGroupedListSample::OnListPropertyRequested(const Control &source)
263 SlidableGroupedListSample::OnLoadToTopRequested(const Control &source, int groupIndex, int itemIndex, int numItems)
265 for(int i=0; i < numItems; ++i)
267 // Loads items upwards
268 int itemId = ITEM_ID_LIMITS * groupIndex + itemIndex;
270 CustomListItem* pItem = LoadListItem(itemId);
271 __pSlidableGroupedList->LoadItemToTop(*pItem, itemId);
276 SlidableGroupedListSample::OnLoadToBottomRequested (const Control &source, int groupIndex, int itemIndex, int numItems)
278 for(int i=0; i< numItems; ++i)
280 // Loads items downwards
281 int itemId = ITEM_ID_LIMITS * groupIndex + itemIndex + i;
283 CustomListItem* pItem = LoadListItem(itemId);
284 __pSlidableGroupedList->LoadItemToBottom(*pItem, itemId);
289 SlidableGroupedListSample::OnUnloadItemRequested(const Control& source, int groupIndex, int itemIndex)
291 // Releases resources of the specified item
297 class _OSP_EXPORT_ SlidableGroupedList
298 : public Tizen::Ui::Control
303 * The object is not fully constructed after this constructor is called. @n
304 * For full construction, the SlidableGroupedList::Construct() method must be called right after calling this constructor.
306 * @brief <i> [Deprecated] </i>
307 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
311 SlidableGroupedList(void);
315 * This polymorphic destructor should be overridden if required.@n
316 * This way, the destructors of the derived classes are called when the destructor of this interface is called.
318 * @brief <i> [Deprecated] </i>
319 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
323 virtual ~SlidableGroupedList(void);
328 * Initializes this instance of %SlidableGroupedList with the specified parameters.
330 * @brief <i> [Deprecated] </i>
331 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
334 * @return An error code
335 * @param[in] rect An instance of the Graphics::Rectangle class @n
336 * This instance represents the x and y coordinates of the top-left corner of the created %SlidableGroupedList along with
337 * the width and height.
338 * @param[in] style The style of the CustomListItem instances
339 * @param[in] itemDivider Set to @c true to display an item divider, @n
341 * @param[in] fastScroll Set to @c true to use fast scroll, @n
343 * @exception E_SUCCESS The method is successful.
344 * @exception E_INVALID_ARG A specified input parameter is invalid.
345 * @exception E_SYSTEM A system error has occurred.
347 * - The size of the control must be within the range defined by the minimum size and the maximum size.
348 * - 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.
352 result Construct(const Tizen::Graphics::Rectangle& rect, CustomListStyle style, bool itemDivider = true, bool fastScroll = false);
356 * Adds the specified listener instance.
357 * The added listener can listen to the events on the context of the given event dispatcher when they are fired.
359 * @brief <i> [Deprecated] </i>
360 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
363 * @param[in] listener The event listener to add
366 void AddSlidableGroupedListEventListener(Tizen::Ui::ISlidableGroupedListEventListener& listener);
370 * Removes the specified listener instance.
371 * The removed listener cannot listen to the events when they are fired.
373 * @brief <i> [Deprecated] </i>
374 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
377 * @param[in] listener The event listener to remove
380 void RemoveSlidableGroupedListEventListener(Tizen::Ui::ISlidableGroupedListEventListener& listener);
384 * Loads the item to the top of the %SlidableGroupedList control.
386 * @brief <i> [Deprecated] </i>
387 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
390 * @return An error code
391 * @param[in] item The %CustomListItem instance
392 * @param[in] itemId The item ID
393 * @exception E_SUCCESS The method is successful.
394 * @exception E_SYSTEM A system error has occurred.
397 result LoadItemToTop(const Tizen::Ui::Controls::CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
401 * Loads the item to the end of the %SlidableGroupedList control.
403 * @brief <i> [Deprecated] </i>
404 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
407 * @return An error code
408 * @param[in] item The %CustomListItem object
409 * @param[in] itemId The item ID
410 * @exception E_SUCCESS The method is successful.
411 * @exception E_SYSTEM A system error has occurred.
414 result LoadItemToBottom(const Tizen::Ui::Controls::CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
418 * Unloads all the loaded items of the %SlidableGroupedList control.
420 * @brief <i> [Deprecated] </i>
421 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
424 * @return An error code
425 * @exception E_SUCCESS The method is successful.
426 * @exception E_SYSTEM A system error has occurred.
429 result UnloadAllItems(void);
434 * Removes all the items in the specified group. @n
435 * The group is not removed.
437 * @brief <i> [Deprecated] </i>
438 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
441 * @return An error code
442 * @param[in] groupIndex The group index
443 * @exception E_SUCCESS The method is successful.
444 * @exception E_INVALID_ARG A specified input parameter is invalid.
445 * @exception E_SYSTEM A system error has occurred.
446 * @remarks The removed list items are deleted from the memory.
449 result RemoveAllItemsAt(int groupIndex);
453 * Removes all the items in the list.
455 * @brief <i> [Deprecated] </i>
456 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
459 * @return An error code
460 * @exception E_SUCCESS The method is successful.
461 * @exception E_SYSTEM A system error has occurred.
463 * - The removed list items are deleted from the memory.
464 * - After the items have been removed, the ISlidableGroupedListEventListener::OnListPropertyRequested() method is called.
465 * @see ISlidableGroupedListEventListener
468 result RemoveAllItems(void);
472 * Removes the specified listener instance. @n
473 * The removed listener cannot listen to events when they are fired.
475 * @brief <i> [Deprecated] </i>
476 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
479 * @param[in] listener The event listener to remove
482 void RemoveFastScrollEventListener(Tizen::Ui::IFastScrollEventListener& listener);
486 * Removes the specified listener instance. @n
487 * The removed listener cannot listen to events when they are fired.
489 * @brief <i> [Deprecated] </i>
490 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
493 * @param[in] listener The event listener to remove
496 void RemoveGroupedItemEventListener(Tizen::Ui::IGroupedItemEventListener& listener);
500 * Scrolls to the bottom of the %SlidableGroupedList control.
502 * @brief <i> [Deprecated] </i>
503 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
507 void ScrollToBottom(void);
511 * Scrolls to the top of the %SlidableGroupedList control.
513 * @brief <i> [Deprecated] </i>
514 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
518 void ScrollToTop(void);
522 * Scrolls to the item at the specified index. @n
523 * The specified item is drawn at the top of the %SlidableGroupedList control.
525 * @brief <i> [Deprecated] </i>
526 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
529 * @return An error code
530 * @param[in] groupIndex The group index
531 * @param[in] itemIndex The item index
532 * @exception E_SUCCESS The method is successful.
533 * @exception E_INVALID_ARG A specified input parameter is invalid.
534 * @exception E_SYSTEM A system error has occurred.
537 result ScrollToTop(int groupIndex, int itemIndex);
541 * Scrolls to the group at the specified index. @n
542 * The specified group is drawn at the top of the %SlidableGroupedList control.
544 * @brief <i> [Deprecated] </i>
545 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
548 * @return An error code
549 * @param[in] groupIndex The group index
550 * @exception E_SUCCESS The method is successful.
551 * @exception E_INVALID_ARG The specified input parameter is invalid.
552 * @exception E_SYSTEM A system error has occurred.
555 result ScrollToTop(int groupIndex);
560 * Sets all the items at the specified group index.
562 * @brief <i> [Deprecated] </i>
563 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
566 * @param[in] groupIndex The group index
567 * @param[in] check Set to @c true to check the item, @n
568 * else @c false to uncheck
569 * @exception E_SUCCESS The method is successful.
570 * @exception E_INVALID_ARG A specified input parameter is invalid.
571 * @exception E_SYSTEM A system error has occurred.
574 result SetAllItemsChecked(int groupIndex, bool check);
578 * Sets the contents of the group of the %SlidableGroupedList control at the specified group index.
580 * @brief <i> [Deprecated] </i>
581 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
584 * @return An error code
585 * @param[in] groupIndex The group index
586 * @param[in] text The string of the group to append
587 * @param[in] pBackgroundBitmap The bitmap of the group
588 * @param[in] groupId The group ID
589 * @exception E_SUCCESS The method is successful.
590 * @exception E_SYSTEM A system error has occurred.
593 result SetGroupAt(int groupIndex, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int groupId = LIST_ITEM_UNSPECIFIED_ID);
597 * Sets the specified item as checked or unchecked.
599 * @brief <i> [Deprecated] </i>
600 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
603 * @return An error code
604 * @param[in] groupIndex The group index of the item to check
605 * @param[in] itemIndex The index of the item to check
606 * @param[in] check Set to @c true to check the item, @n
607 * else @c false to uncheck it
608 * @exception E_SUCCESS The method is successful.
609 * @exception E_INVALID_ARG A specified input parameter is invalid.
610 * @exception E_SYSTEM A system error has occurred.
613 result SetItemChecked(int groupIndex, int itemIndex, bool check);
617 * Enables or disables the item at the specified index of the %SlidableGroupedList.
619 * @brief <i> [Deprecated] </i>
620 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
623 * @return An error code
624 * @param[in] groupIndex The group index of the item to check
625 * @param[in] itemIndex The index of the item to check
626 * @param[in] enable Set to @c true to enable the item, @n
627 * else @c false to disable it
628 * @exception E_SUCCESS The method is successful.
629 * @exception E_INVALID_ARG A specified input parameter is invalid.
630 * @exception E_SYSTEM A system error has occurred.
633 result SetLoadedItemEnabled(int groupIndex, int itemIndex, bool enable);
637 * Removes all the checked items from the group.
639 * @brief <i> [Deprecated] </i>
640 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
643 * @return An error code
644 * @param[in] groupIndex The group index
645 * @param[in] height The estimated/real height of the items of the group
646 * @exception E_SUCCESS The method is successful.
647 * @exception E_INVALID_ARG A specified input parameter is invalid.
648 * @exception E_SYSTEM A system error has occurred.
651 result RemoveAllCheckedItemsAt(int groupIndex, int height);
655 * Removes the specified item from the group.
657 * @brief <i> [Deprecated] </i>
658 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
661 * @return An error code
662 * @param[in] groupIndex The group index
663 * @param[in] itemIndex The item index
664 * @param[in] height The estimated/real height of the item
665 * @exception E_SUCCESS The method is successful.
666 * @exception E_INVALID_ARG A specified input parameter is invalid.
667 * @exception E_SYSTEM A system error has occurred.
668 * @remarks The removed list item is deleted from the memory.
671 result RemoveItemAt(int groupIndex, int itemIndex, int height);
676 * Removes the group of the %SlidableGroupedList control at the group index.
678 * @brief <i> [Deprecated] </i>
679 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
682 * @return An error code
683 * @param[in] groupIndex The group index
684 * @exception E_SUCCESS The method is successful.
685 * @exception E_INVALID_ARG The specified input parameter is invalid.
686 * @exception E_SYSTEM A system error has occurred.
687 * @remarks When the specified group is removed, all the items in the group are also removed.
688 * @remarks The removed list items are deleted from the memory.
691 result RemoveGroupAt(int groupIndex);
696 * Gets the item at the specified indexes if the item is currently loaded.
698 * @brief <i> [Deprecated] </i>
699 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
702 * @return A pointer to the loaded item, @n
703 * else @c null if the specified item is not currently loaded
704 * @param[in] groupIndex The group index
705 * @param[in] itemIndex The item index
708 const Tizen::Ui::Controls::CustomListItem* GetLoadedItemAt(int groupIndex, int itemIndex) const;
713 * Gets the item ID at the specified index if the item is currently loaded.
715 * @brief <i> [Deprecated] </i>
716 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
719 * @return The item ID, @n
720 * else LIST_ITEM_UNSPECIFIED_ID if the specified item is not currently loaded
721 * @param[in] groupIndex The group index
722 * @param[in] itemIndex The item index
725 int GetLoadedItemIdAt(int groupIndex, int itemIndex) const;
730 * Gets the item index from the specified item ID.
732 * @brief <i> [Deprecated] </i>
733 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
736 * @return An error code, @n
737 * else @c -1 if the specified item is not currently loaded
738 * @param[in] itemId The item ID
739 * @param[out] groupIndex The group index
740 * @param[out] itemIndex The item index
741 * @exception E_SUCCESS The method is successful.
742 * @exception E_SYSTEM A system error has occurred.
745 result GetLoadedItemIndexFromItemId(int itemId, int& groupIndex, int& itemIndex) const;
749 * Removes all the checked items of the %SlidableGroupedList control.
751 * @brief <i> [Deprecated] </i>
752 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
755 * @return An error code
756 * @param[in] height The height of the item to delete
757 * @exception E_SUCCESS The method is successful.
758 * @exception E_SYSTEM A system error has occurred.
759 * @remarks The removed list items are deleted from the memory.
760 * @remarks This method can only be used when the style of the list allows multiple selections.
763 result RemoveAllCheckedItems(int height);
767 * Gets the index of the first loaded item.
769 * @brief <i> [Deprecated] </i>
770 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
773 * @return An error code
774 * @param[out] groupIndex The group index
775 * @param[out] itemIndex The item index
776 * @exception E_SUCCESS The method is successful.
777 * @exception E_SYSTEM A system error has occurred.
780 result GetFirstLoadedItemIndex(int& groupIndex, int& itemIndex) const;
784 * Gets the index of the last loaded item.
786 * @brief <i> [Deprecated] </i>
787 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
790 * @return An error code
791 * @param[out] groupIndex The group index
792 * @param[out] itemIndex The item index
793 * @exception E_SUCCESS The method is successful.
794 * @exception E_SYSTEM A system error has occurred.
797 result GetLastLoadedItemIndex(int& groupIndex, int& itemIndex) const;
801 * Sets the first index list of the scroll by text.
803 * @brief <i> [Deprecated] </i>
804 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
807 * @return An error code
808 * @param[in] text The text of the first index
809 * @exception E_SUCCESS The method is successful.
810 * @exception E_SYSTEM A system error has occurred.
813 result SetFastScrollMainIndex(const Tizen::Base::String& text);
817 * Sets the background color of this control.
819 * @brief <i> [Deprecated] </i>
820 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
823 * @param[in] color The background color
826 void SetBackgroundColor(const Tizen::Graphics::Color& color);
830 * Sets the text of the empty list.
832 * @brief <i> [Deprecated] </i>
833 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
836 * @param[in] text The text of the empty list
839 void SetTextOfEmptyList(const Tizen::Base::String& text);
843 * Sets the color of the text to be displayed in the absence of a %SlidableGroupedList item.
845 * @brief <i> [Deprecated] </i>
846 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
849 * @param[in] color The color of the text to display
852 void SetTextColorOfEmptyList(const Tizen::Graphics::Color& color);
856 * Gets the color of the text to be displayed in the absence of a %SlidableGroupedList item.
858 * @brief <i> [Deprecated] </i>
859 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
862 * @return The color of the text to be displayed
865 Tizen::Graphics::Color GetTextColorOfEmptyList(void) const;
869 * Sets the contents of the item in the specified group.
871 * @brief <i> [Deprecated] </i>
872 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
875 * @return An error code
876 * @param[in] groupIndex The group index
877 * @param[in] itemIndex The %CustomListItem object
878 * @param[in] item The item
879 * @param[in] itemId The item ID
880 * @exception E_SUCCESS The method is successful.
881 * @exception E_INVALID_ARG A specified input parameter is invalid.
882 * @exception E_SYSTEM A system error has occurred.
883 * @remarks Do not add, insert, or set an item, that already belongs to %SlidableGroupedList.
886 result SetItemAt(int groupIndex, int itemIndex, const Tizen::Ui::Controls::CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
890 * Adds the specified listener instance.
891 * The added listener can listen to events on the context of the given event dispatcher when they are fired.
893 * @brief <i> [Deprecated] </i>
894 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
897 * @param[in] listener The event listener to add
900 void AddFastScrollEventListener(Tizen::Ui::IFastScrollEventListener& listener);
904 * Adds the specified group to the %SlidableGroupedList control.
906 * @brief <i> [Deprecated] </i>
907 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
910 * @return An error code
911 * @param[in] text The string of the group to append
912 * @param[in] pBackgroundBitmap The background bitmap of the group
913 * @param[in] itemCount The number of items of the group
914 * @param[in] groupHeight The total height of the items of the group
915 * @param[in] groupId The group ID
916 * @exception E_SUCCESS The method is successful.
917 * @exception E_SYSTEM A system error has occurred.
920 result AddGroup(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int itemCount, int groupHeight, int groupId = LIST_ITEM_UNSPECIFIED_ID);
924 * Adds the specified listener instance.
925 * The added listener can listen to events on the context of the given event dispatcher when they are fired.
927 * @brief <i> [Deprecated] </i>
928 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
931 * @param[in] listener The event listener to add
934 void AddGroupedItemEventListener(Tizen::Ui::IGroupedItemEventListener& listener);
939 * Adds the item to the specified group.
941 * @brief <i> [Deprecated] </i>
942 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
945 * @return An error code
946 * @param[in] groupIndex The group index
947 * @param[in] item The CustomListItem object
948 * @param[in] itemId The item ID
949 * @exception E_SUCCESS The method is successful.
950 * @exception E_INVALID_ARG A specified input parameter is invalid.
951 * @exception E_SYSTEM A system error has occurred.
952 * @remarks The added item is deleted automatically when the list is destroyed.
953 * Do not add, insert, or set an item that already belongs to %SlidableGroupedList.
956 result AddItem(int groupIndex, const Tizen::Ui::Controls::CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
960 * Gets the index of the current bottom drawn item.
962 * @brief <i> [Deprecated] </i>
963 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
966 * @return An error code
967 * @param[out] groupIndex The group index
968 * @param[out] itemIndex The item index
969 * @exception E_SUCCESS The method is successful.
970 * @exception E_SYSTEM A system error has occurred.
973 result GetBottomDrawnItemIndex(int& groupIndex, int& itemIndex) const;
978 * Gets the index of the first checked list item.
980 * @brief <i> [Deprecated] </i>
981 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
984 * @return An error code
985 * @param[out] groupIndex The group index
986 * @param[out] itemIndex The item index
987 * @exception E_SUCCESS The method is successful.
988 * @exception E_SYSTEM A system error has occurred.
991 result GetFirstCheckedItemIndex(int& groupIndex, int& itemIndex) const;
996 * Gets the group ID from the specified group index.
998 * @brief <i> [Deprecated] </i>
999 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1002 * @return The group ID
1003 * @param[in] groupIndex The group index
1006 int GetGroupIdAt(int groupIndex) const;
1011 * Gets the group index from the specified group ID.
1013 * @brief <i> [Deprecated] </i>
1014 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1017 * @return The group index
1018 * @param[in] groupId The group ID
1021 int GetGroupIndexFromGroupId(int groupId) const;
1026 * Gets the index of the last checked item.
1028 * @brief <i> [Deprecated] </i>
1029 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1032 * @return An error code
1033 * @param[out] groupIndex The group index
1034 * @param[out] itemIndex The item index
1035 * @exception E_SUCCESS The method is successful.
1036 * @exception E_SYSTEM A system error has occurred.
1039 result GetLastCheckedItemIndex(int& groupIndex, int& itemIndex) const;
1043 * Gets the index of the next checked item after the specified item.
1045 * @brief <i> [Deprecated] </i>
1046 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1049 * @return An error code
1050 * @param[in,out] groupIndex The group index
1051 * @param[in,out] itemIndex The item index
1052 * @exception E_SUCCESS The method is successful.
1053 * @exception E_SYSTEM A system error has occurred.
1056 result GetNextCheckedItemIndexAfter(int& groupIndex, int& itemIndex) const;
1060 * Gets the index of the current top drawn item.
1062 * @brief <i> [Deprecated] </i>
1063 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1066 * @return An error code
1067 * @param[out] groupIndex The group index
1068 * @param[out] itemIndex The item index
1069 * @exception E_SUCCESS The method is successful.
1070 * @exception E_SYSTEM A system error has occurred.
1073 result GetTopDrawnItemIndex(int& groupIndex, int& itemIndex) const;
1077 * Gets the index of the item at the specified item position.
1079 * @brief <i> [Deprecated] </i>
1080 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1083 * @return An error code
1084 * @param[in] x The x position of the point
1085 * @param[in] y The y position of the point
1086 * @param[out] groupIndex The index of the group, that the item belongs to
1087 * @param[out] itemIndex The index of the item
1088 * @exception E_SUCCESS The method is successful.
1089 * @exception E_SYSTEM A system error has occurred. @n
1090 * There is no item at the specified position.
1093 result GetItemIndexFromPosition(int x, int y, int& groupIndex, int& itemIndex) const;
1097 * Gets the index of the item at the specified item position.
1099 * @brief <i> [Deprecated] </i>
1100 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1103 * @return An error code
1104 * @param[in] position The position of the point
1105 * @param[out] groupIndex The index of the group, that the item belongs to
1106 * @param[out] itemIndex The index of the item
1107 * @exception E_SUCCESS The method is successful.
1108 * @exception E_SYSTEM A system error has occurred. @n
1109 * There is no item at the specified position.
1112 result GetItemIndexFromPosition(const Tizen::Graphics::Point& position, int& groupIndex, int& itemIndex) const;
1116 * Inserts the group at the specified group index.
1118 * @brief <i> [Deprecated] </i>
1119 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1122 * @return An error code
1123 * @param[in] groupIndex The group index
1124 * @param[in] text The string of the group to append
1125 * @param[in] pBackgroundBitmap The background bitmap of the group
1126 * @param[in] itemCount The count of all the items in the group
1127 * @param[in] groupHeight The total height of all the items in the group
1128 * @param[in] groupId The group ID
1129 * @exception E_SUCCESS The method is successful.
1130 * @exception E_INVALID_ARG A specified input parameter is invalid.
1131 * @exception E_SYSTEM A system error has occurred.
1134 result InsertGroupAt(int groupIndex, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int itemCount, int groupHeight, int groupId = LIST_ITEM_UNSPECIFIED_ID);
1138 * Checks whether the item at the specified index is checked.
1140 * @brief <i> [Deprecated] </i>
1141 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1144 * @return @c true if the item is checked, @n
1146 * @param[in] groupIndex The group index
1147 * @param[in] itemIndex The item index
1149 * @remarks This method can only be used when the style of the list allows selection.
1152 bool IsItemChecked(int groupIndex, int itemIndex) const;
1156 * Checks whether the item at the specified index is enabled.
1158 * @brief <i> [Deprecated] </i>
1159 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1162 * @return @c true if the item is enabled, @n
1164 * @param[in] groupIndex The group index
1165 * @param[in] itemIndex The item index
1168 bool IsLoadedItemEnabled(int groupIndex, int itemIndex) const;
1173 * Checks whether the item at the specified index is currently loaded to the slidable list.
1175 * @brief <i> [Deprecated] </i>
1176 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1179 * @return @c true if the item is loaded, @n
1181 * @param[in] groupIndex The group index
1182 * @param[in] itemIndex The item index
1185 bool IsItemLoaded(int groupIndex, int itemIndex) const;
1190 * Removes all the groups of the %SlidableGroupedList control.
1192 * @brief <i> [Deprecated] </i>
1193 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1196 * @return An error code
1197 * @exception E_SUCCESS The method is successful.
1198 * @exception E_SYSTEM A system error has occurred.
1199 * @remarks When the specified group is removed, all the items in the group are also removed.
1200 * @remarks The removed list items are deleted from the memory.
1201 * @remarks After the items have been removed, the ISlidableGroupedListEventListener::OnListPropertyRequested() method is called.
1204 result RemoveAllGroups(void);
1208 * Gets the count of all the groups of the %SlidableGroupedList control.
1210 * @brief <i> [Deprecated] </i>
1211 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1214 * @return The count of all the groups
1217 int GetGroupCount(void) const;
1221 * Inserts the item to the specified group and item indices.
1223 * @brief <i> [Deprecated] </i>
1224 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1227 * @return An error code
1228 * @param[in] groupIndex The group index
1229 * @param[in] itemIndex The item index
1230 * @param[in] item The CustomListItem object
1231 * @param[in] itemId The item ID
1232 * @exception E_SUCCESS The method is successful.
1233 * @exception E_SYSTEM A system error has occurred.
1234 * @remarks The inserted item is deleted automatically when the list is destroyed.
1235 * Do not add, insert, or set an item, that already belongs to %SlidableGroupedList.
1238 result InsertItemAt(int groupIndex, int itemIndex, const Tizen::Ui::Controls::CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
1243 * Gets the count of all the items in the specified group.
1245 * @brief <i> [Deprecated] </i>
1246 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1249 * @return The count of all the items in the specified group
1250 * @param[in] groupIndex The group index
1253 int GetItemCountAt(int groupIndex) const;
1257 * Draws and shows the specified item of %SlidableGroupedList.
1259 * @brief <i> [Deprecated] </i>
1260 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1263 * @return An error code
1264 * @param[in] groupIndex The group index
1265 * @param[in] itemIndex The item index
1266 * @exception E_SUCCESS The method is successful.
1267 * @exception E_INVALID_ARG The specified @c groupIndex or @c itemIndex is invalid.
1268 * @exception E_INVALID_OPERATION The item has never been drawn before calling this method.
1269 * @exception E_SYSTEM A system error has occurred.
1272 result RefreshItem(int groupIndex, int itemIndex);
1276 * Draws and shows the specified group of %SlidableGroupedList.
1278 * @brief <i> [Deprecated] </i>
1279 * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class.
1282 * @return An error code
1283 * @param[in] groupIndex The group index
1284 * @exception E_SUCCESS The method is successful.
1285 * @exception E_INVALID_ARG The specified @c groupIndex is invalid.
1286 * @exception E_SYSTEM A system error has occurred.
1289 result RefreshGroup(int groupIndex);
1293 friend class _SlidableGroupedListImpl;
1296 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
1298 SlidableGroupedList(const SlidableGroupedList& rhs);
1301 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
1303 SlidableGroupedList& operator =(const SlidableGroupedList& rhs);
1305 }; //SlidableGroupedList
1307 }}} // Tizen::Ui::Controls
1309 #endif // _FUI_CTRL_SLIDABLE_GROUPED_LIST_H_