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 FUiCtrlGroupedList.h
21 * @brief This is the header file for the %GroupedList class.
23 * This header file contains the declarations of the %GroupedList class and its helper classes.
27 #ifndef _FUI_CTRL_GROUPED_LIST_H_
28 #define _FUI_CTRL_GROUPED_LIST_H_
30 #include <FBaseObject.h>
31 #include <FBaseTypes.h>
32 #include <FGrpRectangle.h>
33 #include <FUiControl.h>
34 #include <FUiContainer.h>
35 #include <FUiCtrlCustomList.h>
36 #include <FUiCtrlControlsTypes.h>
37 #include <FUiIFastScrollEventListener.h>
38 #include <FUiIGroupedItemEventListener.h>
39 #include <FUiCtrlListTypes.h>
41 namespace Tizen { namespace Ui { namespace Controls {
46 * @brief <i> [Deprecated] </i> This class defines the common behavior of a %GroupedList control.
48 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
51 * The %GroupedList class represents grouped items in a list. List items of
52 * %GroupedList consist of groups and items. A group represents grouped items and is
53 * inserted into the first level as items are inserted into List. Items which are
54 * CustomListItem are inserted under related groups. So, items are uniquely identified
55 * with two indices: group index and item index.
57 * If an application wants to perform tasks when the state of a list item is changed,
58 * it must implement IGroupedItemEventListener and register it to the grouped list,
59 * It will then receive related events from %GroupedList.
61 * Unlike ExpandableList which is also a list with a hierarchy of depth 2, group
62 * item itself does not have many functions.
64 * A typical use case of %GroupedList would be a list which groups all items alphabetically.
66 * Note that CustomListItem and CustomListItemFormat need to be created on a heap. CustomListItems will be deleted automatically
67 * when the %GroupedList itself is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). CustomListItemFormat
68 * must be deleted by the application.
70 * Refer to CustomListItem and CustomListItemFormat.
74 * @image html ui_controls_groupedlist.png
76 * This is the simple UI application that uses a %GroupedList control.
79 // Sample code for GroupedListSample.h
83 class GroupedListSample
84 :public Tizen::Ui::Controls::Form
85 , public Tizen::Ui::ICustomItemEventListener
88 GroupedListSample(void)
89 : __pGroupedList(null)
90 , __pCustomListItemFormat(null){}
92 bool Initialize(void);
93 result AddListItem(Tizen::Ui::Controls::GroupedList& groupedList, int groupId, Tizen::Base::String itemText,
94 Tizen::Graphics::Bitmap* pBitmapNormal, Tizen::Graphics::Bitmap* pBitmapFocused);
96 virtual result OnInitializing(void);
97 virtual result OnTerminating(void);
99 // ICustomItemEventListener
100 virtual void OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, Tizen::Ui::ItemStatus status);
101 virtual void OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, int elementId, Tizen::Ui::ItemStatus status);
104 static const int ID_LIST_ = 101;
105 static const int ID_LIST_TEXT = 102;
106 static const int ID_LIST_BITMAP = 103;
108 Tizen::Ui::Controls::GroupedList* __pGroupedList;
109 Tizen::Ui::Controls::CustomListItemFormat* __pCustomListItemFormat;
114 // Sample code for CutomListSample.cpp
116 #include <FGraphics.h>
118 #include "GroupedListSample.h"
120 using namespace Tizen::App;
121 using namespace Tizen::Base;
122 using namespace Tizen::Graphics;
123 using namespace Tizen::Ui;
124 using namespace Tizen::Ui::Controls;
127 GroupedListSample::Initialize(void)
129 Construct(FORM_STYLE_NORMAL);
134 GroupedListSample::OnInitializing(void)
136 result r = E_SUCCESS;
138 // Creates an instance of GroupedList
139 __pGroupedList = new GroupedList();
140 __pGroupedList->Construct(Rectangle(0,0,GetClientAreaBounds().width,GetClientAreaBounds().height), CUSTOM_LIST_STYLE_NORMAL);
142 // Creates an instance of CustomListItemFormat of the grouped list
143 __pCustomListItemFormat = new CustomListItemFormat();
144 __pCustomListItemFormat->Construct();
145 __pCustomListItemFormat->AddElement(ID_LIST_TEXT, Rectangle(10, 25, 200, 80));
146 __pCustomListItemFormat->AddElement(ID_LIST_BITMAP, Rectangle(220, 10, 70, 80));
148 // Adds the groups to the grouped list
149 __pGroupedList->AddGroup(L"Group_1", null);
150 __pGroupedList->AddGroup(L"Group_2", null);
151 __pGroupedList->AddGroup(L"Group_3", null);
153 // Gets instances of Bitmap
154 AppResource *pAppResource = Application::GetInstance()->GetAppResource();
155 Bitmap *pBitmapNormal = pAppResource->GetBitmapN(L"tizen.png");
156 Bitmap *pBitmapFocused = pAppResource->GetBitmapN(L"tizen.png");
158 // Adds the items to the grouped list
159 for (int i = 0; i < __pGroupedList->GetGroupCount(); i++ )
161 AddListItem(*__pGroupedList, i, L"SubItem1", pBitmapNormal, pBitmapFocused);
162 AddListItem(*__pGroupedList, i, L"SubItem2", pBitmapNormal, pBitmapFocused);
163 AddListItem(*__pGroupedList, i, L"SubItem3", pBitmapNormal, pBitmapFocused);
164 AddListItem(*__pGroupedList, i, L"SubItem4", pBitmapNormal, pBitmapFocused);
167 // Adds the grouped list to the form
168 AddControl(__pGroupedList);
170 // Deallocates bitmaps
171 delete pBitmapNormal;
172 delete pBitmapFocused;
178 GroupedListSample::OnTerminating(void)
180 result r = E_SUCCESS;
182 // Deallocates the item format
183 delete __pCustomListItemFormat;
189 GroupedListSample::AddListItem(GroupedList& groupedList, int groupId, String itemText, Bitmap* pBitmapNormal, Bitmap* pBitmapFocused)
191 result r = E_SUCCESS;
193 // Creates an instance of CustomListItem of the grouped list
194 CustomListItem* pItem = new CustomListItem();
195 pItem->Construct(100);
196 pItem->SetItemFormat(*__pCustomListItemFormat);
197 pItem->SetElement(ID_LIST_TEXT, itemText);
198 pItem->SetElement(ID_LIST_BITMAP, *pBitmapNormal, pBitmapFocused);
200 // Adds the item to the grouped list
201 groupedList.AddItem(groupId, *pItem, ID_LIST_);
206 // ICustomItemEventListener implementation
208 GroupedListSample::OnItemStateChanged(const Control& source, int index, int itemId, ItemStatus status)
223 GroupedListSample::OnItemStateChanged(const Control& source, int index, int itemId, int elementId, ItemStatus status)
253 class _OSP_EXPORT_ GroupedList
254 : public Tizen::Ui::Control
259 * The object is not fully constructed after this constructor is called. @n
260 * For full construction, the GroupedList::Construct() method must be called right after calling this constructor.
262 * @brief <i> [Deprecated] </i>
263 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
271 * This polymorphic destructor should be overridden if required. @n
272 * This way, the destructors of the derived classes are called when the destructor of this interface is called.
274 * @brief <i> [Deprecated] </i>
275 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
279 virtual ~GroupedList(void);
283 * Initializes this instance of %GroupedList with the specified parameters.
285 * @brief <i> [Deprecated] </i>
286 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
289 * @return An error code
290 * @param[in] rect An instance of the Graphics::Rectangle class @n
291 * This instance represents the X, Y coordinates of the top-left corner of the created %GroupedList along with the width and
293 * @param[in] style The style of the %GroupedList control
294 * @param[in] itemDivider Set to @c true to display an item divider, @n
296 * @param[in] fastScroll Set to @c true if to use a fast scroll, @n
298 * @exception E_SUCCESS The method is successful.
299 * @exception E_INVALID_ARG A specified input parameter is invalid.
300 * @exception E_SYSTEM A system error has occurred.
302 * - The size of the control must be within the range as defined by the minimum and maximum size.
303 * - 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.
306 result Construct(const Tizen::Graphics::Rectangle& rect, CustomListStyle style, bool itemDivider = true, bool fastScroll = false);
310 * Adds the group to the %GroupedList control.
312 * @brief <i> [Deprecated] </i>
313 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
316 * @return An error code
317 * @param[in] text The string of the group to append
318 * @param[in] pBackgroundBitmap The background bitmap of the group
319 * @param[in] groupId The ID of the group
320 * @exception E_SUCCESS The method is successful.
321 * @exception E_SYSTEM A system error has occurred.
324 result AddGroup(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int groupId = LIST_ITEM_UNSPECIFIED_ID);
328 * Inserts the group of the %GroupedList control at the specified index.
330 * @brief <i> [Deprecated] </i>
331 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
334 * @return An error code
335 * @param[in] groupIndex The group index
336 * @param[in] text The name of the group item
337 * @param[in] pBackgroundBitmap The background bitmap of the group item
338 * @param[in] groupId The ID of the group item
339 * @exception E_SUCCESS The method is successful.
340 * @exception E_INVALID_ARG The @c groupIndex is out of bounds.
341 * @exception E_SYSTEM A system error has occurred.
344 result InsertGroupAt(int groupIndex, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int groupId = LIST_ITEM_UNSPECIFIED_ID);
348 * Sets the contents of the group of the %GroupedList control at the index.
350 * @brief <i> [Deprecated] </i>
351 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
354 * @return An error code
355 * @param[in] groupIndex The group index
356 * @param[in] text The string of the group to append
357 * @param[in] pBackgroundBitmap The bitmap of the group
358 * @param[in] groupId The ID of the group
359 * @exception E_SUCCESS The method is successful.
360 * @exception E_INVALID_ARG The specified @c groupIndex is invalid.
361 * @exception E_SYSTEM A system error has occurred.
364 result SetGroupAt(int groupIndex, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int groupId = LIST_ITEM_UNSPECIFIED_ID);
368 * Removes the group of the %GroupedList control at the index.
370 * @brief <i> [Deprecated] </i>
371 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
374 * @return An error code
375 * @param[in] groupIndex The group index
376 * @exception E_SUCCESS The method is successful.
377 * @exception E_INVALID_ARG The specified @c groupIndex is invalid.
378 * @exception E_SYSTEM A system error has occurred.
380 * - When the specified group is removed, all the items in the group are also removed.
381 * - The removed list items are deleted from the memory.
384 result RemoveGroupAt(int groupIndex);
388 * Removes all the groups of the %GroupedList control.
390 * @brief <i> [Deprecated] </i>
391 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
394 * @return An error code
395 * @exception E_SUCCESS The method is successful.
396 * @exception E_SYSTEM A system error has occurred.
398 * - When the specified group is removed, all the items in the group are also removed.
399 * - The removed list items are deleted from the memory.
402 result RemoveAllGroups(void);
406 * Counts all the groups of the %GroupedList control.
408 * @brief <i> [Deprecated] </i>
409 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
412 * @return The count of all the groups
415 int GetGroupCount(void) const;
419 * Adds the item to the specified group.
421 * @brief <i> [Deprecated] </i>
422 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
425 * @return An error code
426 * @param[in] groupIndex The group index
427 * @param[in] item The custom list item object to add
428 * @param[in] itemId The specified item ID for this item
429 * @exception E_SUCCESS The method is successful.
430 * @exception E_INVALID_ARG The specified @c groupIndex or @c itemId is invalid.
431 * @exception E_SYSTEM A system error has occurred.
433 * - The added item is deleted automatically when the list is destroyed.
434 * - Do not add, insert, or set an item that already belongs to a %GroupedList control.
437 result AddItem(int groupIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
441 * Inserts the item to the specified group.
443 * @brief <i> [Deprecated] </i>
444 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
447 * @return An error code
448 * @param[in] groupIndex The group index
449 * @param[in] itemIndex The item index in the specified group
450 * @param[in] item The custom list item to insert
451 * @param[in] itemId The item ID for this item
452 * @exception E_SUCCESS The method is successful.
453 * @exception E_INVALID_ARG The specified @c groupIndex or @c itemId is invalid.
454 * @exception E_SYSTEM A system error has occurred.
456 * - The inserted item is deleted automatically when the list is destroyed.
457 * - Do not add, insert, or set an item that already belongs to a %GroupedList control.
460 result InsertItemAt(int groupIndex, int itemIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
464 * Sets the contents of the item in the specified group.
466 * @brief <i> [Deprecated] </i>
467 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
470 * @return An error code
471 * @param[in] groupIndex The group index
472 * @param[in] itemIndex The item index in the specified group
473 * @param[in] item The custom list item to set
474 * @param[in] itemId The item ID for this item
475 * @exception E_SUCCESS The method is successful.
476 * @exception E_INVALID_ARG The specified @c groupIndex or @c itemId is invalid.
477 * @exception E_SYSTEM A system error has occurred.
478 * @remarks Do not add, insert, or set an item that already belongs to a %GroupedList control.
481 result SetItemAt(int groupIndex, int itemIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
485 * Sets the checked status for the specified item.
487 * @brief <i> [Deprecated] </i>
488 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
491 * @return An error code
492 * @param[in] groupIndex The group index of the item
493 * @param[in] itemIndex The item index
494 * @param[in] check Set to @c true to check the item, @n
496 * @exception E_SUCCESS The method is successful.
497 * @exception E_INVALID_ARG The specified @c groupIndex or @c itemIndex is invalid.
498 * @exception E_SYSTEM A system error has occurred.
501 result SetItemChecked(int groupIndex, int itemIndex, bool check);
505 * Enables or disables the item at the specified index of the %GroupedList.
507 * @brief <i> [Deprecated] </i>
508 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
511 * @return An error code
512 * @param[in] groupIndex The group index of the item
513 * @param[in] itemIndex The item index
514 * @param[in] enable Set to @c true to enable the item, @n
516 * @exception E_SUCCESS The method is successful.
517 * @exception E_INVALID_ARG The specified @c groupIndex or @c itemIndex is invalid.
518 * @exception E_SYSTEM A system error has occurred.
521 result SetItemEnabled(int groupIndex, int itemIndex, bool enable);
525 * Sets the background color of this control.
527 * @brief <i> [Deprecated] </i>
528 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
531 * @param[in] color The background color
534 void SetBackgroundColor(const Tizen::Graphics::Color& color);
538 * Sets the text that is displayed when %GroupedList is empty.
540 * @brief <i> [Deprecated] </i>
541 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
544 * @param[in] text The empty list test
547 void SetTextOfEmptyList(const Tizen::Base::String& text);
551 * Sets the color of the text that is displayed when %GroupedList is empty.
553 * @brief <i> [Deprecated] </i>
554 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
557 * @param[in] color The color of the text to display
560 void SetTextColorOfEmptyList(const Tizen::Graphics::Color& color);
564 * Gets the color of the text that is displayed when %GroupedList is empty.
566 * @brief <i> [Deprecated] </i>
567 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
570 * @return The color of the text to be displayed
573 Tizen::Graphics::Color GetTextColorOfEmptyList(void) const;
577 * Checks whether the item at the specified index of this grouped list is checked.
579 * @brief <i> [Deprecated] </i>
580 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
583 * @return @c true if the item is checked, @n
585 * @param[in] groupIndex The group index of the item
586 * @param[in] itemIndex The item index
587 * @exception E_SUCCESS The method is successful.
588 * @exception E_INVALID_ARG The specified @c groupIndex or @c itemIndex is invalid.
589 * @exception E_SYSTEM A system error has occurred.
590 * @remarks This method can only be used when the style of the list allows selection.
593 bool IsItemChecked(int groupIndex, int itemIndex) const;
597 * Checks whether the item at the specified index is enabled.
599 * @brief <i> [Deprecated] </i>
600 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
603 * @return @c true if the item is enabled, @n
605 * @param[in] groupIndex The group index of the item
606 * @param[in] itemIndex The item index
607 * @exception E_SUCCESS The method is successful.
608 * @exception E_INVALID_ARG The specified @c groupIndex or @c itemIndex is invalid.
609 * @exception E_SYSTEM A system error has occurred.
612 bool IsItemEnabled(int groupIndex, int itemIndex) const;
616 * Removes an item in the specified group.
618 * @brief <i> [Deprecated] </i>
619 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
622 * @return An error code
623 * @param[in] groupIndex The group index
624 * @param[in] itemIndex The item index
625 * @exception E_SUCCESS The method is successful.
626 * @exception E_INVALID_ARG The specified @c groupIndex or @c itemIndex is invalid.
627 * @exception E_SYSTEM A system error has occurred.
628 * @remarks The removed list item is deleted from the memory.
631 result RemoveItemAt(int groupIndex, int itemIndex);
635 * Removes all the items in the specified group.
637 * @brief <i> [Deprecated] </i>
638 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
641 * @return An error code
642 * @param[in] groupIndex The group index
643 * @exception E_SUCCESS The method is successful.
644 * @exception E_INVALID_ARG The specified @c groupIndex is invalid.
645 * @exception E_SYSTEM A system error has occurred.
646 * @remarks The removed list items are deleted from the memory.
649 result RemoveAllItemsAt(int groupIndex);
653 * Removes all the checked items in the specified group.
655 * @brief <i> [Deprecated] </i>
656 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
659 * @return An error code
660 * @param[in] groupIndex The group index
661 * @exception E_SUCCESS The method is successful.
662 * @exception E_INVALID_ARG The specified @c groupIndex is invalid.
663 * @exception E_SYSTEM A system error has occurred.
664 * @remarks The removed list items are deleted from the memory.
667 result RemoveAllCheckedItemsAt(int groupIndex);
671 * Counts all items of the %GroupedList instance.
673 * @brief <i> [Deprecated] </i>
674 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
677 * @return The item count of the specified group
678 * @param[in] groupIndex The group index
679 * @exception E_SUCCESS The method is successful.
680 * @exception E_INVALID_ARG The specified @c groupIndex is invalid.
681 * @exception E_SYSTEM A system error has occurred.
684 int GetItemCountAt(int groupIndex) const;
688 * Gets the item ID of the item at the specified index.
690 * @brief <i> [Deprecated] </i>
691 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
694 * @return The item ID
695 * @param[in] groupIndex The group index
696 * @param[in] itemIndex The item index in the specified group
697 * @exception E_SUCCESS The method is successful.
698 * @exception E_INVALID_ARG The specified @c groupIndex or @c itemIndex is invalid.
699 * @exception E_SYSTEM A system error has occurred.
702 int GetItemIdAt(int groupIndex, int itemIndex) const;
706 * Gets the item index by the specified item ID.
708 * @brief <i> [Deprecated] </i>
709 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
712 * @return An error code
713 * @param[in] itemId The item ID
714 * @param[out] groupIndex The group index
715 * @param[out] itemIndex The item index in the specified group
716 * @exception E_SUCCESS The method is successful.
717 * @exception E_SYSTEM A system error has occurred.
720 result GetItemIndexFromItemId(int itemId, int& groupIndex, int& itemIndex) const;
724 * Gets the group ID at the specified index.
726 * @brief <i> [Deprecated] </i>
727 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
730 * @return The group ID
731 * @param[in] groupIndex The group index
732 * @exception E_SUCCESS The method is successful.
733 * @exception E_INVALID_ARG The specified @c groupIndex is invalid.
734 * @exception E_SYSTEM A system error has occurred.
737 int GetGroupIdAt(int groupIndex) const;
741 * Gets the group index from the specified group ID.
743 * @brief <i> [Deprecated] </i>
744 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
747 * @return The group index
748 * @param[in] groupId The ID of the group
749 * @exception E_SUCCESS The method is successful.
750 * @exception E_SYSTEM A system error has occurred.
753 int GetGroupIndexFromGroupId(int groupId) const;
757 * Gets the index of the last item checked.
759 * @brief <i> [Deprecated] </i>
760 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
763 * @return An error code
764 * @param[out] groupIndex The group index
765 * @param[out] itemIndex The item index in the specified group
766 * @exception E_SUCCESS The method is successful.
767 * @exception E_SYSTEM A system error has occurred.
770 result GetLastCheckedItemIndex(int& groupIndex, int& itemIndex) const;
774 * Gets the index of the next checked item.
776 * @brief <i> [Deprecated] </i>
777 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
780 * @return An error code
781 * @param[in,out] groupIndex The group index
782 * @param[in,out] itemIndex The item index in the specified group
783 * @exception E_SUCCESS The method is successful.
784 * @exception E_SYSTEM A system error has occurred.
787 result GetNextCheckedItemIndexAfter(int& groupIndex, int& itemIndex) const;
791 * Gets the index of the item at the specified item position.
793 * @brief <i> [Deprecated] </i>
794 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
797 * @return An error code
798 * @param[in] x The x position of the point
799 * @param[in] y The y position of the point
800 * @param[out] groupIndex The index of the group which the item belongs to
801 * @param[out] itemIndex The index of the item
802 * @exception E_SUCCESS The method is successful.
803 * @exception E_SYSTEM A system error has occurred. @n
804 * There is no item at the specified position.
807 result GetItemIndexFromPosition(int x, int y, int& groupIndex, int& itemIndex) const;
811 * Gets the index of the item at the specified item position.
813 * @brief <i> [Deprecated] </i>
814 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
817 * @return An error code
818 * @param[in] position The position of the point
819 * @param[out] groupIndex The index of the group which the item belongs to
820 * @param[out] itemIndex The index of the item
821 * @exception E_SUCCESS The method is successful.
822 * @exception E_SYSTEM A system error has occurred. @n
823 * There is no item at the specified position.
826 result GetItemIndexFromPosition(const Tizen::Graphics::Point& position, int& groupIndex, int& itemIndex) const;
830 * Gets the index of the current top drawn list item.
832 * @brief <i> [Deprecated] </i>
833 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
836 * @return An error code
837 * @param[out] groupIndex The group index of the item
838 * @param[out] itemIndex The item index of the item
839 * @exception E_SUCCESS The method is successful.
840 * @exception E_SYSTEM A system error has occurred.
843 result GetTopDrawnItemIndex(int& groupIndex, int& itemIndex) const;
847 * Removes all the items of the %GroupedList control.
849 * @brief <i> [Deprecated] </i>
850 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
853 * @return An error code
854 * @exception E_SUCCESS The method is successful.
855 * @exception E_SYSTEM A system error has occurred.
856 * @remarks The removed list items are deleted from the memory.
859 result RemoveAllItems(void);
863 * Removes all the checked items of the %GroupedList control.
865 * @brief <i> [Deprecated] </i>
866 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
869 * @return An error code
870 * @exception E_SUCCESS The method is successful.
871 * @exception E_SYSTEM A system error has occurred.
872 * @remarks The removed list items are deleted from the memory.
875 result RemoveAllCheckedItems(void);
879 * Gets the specified item of the %GroupedList control.
881 * @brief <i> [Deprecated] </i>
882 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
885 * @return A custom list item
886 * @param[in] groupIndex The index of the group which the item belongs to
887 * @param[in] itemIndex The index of the item
888 * @exception E_SUCCESS The method is successful.
889 * @exception E_INVALID_ARG The specified @c groupIndex or @c itemIndex is invalid.
890 * @exception E_SYSTEM A system error has occurred.
893 const CustomListItem* GetItemAt(int groupIndex, int itemIndex) const;
897 * Scrolls to the bottom of the %GroupedList control.
899 * @brief <i> [Deprecated] </i>
900 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
904 void ScrollToBottom(void);
908 * Scrolls to the top of the %GroupedList.
910 * @brief <i> [Deprecated] </i>
911 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
915 void ScrollToTop(void);
919 * Scrolls to the item at the specified index. @n
920 * The specified item is drawn at the top of the %GroupedList control.
922 * @brief <i> [Deprecated] </i>
923 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
926 * @return An error code
927 * @param[in] groupIndex The group index
928 * @param[in] itemIndex The item index
929 * @exception E_SUCCESS The method is successful.
930 * @exception E_INVALID_ARG The specified @c groupIndex or @c itemIndex is invalid.
931 * @exception E_SYSTEM A system error has occurred.
934 result ScrollToTop(int groupIndex, int itemIndex);
938 * Scrolls to the group at the specified index. @n
939 * The specified group is drawn at the top of the %GroupedList control.
941 * @brief <i> [Deprecated] </i>
942 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
945 * @return An error code
946 * @param[in] groupIndex The group index
947 * @exception E_SUCCESS The method is successful.
948 * @exception E_INVALID_ARG The specified @c groupIndex is invalid.
949 * @exception E_SYSTEM A system error has occurred.
952 result ScrollToTop(int groupIndex);
956 * Sets the first index list of scroll by text.
958 * @brief <i> [Deprecated] </i>
959 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
962 * @return An error code
963 * @param[in] text The text of the first index
964 * @exception E_SUCCESS The method is successful.
965 * @exception E_SYSTEM A system error has occurred.
968 result SetFastScrollMainIndex(const Tizen::Base::String& text);
972 * Adds the fast scroll event listener.
974 * @brief <i> [Deprecated] </i>
975 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
978 * @param[in] listener The listener to add
981 void AddFastScrollEventListener(Tizen::Ui::IFastScrollEventListener& listener);
985 * Removes the fast scroll event listener.
987 * @brief <i> [Deprecated] </i>
988 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
991 * @param[in] listener The listener to remove
994 void RemoveFastScrollEventListener(Tizen::Ui::IFastScrollEventListener& listener);
998 * Adds the grouped list item event listener.
1000 * @brief <i> [Deprecated] </i>
1001 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
1004 * @param[in] listener The listener to add
1007 void AddGroupedItemEventListener(Tizen::Ui::IGroupedItemEventListener& listener);
1011 * Removes the grouped list item event listener.
1013 * @brief <i> [Deprecated] </i>
1014 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
1017 * @param[in] listener The listener to remove
1020 void RemoveGroupedItemEventListener(Tizen::Ui::IGroupedItemEventListener& listener);
1024 * Gets the index of the first checked list item.
1026 * @brief <i> [Deprecated] </i>
1027 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
1030 * @return An error code
1031 * @param[out] groupIndex The group index of the item
1032 * @param[out] itemIndex The item index of the item
1033 * @exception E_SUCCESS The method is successful.
1034 * @exception E_SYSTEM A system error has occurred.
1037 result GetFirstCheckedItemIndex(int& groupIndex, int& itemIndex) const;
1041 * Sets the checked status of all the items of the specified group with the given value.
1043 * @brief <i> [Deprecated] </i>
1044 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
1047 * @return An error code
1048 * @param[in] groupIndex The group index of the item
1049 * @param[in] check Set to @c true to check all the items, @n
1051 * @exception E_SUCCESS The method is successful.
1052 * @exception E_INVALID_ARG The specified @c groupIndex is invalid.
1053 * @exception E_SYSTEM A system error has occurred.
1056 result SetAllItemsChecked(int groupIndex, bool check);
1060 * Gets the index of the current bottom drawn list item.
1062 * @brief <i> [Deprecated] </i>
1063 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
1066 * @return An error code
1067 * @param[out] groupIndex The group index of the item
1068 * @param[out] itemIndex The item index of the item
1069 * @exception E_SUCCESS The method is successful.
1070 * @exception E_SYSTEM A system error has occurred.
1073 result GetBottomDrawnItemIndex(int& groupIndex, int& itemIndex) const;
1077 * Draws and shows the item of %GroupedList control.
1079 * @brief <i> [Deprecated] </i>
1080 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
1083 * @return An error code
1084 * @param[in] groupIndex The group index
1085 * @param[in] itemIndex The item index
1086 * @exception E_SUCCESS The method is successful.
1087 * @exception E_INVALID_ARG The specified @c groupIndex or @c itemIndex is invalid.
1088 * @exception E_INVALID_OPERATION The item has never been drawn before calling this method.
1089 * @exception E_SYSTEM A system error has occurred.
1092 result RefreshItem(int groupIndex, int itemIndex);
1096 * Draws and shows the group of %GroupedList control.
1098 * @brief <i> [Deprecated] </i>
1099 * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class.
1102 * @return An error code
1103 * @param[in] groupIndex The group index
1104 * @exception E_SUCCESS The method is successful.
1105 * @exception E_INVALID_ARG The specified @c groupIndex is invalid.
1106 * @exception E_SYSTEM A system error has occurred.
1109 result RefreshGroup(int groupIndex);
1113 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
1115 GroupedList(const GroupedList& rhs);
1118 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
1120 GroupedList& operator =(const GroupedList& rhs);
1122 friend class _GroupedListImpl;
1124 }}} // Tizen::Ui::Controls
1125 #endif // _FUI_CTRL_GROUPED_LIST_H_