Merge "update header for Doxygen" into tizen_2.1
[platform/framework/native/uifw.git] / inc / FUiCtrlGroupedList.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0/
10 //
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.
16 //
17
18 /**
19  * @file        FUiCtrlGroupedList.h
20  * @brief       This is the header file for the %GroupedList class.
21  *
22  * This header file contains the declarations of the %GroupedList class and its helper classes.
23  */
24
25 #ifndef _FUI_CTRL_GROUPED_LIST_H_
26 #define _FUI_CTRL_GROUPED_LIST_H_
27
28 #include <FBaseObject.h>
29 #include <FBaseTypes.h>
30 #include <FGrpRectangle.h>
31 #include <FUiControl.h>
32 #include <FUiContainer.h>
33 #include <FUiCtrlCustomList.h>
34 #include <FUiCtrlControlsTypes.h>
35 #include <FUiIFastScrollEventListener.h>
36 #include <FUiIGroupedItemEventListener.h>
37 #include <FUiCtrlListTypes.h>
38
39 namespace Tizen { namespace Ui { namespace Controls {
40
41 /**
42  * @if OSPDEPREC
43  * @class               GroupedList
44  * @brief       <i> [Deprecated] </i> This class defines the common behavior of a %GroupedList control.
45  *
46  * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
47  * @since               2.0
48  *
49  * The %GroupedList class represents grouped items in a list. List items of
50  * %GroupedList consist of groups and items. A group represents grouped items and is
51  * inserted into the first level as items are inserted into List. Items which are
52  * CustomListItem are inserted under related groups. So, items are uniquely identified
53  * with two indices: group index and item index.
54  *
55  * If an application wants to perform tasks when the state of a list item is changed,
56  * it must implement IGroupedItemEventListener and register it to the grouped list,
57  * It will then receive related events from %GroupedList.
58  *
59  * Unlike ExpandableList which is also a list with a hierarchy of depth 2, group
60  * item itself does not have many functions.
61  *
62  * A typical use case of %GroupedList would be a list which groups all items alphabetically.
63  *
64  * Note that CustomListItem and CustomListItemFormat need to be created on a heap. CustomListItems will be deleted automatically
65  * when the %GroupedList itself is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). CustomListItemFormat
66  * must be deleted by the application.
67  *
68  * Refer to CustomListItem and CustomListItemFormat.
69  *
70  * Example:
71  *
72  * @image html ui_controls_groupedlist.png
73  *
74  * This is the simple UI application that uses a %GroupedList control.
75  *
76  * @code
77 // Sample code for GroupedListSample.h
78 #include <FApp.h>
79 #include <FUi.h>
80
81 class GroupedListSample
82         :public Tizen::Ui::Controls::Form
83         , public Tizen::Ui::ICustomItemEventListener
84 {
85 public:
86         GroupedListSample(void)
87         : __pGroupedList(null)
88         , __pCustomListItemFormat(null){}
89
90         bool Initialize(void);
91         result AddListItem(Tizen::Ui::Controls::GroupedList& groupedList, int groupId, Tizen::Base::String itemText,
92                         Tizen::Graphics::Bitmap* pBitmapNormal, Tizen::Graphics::Bitmap* pBitmapFocused);
93
94         virtual result OnInitializing(void);
95         virtual result OnTerminating(void);
96
97         // ICustomItemEventListener
98         virtual void OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, Tizen::Ui::ItemStatus status);
99         virtual void OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, int elementId, Tizen::Ui::ItemStatus status);
100
101 private:
102         static const int ID_LIST_          = 101;
103         static const int ID_LIST_TEXT   = 102;
104         static const int ID_LIST_BITMAP = 103;
105
106         Tizen::Ui::Controls::GroupedList* __pGroupedList;
107         Tizen::Ui::Controls::CustomListItemFormat* __pCustomListItemFormat;
108 };
109  *      @endcode
110  *
111  *      @code
112 // Sample code for CutomListSample.cpp
113 #include <FApp.h>
114 #include <FGraphics.h>
115
116 #include "GroupedListSample.h"
117
118 using namespace Tizen::App;
119 using namespace Tizen::Base;
120 using namespace Tizen::Graphics;
121 using namespace Tizen::Ui;
122 using namespace Tizen::Ui::Controls;
123
124 bool
125 GroupedListSample::Initialize(void)
126 {
127         Construct(FORM_STYLE_NORMAL);
128         return true;
129 }
130
131 result
132 GroupedListSample::OnInitializing(void)
133 {
134         result r = E_SUCCESS;
135
136         // Creates an instance of GroupedList
137         __pGroupedList = new GroupedList();
138         __pGroupedList->Construct(Rectangle(0,0,GetClientAreaBounds().width,GetClientAreaBounds().height), CUSTOM_LIST_STYLE_NORMAL);
139
140         // Creates an instance of CustomListItemFormat of the grouped list
141         __pCustomListItemFormat = new CustomListItemFormat();
142         __pCustomListItemFormat->Construct();
143         __pCustomListItemFormat->AddElement(ID_LIST_TEXT, Rectangle(10, 25, 200, 80));
144         __pCustomListItemFormat->AddElement(ID_LIST_BITMAP, Rectangle(220, 10, 70, 80));
145
146         // Adds the groups to the grouped list
147         __pGroupedList->AddGroup(L"Group_1", null);
148         __pGroupedList->AddGroup(L"Group_2", null);
149         __pGroupedList->AddGroup(L"Group_3", null);
150
151         // Gets instances of Bitmap
152         AppResource *pAppResource = Application::GetInstance()->GetAppResource();
153         Bitmap *pBitmapNormal  = pAppResource->GetBitmapN(L"tizen.png");
154         Bitmap *pBitmapFocused = pAppResource->GetBitmapN(L"tizen.png");
155
156         // Adds the items to the grouped list
157         for (int i = 0; i < __pGroupedList->GetGroupCount(); i++ )
158         {
159                 AddListItem(*__pGroupedList, i, L"SubItem1", pBitmapNormal, pBitmapFocused);
160                 AddListItem(*__pGroupedList, i, L"SubItem2", pBitmapNormal, pBitmapFocused);
161                 AddListItem(*__pGroupedList, i, L"SubItem3", pBitmapNormal, pBitmapFocused);
162                 AddListItem(*__pGroupedList, i, L"SubItem4", pBitmapNormal, pBitmapFocused);
163         }
164
165         // Adds the grouped list to the form
166         AddControl(*__pGroupedList);
167
168         // Deallocates bitmaps
169         delete pBitmapNormal;
170         delete pBitmapFocused;
171
172         return r;
173 }
174
175 result
176 GroupedListSample::OnTerminating(void)
177 {
178         result r = E_SUCCESS;
179
180         // Deallocates the item format
181         delete __pCustomListItemFormat;
182
183         return r;
184 }
185
186 result
187 GroupedListSample::AddListItem(GroupedList& groupedList, int groupId, String itemText, Bitmap* pBitmapNormal, Bitmap* pBitmapFocused)
188 {
189         result r = E_SUCCESS;
190
191         // Creates an instance of CustomListItem of the grouped list
192         CustomListItem* pItem = new CustomListItem();
193         pItem->Construct(100);
194         pItem->SetItemFormat(*__pCustomListItemFormat);
195         pItem->SetElement(ID_LIST_TEXT, itemText);
196         pItem->SetElement(ID_LIST_BITMAP, *pBitmapNormal, pBitmapFocused);
197
198         // Adds the item to the grouped list
199         groupedList.AddItem(groupId, *pItem, ID_LIST_);
200
201         return r;
202 }
203
204 // ICustomItemEventListener implementation
205 void
206 GroupedListSample::OnItemStateChanged(const Control& source, int index, int itemId, ItemStatus status)
207 {
208         switch (itemId)
209         {
210         case ID_LIST_:
211                 {
212                         // ....
213                 }
214                 break;
215         default:
216                 break;
217         }
218 }
219
220 void
221 GroupedListSample::OnItemStateChanged(const Control& source, int index, int itemId, int elementId, ItemStatus status)
222 {
223         switch (itemId)
224         {
225         case ID_LIST_:
226                 {
227                         switch (elementId)
228                         {
229                         case ID_LIST_TEXT:
230                                 {
231                                         // ....
232                                 }
233                                 break;
234                         case ID_LIST_BITMAP:
235                                 {
236                                         // ....
237                                 }
238                                 break;
239                         default:
240                                 break;
241                         }
242                 }
243                 break;
244         default:
245                 break;
246         }
247 }
248  * @endcode
249  * @endif
250  */
251 class _OSP_EXPORT_ GroupedList
252         : public Tizen::Ui::Control
253 {
254 public:
255         /**
256          * @if OSPDEPREC
257          * The object is not fully constructed after this constructor is called. @n
258          * For full construction, the GroupedList::Construct() method must be called right after calling this constructor.
259          *
260          * @brief       <i> [Deprecated] </i>
261          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
262          * @since               2.0
263          * @endif
264          */
265         GroupedList(void);
266
267         /**
268          * @if OSPDEPREC
269          * This polymorphic destructor should be overridden if required. @n
270          * This way, the destructors of the derived classes are called when the destructor of this interface is called.
271          *
272          * @brief       <i> [Deprecated] </i>
273          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
274          * @since               2.0
275          * @endif
276          */
277         virtual ~GroupedList(void);
278
279         /**
280          * @if OSPDEPREC
281          * Initializes this instance of %GroupedList with the specified parameters.
282          *
283          * @brief       <i> [Deprecated] </i>
284          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
285          * @since                       2.0
286          *
287          * @return              An error code
288          * @param[in]   rect                    An instance of the Graphics::Rectangle class @n
289          *                                      This instance represents the X, Y coordinates of the top-left corner of the created %GroupedList along with the width and
290          *                                                              height.
291          * @param[in]   style                   The style of the %GroupedList control
292          * @param[in]   itemDivider             Set to @c true to display an item divider, @n
293          *                                                              else @c false
294          * @param[in]   fastScroll              Set to @c true if to use a fast scroll, @n
295          *                                                              else @c false
296          * @exception   E_SUCCESS               The method is successful.
297          * @exception   E_INVALID_ARG   A specified input parameter is invalid.
298          * @exception   E_SYSTEM                A system error has occurred.
299          * @remarks    
300          *                      - The size of the control must be within the range as defined by the minimum and maximum size.
301          *                      - The minimum size of this control is 274 x 148 on a WVGA screen, 180 x 96 on a HVGA screen and 137 x 74 on a WQVGA screen.
302          * @endif
303          */
304         result Construct(const Tizen::Graphics::Rectangle& rect, CustomListStyle style, bool itemDivider = true, bool fastScroll = false);
305
306         /**
307          * @if OSPDEPREC
308          * Adds the group to the %GroupedList control.
309          *
310          * @brief       <i> [Deprecated] </i>
311          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
312          * @since               2.0
313          *
314          * @return              An error code
315          * @param[in]   text                            The string of the group to append
316          * @param[in]   pBackgroundBitmap       The background bitmap of the group
317          * @param[in]   groupId                         The ID of the group
318          * @exception   E_SUCCESS                       The method is successful.
319          * @exception   E_SYSTEM                    A system error has occurred.
320          * @endif
321          */
322         result AddGroup(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int groupId = LIST_ITEM_UNSPECIFIED_ID);
323
324         /**
325          * @if OSPDEPREC
326          * Inserts the group of the %GroupedList control at the specified index.
327          *
328          * @brief       <i> [Deprecated] </i>
329          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
330          * @since               2.0
331          *
332          * @return              An error code
333          * @param[in]   groupIndex                      The group index
334          * @param[in]   text                            The name of the group item
335          * @param[in]   pBackgroundBitmap       The background bitmap of the group item
336          * @param[in]   groupId                         The ID of the group item
337          * @exception   E_SUCCESS                       The method is successful.
338          * @exception   E_INVALID_ARG           The @c groupIndex is out of bounds.
339          * @exception   E_SYSTEM                        A system error has occurred.
340          * @endif
341          */
342         result InsertGroupAt(int groupIndex, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int groupId = LIST_ITEM_UNSPECIFIED_ID);
343
344         /**
345          * @if OSPDEPREC
346          * Sets the contents of the group of the %GroupedList control at the index.
347          *
348          * @brief       <i> [Deprecated] </i>
349          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
350          * @since               2.0
351          *
352          * @return              An error code
353          * @param[in]   groupIndex                  The group index
354          * @param[in]   text                        The string of the group to append
355          * @param[in]   pBackgroundBitmap       The bitmap of the group
356          * @param[in]   groupId                         The ID of the group
357          * @exception   E_SUCCESS                   The method is successful.
358          * @exception   E_INVALID_ARG           The specified @c groupIndex is invalid.
359          * @exception   E_SYSTEM                    A system error has occurred.
360          * @endif
361          */
362         result SetGroupAt(int groupIndex, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int groupId = LIST_ITEM_UNSPECIFIED_ID);
363
364         /**
365          * @if OSPDEPREC
366          * Removes the group of the %GroupedList control at the index.
367          *
368          * @brief       <i> [Deprecated] </i>
369          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
370          * @since               2.0
371          *
372          * @return              An error code
373          * @param[in]   groupIndex              The group index
374          * @exception   E_SUCCESS               The method is successful.
375          * @exception   E_INVALID_ARG   The specified @c groupIndex is invalid.
376          * @exception   E_SYSTEM                A system error has occurred.
377          * @remarks             
378          *                      - When the specified group is removed, all the items in the group are also removed.
379          *                      - The removed list items are deleted from the memory.
380          * @endif
381          */
382         result RemoveGroupAt(int groupIndex);
383
384         /**
385          * @if OSPDEPREC
386          * Removes all the groups of the %GroupedList control.
387          *
388          * @brief       <i> [Deprecated] </i>
389          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
390          * @since               2.0
391          *
392          * @return              An error code
393          * @exception   E_SUCCESS               The method is successful.
394          * @exception   E_SYSTEM                A system error has occurred.
395          * @remarks             
396          *                      - When the specified group is removed, all the items in the group are also removed. 
397          *                      - The removed list items are deleted from the memory.
398          * @endif
399          */
400         result RemoveAllGroups(void);
401
402         /**
403          * @if OSPDEPREC
404          * Counts all the groups of the %GroupedList control.
405          *
406          * @brief       <i> [Deprecated] </i>
407          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
408          * @since               2.0
409          *
410          * @return              The count of all the groups
411          * @endif
412          */
413         int GetGroupCount(void) const;
414
415         /**
416          * @if OSPDEPREC
417          * Adds the item to the specified group.
418          *
419          * @brief       <i> [Deprecated] </i>
420          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
421          * @since               2.0
422          *
423          * @return              An error code
424          * @param[in]   groupIndex              The group index
425          * @param[in]   item                    The custom list item object to add
426          * @param[in]   itemId                  The specified item ID for this item
427          * @exception   E_SUCCESS               The method is successful.
428          * @exception   E_INVALID_ARG   The specified @c groupIndex or @c itemId is invalid.
429          * @exception   E_SYSTEM                A system error has occurred.
430          * @remarks     
431          *                      - The added item is deleted automatically when the list is destroyed.
432          *                      - Do not add, insert, or set an item that already belongs to a %GroupedList control.
433          * @endif
434          */
435         result AddItem(int groupIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
436
437         /**
438          * @if OSPDEPREC
439          * Inserts the item to the specified group.
440          *
441          * @brief       <i> [Deprecated] </i>
442          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
443          * @since               2.0
444          *
445          * @return              An error code
446          * @param[in]   groupIndex              The group index
447          * @param[in]   itemIndex               The item index in the specified group
448          * @param[in]   item            The custom list item to insert
449          * @param[in]   itemId                  The item ID for this item
450          * @exception   E_SUCCESS               The method is successful.
451          * @exception   E_INVALID_ARG   The specified @c groupIndex or @c itemId is invalid.
452          * @exception   E_SYSTEM                A system error has occurred.
453          * @remarks     
454          *                      - The inserted item is deleted automatically when the list is destroyed.
455          *                      - Do not add, insert, or set an item that already belongs to a %GroupedList control.
456          * @endif
457          */
458         result InsertItemAt(int groupIndex, int itemIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
459
460         /**
461          * @if OSPDEPREC
462          * Sets the contents of the item in the specified group.
463          *
464          * @brief       <i> [Deprecated] </i>
465          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
466          * @since               2.0
467          *
468          * @return              An error code
469          * @param[in]   groupIndex              The group index
470          * @param[in]   itemIndex               The item index in the specified group
471          * @param[in]   item                    The custom list item to set
472          * @param[in]   itemId                  The item ID for this item
473          * @exception   E_SUCCESS               The method is successful.
474          * @exception   E_INVALID_ARG   The specified @c groupIndex or @c itemId is invalid.
475          * @exception   E_SYSTEM                A system error has occurred.
476          * @remarks             Do not add, insert, or set an item that already belongs to a %GroupedList control.
477          * @endif
478          */
479         result SetItemAt(int groupIndex, int itemIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
480
481         /**
482          * @if OSPDEPREC
483          * Sets the checked status for the specified item.
484          *
485          * @brief       <i> [Deprecated] </i>
486          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
487          * @since                       2.0
488          *
489          * @return                                              An error code
490          * @param[in]   groupIndex              The group index of the item
491          * @param[in]   itemIndex               The item index
492          * @param[in]   check                   Set to @c true to check the item, @n
493          *                                                              else @c false
494          * @exception   E_SUCCESS               The method is successful.
495          * @exception   E_INVALID_ARG   The specified @c groupIndex or @c itemIndex is invalid.
496          * @exception   E_SYSTEM                A system error has occurred.
497          * @endif
498          */
499         result SetItemChecked(int groupIndex, int itemIndex, bool check);
500
501         /**
502          * @if OSPDEPREC
503          * Enables or disables the item at the specified index of the %GroupedList.
504          *
505          * @brief       <i> [Deprecated] </i>
506          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
507          * @since               2.0
508          *
509          * @return              An error code
510          * @param[in]   groupIndex              The group index of the item
511          * @param[in]   itemIndex               The item index
512          * @param[in]   enable                  Set to @c true to enable the item, @n
513          *                                                              else @c false
514          * @exception   E_SUCCESS               The method is successful.
515          * @exception   E_INVALID_ARG   The specified @c groupIndex or @c itemIndex is invalid.
516          * @exception   E_SYSTEM                A system error has occurred.
517          * @endif
518          */
519         result SetItemEnabled(int groupIndex, int itemIndex, bool enable);
520
521         /**
522          * @if OSPDEPREC
523          * Sets the background color of this control.
524          *
525          * @brief       <i> [Deprecated] </i>
526          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
527          * @since       2.0
528          *
529          * @param[in]   color   The background color
530          * @endif
531          */
532         void SetBackgroundColor(const Tizen::Graphics::Color& color);
533
534         /**
535          * @if OSPDEPREC
536          * Sets the text that is displayed when %GroupedList is empty.
537          *
538          * @brief       <i> [Deprecated] </i>
539          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
540          * @since               2.0
541          *
542          * @param[in]   text    The empty list test
543          * @endif
544          */
545         void SetTextOfEmptyList(const Tizen::Base::String& text);
546
547         /**
548          * @if OSPDEPREC
549          * Sets the color of the text that is displayed when %GroupedList is empty.
550          *
551          * @brief       <i> [Deprecated] </i>
552          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
553          * @since     2.0
554          *
555          * @param[in]   color   The color of the text to display
556          * @endif
557          */
558         void SetTextColorOfEmptyList(const Tizen::Graphics::Color& color);
559
560         /**
561          * @if OSPDEPREC
562          * Gets the color of the text that is displayed when %GroupedList is empty.
563          *
564          * @brief       <i> [Deprecated] </i>
565          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
566          * @since       2.0
567          *
568          * @return      The color of the text to be displayed
569          * @endif
570          */
571         Tizen::Graphics::Color GetTextColorOfEmptyList(void) const;
572
573         /**
574          * @if OSPDEPREC
575          * Checks whether the item at the specified index of this grouped list is checked.
576          *
577          * @brief       <i> [Deprecated] </i>
578          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
579          * @since               2.0
580          *
581          * @return              @c true if the item is checked, @n
582          *              else @c false
583          * @param[in]   groupIndex              The group index of the item
584          * @param[in]   itemIndex               The item index
585          * @exception   E_SUCCESS               The method is successful.
586          * @exception   E_INVALID_ARG   The specified @c groupIndex or @c itemIndex is invalid.
587          * @exception   E_SYSTEM                A system error has occurred.
588          * @remarks             This method can only be used when the style of the list allows selection.
589          * @endif
590          */
591         bool IsItemChecked(int groupIndex, int itemIndex) const;
592
593         /**
594          * @if OSPDEPREC
595          * Checks whether the item at the specified index is enabled.
596          *
597          * @brief       <i> [Deprecated] </i>
598          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
599          * @since               2.0
600          *
601          * @return              @c true if the item is enabled, @n
602          *                              else @c false
603          * @param[in]   groupIndex              The group index of the item
604          * @param[in]   itemIndex               The item index
605          * @exception   E_SUCCESS               The method is successful.
606          * @exception   E_INVALID_ARG   The specified @c groupIndex or @c itemIndex is invalid.
607          * @exception   E_SYSTEM                A system error has occurred.
608          * @endif
609          */
610         bool IsItemEnabled(int groupIndex, int itemIndex) const;
611
612         /**
613          * @if OSPDEPREC
614          * Removes an item in the specified group.
615          *
616          * @brief       <i> [Deprecated] </i>
617          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
618          * @since               2.0
619          *
620          * @return              An error code
621          * @param[in]   groupIndex              The group index
622          * @param[in]   itemIndex               The item index
623          * @exception   E_SUCCESS               The method is successful.
624          * @exception   E_INVALID_ARG   The specified @c groupIndex or @c itemIndex is invalid.
625          * @exception   E_SYSTEM                A system error has occurred.
626          * @remarks     The removed list item is deleted from the memory.
627          * @endif
628          */
629         result RemoveItemAt(int groupIndex, int itemIndex);
630
631         /**
632          * @if OSPDEPREC
633          * Removes all the items in the specified group.
634          *
635          * @brief       <i> [Deprecated] </i>
636          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
637          * @since               2.0
638          *
639          * @return              An error code
640          * @param[in]   groupIndex              The group index
641          * @exception   E_SUCCESS               The method is successful.
642          * @exception   E_INVALID_ARG   The specified @c groupIndex is invalid.
643          * @exception   E_SYSTEM                A system error has occurred.
644          * @remarks     The removed list items are deleted from the memory.
645          * @endif
646          */
647         result RemoveAllItemsAt(int groupIndex);
648
649         /**
650          * @if OSPDEPREC
651          * Removes all the checked items in the specified group.
652          *
653          * @brief       <i> [Deprecated] </i>
654          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
655          * @since               2.0
656          *
657          * @return              An error code
658          * @param[in]   groupIndex              The group index
659          * @exception   E_SUCCESS               The method is successful.
660          * @exception   E_INVALID_ARG   The specified @c groupIndex is invalid.
661          * @exception   E_SYSTEM                A system error has occurred.
662          * @remarks     The removed list items are deleted from the memory.
663          * @endif
664          */
665         result RemoveAllCheckedItemsAt(int groupIndex);
666
667         /**
668          * @if OSPDEPREC
669          * Counts all items of the %GroupedList instance.
670          *
671          * @brief       <i> [Deprecated] </i>
672          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
673          * @since               2.0
674          *
675          * @return              The item count of the specified group
676          * @param[in]   groupIndex              The group index
677          * @exception   E_SUCCESS               The method is successful.
678          * @exception   E_INVALID_ARG   The specified @c groupIndex is invalid.
679          * @exception   E_SYSTEM                A system error has occurred.
680          * @endif
681          */
682         int GetItemCountAt(int groupIndex) const;
683
684         /**
685          * @if OSPDEPREC
686          * Gets the item ID of the item at the specified index.
687          *
688          * @brief       <i> [Deprecated] </i>
689          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
690          * @since               2.0
691          *
692          * @return              The item ID
693          * @param[in]   groupIndex              The group index
694          * @param[in]   itemIndex               The item index in the specified group
695          * @exception   E_SUCCESS               The method is successful.
696          * @exception   E_INVALID_ARG   The specified @c groupIndex or @c itemIndex is invalid.
697          * @exception   E_SYSTEM                A system error has occurred.
698          * @endif
699          */
700         int GetItemIdAt(int groupIndex, int itemIndex) const;
701
702         /**
703          * @if OSPDEPREC
704          * Gets the item index by the specified item ID.
705          *
706          * @brief       <i> [Deprecated] </i>
707          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
708          * @since                       2.0
709          *
710          * @return                      An error code
711          * @param[in]           itemId                  The item ID
712          * @param[out]      groupIndex          The group index
713          * @param[out]      itemIndex           The item index in the specified group
714          * @exception           E_SUCCESS               The method is successful.
715          * @exception           E_SYSTEM                A system error has occurred.
716          * @endif
717          */
718         result GetItemIndexFromItemId(int itemId, int& groupIndex, int& itemIndex) const;
719
720         /**
721          * @if OSPDEPREC
722          * Gets the group ID at the specified index.
723          *
724          * @brief       <i> [Deprecated] </i>
725          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
726          * @since               2.0
727          *
728          * @return              The group ID
729          * @param[in]   groupIndex              The group index
730          * @exception   E_SUCCESS               The method is successful.
731          * @exception   E_INVALID_ARG   The specified @c groupIndex is invalid.
732          * @exception   E_SYSTEM                A system error has occurred.
733          * @endif
734          */
735         int GetGroupIdAt(int groupIndex) const;
736
737         /**
738          * @if OSPDEPREC
739          * Gets the group index from the specified group ID.
740          *
741          * @brief       <i> [Deprecated] </i>
742          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
743          * @since               2.0
744          *
745          * @return              The group index
746          * @param[in]   groupId             The ID of the group
747          * @exception   E_SUCCESS               The method is successful.
748          * @exception   E_SYSTEM                A system error has occurred.
749          * @endif
750          */
751         int GetGroupIndexFromGroupId(int groupId) const;
752
753         /**
754          * @if OSPDEPREC
755          * Gets the index of the last item checked.
756          *
757          * @brief       <i> [Deprecated] </i>
758          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
759          * @since               2.0
760          *
761          * @return              An error code
762          * @param[out]  groupIndex              The group index
763          * @param[out]  itemIndex               The item index in the specified group
764          * @exception   E_SUCCESS               The method is successful.
765          * @exception   E_SYSTEM                A system error has occurred.
766          * @endif
767          */
768         result GetLastCheckedItemIndex(int& groupIndex, int& itemIndex) const;
769
770         /**
771          * @if OSPDEPREC
772          * Gets the index of the next checked item.
773          *
774          * @brief       <i> [Deprecated] </i>
775          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
776          * @since                       2.0
777          *
778          * @return                      An error code
779          * @param[in,out]   groupIndex          The group index
780          * @param[in,out]   itemIndex           The item index in the specified group
781          * @exception           E_SUCCESS               The method is successful.
782          * @exception           E_SYSTEM                A system error has occurred.
783          * @endif
784          */
785         result GetNextCheckedItemIndexAfter(int& groupIndex, int& itemIndex) const;
786
787         /**
788          * @if OSPDEPREC
789          * Gets the index of the item at the specified item position.
790          *
791          * @brief       <i> [Deprecated] </i>
792          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
793          * @since               2.0
794          *
795          * @return              An error code
796          * @param[in]   x                               The x position of the point
797          * @param[in]   y                               The y position of the point
798          * @param[out]  groupIndex              The index of the group which the item belongs to
799          * @param[out]  itemIndex               The index of the item
800          * @exception   E_SUCCESS               The method is successful.
801          * @exception   E_SYSTEM        A system error has occurred. @n
802          *                                                              There is no item at the specified position.
803          * @endif
804          */
805         result GetItemIndexFromPosition(int x, int y, int& groupIndex, int& itemIndex) const;
806
807         /**
808          * @if OSPDEPREC
809          * Gets the index of the item at the specified item position.
810          *
811          * @brief       <i> [Deprecated] </i>
812          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
813          * @since               2.0
814          *
815          * @return              An error code
816          * @param[in]   position        The position of the point
817          * @param[out]  groupIndex      The index of the group which the item belongs to
818          * @param[out]  itemIndex       The index of the item
819          * @exception   E_SUCCESS               The method is successful.
820          * @exception   E_SYSTEM        A system error has occurred. @n
821          *                                                              There is no item at the specified position.
822          * @endif
823          */
824         result GetItemIndexFromPosition(const Tizen::Graphics::Point& position, int& groupIndex, int& itemIndex) const;
825
826         /**
827          * @if OSPDEPREC
828          * Gets the index of the current top drawn list item.
829          *
830          * @brief       <i> [Deprecated] </i>
831          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
832          * @since               2.0
833          *
834          * @return              An error code
835          * @param[out]  groupIndex          The group index of the item
836          * @param[out]  itemIndex               The item index of the item
837          * @exception   E_SUCCESS               The method is successful.
838          * @exception   E_SYSTEM                A system error has occurred.
839          * @endif
840          */
841         result GetTopDrawnItemIndex(int& groupIndex, int& itemIndex) const;
842
843         /**
844          * @if OSPDEPREC
845          * Removes all the items of the %GroupedList control.
846          *
847          * @brief       <i> [Deprecated] </i>
848          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
849          * @since               2.0
850          *
851          * @return              An error code
852          * @exception   E_SUCCESS               The method is successful.
853          * @exception   E_SYSTEM                A system error has occurred.
854          * @remarks     The removed list items are deleted from the memory.
855          * @endif
856          */
857         result RemoveAllItems(void);
858
859         /**
860          * @if OSPDEPREC
861          * Removes all the checked items of the %GroupedList control.
862          *
863          * @brief       <i> [Deprecated] </i>
864          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
865          * @since               2.0
866          *
867          * @return              An error code
868          * @exception   E_SUCCESS               The method is successful.
869          * @exception   E_SYSTEM                A system error has occurred.
870          * @remarks     The removed list items are deleted from the memory.
871          * @endif
872          */
873         result RemoveAllCheckedItems(void);
874
875         /**
876          * @if OSPDEPREC
877          * Gets the specified item of the %GroupedList control.
878          *
879          * @brief       <i> [Deprecated] </i>
880          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
881          * @since               2.0
882          *
883          * @return              A custom list item
884          * @param[in]   groupIndex                      The index of the group which the item belongs to
885          * @param[in]   itemIndex                   The index of the item
886          * @exception   E_SUCCESS                       The method is successful.
887          * @exception   E_INVALID_ARG           The specified @c groupIndex or @c itemIndex is invalid.
888          * @exception   E_SYSTEM                        A system error has occurred.
889          * @endif
890          */
891         const CustomListItem* GetItemAt(int groupIndex, int itemIndex) const;
892
893         /**
894          * @if OSPDEPREC
895          * Scrolls to the bottom of the %GroupedList control.
896          *
897          * @brief       <i> [Deprecated] </i>
898          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
899          * @since       2.0
900          * @endif
901          */
902         void ScrollToBottom(void);
903
904         /**
905          * @if OSPDEPREC
906          * Scrolls to the top of the %GroupedList.
907          *
908          * @brief       <i> [Deprecated] </i>
909          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
910          * @since       2.0
911          * @endif
912          */
913         void ScrollToTop(void);
914
915         /**
916          * @if OSPDEPREC
917          * Scrolls to the item at the specified index. @n
918          * The specified item is drawn at the top of the %GroupedList control.
919          *
920          * @brief       <i> [Deprecated] </i>
921          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
922          * @since               2.0
923          *
924          * @return              An error code
925          * @param[in]   groupIndex              The group index
926          * @param[in]   itemIndex               The item index
927          * @exception   E_SUCCESS               The method is successful.
928          * @exception   E_INVALID_ARG   The specified @c groupIndex or @c itemIndex is invalid.
929          * @exception   E_SYSTEM                A system error has occurred.
930          * @endif
931          */
932         result ScrollToTop(int groupIndex, int itemIndex);
933
934         /**
935          * @if OSPDEPREC
936          * Scrolls to the group at the specified index. @n
937          * The specified group is drawn at the top of the %GroupedList control.
938          *
939          * @brief       <i> [Deprecated] </i>
940          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
941          * @since               2.0
942          *
943          * @return              An error code
944          * @param[in]   groupIndex              The group index
945          * @exception   E_SUCCESS               The method is successful.
946          * @exception   E_INVALID_ARG   The specified @c groupIndex is invalid.
947          * @exception   E_SYSTEM                A system error has occurred.
948          * @endif
949          */
950         result ScrollToTop(int groupIndex);
951
952         /**
953          * @if OSPDEPREC
954          * Sets the first index list of scroll by text.
955          *
956          * @brief       <i> [Deprecated] </i>
957          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
958          * @since               2.0
959          *
960          * @return              An error code
961          * @param[in]   text                    The text of the first index
962          * @exception   E_SUCCESS               The method is successful.
963          * @exception   E_SYSTEM                A system error has occurred.
964          * @endif
965          */
966         result SetFastScrollMainIndex(const Tizen::Base::String& text);
967
968         /**
969          * @if OSPDEPREC
970          * Adds the fast scroll event listener.
971          *
972          * @brief       <i> [Deprecated] </i>
973          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
974          * @since               2.0
975          *
976          * @param[in]   listener        The listener to add
977          * @endif
978          */
979         void AddFastScrollEventListener(Tizen::Ui::IFastScrollEventListener& listener);
980
981         /**
982          * @if OSPDEPREC
983          * Removes the fast scroll event listener.
984          *
985          * @brief       <i> [Deprecated] </i>
986          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
987          * @since               2.0
988          *
989          * @param[in]   listener        The listener to remove
990          * @endif
991          */
992         void RemoveFastScrollEventListener(Tizen::Ui::IFastScrollEventListener& listener);
993
994         /**
995          * @if OSPDEPREC
996          * Adds the grouped list item event listener.
997          *
998          * @brief       <i> [Deprecated] </i>
999          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
1000          * @since               2.0
1001          *
1002          * @param[in]   listener        The listener to add
1003          * @endif
1004          */
1005         void AddGroupedItemEventListener(Tizen::Ui::IGroupedItemEventListener& listener);
1006
1007         /**
1008          * @if OSPDEPREC
1009          * Removes the grouped list item event listener.
1010          *
1011          * @brief       <i> [Deprecated] </i>
1012          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
1013          * @since               2.0
1014          *
1015          * @param[in]   listener        The listener to remove
1016          * @endif
1017          */
1018         void RemoveGroupedItemEventListener(Tizen::Ui::IGroupedItemEventListener& listener);
1019
1020         /**
1021          * @if OSPDEPREC
1022          * Gets the index of the first checked list item.
1023          *
1024          * @brief       <i> [Deprecated] </i>
1025          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
1026          * @since               2.0
1027          *
1028          * @return              An error code
1029          * @param[out]  groupIndex          The group index of the item
1030          * @param[out]  itemIndex               The item index of the item
1031          * @exception   E_SUCCESS           The method is successful.
1032          * @exception   E_SYSTEM                A system error has occurred.
1033          * @endif
1034          */
1035         result GetFirstCheckedItemIndex(int& groupIndex, int& itemIndex) const;
1036
1037         /**
1038          * @if OSPDEPREC
1039          * Sets the checked status of all the items of the specified group with the given value.
1040          *
1041          * @brief       <i> [Deprecated] </i>
1042          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
1043          * @since               2.0
1044          *
1045          * @return              An error code
1046          * @param[in]   groupIndex          The group index of the item
1047          * @param[in]   check                   Set to @c true to check all the items, @n
1048          *                                                          else @c false
1049          * @exception   E_SUCCESS           The method is successful.
1050          * @exception   E_INVALID_ARG   The specified @c groupIndex is invalid.
1051          * @exception   E_SYSTEM                A system error has occurred.
1052          * @endif
1053          */
1054         result SetAllItemsChecked(int groupIndex, bool check);
1055
1056         /**
1057          * @if OSPDEPREC
1058          * Gets the index of the current bottom drawn list item.
1059          *
1060          * @brief       <i> [Deprecated] </i>
1061          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
1062          * @since               2.0
1063          *
1064          * @return              An error code
1065          * @param[out]  groupIndex          The group index of the item
1066          * @param[out]  itemIndex               The item index of the item
1067          * @exception   E_SUCCESS           The method is successful.
1068          * @exception   E_SYSTEM                A system error has occurred.
1069          * @endif
1070          */
1071         result GetBottomDrawnItemIndex(int& groupIndex, int& itemIndex) const;
1072
1073         /**
1074          * @if OSPDEPREC
1075          * Draws and shows the item of %GroupedList control.
1076          *
1077          * @brief       <i> [Deprecated] </i>
1078          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
1079          * @since                       2.0
1080          *
1081          * @return              An error code
1082          * @param[in]   groupIndex                      The group index
1083          * @param[in]   itemIndex                       The item index
1084          * @exception   E_SUCCESS                       The method is successful.
1085          * @exception   E_INVALID_ARG           The specified @c groupIndex or @c itemIndex is invalid.
1086          * @exception   E_INVALID_OPERATION     The item has never been drawn before calling this method.
1087          * @exception   E_SYSTEM                        A system error has occurred.
1088          * @endif
1089          */
1090         result RefreshItem(int groupIndex, int itemIndex);
1091
1092         /**
1093          * @if OSPDEPREC
1094          * Draws and shows the group of %GroupedList control.
1095          *
1096          * @brief       <i> [Deprecated] </i>
1097          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
1098          * @since               2.0
1099          *
1100          * @return              An error code
1101          * @param[in]   groupIndex              The group index
1102          * @exception   E_SUCCESS               The method is successful.
1103          * @exception   E_INVALID_ARG   The specified @c groupIndex is invalid.
1104          * @exception   E_SYSTEM                A system error has occurred.
1105          * @endif
1106          */
1107         result RefreshGroup(int groupIndex);
1108
1109 private:
1110         //
1111         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
1112         //
1113         GroupedList(const GroupedList& rhs);
1114
1115         //
1116         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
1117         //
1118         GroupedList& operator =(const GroupedList& rhs);
1119
1120         friend class _GroupedListImpl;
1121 }; //GroupedList
1122 }}} // Tizen::Ui::Controls
1123 #endif // _FUI_CTRL_GROUPED_LIST_H_