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 FUiCtrlExpandableList.h
21 * @brief This is the header file for the %ExpandableList class.
23 * This header file contains the declarations of the %ExpandableList class and its helper classes.
27 #ifndef _FUI_CTRL_EXPANDABLE_LIST_H_
28 #define _FUI_CTRL_EXPANDABLE_LIST_H_
30 #include <FBaseObject.h>
31 #include <FBaseTypes.h>
32 #include <FGrpRectangle.h>
33 #include <FUiContainer.h>
34 #include <FUiIExpandableItemEventListener.h>
35 #include <FUiCtrlCustomListTypes.h>
36 #include <FUiCtrlListTypes.h>
37 #include <FUiCtrlCustomListItem.h>
39 namespace Tizen { namespace Ui { namespace Controls
44 * @class ExpandableList
45 * @brief <i> [Deprecated] </i> This class defines the common behavior of an %ExpandableList control.
47 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. @n
50 * The %ExpandableList class defines the common behavior of an %ExpandableList control.
51 * An expandable list is a list with a hierarchy of depth 2. List items of %ExpandableList
52 * consist of main items and sub-items which are CustomListItem. Main items are inserted
53 * into the first level as items are inserted into List class. Sub-items are inserted under
54 * related main items. So, sub-items are uniquely identified with two indices: main item
55 * index and sub-item index.
57 * If an application wants to perform tasks when the state of a list item is changed,
58 * it must implement IExpandableItemEventListener and register it to the expandable list,
59 * It will then receive related events from %ExpandableList.
61 * Unlike GroupedList which is also a list with the hierarch of depth 2, main items of
62 * %ExpandableList can be expanded or closed.
64 * Note that CustomListItem and CustomListItemFormat need to be created on a heap. CustomListItems will be deleted automatically
65 * when the %ExpandableList 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_expandablelist.png
74 * This is the simple UI application which uses an %ExpandableList control.
77 //Sample code for ExpandableListSample.h
80 class ExpandableListSample
81 : public Tizen::Ui::Controls::Form
82 , public Tizen::Ui::IExpandableItemEventListener
85 ExpandableListSample(void)
86 : __pMainItemFormat(null)
87 , __pSubItemFormat(null){}
89 bool Initialize(void);
90 result AddListMainItem(Tizen::Ui::Controls::ExpandableList& expandableList, Tizen::Base::String itemText,
91 Tizen::Graphics::Bitmap* pBitmapNormal, Tizen::Graphics::Bitmap* pBitmapFocused);
92 result AddListSubItem(Tizen::Ui::Controls::ExpandableList& expandableList, int itemId, Tizen::Base::String itemText);
94 virtual result OnInitializing(void);
95 virtual result OnTerminating(void);
97 // IExpandableItemEventListener
98 virtual void OnItemStateChanged(const Control& source, int mainIndex, int subIndex, int itemId, Tizen::Ui::ItemStatus status);
99 virtual void OnItemStateChanged(const Control& source, int mainIndex, int subIndex, int itemId, int elementId, Tizen::Ui::ItemStatus status);
104 static const int ID_LIST_MAINITEM = 101;
105 static const int ID_LIST_SUBITEM = 102;
106 static const int ID_LIST_TEXT = 103;
107 static const int ID_LIST_BITMAP = 104;
109 Tizen::Ui::Controls::CustomListItemFormat* __pMainItemFormat;
110 Tizen::Ui::Controls::CustomListItemFormat* __pSubItemFormat;
115 //Sample code for ExpandableListSample.cpp
117 #include <FGraphics.h>
119 #include "ExpandableListSample.h"
121 using namespace Tizen::App;
122 using namespace Tizen::Base;
123 using namespace Tizen::Ui;
124 using namespace Tizen::Ui::Controls;
125 using namespace Tizen::Graphics;
128 ExpandableListSample::Initialize(void)
130 Construct(FORM_STYLE_NORMAL);
135 ExpandableListSample::OnInitializing(void)
137 result r = E_SUCCESS;
139 // Creates an instance of ExpandableList
140 ExpandableList* pExpandableList = new ExpandableList();
141 pExpandableList->Construct(Rectangle(0, 0, 480, 500), CUSTOM_LIST_STYLE_NORMAL);
142 pExpandableList->AddExpandableItemEventListener(*this);
144 // Creates an instance of CustomListItemFormat of the main item
145 __pMainItemFormat = new CustomListItemFormat();
146 __pMainItemFormat->Construct();
147 __pMainItemFormat->AddElement(ID_LIST_TEXT, Rectangle(10, 25, 200, 80));
148 __pMainItemFormat->AddElement(ID_LIST_BITMAP, Rectangle(220, 10, 70, 80));
150 // Creates an instance of CustomListItemFormat of the sub item
151 __pSubItemFormat = new CustomListItemFormat();
152 __pSubItemFormat->Construct();
153 __pSubItemFormat->AddElement(ID_LIST_TEXT, Rectangle(20, 25, 450, 50));
155 // Gets instances of Bitmap
156 AppResource *pAppResource = Application::GetInstance()->GetAppResource();
157 Bitmap *pBitmapNormal = pAppResource->GetBitmapN(L"tizen.png");
158 Bitmap *pBitmapFocused = pAppResource->GetBitmapN(L"tizen.png");
160 // Adds the main item
161 AddListMainItem(*pExpandableList, L"MainItem", pBitmapNormal, pBitmapFocused);
164 AddListSubItem(*pExpandableList, ID_LIST_MAINITEM, L"SubItem");
166 // Adds the expandable list to the form
167 AddControl(pExpandableList);
169 // Deallocates bitmaps
170 delete pBitmapNormal;
171 delete pBitmapFocused;
177 ExpandableListSample::OnTerminating(void)
179 result r = E_SUCCESS;
181 // Deallocates item formats
182 delete __pMainItemFormat;
183 delete __pSubItemFormat;
189 ExpandableListSample::AddListMainItem(ExpandableList& expandableList, String itemText, Bitmap* pBitmapNormal, Bitmap* pBitmapFocused)
191 result r = E_SUCCESS;
193 // Creates a main instance of CustomListItem of the expandable list
194 CustomListItem* pMainItem = new CustomListItem();
195 pMainItem->Construct(100);
196 pMainItem->SetItemFormat(*__pMainItemFormat);
197 pMainItem->SetElement(ID_LIST_TEXT, itemText);
198 pMainItem->SetElement(ID_LIST_BITMAP, *pBitmapNormal, pBitmapFocused);
200 // Adds the item to the expandable list
201 expandableList.AddItem(*pMainItem, ID_LIST_MAINITEM);
207 ExpandableListSample::AddListSubItem(ExpandableList& expandableList, int itemId, String itemText)
209 result r = E_SUCCESS;
211 // Creates a sub instance of CustomListItem of the expandable list
212 CustomListItem* pSubItem = new CustomListItem();
213 pSubItem->Construct(100);
214 pSubItem->SetItemFormat(*__pSubItemFormat);
215 pSubItem->SetElement(ID_LIST_TEXT, itemText);
217 // Adds the item to the expandable list
218 expandableList.AddSubItem(expandableList.GetItemIndexFromItemId(ID_LIST_MAINITEM), *pSubItem, ID_LIST_SUBITEM);
223 // IExpandableItemEventListener implementation
225 ExpandableListSample::OnItemStateChanged(const Control& source, int mainIndex, int subIndex, int itemId, ItemStatus status)
229 case ID_LIST_MAINITEM:
234 case ID_LIST_SUBITEM:
245 ExpandableListSample::OnItemStateChanged(const Control& source, int mainIndex, int subIndex, int itemId, int elementId, ItemStatus status)
249 case ID_LIST_MAINITEM:
268 case ID_LIST_SUBITEM:
294 class _OSP_EXPORT_ ExpandableList
295 : public Tizen::Ui::Control
300 * The object is not fully constructed after this constructor is called. @n
301 * For full construction, the ExpandableList::Construct() method must be called right after calling this constructor.
303 * @brief <i> [Deprecated] </i>
304 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
308 ExpandableList(void);
312 * This polymorphic destructor should be overridden if required. @n
313 * This way, the destructors of the derived classes are called when the destructor of this interface is called.
315 * @brief <i> [Deprecated] </i>
316 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
320 virtual ~ExpandableList(void);
324 * Initializes this instance of %ExpandableList with the specified parameters.
326 * @brief <i> [Deprecated] </i>
327 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
330 * @return An error code
331 * @param[in] rect The x, y position of the top-left corner of the %ExpandableList along with the width and the height of the control
332 * @param[in] style The style set
333 * @param[in] itemDivider Set to @c true to display the divider, @n
335 * @exception E_SUCCESS The method is successful.
336 * @exception E_INVALID_ARG A specified input parameter is invalid.
337 * @exception E_SYSTEM A system error has occurred.
338 * @remarks The size of the control must be within the range defined by the minimum size and the maximum size. @n
339 * The minimum size of this control is 92 x 72 on a WVGA screen, 60 x 48 on a HVGA screen and 46 x 36 on a WQVGA screen.
342 result Construct(const Tizen::Graphics::Rectangle& rect, CustomListStyle style, bool itemDivider = true);
346 * Adds the ExpandableItemEventListener instance. @n
347 * The added listener gets notified when the state of an item is changed.
349 * @brief <i> [Deprecated] </i>
350 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
353 * @param[in] listener The event listener to add
356 void AddExpandableItemEventListener(Tizen::Ui::IExpandableItemEventListener& listener);
360 * Removes the ExpandableItemEventListener instance. @n
361 * The removed listener is not notified even when the expandable item events are fired.
363 * @brief <i> [Deprecated] </i>
364 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
367 * @param[in] listener The event listener to remove
370 void RemoveExpandableItemEventListener(Tizen::Ui::IExpandableItemEventListener& listener);
374 * Adds the specified item to the %ExpandableList control.
376 * @brief <i> [Deprecated] </i>
377 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
380 * @return An error code
381 * @param[in] item The CustomListItem to add
382 * @param[in] itemId The item ID for the item
383 * @exception E_SUCCESS The method is successful.
384 * @exception E_SYSTEM A system error has occurred.
386 * - The item ID can be used to identify the specific %CustomListItem instance or to associate the user-allocated resources.
387 * - Note that %ExpandableList does not throw an exception, if the same item ID is given to multiple items.
388 * - The added item is deleted automatically when the list is destroyed.
389 * - Do not add, insert, or set an item which already belongs to the %ExpandableList.
392 result AddItem(const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
396 * Inserts the specified item to the %ExpandableList control at the specified index.
398 * @brief <i> [Deprecated] </i>
399 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
402 * @return An error code
403 * @param[in] mainIndex The index at which to insert the item
404 * @param[in] item The CustomListItem instance to insert
405 * @param[in] itemId The item ID for the item
406 * @exception E_SUCCESS The method is successful.
407 * @exception E_INVALID_ARG The specified @c index is less than @c 0 or greater than the item count.
408 * @exception E_SYSTEM A system error has occurred.
410 * - The inserted item is deleted automatically when the list is destroyed.
411 * - Do not add, insert, or set an item that already belongs to the %ExpandableList control.
414 result InsertItemAt(int mainIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
418 * Changes the contents of the item at the specified index in the %ExpandableList control.
420 * @brief <i> [Deprecated] </i>
421 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
424 * @return An error code
425 * @param[in] mainIndex The index at which to set the contents of the item
426 * @param[in] item The CustomListItem instance to set
427 * @param[in] itemId The item ID for the item
428 * @exception E_SUCCESS The method is successful.
429 * @exception E_INVALID_ARG The specified @c index is less than @c 0 or greater than the item count.
430 * @exception E_SYSTEM A system error has occurred.
431 * @remarks Do not add, insert, or set an item that already belongs to the %ExpandableList control.
434 result SetItemAt(int mainIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
438 * Removes the item at the specified index in the %ExpandableList control.
440 * @brief <i> [Deprecated] </i>
441 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
444 * @return An error code
445 * @param[in] mainIndex The index of the item to delete
446 * @exception E_SUCCESS The method is successful.
447 * @exception E_INVALID_ARG The specified @c index is less than @c 0 or greater than the item count.
448 * @exception E_SYSTEM A system error has occurred.
449 * @remarks The removed list item is deleted from the memory.
452 result RemoveItemAt(int mainIndex);
456 * Removes all the items from the %ExpandableList control.
458 * @brief <i> [Deprecated] </i>
459 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
462 * @return An error code
463 * @exception E_SUCCESS The method is successful.
464 * @exception E_SYSTEM A system error has occurred.
465 * @remarks The removed list items are deleted from the memory.
468 result RemoveAllItems(void);
472 * Gets the item at the specified index in the %ExpandableList control.
474 * @brief <i> [Deprecated] </i>
475 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
478 * @return A CustomListItem instance, @n
479 * else @c null if the specified index is out of range
480 * @param[in] mainIndex The index of the item
483 const CustomListItem* GetItemAt(int mainIndex) const;
487 * Adds the specified sub-item to the main item in the %ExpandableList control.
489 * @brief <i> [Deprecated] </i>
490 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
493 * @return An error code
494 * @param[in] mainIndex The index of the main item to which the sub-item is added
495 * @param[in] item The CustomListItem instance to add
496 * @param[in] itemId The item ID for the sub-item
497 * @exception E_SUCCESS The method is successful.
498 * @exception E_INVALID_ARG The specified index is less than @c 0, or greater than the item count.
499 * @exception E_SYSTEM A system error has occurred.
502 result AddSubItem(int mainIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
506 * Inserts the specified sub-item at the specified index to the main item in the %ExpandableList control.
508 * @brief <i> [Deprecated] </i>
509 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
512 * @return An error code
513 * @param[in] mainIndex The index of the main item to which the sub-item is added
514 * @param[in] subIndex The index of the sub-item at which to insert the item
515 * @param[in] item The CustomListItem instance to insert
516 * @param[in] itemId The item ID
517 * @exception E_SUCCESS The method is successful.
518 * @exception E_INVALID_ARG The specified index is less than @c 0, or greater than the item count.
519 * @exception E_SYSTEM A system error has occurred.
522 result InsertSubItemAt(int mainIndex, int subIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
526 * Changes the contents of the sub-item at the specified index in the %ExpandableList control.
528 * @brief <i> [Deprecated] </i>
529 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
532 * @return An error code
533 * @param[in] mainIndex The main index of the sub-item at which to set the contents of the item
534 * @param[in] subIndex The sub-index of the sub-item at which to set the contents of the item
535 * @param[in] item The CustomListItem instance to set
536 * @param[in] itemId The item ID
537 * @exception E_SUCCESS The method is successful.
538 * @exception E_INVALID_ARG The specified index is less than @c 0, or greater than the item count.
539 * @exception E_SYSTEM A system error has occurred.
542 result SetSubItemAt(int mainIndex, int subIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
546 * Removes the sub-item at the specified index in the %ExpandableList control.
548 * @brief <i> [Deprecated] </i>
549 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
552 * @return An error code
553 * @param[in] mainIndex The index of the main item which the sub-item belongs to
554 * @param[in] subIndex The index of the sub-item to delete in the main item
555 * @exception E_SUCCESS The method is successful.
556 * @exception E_INVALID_ARG The specified index is less than @c 0, or greater than the item count.
557 * @exception E_SYSTEM A system error has occurred.
560 result RemoveSubItemAt(int mainIndex, int subIndex);
564 * Removes all sub-items of the specified main item in the %ExpandableList control.
566 * @brief <i> [Deprecated] </i>
567 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
570 * @return An error code
571 * @param[in] mainIndex The index of the main item of the %ExpandableList control
572 * @exception E_SUCCESS The method is successful.
573 * @exception E_INVALID_ARG The specified index is less than @c 0, or greater than or equal to the item count.
574 * @exception E_SYSTEM A system error has occurred.
577 result RemoveAllSubItemsAt(int mainIndex);
581 * Gets the number of items in the %ExpandableList control.
583 * @brief <i> [Deprecated] </i>
584 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
587 * @return The number of items in %ExpandableList, @n
588 * else @c -1 if an error occurs
591 int GetItemCount(void) const;
595 * Gets the number of sub-items in the main item.
597 * @brief <i> [Deprecated] </i>
598 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
601 * @return The number of sub-items in the main item, @n
602 * else @c -1 if an error occurs
603 * @param[in] mainIndex The index of the main item
606 int GetSubItemCount(int mainIndex) const;
610 * Gets the sub-item at the specified index.
612 * @brief <i> [Deprecated] </i>
613 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
616 * @return A pointer to the CustomListItem instance at the specified index, @n
617 * else @c null if the specified index does not exist in the %ExpandableList control
618 * @param[in] mainIndex The index of the main item which the sub-item belongs to
619 * @param[in] subIndex The index of the sub-item to get in the main index
622 const CustomListItem* GetSubItemAt(int mainIndex, int subIndex) const;
626 * Gets the first item of all the checked main items in the %ExpandableList control.
628 * @brief <i> [Deprecated] </i>
629 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
632 * @return The index of the first checked item, @n
633 * else @c -1 if no main item is checked
636 int GetFirstCheckedItemIndex(void) const;
640 * Gets the item ID of the specified main item.
642 * @brief <i> [Deprecated] </i>
643 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
646 * @return The item ID of the main item, @n
647 * else @c -1 if the specified @c mainIndex is less than @c 0 or greater than the main item count
648 * @param[in] mainIndex The index of the main item
651 int GetItemIdAt(int mainIndex) const;
655 * Gets the index of the specified main item.
657 * @brief <i> [Deprecated] </i>
658 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
661 * @return The index of the main item, @n
662 * else @c -1 if no main item has the specified item ID
663 * @param[in] itemId The item ID
664 * @remarks A main item can have the same item ID and this method returns the first main item among such items.
667 int GetItemIndexFromItemId(int itemId) const;
671 * Gets the item ID of the specified sub-item.
673 * @brief <i> [Deprecated] </i>
674 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
677 * @return The item ID of the specified sub-item, @n
678 * else @c -1 if the specified sub-item does not exist
679 * @param[in] mainIndex The index of the main item, which the sub-item belongs to
680 * @param[in] subIndex The index of the sub-item
683 int GetSubItemIdAt(int mainIndex, int subIndex) const;
687 * Expands or shrinks the specified main item.
689 * @brief <i> [Deprecated] </i>
690 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
693 * @return An error code
694 * @param[in] mainIndex The index of the main item
695 * @param[in] expand Set to @c true to expand the specified main item, @n
697 * @exception E_SUCCESS The method is successful.
698 * @exception E_INVALID_ARG The specified @c mainIndex is less than @c 0, or greater than the main item count.
699 * @exception E_SYSTEM A system error has occurred.
702 result SetItemExpanded(int mainIndex, bool expand);
706 * Checks whether the main item is expanded.
708 * @brief <i> [Deprecated] </i>
709 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
712 * @return @c true if the main item is expanded, @n
714 * @param[in] mainIndex The index of the main item
717 bool IsItemExpanded(int mainIndex) const;
721 * Enables or disables the status of the main item at the specified index of the %ExpandableList control.
723 * @brief <i> [Deprecated] </i>
724 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
727 * @return An error code
728 * @param[in] mainIndex The index of the main item, for which the status is set
729 * @param[in] enable Set to @c true to enable the main item, @n
731 * @exception E_SUCCESS The method is successful.
732 * @exception E_INVALID_ARG The specified @c mainIndex is less than @c 0, or no less than the main item count.
733 * @exception E_SYSTEM A system error has occurred.
736 result SetItemEnabled(int mainIndex, bool enable);
740 * Checks whether the main item at the specified index in the %ExpandableList control is enabled.
742 * @brief <i> [Deprecated] </i>
743 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
746 * @return @c true if the main item is enabled, @n
748 * @param[in] mainIndex The index of the main item to check
751 bool IsItemEnabled(int mainIndex) const;
755 * Sets the enabled status of the specific sub-item.
757 * @brief <i> [Deprecated] </i>
758 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
761 * @return An error code
762 * @param[in] mainIndex The index of the main item which the sub-item belongs to
763 * @param[in] subIndex The index of the sub-item in the main item
764 * @param[in] enable Set to @c true to enable the sub-item, @n
766 * @exception E_SUCCESS The method is successful.
767 * @exception E_INVALID_ARG The sub-item at the specified index does not exist.
768 * @exception E_SYSTEM A system error has occurred.
771 result SetSubItemEnabled(int mainIndex, int subIndex, bool enable);
775 * Checks whether the specified sub-item is enabled.
777 * @brief <i> [Deprecated] </i>
778 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
781 * @return @c true if the specified sub-item is enabled, @n
783 * @param[in] mainIndex The index of the main item which the sub-item belongs to
784 * @param[in] subIndex The index of the sub-item in the main item
787 bool IsSubItemEnabled(int mainIndex, int subIndex) const;
791 * Sets the check status of the main item at the specified index.
793 * @brief <i> [Deprecated] </i>
794 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
797 * @return An error code
798 * @param[in] mainIndex The index of the main item
799 * @param[in] check Set to @c true to check the main item, @n
801 * @exception E_SUCCESS The method is successful.
802 * @exception E_INVALID_ARG The specified @c mainIndex is less than @c 0, or no less than the main item count.
803 * @exception E_SYSTEM A system error has occurred.
804 * @remarks This method can only be used when the style of the list allows selection.
807 result SetItemChecked(int mainIndex, bool check);
811 * Checks whether the status of the main item at the specified index is checked.
813 * @brief <i> [Deprecated] </i>
814 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
817 * @return @c true if the main item is checked, @n
819 * @param[in] mainIndex The index of the main item
820 * @remarks This method can only be used when the style of the list allows selection.
823 bool IsItemChecked(int mainIndex) const;
828 * Sets the check status of the specified sub-item of the %ExpandableList control.
830 * @brief <i> [Deprecated] </i>
831 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
834 * @return An error code
835 * @param[in] mainIndex The index of the main item which the sub-item belongs to
836 * @param[in] subIndex The index of the sub-item in the main index
837 * @param[in] check Set to @c true to check the sub-item, @n
839 * @exception E_SUCCESS The method is successful.
840 * @exception E_INVALID_ARG The sub-item at the specified index does not exist.
841 * @exception E_SYSTEM A system error has occurred.
842 * @remarks This method can only be used when the style of the list allows selection.
845 result SetSubItemChecked(int mainIndex, int subIndex, bool check);
849 * Checks whether the specified sub-item is checked.
851 * @brief <i> [Deprecated] </i>
852 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
855 * @return @c true if the sub-item is checked, @n
857 * @param[in] mainIndex The index of the main item which the sub-item belongs to
858 * @param[in] subIndex The index of the sub-item in the main item
859 * @remarks This method can only be used when the style of the list allows selection.
862 bool IsSubItemChecked(int mainIndex, int subIndex) const;
866 * Sets the check status of all sub-items of the specified main item.
868 * @brief <i> [Deprecated] </i>
869 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
872 * @return An error code
873 * @param[in] mainIndex The index of the main item
874 * @param[in] check Set to @c true to check the items, @n
876 * @exception E_SUCCESS The method is successful.
877 * @exception E_INVALID_ARG The specified @c mainIndex is less than @c 0, or greater than the main item count.
878 * @exception E_SYSTEM A system error has occurred.
879 * @remarks This method can only be used when the style of the list allows multiple selections.
882 result SetAllSubItemsChecked(int mainIndex, bool check);
886 * Removes all the checked sub-items of the specified main item.
888 * @brief <i> [Deprecated] </i>
889 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
892 * @return An error code
893 * @param[in] mainIndex The index of the main item
894 * @exception E_SUCCESS The method is successful.
895 * @exception E_INVALID_ARG The specified @c mainIndex is less than @c 0, or not less than the main item count.
896 * @exception E_SYSTEM A system error has occurred.
897 * @remarks This method can only be used when the style of the list allows multiple selections.
900 result RemoveAllCheckedSubItemsAt(int mainIndex);
904 * Gets the first sub-item of all the checked sub-items in the main item.
906 * @brief <i> [Deprecated] </i>
907 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
910 * @return The index of the first checked sub-item, @n
911 * else @c -1 if no sub-item is checked, or the specified main item does not exist
914 int GetFirstCheckedSubItemIndex(int mainIndex) const;
918 * Gets the last item of all the checked main items in the %ExpandableList control.
920 * @brief <i> [Deprecated] </i>
921 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
924 * @return The index of the last checked item, @n
925 * else @c -1 if no main item is checked
928 int GetLastCheckedItemIndex(void) const;
932 * Gets the last sub-item of all the checked sub-items in the main item.
934 * @brief <i> [Deprecated] </i>
935 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
938 * @return The index of the last checked sub-item, @n
939 * else @c -1 if no sub-item is checked or the specified main item does not exist
942 int GetLastCheckedSubItemIndex(int mainIndex) const;
946 * Gets the next checked main item from the specified index in the %ExpandableList control.
948 * @brief <i> [Deprecated] </i>
949 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
952 * @return The index of the next checked main item, @n
953 * else @c -1 if no more main item after the specified index is checked, or the specified main item does not exist
954 * @param[in] mainIndex The index of the main item
957 int GetNextCheckedItemIndexAfter(int mainIndex) const;
961 * Gets the next checked sub-item from the specified index in the main item.
963 * @brief <i> [Deprecated] </i>
964 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
967 * @return The index of the next checked sub-item, @n
968 * else @c -1 if no more sub-item after the specified index is checked, or the specified sub-item does not exist
969 * @param[in] mainIndex The index of the main item, that the sub-item belongs to
970 * @param[in] subIndex The index of the sub-item in the main item
973 int GetNextCheckedSubItemIndexAfter(int mainIndex, int subIndex) const;
977 * Gets the index of the sub-item with the specified @c itemId.
979 * @brief <i> [Deprecated] </i>
980 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
983 * @return An error code
984 * @param[in] itemId The item ID
985 * @param[out] mainIndex The index of the main item which the sub-item belongs to
986 * @param[out] subIndex The index of the sub-item
987 * @exception E_SUCCESS The method is successful.
988 * @exception E_OBJ_NOT_FOUND The specified item is not found.
989 * @remarks Note that one or more sub-items can have the same item ID. This method returns the first sub-item among such sub-items.
992 result GetSubItemIndexFromItemId(int itemId, int& mainIndex, int& subIndex) const;
996 * Gets the index of the item at the specified position.
998 * @brief <i> [Deprecated] </i>
999 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
1002 * @return An error code
1003 * @param[in] x The x position of the point
1004 * @param[in] y The y position of the point
1005 * @param[out] mainIndex The index of the main item which the sub-item belongs to
1006 * @param[out] subIndex The index of the sub-item
1007 * @exception E_SUCCESS The method is successful.
1008 * @exception E_SYSTEM A system error has occurred.
1011 result GetItemIndexFromPosition(int x, int y, int& mainIndex, int& subIndex) const;
1015 * Gets the index of the item at the specified position.
1017 * @brief <i> [Deprecated] </i>
1018 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
1021 * @return An error code
1022 * @param[in] position The position of the point
1023 * @param[out] mainIndex The index of the main item which the sub-item belongs to
1024 * @param[out] subIndex The index of the sub-item
1025 * @exception E_SUCCESS The method is successful.
1026 * @exception E_SYSTEM A system error has occurred.
1029 result GetItemIndexFromPosition(const Tizen::Graphics::Point& position, int& mainIndex, int& subIndex) const;
1033 * Gets the index of the first item of the visible items in the %ExpandableList control.
1035 * @brief <i> [Deprecated] </i>
1036 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
1039 * @return An error code
1040 * @param[out] mainIndex The main index of the top drawn item
1041 * @param[out] subIndex The sub-index of the top drawn item
1042 * @exception E_SUCCESS The method is successful.
1043 * @exception E_SYSTEM A system error has occurred.
1045 * - @c mainIndex is @c -1 if no item is visible.
1046 * - @c subIndex is @c -1 if the top item drawn is a main item.
1049 result GetTopDrawnItemIndex(int& mainIndex, int& subIndex) const;
1054 * Gets the index of the last of the visible items in the %ExpandableList control.
1056 * @brief <i> [Deprecated] </i>
1057 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
1060 * @return An error code
1061 * @param[out] mainIndex The main index of the bottom drawn item
1062 * @param[out] subIndex The sub-index of the bottom drawn item
1063 * @exception E_SUCCESS The method is successful.
1064 * @exception E_SYSTEM A system error has occurred.
1066 * - @c mainIndex is @c -1 if no item is visible.
1067 * - @c subIndex is @c -1 if the bottom item drawn is a main item.
1070 result GetBottomDrawnItemIndex(int& mainIndex, int& subIndex) const;
1075 * Sets the background color of this control.
1077 * @brief <i> [Deprecated] </i>
1078 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
1081 * @param[in] color The background color
1084 void SetBackgroundColor(const Tizen::Graphics::Color& color);
1088 * Sets the text to display when there is no item in the %ExpandableList control.
1090 * @brief <i> [Deprecated] </i>
1091 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
1094 * @param[in] text The text message to display
1097 void SetTextOfEmptyList(const Tizen::Base::String& text);
1101 * Sets the color of the text to be displayed when there is no item in the %ExpandableList control.
1103 * @brief <i> [Deprecated] </i>
1104 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
1107 * @param[in] color The color of the text to display
1110 void SetTextColorOfEmptyList(const Tizen::Graphics::Color& color);
1114 * Gets the color of the text to be displayed when there is no item in the %ExpandableList control.
1116 * @brief <i> [Deprecated] </i>
1117 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
1120 * @return The color of the text to be displayed
1123 Tizen::Graphics::Color GetTextColorOfEmptyList(void) const;
1128 * Scrolls to the bottom of the %ExpandableList control.
1130 * @brief <i> [Deprecated] </i>
1131 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
1135 void ScrollToBottom(void);
1139 * Scrolls to the top of the %ExpandableList control.
1141 * @brief <i> [Deprecated] </i>
1142 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
1146 void ScrollToTop(void);
1150 * Scrolls to the item at the specified index. @n
1151 * The specified item is drawn at the top of the %ExpandableList control.
1153 * @brief <i> [Deprecated] </i>
1154 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
1157 * @return An error code
1158 * @param[in] mainIndex The index of the main item
1159 * @param[in] subIndex The index of the sub-item
1160 * @exception E_SUCCESS The method is successful.
1161 * @exception E_SYSTEM A system error has occurred.
1162 * @exception E_INVALID_ARG The specified item does not exist.
1165 result ScrollToTop(int mainIndex, int subIndex);
1169 * Scrolls to the main item at the specified index. @n
1170 * The specified main item is drawn at the top of the %ExpandableList control.
1172 * @brief <i> [Deprecated] </i>
1173 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
1176 * @return An error code
1177 * @param[in] mainIndex The index of the main item
1178 * @exception E_SUCCESS The method is successful.
1179 * @exception E_SYSTEM A system error has occurred.
1180 * @exception E_INVALID_ARG The specified @c mainIndex is less than @c 0, or not less than the main item count.
1183 result ScrollToTop(int mainIndex);
1187 * Draws and shows the item at the specified index in the %ExpandableList control.
1189 * @brief <i> [Deprecated] </i>
1190 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
1193 * @return An error code
1194 * @param[in] mainIndex The index of the main item
1195 * @param[in] subIndex The index of the sub-item
1196 * @exception E_SUCCESS The method is successful.
1197 * @exception E_SYSTEM A system error has occurred.
1198 * @exception E_INVALID_OPERATION The item has never been drawn before calling this method.
1199 * @exception E_INVALID_ARG The specified item does not exist.
1202 result RefreshSubItem(int mainIndex, int subIndex);
1206 * Draws and shows the main item at the specified index in the %ExpandableList control.
1208 * @brief <i> [Deprecated] </i>
1209 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
1212 * @return An error code
1213 * @param[in] mainIndex The index of the main item
1214 * @exception E_SUCCESS The method is successful.
1215 * @exception E_SYSTEM A system error has occurred.
1216 * @exception E_INVALID_OPERATION The item has never been drawn before calling this method.
1217 * @exception E_INVALID_ARG The specified @c mainIndex is invalid.
1220 result RefreshItem(int mainIndex);
1224 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
1226 ExpandableList(const ExpandableList& rhs);
1229 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
1231 ExpandableList& operator =(const ExpandableList& rhs);
1233 friend class _ExpandableListImpl;
1236 }}} // Tizen::Ui::Controls
1237 #endif // _FUI_CTRL_EXPANDABLE_LIST_H_