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.
19 * @file FUiCtrlGroupedList.h
20 * @brief This is the header file for the %GroupedList class.
22 * This header file contains the declarations of the %GroupedList class and its helper classes.
25 #ifndef _FUI_CTRL_GROUPED_LIST_H_
26 #define _FUI_CTRL_GROUPED_LIST_H_
28 #include <FBaseObject.h>
29 #include <FBaseTypes.h>
30 #include <FGrpRectangle.h>
31 #include <FUiControl.h>
32 #include <FUiContainer.h>
33 #include <FUiCtrlCustomList.h>
34 #include <FUiCtrlControlsTypes.h>
35 #include <FUiIFastScrollEventListener.h>
36 #include <FUiIGroupedItemEventListener.h>
37 #include <FUiCtrlListTypes.h>
39 namespace Tizen { namespace Ui { namespace Controls {
44 * @brief <i> [Deprecated] </i> This class defines the common behavior of a %GroupedList control.
46 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
49 * The %GroupedList class represents grouped items in a list. List items of
50 * %GroupedList consist of groups and items. A group represents grouped items and is
51 * inserted into the first level as items are inserted into List. Items which are
52 * CustomListItem are inserted under related groups. So, items are uniquely identified
53 * with two indices: group index and item index.
55 * If an application wants to perform tasks when the state of a list item is changed,
56 * it must implement IGroupedItemEventListener and register it to the grouped list,
57 * It will then receive related events from %GroupedList.
59 * Unlike ExpandableList which is also a list with a hierarchy of depth 2, group
60 * item itself does not have many functions.
62 * A typical use case of %GroupedList would be a list which groups all items alphabetically.
64 * Note that CustomListItem and CustomListItemFormat need to be created on a heap. CustomListItems will be deleted automatically
65 * when the %GroupedList itself is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). CustomListItemFormat
66 * must be deleted by the application.
68 * Refer to CustomListItem and CustomListItemFormat.
72 * @image html ui_controls_groupedlist.png
74 * This is the simple UI application that uses a %GroupedList control.
77 // Sample code for GroupedListSample.h
81 class GroupedListSample
82 :public Tizen::Ui::Controls::Form
83 , public Tizen::Ui::ICustomItemEventListener
86 GroupedListSample(void)
87 : __pGroupedList(null)
88 , __pCustomListItemFormat(null){}
90 bool Initialize(void);
91 result AddListItem(Tizen::Ui::Controls::GroupedList& groupedList, int groupId, Tizen::Base::String itemText,
92 Tizen::Graphics::Bitmap* pBitmapNormal, Tizen::Graphics::Bitmap* pBitmapFocused);
94 virtual result OnInitializing(void);
95 virtual result OnTerminating(void);
97 // ICustomItemEventListener
98 virtual void OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, Tizen::Ui::ItemStatus status);
99 virtual void OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, int elementId, Tizen::Ui::ItemStatus status);
102 static const int ID_LIST_ = 101;
103 static const int ID_LIST_TEXT = 102;
104 static const int ID_LIST_BITMAP = 103;
106 Tizen::Ui::Controls::GroupedList* __pGroupedList;
107 Tizen::Ui::Controls::CustomListItemFormat* __pCustomListItemFormat;
112 // Sample code for CutomListSample.cpp
114 #include <FGraphics.h>
116 #include "GroupedListSample.h"
118 using namespace Tizen::App;
119 using namespace Tizen::Base;
120 using namespace Tizen::Graphics;
121 using namespace Tizen::Ui;
122 using namespace Tizen::Ui::Controls;
125 GroupedListSample::Initialize(void)
127 Construct(FORM_STYLE_NORMAL);
132 GroupedListSample::OnInitializing(void)
134 result r = E_SUCCESS;
136 // Creates an instance of GroupedList
137 __pGroupedList = new GroupedList();
138 __pGroupedList->Construct(Rectangle(0,0,GetClientAreaBounds().width,GetClientAreaBounds().height), CUSTOM_LIST_STYLE_NORMAL);
140 // Creates an instance of CustomListItemFormat of the grouped list
141 __pCustomListItemFormat = new CustomListItemFormat();
142 __pCustomListItemFormat->Construct();
143 __pCustomListItemFormat->AddElement(ID_LIST_TEXT, Rectangle(10, 25, 200, 80));
144 __pCustomListItemFormat->AddElement(ID_LIST_BITMAP, Rectangle(220, 10, 70, 80));
146 // Adds the groups to the grouped list
147 __pGroupedList->AddGroup(L"Group_1", null);
148 __pGroupedList->AddGroup(L"Group_2", null);
149 __pGroupedList->AddGroup(L"Group_3", null);
151 // Gets instances of Bitmap
152 AppResource *pAppResource = Application::GetInstance()->GetAppResource();
153 Bitmap *pBitmapNormal = pAppResource->GetBitmapN(L"tizen.png");
154 Bitmap *pBitmapFocused = pAppResource->GetBitmapN(L"tizen.png");
156 // Adds the items to the grouped list
157 for (int i = 0; i < __pGroupedList->GetGroupCount(); i++ )
159 AddListItem(*__pGroupedList, i, L"SubItem1", pBitmapNormal, pBitmapFocused);
160 AddListItem(*__pGroupedList, i, L"SubItem2", pBitmapNormal, pBitmapFocused);
161 AddListItem(*__pGroupedList, i, L"SubItem3", pBitmapNormal, pBitmapFocused);
162 AddListItem(*__pGroupedList, i, L"SubItem4", pBitmapNormal, pBitmapFocused);
165 // Adds the grouped list to the form
166 AddControl(__pGroupedList);
168 // Deallocates bitmaps
169 delete pBitmapNormal;
170 delete pBitmapFocused;
176 GroupedListSample::OnTerminating(void)
178 result r = E_SUCCESS;
180 // Deallocates the item format
181 delete __pCustomListItemFormat;
187 GroupedListSample::AddListItem(GroupedList& groupedList, int groupId, String itemText, Bitmap* pBitmapNormal, Bitmap* pBitmapFocused)
189 result r = E_SUCCESS;
191 // Creates an instance of CustomListItem of the grouped list
192 CustomListItem* pItem = new CustomListItem();
193 pItem->Construct(100);
194 pItem->SetItemFormat(*__pCustomListItemFormat);
195 pItem->SetElement(ID_LIST_TEXT, itemText);
196 pItem->SetElement(ID_LIST_BITMAP, *pBitmapNormal, pBitmapFocused);
198 // Adds the item to the grouped list
199 groupedList.AddItem(groupId, *pItem, ID_LIST_);
204 // ICustomItemEventListener implementation
206 GroupedListSample::OnItemStateChanged(const Control& source, int index, int itemId, ItemStatus status)
221 GroupedListSample::OnItemStateChanged(const Control& source, int index, int itemId, int elementId, ItemStatus status)
251 class _OSP_EXPORT_ GroupedList
252 : public Tizen::Ui::Control
257 * The object is not fully constructed after this constructor is called. @n
258 * For full construction, the GroupedList::Construct() method must be called right after calling this constructor.
260 * @brief <i> [Deprecated] </i>
261 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
269 * This polymorphic destructor should be overridden if required. @n
270 * This way, the destructors of the derived classes are called when the destructor of this interface is called.
272 * @brief <i> [Deprecated] </i>
273 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
277 virtual ~GroupedList(void);
281 * Initializes this instance of %GroupedList with the specified parameters.
283 * @brief <i> [Deprecated] </i>
284 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
287 * @return An error code
288 * @param[in] rect An instance of the Graphics::Rectangle class @n
289 * This instance represents the X, Y coordinates of the top-left corner of the created %GroupedList along with the width and
291 * @param[in] style The style of the %GroupedList control
292 * @param[in] itemDivider Set to @c true to display an item divider, @n
294 * @param[in] fastScroll Set to @c true if to use a fast scroll, @n
296 * @exception E_SUCCESS The method is successful.
297 * @exception E_INVALID_ARG A specified input parameter is invalid.
298 * @exception E_SYSTEM A system error has occurred.
300 * - The size of the control must be within the range as defined by the minimum and maximum size.
301 * - 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.
304 result Construct(const Tizen::Graphics::Rectangle& rect, CustomListStyle style, bool itemDivider = true, bool fastScroll = false);
308 * Adds the group to the %GroupedList control.
310 * @brief <i> [Deprecated] </i>
311 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
314 * @return An error code
315 * @param[in] text The string of the group to append
316 * @param[in] pBackgroundBitmap The background bitmap of the group
317 * @param[in] groupId The ID of the group
318 * @exception E_SUCCESS The method is successful.
319 * @exception E_SYSTEM A system error has occurred.
322 result AddGroup(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int groupId = LIST_ITEM_UNSPECIFIED_ID);
326 * Inserts the group of the %GroupedList control at the specified index.
328 * @brief <i> [Deprecated] </i>
329 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
332 * @return An error code
333 * @param[in] groupIndex The group index
334 * @param[in] text The name of the group item
335 * @param[in] pBackgroundBitmap The background bitmap of the group item
336 * @param[in] groupId The ID of the group item
337 * @exception E_SUCCESS The method is successful.
338 * @exception E_INVALID_ARG The @c groupIndex is out of bounds.
339 * @exception E_SYSTEM A system error has occurred.
342 result InsertGroupAt(int groupIndex, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int groupId = LIST_ITEM_UNSPECIFIED_ID);
346 * Sets the contents of the group of the %GroupedList control at the index.
348 * @brief <i> [Deprecated] </i>
349 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
352 * @return An error code
353 * @param[in] groupIndex The group index
354 * @param[in] text The string of the group to append
355 * @param[in] pBackgroundBitmap The bitmap of the group
356 * @param[in] groupId The ID of the group
357 * @exception E_SUCCESS The method is successful.
358 * @exception E_INVALID_ARG The specified @c groupIndex is invalid.
359 * @exception E_SYSTEM A system error has occurred.
362 result SetGroupAt(int groupIndex, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int groupId = LIST_ITEM_UNSPECIFIED_ID);
366 * Removes the group of the %GroupedList control at the index.
368 * @brief <i> [Deprecated] </i>
369 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
372 * @return An error code
373 * @param[in] groupIndex The group index
374 * @exception E_SUCCESS The method is successful.
375 * @exception E_INVALID_ARG The specified @c groupIndex is invalid.
376 * @exception E_SYSTEM A system error has occurred.
378 * - When the specified group is removed, all the items in the group are also removed.
379 * - The removed list items are deleted from the memory.
382 result RemoveGroupAt(int groupIndex);
386 * Removes all the groups of the %GroupedList control.
388 * @brief <i> [Deprecated] </i>
389 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
392 * @return An error code
393 * @exception E_SUCCESS The method is successful.
394 * @exception E_SYSTEM A system error has occurred.
396 * - When the specified group is removed, all the items in the group are also removed.
397 * - The removed list items are deleted from the memory.
400 result RemoveAllGroups(void);
404 * Counts all the groups of the %GroupedList control.
406 * @brief <i> [Deprecated] </i>
407 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
410 * @return The count of all the groups
413 int GetGroupCount(void) const;
417 * Adds the item to the specified group.
419 * @brief <i> [Deprecated] </i>
420 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
423 * @return An error code
424 * @param[in] groupIndex The group index
425 * @param[in] item The custom list item object to add
426 * @param[in] itemId The specified item ID for this item
427 * @exception E_SUCCESS The method is successful.
428 * @exception E_INVALID_ARG The specified @c groupIndex or @c itemId is invalid.
429 * @exception E_SYSTEM A system error has occurred.
431 * - The added item is deleted automatically when the list is destroyed.
432 * - Do not add, insert, or set an item that already belongs to a %GroupedList control.
435 result AddItem(int groupIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
439 * Inserts the item to the specified group.
441 * @brief <i> [Deprecated] </i>
442 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
445 * @return An error code
446 * @param[in] groupIndex The group index
447 * @param[in] itemIndex The item index in the specified group
448 * @param[in] item The custom list item to insert
449 * @param[in] itemId The item ID for this item
450 * @exception E_SUCCESS The method is successful.
451 * @exception E_INVALID_ARG The specified @c groupIndex or @c itemId is invalid.
452 * @exception E_SYSTEM A system error has occurred.
454 * - The inserted item is deleted automatically when the list is destroyed.
455 * - Do not add, insert, or set an item that already belongs to a %GroupedList control.
458 result InsertItemAt(int groupIndex, int itemIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
462 * Sets the contents of the item in the specified group.
464 * @brief <i> [Deprecated] </i>
465 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
468 * @return An error code
469 * @param[in] groupIndex The group index
470 * @param[in] itemIndex The item index in the specified group
471 * @param[in] item The custom list item to set
472 * @param[in] itemId The item ID for this item
473 * @exception E_SUCCESS The method is successful.
474 * @exception E_INVALID_ARG The specified @c groupIndex or @c itemId is invalid.
475 * @exception E_SYSTEM A system error has occurred.
476 * @remarks Do not add, insert, or set an item that already belongs to a %GroupedList control.
479 result SetItemAt(int groupIndex, int itemIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
483 * Sets the checked status for the specified item.
485 * @brief <i> [Deprecated] </i>
486 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
489 * @return An error code
490 * @param[in] groupIndex The group index of the item
491 * @param[in] itemIndex The item index
492 * @param[in] check Set to @c true to check the item, @n
494 * @exception E_SUCCESS The method is successful.
495 * @exception E_INVALID_ARG The specified @c groupIndex or @c itemIndex is invalid.
496 * @exception E_SYSTEM A system error has occurred.
499 result SetItemChecked(int groupIndex, int itemIndex, bool check);
503 * Enables or disables the item at the specified index of the %GroupedList.
505 * @brief <i> [Deprecated] </i>
506 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
509 * @return An error code
510 * @param[in] groupIndex The group index of the item
511 * @param[in] itemIndex The item index
512 * @param[in] enable Set to @c true to enable the item, @n
514 * @exception E_SUCCESS The method is successful.
515 * @exception E_INVALID_ARG The specified @c groupIndex or @c itemIndex is invalid.
516 * @exception E_SYSTEM A system error has occurred.
519 result SetItemEnabled(int groupIndex, int itemIndex, bool enable);
523 * Sets the background color of this control.
525 * @brief <i> [Deprecated] </i>
526 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
529 * @param[in] color The background color
532 void SetBackgroundColor(const Tizen::Graphics::Color& color);
536 * Sets the text that is displayed when %GroupedList is empty.
538 * @brief <i> [Deprecated] </i>
539 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
542 * @param[in] text The empty list test
545 void SetTextOfEmptyList(const Tizen::Base::String& text);
549 * Sets the color of the text that is displayed when %GroupedList is empty.
551 * @brief <i> [Deprecated] </i>
552 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
555 * @param[in] color The color of the text to display
558 void SetTextColorOfEmptyList(const Tizen::Graphics::Color& color);
562 * Gets the color of the text that is displayed when %GroupedList is empty.
564 * @brief <i> [Deprecated] </i>
565 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
568 * @return The color of the text to be displayed
571 Tizen::Graphics::Color GetTextColorOfEmptyList(void) const;
575 * Checks whether the item at the specified index of this grouped list is checked.
577 * @brief <i> [Deprecated] </i>
578 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
581 * @return @c true if the item is checked, @n
583 * @param[in] groupIndex The group index of the item
584 * @param[in] itemIndex The item index
585 * @exception E_SUCCESS The method is successful.
586 * @exception E_INVALID_ARG The specified @c groupIndex or @c itemIndex is invalid.
587 * @exception E_SYSTEM A system error has occurred.
588 * @remarks This method can only be used when the style of the list allows selection.
591 bool IsItemChecked(int groupIndex, int itemIndex) const;
595 * Checks whether the item at the specified index is enabled.
597 * @brief <i> [Deprecated] </i>
598 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
601 * @return @c true if the item is enabled, @n
603 * @param[in] groupIndex The group index of the item
604 * @param[in] itemIndex The item index
605 * @exception E_SUCCESS The method is successful.
606 * @exception E_INVALID_ARG The specified @c groupIndex or @c itemIndex is invalid.
607 * @exception E_SYSTEM A system error has occurred.
610 bool IsItemEnabled(int groupIndex, int itemIndex) const;
614 * Removes an item in the specified group.
616 * @brief <i> [Deprecated] </i>
617 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
620 * @return An error code
621 * @param[in] groupIndex The group index
622 * @param[in] itemIndex The item index
623 * @exception E_SUCCESS The method is successful.
624 * @exception E_INVALID_ARG The specified @c groupIndex or @c itemIndex is invalid.
625 * @exception E_SYSTEM A system error has occurred.
626 * @remarks The removed list item is deleted from the memory.
629 result RemoveItemAt(int groupIndex, int itemIndex);
633 * Removes all the items in the specified group.
635 * @brief <i> [Deprecated] </i>
636 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
639 * @return An error code
640 * @param[in] groupIndex The group index
641 * @exception E_SUCCESS The method is successful.
642 * @exception E_INVALID_ARG The specified @c groupIndex is invalid.
643 * @exception E_SYSTEM A system error has occurred.
644 * @remarks The removed list items are deleted from the memory.
647 result RemoveAllItemsAt(int groupIndex);
651 * Removes all the checked items in the specified group.
653 * @brief <i> [Deprecated] </i>
654 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
657 * @return An error code
658 * @param[in] groupIndex The group index
659 * @exception E_SUCCESS The method is successful.
660 * @exception E_INVALID_ARG The specified @c groupIndex is invalid.
661 * @exception E_SYSTEM A system error has occurred.
662 * @remarks The removed list items are deleted from the memory.
665 result RemoveAllCheckedItemsAt(int groupIndex);
669 * Counts all items of the %GroupedList instance.
671 * @brief <i> [Deprecated] </i>
672 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
675 * @return The item count of the specified group
676 * @param[in] groupIndex The group index
677 * @exception E_SUCCESS The method is successful.
678 * @exception E_INVALID_ARG The specified @c groupIndex is invalid.
679 * @exception E_SYSTEM A system error has occurred.
682 int GetItemCountAt(int groupIndex) const;
686 * Gets the item ID of the item at the specified index.
688 * @brief <i> [Deprecated] </i>
689 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
692 * @return The item ID
693 * @param[in] groupIndex The group index
694 * @param[in] itemIndex The item index in the specified group
695 * @exception E_SUCCESS The method is successful.
696 * @exception E_INVALID_ARG The specified @c groupIndex or @c itemIndex is invalid.
697 * @exception E_SYSTEM A system error has occurred.
700 int GetItemIdAt(int groupIndex, int itemIndex) const;
704 * Gets the item index by the specified item ID.
706 * @brief <i> [Deprecated] </i>
707 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
710 * @return An error code
711 * @param[in] itemId The item ID
712 * @param[out] groupIndex The group index
713 * @param[out] itemIndex The item index in the specified group
714 * @exception E_SUCCESS The method is successful.
715 * @exception E_SYSTEM A system error has occurred.
718 result GetItemIndexFromItemId(int itemId, int& groupIndex, int& itemIndex) const;
722 * Gets the group ID at the specified index.
724 * @brief <i> [Deprecated] </i>
725 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
728 * @return The group ID
729 * @param[in] groupIndex The group index
730 * @exception E_SUCCESS The method is successful.
731 * @exception E_INVALID_ARG The specified @c groupIndex is invalid.
732 * @exception E_SYSTEM A system error has occurred.
735 int GetGroupIdAt(int groupIndex) const;
739 * Gets the group index from the specified group ID.
741 * @brief <i> [Deprecated] </i>
742 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
745 * @return The group index
746 * @param[in] groupId The ID of the group
747 * @exception E_SUCCESS The method is successful.
748 * @exception E_SYSTEM A system error has occurred.
751 int GetGroupIndexFromGroupId(int groupId) const;
755 * Gets the index of the last item checked.
757 * @brief <i> [Deprecated] </i>
758 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
761 * @return An error code
762 * @param[out] groupIndex The group index
763 * @param[out] itemIndex The item index in the specified group
764 * @exception E_SUCCESS The method is successful.
765 * @exception E_SYSTEM A system error has occurred.
768 result GetLastCheckedItemIndex(int& groupIndex, int& itemIndex) const;
772 * Gets the index of the next checked item.
774 * @brief <i> [Deprecated] </i>
775 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
778 * @return An error code
779 * @param[in,out] groupIndex The group index
780 * @param[in,out] itemIndex The item index in the specified group
781 * @exception E_SUCCESS The method is successful.
782 * @exception E_SYSTEM A system error has occurred.
785 result GetNextCheckedItemIndexAfter(int& groupIndex, int& itemIndex) const;
789 * Gets the index of the item at the specified item position.
791 * @brief <i> [Deprecated] </i>
792 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
795 * @return An error code
796 * @param[in] x The x position of the point
797 * @param[in] y The y position of the point
798 * @param[out] groupIndex The index of the group which the item belongs to
799 * @param[out] itemIndex The index of the item
800 * @exception E_SUCCESS The method is successful.
801 * @exception E_SYSTEM A system error has occurred. @n
802 * There is no item at the specified position.
805 result GetItemIndexFromPosition(int x, int y, int& groupIndex, int& itemIndex) const;
809 * Gets the index of the item at the specified item position.
811 * @brief <i> [Deprecated] </i>
812 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
815 * @return An error code
816 * @param[in] position The position of the point
817 * @param[out] groupIndex The index of the group which the item belongs to
818 * @param[out] itemIndex The index of the item
819 * @exception E_SUCCESS The method is successful.
820 * @exception E_SYSTEM A system error has occurred. @n
821 * There is no item at the specified position.
824 result GetItemIndexFromPosition(const Tizen::Graphics::Point& position, int& groupIndex, int& itemIndex) const;
828 * Gets the index of the current top drawn list item.
830 * @brief <i> [Deprecated] </i>
831 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
834 * @return An error code
835 * @param[out] groupIndex The group index of the item
836 * @param[out] itemIndex The item index of the item
837 * @exception E_SUCCESS The method is successful.
838 * @exception E_SYSTEM A system error has occurred.
841 result GetTopDrawnItemIndex(int& groupIndex, int& itemIndex) const;
845 * Removes all the items of the %GroupedList control.
847 * @brief <i> [Deprecated] </i>
848 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
851 * @return An error code
852 * @exception E_SUCCESS The method is successful.
853 * @exception E_SYSTEM A system error has occurred.
854 * @remarks The removed list items are deleted from the memory.
857 result RemoveAllItems(void);
861 * Removes all the checked items of the %GroupedList control.
863 * @brief <i> [Deprecated] </i>
864 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
867 * @return An error code
868 * @exception E_SUCCESS The method is successful.
869 * @exception E_SYSTEM A system error has occurred.
870 * @remarks The removed list items are deleted from the memory.
873 result RemoveAllCheckedItems(void);
877 * Gets the specified item of the %GroupedList control.
879 * @brief <i> [Deprecated] </i>
880 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
883 * @return A custom list item
884 * @param[in] groupIndex The index of the group which the item belongs to
885 * @param[in] itemIndex The index of the item
886 * @exception E_SUCCESS The method is successful.
887 * @exception E_INVALID_ARG The specified @c groupIndex or @c itemIndex is invalid.
888 * @exception E_SYSTEM A system error has occurred.
891 const CustomListItem* GetItemAt(int groupIndex, int itemIndex) const;
895 * Scrolls to the bottom of the %GroupedList control.
897 * @brief <i> [Deprecated] </i>
898 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
902 void ScrollToBottom(void);
906 * Scrolls to the top of the %GroupedList.
908 * @brief <i> [Deprecated] </i>
909 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
913 void ScrollToTop(void);
917 * Scrolls to the item at the specified index. @n
918 * The specified item is drawn at the top of the %GroupedList control.
920 * @brief <i> [Deprecated] </i>
921 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
924 * @return An error code
925 * @param[in] groupIndex The group index
926 * @param[in] itemIndex The item index
927 * @exception E_SUCCESS The method is successful.
928 * @exception E_INVALID_ARG The specified @c groupIndex or @c itemIndex is invalid.
929 * @exception E_SYSTEM A system error has occurred.
932 result ScrollToTop(int groupIndex, int itemIndex);
936 * Scrolls to the group at the specified index. @n
937 * The specified group is drawn at the top of the %GroupedList control.
939 * @brief <i> [Deprecated] </i>
940 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
943 * @return An error code
944 * @param[in] groupIndex The group index
945 * @exception E_SUCCESS The method is successful.
946 * @exception E_INVALID_ARG The specified @c groupIndex is invalid.
947 * @exception E_SYSTEM A system error has occurred.
950 result ScrollToTop(int groupIndex);
954 * Sets the first index list of scroll by text.
956 * @brief <i> [Deprecated] </i>
957 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
960 * @return An error code
961 * @param[in] text The text of the first index
962 * @exception E_SUCCESS The method is successful.
963 * @exception E_SYSTEM A system error has occurred.
966 result SetFastScrollMainIndex(const Tizen::Base::String& text);
970 * Adds the fast scroll event listener.
972 * @brief <i> [Deprecated] </i>
973 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
976 * @param[in] listener The listener to add
979 void AddFastScrollEventListener(Tizen::Ui::IFastScrollEventListener& listener);
983 * Removes the fast scroll event listener.
985 * @brief <i> [Deprecated] </i>
986 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
989 * @param[in] listener The listener to remove
992 void RemoveFastScrollEventListener(Tizen::Ui::IFastScrollEventListener& listener);
996 * Adds the grouped list item event listener.
998 * @brief <i> [Deprecated] </i>
999 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
1002 * @param[in] listener The listener to add
1005 void AddGroupedItemEventListener(Tizen::Ui::IGroupedItemEventListener& listener);
1009 * Removes the grouped list item event listener.
1011 * @brief <i> [Deprecated] </i>
1012 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
1015 * @param[in] listener The listener to remove
1018 void RemoveGroupedItemEventListener(Tizen::Ui::IGroupedItemEventListener& listener);
1022 * Gets the index of the first checked list item.
1024 * @brief <i> [Deprecated] </i>
1025 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
1028 * @return An error code
1029 * @param[out] groupIndex The group index of the item
1030 * @param[out] itemIndex The item index of the item
1031 * @exception E_SUCCESS The method is successful.
1032 * @exception E_SYSTEM A system error has occurred.
1035 result GetFirstCheckedItemIndex(int& groupIndex, int& itemIndex) const;
1039 * Sets the checked status of all the items of the specified group with the given value.
1041 * @brief <i> [Deprecated] </i>
1042 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
1045 * @return An error code
1046 * @param[in] groupIndex The group index of the item
1047 * @param[in] check Set to @c true to check all the items, @n
1049 * @exception E_SUCCESS The method is successful.
1050 * @exception E_INVALID_ARG The specified @c groupIndex is invalid.
1051 * @exception E_SYSTEM A system error has occurred.
1054 result SetAllItemsChecked(int groupIndex, bool check);
1058 * Gets the index of the current bottom drawn list item.
1060 * @brief <i> [Deprecated] </i>
1061 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
1064 * @return An error code
1065 * @param[out] groupIndex The group index of the item
1066 * @param[out] itemIndex The item index of the item
1067 * @exception E_SUCCESS The method is successful.
1068 * @exception E_SYSTEM A system error has occurred.
1071 result GetBottomDrawnItemIndex(int& groupIndex, int& itemIndex) const;
1075 * Draws and shows the item of %GroupedList control.
1077 * @brief <i> [Deprecated] </i>
1078 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
1081 * @return An error code
1082 * @param[in] groupIndex The group index
1083 * @param[in] itemIndex The item index
1084 * @exception E_SUCCESS The method is successful.
1085 * @exception E_INVALID_ARG The specified @c groupIndex or @c itemIndex is invalid.
1086 * @exception E_INVALID_OPERATION The item has never been drawn before calling this method.
1087 * @exception E_SYSTEM A system error has occurred.
1090 result RefreshItem(int groupIndex, int itemIndex);
1094 * Draws and shows the group of %GroupedList control.
1096 * @brief <i> [Deprecated] </i>
1097 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
1100 * @return An error code
1101 * @param[in] groupIndex The group index
1102 * @exception E_SUCCESS The method is successful.
1103 * @exception E_INVALID_ARG The specified @c groupIndex is invalid.
1104 * @exception E_SYSTEM A system error has occurred.
1107 result RefreshGroup(int groupIndex);
1111 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
1113 GroupedList(const GroupedList& rhs);
1116 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
1118 GroupedList& operator =(const GroupedList& rhs);
1120 friend class _GroupedListImpl;
1122 }}} // Tizen::Ui::Controls
1123 #endif // _FUI_CTRL_GROUPED_LIST_H_