2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://floralicense.org/license/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FUiCtrlExpandableList.h
20 * @brief This is the header file for the %ExpandableList class.
22 * This header file contains the declarations of the %ExpandableList class and its helper classes.
25 #ifndef _FUI_CTRL_EXPANDABLE_LIST_H_
26 #define _FUI_CTRL_EXPANDABLE_LIST_H_
28 #include <FBaseObject.h>
29 #include <FBaseTypes.h>
30 #include <FGrpRectangle.h>
31 #include <FUiContainer.h>
32 #include <FUiIExpandableItemEventListener.h>
33 #include <FUiCtrlCustomListTypes.h>
34 #include <FUiCtrlListTypes.h>
35 #include <FUiCtrlCustomListItem.h>
37 namespace Tizen { namespace Ui { namespace Controls
42 * @class ExpandableList
43 * @brief <i> [Deprecated] </i> This class defines the common behavior of an %ExpandableList control.
45 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. @n
48 * The %ExpandableList class defines the common behavior of an %ExpandableList control.
49 * An expandable list is a list with a hierarchy of depth 2. List items of %ExpandableList
50 * consist of main items and sub-items which are CustomListItem. Main items are inserted
51 * into the first level as items are inserted into List class. Sub-items are inserted under
52 * related main items. So, sub-items are uniquely identified with two indices: main item
53 * index and sub-item index.
55 * If an application wants to perform tasks when the state of a list item is changed,
56 * it must implement IExpandableItemEventListener and register it to the expandable list,
57 * It will then receive related events from %ExpandableList.
59 * Unlike GroupedList which is also a list with the hierarch of depth 2, main items of
60 * %ExpandableList can be expanded or closed.
62 * Note that CustomListItem and CustomListItemFormat need to be created on a heap. CustomListItems will be deleted automatically
63 * when the %ExpandableList itself is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). CustomListItemFormat
64 * must be deleted by the application.
66 * Refer to CustomListItem and CustomListItemFormat.
70 * @image html ui_controls_expandablelist.png
72 * This is the simple UI application which uses an %ExpandableList control.
75 //Sample code for ExpandableListSample.h
78 class ExpandableListSample
79 : public Tizen::Ui::Controls::Form
80 , public Tizen::Ui::IExpandableItemEventListener
83 ExpandableListSample(void)
84 : __pMainItemFormat(null)
85 , __pSubItemFormat(null){}
87 bool Initialize(void);
88 result AddListMainItem(Tizen::Ui::Controls::ExpandableList& expandableList, Tizen::Base::String itemText,
89 Tizen::Graphics::Bitmap* pBitmapNormal, Tizen::Graphics::Bitmap* pBitmapFocused);
90 result AddListSubItem(Tizen::Ui::Controls::ExpandableList& expandableList, int itemId, Tizen::Base::String itemText);
92 virtual result OnInitializing(void);
93 virtual result OnTerminating(void);
95 // IExpandableItemEventListener
96 virtual void OnItemStateChanged(const Control& source, int mainIndex, int subIndex, int itemId, Tizen::Ui::ItemStatus status);
97 virtual void OnItemStateChanged(const Control& source, int mainIndex, int subIndex, int itemId, int elementId, Tizen::Ui::ItemStatus status);
102 static const int ID_LIST_MAINITEM = 101;
103 static const int ID_LIST_SUBITEM = 102;
104 static const int ID_LIST_TEXT = 103;
105 static const int ID_LIST_BITMAP = 104;
107 Tizen::Ui::Controls::CustomListItemFormat* __pMainItemFormat;
108 Tizen::Ui::Controls::CustomListItemFormat* __pSubItemFormat;
113 //Sample code for ExpandableListSample.cpp
115 #include <FGraphics.h>
117 #include "ExpandableListSample.h"
119 using namespace Tizen::App;
120 using namespace Tizen::Base;
121 using namespace Tizen::Ui;
122 using namespace Tizen::Ui::Controls;
123 using namespace Tizen::Graphics;
126 ExpandableListSample::Initialize(void)
128 Construct(FORM_STYLE_NORMAL);
133 ExpandableListSample::OnInitializing(void)
135 result r = E_SUCCESS;
137 // Creates an instance of ExpandableList
138 ExpandableList* pExpandableList = new ExpandableList();
139 pExpandableList->Construct(Rectangle(0, 0, 480, 500), CUSTOM_LIST_STYLE_NORMAL);
140 pExpandableList->AddExpandableItemEventListener(*this);
142 // Creates an instance of CustomListItemFormat of the main item
143 __pMainItemFormat = new CustomListItemFormat();
144 __pMainItemFormat->Construct();
145 __pMainItemFormat->AddElement(ID_LIST_TEXT, Rectangle(10, 25, 200, 80));
146 __pMainItemFormat->AddElement(ID_LIST_BITMAP, Rectangle(220, 10, 70, 80));
148 // Creates an instance of CustomListItemFormat of the sub item
149 __pSubItemFormat = new CustomListItemFormat();
150 __pSubItemFormat->Construct();
151 __pSubItemFormat->AddElement(ID_LIST_TEXT, Rectangle(20, 25, 450, 50));
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 main item
159 AddListMainItem(*pExpandableList, L"MainItem", pBitmapNormal, pBitmapFocused);
162 AddListSubItem(*pExpandableList, ID_LIST_MAINITEM, L"SubItem");
164 // Adds the expandable list to the form
165 AddControl(*pExpandableList);
167 // Deallocates bitmaps
168 delete pBitmapNormal;
169 delete pBitmapFocused;
175 ExpandableListSample::OnTerminating(void)
177 result r = E_SUCCESS;
179 // Deallocates item formats
180 delete __pMainItemFormat;
181 delete __pSubItemFormat;
187 ExpandableListSample::AddListMainItem(ExpandableList& expandableList, String itemText, Bitmap* pBitmapNormal, Bitmap* pBitmapFocused)
189 result r = E_SUCCESS;
191 // Creates a main instance of CustomListItem of the expandable list
192 CustomListItem* pMainItem = new CustomListItem();
193 pMainItem->Construct(100);
194 pMainItem->SetItemFormat(*__pMainItemFormat);
195 pMainItem->SetElement(ID_LIST_TEXT, itemText);
196 pMainItem->SetElement(ID_LIST_BITMAP, *pBitmapNormal, pBitmapFocused);
198 // Adds the item to the expandable list
199 expandableList.AddItem(*pMainItem, ID_LIST_MAINITEM);
205 ExpandableListSample::AddListSubItem(ExpandableList& expandableList, int itemId, String itemText)
207 result r = E_SUCCESS;
209 // Creates a sub instance of CustomListItem of the expandable list
210 CustomListItem* pSubItem = new CustomListItem();
211 pSubItem->Construct(100);
212 pSubItem->SetItemFormat(*__pSubItemFormat);
213 pSubItem->SetElement(ID_LIST_TEXT, itemText);
215 // Adds the item to the expandable list
216 expandableList.AddSubItem(expandableList.GetItemIndexFromItemId(ID_LIST_MAINITEM), *pSubItem, ID_LIST_SUBITEM);
221 // IExpandableItemEventListener implementation
223 ExpandableListSample::OnItemStateChanged(const Control& source, int mainIndex, int subIndex, int itemId, ItemStatus status)
227 case ID_LIST_MAINITEM:
232 case ID_LIST_SUBITEM:
243 ExpandableListSample::OnItemStateChanged(const Control& source, int mainIndex, int subIndex, int itemId, int elementId, ItemStatus status)
247 case ID_LIST_MAINITEM:
266 case ID_LIST_SUBITEM:
292 class _OSP_EXPORT_ ExpandableList
293 : public Tizen::Ui::Control
298 * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
300 * @brief <i> [Deprecated] </i>
301 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
305 ExpandableList(void);
309 * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
311 * @brief <i> [Deprecated] </i>
312 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
316 virtual ~ExpandableList(void);
320 * Initializes this instance of %ExpandableList with the specified parameters.
322 * @brief <i> [Deprecated] </i>
323 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
326 * @return An error code
327 * @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
328 * @param[in] style The style set
329 * @param[in] itemDivider Set to @c true to display the divider, @n
331 * @exception E_SUCCESS The method is successful.
332 * @exception E_INVALID_ARG A specified input parameter is invalid.
333 * @exception E_SYSTEM A system error has occurred.
334 * @remarks The size of the control must be within the range defined by the minimum size and the maximum size.
335 * 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.
338 result Construct(const Tizen::Graphics::Rectangle& rect, CustomListStyle style, bool itemDivider = true);
342 * Adds the ExpandableItemEventListener instance. @n
343 * The added listener gets notified when the state of an item is changed.
345 * @brief <i> [Deprecated] </i>
346 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
349 * @param[in] listener The event listener to add
352 void AddExpandableItemEventListener(Tizen::Ui::IExpandableItemEventListener& listener);
356 * Removes the ExpandableItemEventListener instance. @n
357 * The removed listener is not notified even when the expandable item events are fired.
359 * @brief <i> [Deprecated] </i>
360 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
363 * @param[in] listener The event listener to remove
366 void RemoveExpandableItemEventListener(Tizen::Ui::IExpandableItemEventListener& listener);
370 * Adds the specified item to the %ExpandableList control.
372 * @brief <i> [Deprecated] </i>
373 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
376 * @return An error code
377 * @param[in] item The CustomListItem to add
378 * @param[in] itemId The item ID for the item
379 * @exception E_SUCCESS The method is successful.
380 * @exception E_SYSTEM A system error has occurred.
381 * @remarks The item ID can be used to identify the specific %CustomListItem instance or to associate the user-allocated resources. @n
382 * Note that %ExpandableList does not throw an exception, if the same item ID is given to multiple items. @n
383 * The added item is deleted automatically when the list is destroyed. @n
384 * Do not add, insert, or set an item which already belongs to the %ExpandableList.
387 result AddItem(const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
391 * Inserts the specified item to the %ExpandableList control at the specified index.
393 * @brief <i> [Deprecated] </i>
394 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
397 * @return An error code
398 * @param[in] mainIndex The index at which to insert the item
399 * @param[in] item The CustomListItem instance to insert
400 * @param[in] itemId The item ID for the item
401 * @exception E_SUCCESS The method is successful.
402 * @exception E_INVALID_ARG The specified @c index is less than @c 0 or greater than the item count.
403 * @exception E_SYSTEM A system error has occurred.
404 * @remarks The inserted item is deleted automatically when the list is destroyed.
405 * Do not add, insert, or set an item that already belongs to the %ExpandableList control.
408 result InsertItemAt(int mainIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
412 * Changes the contents of the item at the specified index in the %ExpandableList control.
414 * @brief <i> [Deprecated] </i>
415 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
418 * @return An error code
419 * @param[in] mainIndex The index at which to set the contents of the item
420 * @param[in] item The CustomListItem instance to set
421 * @param[in] itemId The item ID for the item
422 * @exception E_SUCCESS The method is successful.
423 * @exception E_INVALID_ARG The specified @c index is less than @c 0 or greater than the item count.
424 * @exception E_SYSTEM A system error has occurred.
425 * @remarks Do not add, insert, or set an item that already belongs to the %ExpandableList control.
428 result SetItemAt(int mainIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
432 * Removes the item at the specified index in the %ExpandableList control.
434 * @brief <i> [Deprecated] </i>
435 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
438 * @return An error code
439 * @param[in] mainIndex The index of the item to delete
440 * @exception E_SUCCESS The method is successful.
441 * @exception E_INVALID_ARG The specified @c index is less than @c 0 or greater than the item count.
442 * @exception E_SYSTEM A system error has occurred.
443 * @remarks The removed list item is deleted from the memory.
446 result RemoveItemAt(int mainIndex);
450 * Removes all the items from the %ExpandableList control.
452 * @brief <i> [Deprecated] </i>
453 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
456 * @return An error code
457 * @exception E_SUCCESS The method is successful.
458 * @exception E_SYSTEM A system error has occurred.
459 * @remarks The removed list items are deleted from the memory.
462 result RemoveAllItems(void);
466 * Gets the item at the specified index in the %ExpandableList control.
468 * @brief <i> [Deprecated] </i>
469 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
472 * @return A CustomListItem instance, @n
473 * else @c null if the specified index is out of range
474 * @param[in] mainIndex The index of the item
477 const CustomListItem* GetItemAt(int mainIndex) const;
481 * Adds the specified sub-item to the main item in the %ExpandableList control.
483 * @brief <i> [Deprecated] </i>
484 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
487 * @return An error code
488 * @param[in] mainIndex The index of the main item to which the sub-item is added
489 * @param[in] item The CustomListItem instance to add
490 * @param[in] itemId The item ID for the sub-item
491 * @exception E_SUCCESS The method is successful.
492 * @exception E_INVALID_ARG The specified index is less than @c 0, or greater than the item count.
493 * @exception E_SYSTEM A system error has occurred.
496 result AddSubItem(int mainIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
500 * Inserts the specified sub-item at the specified index to the main item in the %ExpandableList control.
502 * @brief <i> [Deprecated] </i>
503 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
506 * @return An error code
507 * @param[in] mainIndex The index of the main item to which the sub-item is added
508 * @param[in] subIndex The index of the sub-item at which to insert the item
509 * @param[in] item The CustomListItem instance to insert
510 * @param[in] itemId The item ID
511 * @exception E_SUCCESS The method is successful.
512 * @exception E_INVALID_ARG The specified index is less than @c 0, or greater than the item count.
513 * @exception E_SYSTEM A system error has occurred.
516 result InsertSubItemAt(int mainIndex, int subIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
520 * Changes the contents of the sub-item at the specified index in the %ExpandableList control.
522 * @brief <i> [Deprecated] </i>
523 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
526 * @return An error code
527 * @param[in] mainIndex The main index of the sub-item at which to set the contents of the item
528 * @param[in] subIndex The sub-index of the sub-item at which to set the contents of the item
529 * @param[in] item The CustomListItem instance to set
530 * @param[in] itemId The item ID
531 * @exception E_SUCCESS The method is successful.
532 * @exception E_INVALID_ARG The specified index is less than @c 0, or greater than the item count.
533 * @exception E_SYSTEM A system error has occurred.
536 result SetSubItemAt(int mainIndex, int subIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
540 * Removes the sub-item at the specified index in the %ExpandableList control.
542 * @brief <i> [Deprecated] </i>
543 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
546 * @return An error code
547 * @param[in] mainIndex The index of the main item which the sub-item belongs to
548 * @param[in] subIndex The index of the sub-item to delete in the main item
549 * @exception E_SUCCESS The method is successful.
550 * @exception E_INVALID_ARG The specified index is less than @c 0, or greater than the item count.
551 * @exception E_SYSTEM A system error has occurred.
554 result RemoveSubItemAt(int mainIndex, int subIndex);
558 * Removes all sub-items of the specified main item in the %ExpandableList control.
560 * @brief <i> [Deprecated] </i>
561 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
564 * @return An error code
565 * @param[in] mainIndex The index of the main item of the %ExpandableList control
566 * @exception E_SUCCESS The method is successful.
567 * @exception E_INVALID_ARG The specified index is less than @c 0, or greater than or equal to the item count.
568 * @exception E_SYSTEM A system error has occurred.
571 result RemoveAllSubItemsAt(int mainIndex);
575 * Gets the number of items in the %ExpandableList control.
577 * @brief <i> [Deprecated] </i>
578 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
581 * @return The number of items in %ExpandableList, @n
582 * else @c -1 if an error occurs
585 int GetItemCount(void) const;
589 * Gets the number of sub-items in the main item.
591 * @brief <i> [Deprecated] </i>
592 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
595 * @return The number of sub-items in the main item, @n
596 * else @c -1 if an error occurs
597 * @param[in] mainIndex The index of the main item
600 int GetSubItemCount(int mainIndex) const;
604 * Gets the sub-item at the specified index.
606 * @brief <i> [Deprecated] </i>
607 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
610 * @return A pointer to the CustomListItem instance at the specified index, @n
611 * else @c null if the specified index does not exist in the %ExpandableList control
612 * @param[in] mainIndex The index of the main item which the sub-item belongs to
613 * @param[in] subIndex The index of the sub-item to get in the main index
616 const CustomListItem* GetSubItemAt(int mainIndex, int subIndex) const;
620 * Gets the first item of all the checked main items in the %ExpandableList control.
622 * @brief <i> [Deprecated] </i>
623 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
626 * @return The index of the first checked item, @n
627 * else @c -1 if no main item is checked
630 int GetFirstCheckedItemIndex(void) const;
634 * Gets the item ID of the specified main item.
636 * @brief <i> [Deprecated] </i>
637 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
640 * @return The item ID of the main item, @n
641 * else @c -1 if the specified @c mainIndex is less than @c 0 or greater than the main item count
642 * @param[in] mainIndex The index of the main item
645 int GetItemIdAt(int mainIndex) const;
649 * Gets the index of the specified main item.
651 * @brief <i> [Deprecated] </i>
652 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
655 * @return The index of the main item, @n
656 * else @c -1 if no main item has the specified item ID
657 * @param[in] itemId The item ID
658 * @remarks A main item can have the same item ID and this method returns the first main item among such items.
661 int GetItemIndexFromItemId(int itemId) const;
665 * Gets the item ID of the specified sub-item.
667 * @brief <i> [Deprecated] </i>
668 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
671 * @return The item ID of the specified sub-item, @n
672 * else @c -1 if the specified sub-item does not exist
673 * @param[in] mainIndex The index of the main item, which the sub-item belongs to
674 * @param[in] subIndex The index of the sub-item
677 int GetSubItemIdAt(int mainIndex, int subIndex) const;
681 * Expands or shrinks the specified main item.
683 * @brief <i> [Deprecated] </i>
684 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
687 * @return An error code
688 * @param[in] mainIndex The index of the main item
689 * @param[in] expand Set to @c true to expand the specified main item, @n
691 * @exception E_SUCCESS The method is successful.
692 * @exception E_INVALID_ARG The specified @c mainIndex is less than @c 0, or greater than the main item count.
693 * @exception E_SYSTEM A system error has occurred.
696 result SetItemExpanded(int mainIndex, bool expand);
700 * Checks whether the main item is expanded.
702 * @brief <i> [Deprecated] </i>
703 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
706 * @return @c true if the main item is expanded, @n
708 * @param[in] mainIndex The index of the main item
711 bool IsItemExpanded(int mainIndex) const;
715 * Enables or disables the status of the main item at the specified index of the %ExpandableList control.
717 * @brief <i> [Deprecated] </i>
718 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
721 * @return An error code
722 * @param[in] mainIndex The index of the main item, for which the status is set
723 * @param[in] enable Set to @c true to enable the main item, @n
725 * @exception E_SUCCESS The method is successful.
726 * @exception E_INVALID_ARG The specified @c mainIndex is less than @c 0, or no less than the main item count.
727 * @exception E_SYSTEM A system error has occurred.
730 result SetItemEnabled(int mainIndex, bool enable);
734 * Checks whether the main item at the specified index in the %ExpandableList control is enabled.
736 * @brief <i> [Deprecated] </i>
737 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
740 * @return @c true if the main item is enabled, @n
742 * @param[in] mainIndex The index of the main item to check
745 bool IsItemEnabled(int mainIndex) const;
749 * Sets the enabled status of the specific sub-item.
751 * @brief <i> [Deprecated] </i>
752 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
755 * @return An error code
756 * @param[in] mainIndex The index of the main item which the sub-item belongs to
757 * @param[in] subIndex The index of the sub-item in the main item
758 * @param[in] enable Set to @c true to enable the sub-item, @n
760 * @exception E_SUCCESS The method is successful.
761 * @exception E_INVALID_ARG The sub-item at the specified index does not exist.
762 * @exception E_SYSTEM A system error has occurred.
765 result SetSubItemEnabled(int mainIndex, int subIndex, bool enable);
769 * Checks whether the specified sub-item is enabled.
771 * @brief <i> [Deprecated] </i>
772 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
775 * @return @c true if the specified sub-item is enabled, @n
777 * @param[in] mainIndex The index of the main item which the sub-item belongs to
778 * @param[in] subIndex The index of the sub-item in the main item
781 bool IsSubItemEnabled(int mainIndex, int subIndex) const;
785 * Sets the check status of the main item at the specified index.
787 * @brief <i> [Deprecated] </i>
788 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
791 * @return An error code
792 * @param[in] mainIndex The index of the main item
793 * @param[in] check Set to @c true to check the main item, @n
795 * @exception E_SUCCESS The method is successful.
796 * @exception E_INVALID_ARG The specified @c mainIndex is less than @c 0, or no less than the main item count.
797 * @exception E_SYSTEM A system error has occurred.
798 * @remarks This method can only be used when the style of the list allows selection.
801 result SetItemChecked(int mainIndex, bool check);
805 * Checks whether the status of the main item at the specified index is checked.
807 * @brief <i> [Deprecated] </i>
808 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
811 * @return @c true if the main item is checked, @n
813 * @param[in] mainIndex The index of the main item
814 * @remarks This method can only be used when the style of the list allows selection.
817 bool IsItemChecked(int mainIndex) const;
822 * Sets the check status of the specified sub-item of the %ExpandableList control.
824 * @brief <i> [Deprecated] </i>
825 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
828 * @return An error code
829 * @param[in] mainIndex The index of the main item which the sub-item belongs to
830 * @param[in] subIndex The index of the sub-item in the main index
831 * @param[in] check Set to @c true to check the sub-item, @n
833 * @exception E_SUCCESS The method is successful.
834 * @exception E_INVALID_ARG The sub-item at the specified index does not exist.
835 * @exception E_SYSTEM A system error has occurred.
836 * @remarks This method can only be used when the style of the list allows selection.
839 result SetSubItemChecked(int mainIndex, int subIndex, bool check);
843 * Checks whether the specified sub-item is checked.
845 * @brief <i> [Deprecated] </i>
846 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
849 * @return @c true if the sub-item is checked, @n
851 * @param[in] mainIndex The index of the main item which the sub-item belongs to
852 * @param[in] subIndex The index of the sub-item in the main item
853 * @remarks This method can only be used when the style of the list allows selection.
856 bool IsSubItemChecked(int mainIndex, int subIndex) const;
860 * Sets the check status of all sub-items of the specified main item.
862 * @brief <i> [Deprecated] </i>
863 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
866 * @return An error code
867 * @param[in] mainIndex The index of the main item
868 * @param[in] check Set to @c true to check the items, @n
870 * @exception E_SUCCESS The method is successful.
871 * @exception E_INVALID_ARG The specified @c mainIndex is less than @c 0, or greater than the main item count.
872 * @exception E_SYSTEM A system error has occurred.
873 * @remarks This method can only be used when the style of the list allows multiple selections.
876 result SetAllSubItemsChecked(int mainIndex, bool check);
880 * Removes all the checked sub-items of the specified main item.
882 * @brief <i> [Deprecated] </i>
883 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
886 * @return An error code
887 * @param[in] mainIndex The index of the main item
888 * @exception E_SUCCESS The method is successful.
889 * @exception E_INVALID_ARG The specified @c mainIndex is less than @c 0, or not less than the main item count.
890 * @exception E_SYSTEM A system error has occurred.
891 * @remarks This method can only be used when the style of the list allows multiple selections.
894 result RemoveAllCheckedSubItemsAt(int mainIndex);
898 * Gets the first sub-item of all the checked sub-items in the main item.
900 * @brief <i> [Deprecated] </i>
901 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
904 * @return The index of the first checked sub-item, @n
905 * else @c -1 if no sub-item is checked, or the specified main item does not exist
908 int GetFirstCheckedSubItemIndex(int mainIndex) const;
912 * Gets the last item of all the checked main items in the %ExpandableList control.
914 * @brief <i> [Deprecated] </i>
915 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
918 * @return The index of the last checked item, @n
919 * else @c -1 if no main item is checked
922 int GetLastCheckedItemIndex(void) const;
926 * Gets the last sub-item of all the checked sub-items in the main item.
928 * @brief <i> [Deprecated] </i>
929 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
932 * @return The index of the last checked sub-item, @n
933 * else @c -1 if no sub-item is checked or the specified main item does not exist
936 int GetLastCheckedSubItemIndex(int mainIndex) const;
940 * Gets the next checked main item from the specified index in the %ExpandableList control.
942 * @brief <i> [Deprecated] </i>
943 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
946 * @return The index of the next checked main item, @n
947 * else @c -1 if no more main item after the specified index is checked, or the specified main item does not exist
948 * @param[in] mainIndex The index of the main item
951 int GetNextCheckedItemIndexAfter(int mainIndex) const;
954 * Gets the next checked sub-item from the specified index in the main item.
956 * @brief <i> [Deprecated] </i>
957 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
960 * @return The index of the next checked sub-item, @n
961 * else @c -1 if no more sub-item after the specified index is checked, or the specified sub-item does not exist
962 * @param[in] mainIndex The index of the main item, that the sub-item belongs to
963 * @param[in] subIndex The index of the sub-item in the main item
966 int GetNextCheckedSubItemIndexAfter(int mainIndex, int subIndex) const;
970 * Gets the index of the sub-item with the specified @c itemId.
972 * @brief <i> [Deprecated] </i>
973 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
976 * @return An error code
977 * @param[in] itemId The item ID
978 * @param[out] mainIndex The index of the main item which the sub-item belongs to
979 * @param[out] subIndex The index of the sub-item
980 * @exception E_SUCCESS The method is successful.
981 * @exception E_OBJ_NOT_FOUND The specified item is not found.
982 * @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.
985 result GetSubItemIndexFromItemId(int itemId, int& mainIndex, int& subIndex) const;
989 * Gets the index of the item at the specified position.
991 * @brief <i> [Deprecated] </i>
992 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
995 * @return An error code
996 * @param[in] x The x position of the point
997 * @param[in] y The y position of the point
998 * @param[out] mainIndex The index of the main item which the sub-item belongs to
999 * @param[out] subIndex The index of the sub-item
1000 * @exception E_SUCCESS The method is successful.
1001 * @exception E_SYSTEM A system error has occurred.
1004 result GetItemIndexFromPosition(int x, int y, int& mainIndex, int& subIndex) const;
1008 * Gets the index of the item at the specified position.
1010 * @brief <i> [Deprecated] </i>
1011 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
1014 * @return An error code
1015 * @param[in] position The position of the point
1016 * @param[out] mainIndex The index of the main item which the sub-item belongs to
1017 * @param[out] subIndex The index of the sub-item
1018 * @exception E_SUCCESS The method is successful.
1019 * @exception E_SYSTEM A system error has occurred.
1022 result GetItemIndexFromPosition(const Tizen::Graphics::Point& position, int& mainIndex, int& subIndex) const;
1026 * Gets the index of the first item of the visible items in the %ExpandableList control.
1028 * @brief <i> [Deprecated] </i>
1029 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
1032 * @return An error code
1033 * @param[out] mainIndex The main index of the top drawn item
1034 * @param[out] subIndex The sub-index of the top drawn item
1035 * @exception E_SUCCESS The method is successful.
1036 * @exception E_SYSTEM A system error has occurred.
1037 * @remarks @c mainIndex is @c -1 if no item is visible. @n
1038 * @c subIndex is @c -1 if the top item drawn is a main item.
1041 result GetTopDrawnItemIndex(int& mainIndex, int& subIndex) const;
1046 * Gets the index of the last of the visible items in the %ExpandableList control.
1048 * @brief <i> [Deprecated] </i>
1049 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
1052 * @return An error code
1053 * @param[out] mainIndex The main index of the bottom drawn item
1054 * @param[out] subIndex The sub-index of the bottom drawn item
1055 * @exception E_SUCCESS The method is successful.
1056 * @exception E_SYSTEM A system error has occurred.
1057 * @remarks @c mainIndex is @c -1 if no item is visible. @n
1058 * @c subIndex is @c -1 if the bottom item drawn is a main item.
1061 result GetBottomDrawnItemIndex(int& mainIndex, int& subIndex) const;
1066 * Sets the background color of this control.
1068 * @brief <i> [Deprecated] </i>
1069 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
1072 * @param[in] color The background color
1075 void SetBackgroundColor(const Tizen::Graphics::Color& color);
1079 * Sets the text to display when there is no item in the %ExpandableList control.
1081 * @brief <i> [Deprecated] </i>
1082 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
1085 * @param[in] text The text message to display
1088 void SetTextOfEmptyList(const Tizen::Base::String& text);
1092 * Sets the color of the text to be displayed when there is no item in the %ExpandableList control.
1094 * @brief <i> [Deprecated] </i>
1095 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
1098 * @param[in] color The color of the text to display
1101 void SetTextColorOfEmptyList(const Tizen::Graphics::Color& color);
1105 * Gets the color of the text to be displayed when there is no item in the %ExpandableList control.
1107 * @brief <i> [Deprecated] </i>
1108 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
1111 * @return The color of the text to be displayed
1114 Tizen::Graphics::Color GetTextColorOfEmptyList(void) const;
1119 * Scrolls to the bottom of the %ExpandableList control.
1121 * @brief <i> [Deprecated] </i>
1122 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
1126 void ScrollToBottom(void);
1130 * Scrolls to the top of the %ExpandableList control.
1132 * @brief <i> [Deprecated] </i>
1133 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
1137 void ScrollToTop(void);
1141 * Scrolls to the item at the specified index. @n
1142 * The specified item is drawn at the top of the %ExpandableList control.
1144 * @brief <i> [Deprecated] </i>
1145 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
1148 * @return An error code
1149 * @param[in] mainIndex The index of the main item
1150 * @param[in] subIndex The index of the sub-item
1151 * @exception E_SUCCESS The method is successful.
1152 * @exception E_SYSTEM A system error has occurred.
1153 * @exception E_INVALID_ARG The specified item does not exist.
1156 result ScrollToTop(int mainIndex, int subIndex);
1160 * Scrolls to the main item at the specified index. @n
1161 * The specified main item is drawn at the top of the %ExpandableList control.
1163 * @brief <i> [Deprecated] </i>
1164 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
1167 * @return An error code
1168 * @param[in] mainIndex The index of the main item
1169 * @exception E_SUCCESS The method is successful.
1170 * @exception E_SYSTEM A system error has occurred.
1171 * @exception E_INVALID_ARG The specified @c mainIndex is less than @c 0, or not less than the main item count.
1174 result ScrollToTop(int mainIndex);
1178 * Draws and shows the item at the specified index in the %ExpandableList control.
1180 * @brief <i> [Deprecated] </i>
1181 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
1184 * @return An error code
1185 * @param[in] mainIndex The index of the main item
1186 * @param[in] subIndex The index of the sub-item
1187 * @exception E_SUCCESS The method is successful.
1188 * @exception E_SYSTEM A system error has occurred.
1189 * @exception E_INVALID_OPERATION The item has never been drawn before calling this method.
1190 * @exception E_INVALID_ARG The specified item does not exist.
1193 result RefreshSubItem(int mainIndex, int subIndex);
1197 * Draws and shows the main item at the specified index in the %ExpandableList control.
1199 * @brief <i> [Deprecated] </i>
1200 * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class.
1203 * @return An error code
1204 * @param[in] mainIndex The index of the main item
1205 * @exception E_SUCCESS The method is successful.
1206 * @exception E_SYSTEM A system error has occurred.
1207 * @exception E_INVALID_OPERATION The item has never been drawn before calling this method.
1208 * @exception E_INVALID_ARG The specified @c mainIndex is invalid.
1211 result RefreshItem(int mainIndex);
1215 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
1217 ExpandableList(const ExpandableList& rhs);
1220 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
1222 ExpandableList& operator =(const ExpandableList& rhs);
1224 friend class _ExpandableListImpl;
1227 }}} // Tizen::Ui::Controls
1228 #endif // _FUI_CTRL_EXPANDABLE_LIST_H_