remove APIs to apply [ACR][03/30][Remove] Remove APIs in Tizen::Ui namespace
[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 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
8 //
9 //     http://floralicense.org/license/
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. For full construction, the Construct() method must be called right after calling this constructor.
258          *
259          * @brief       <i> [Deprecated] </i>
260          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
261          * @since               2.0
262          * @endif
263          */
264         GroupedList(void);
265
266         /**
267          * @if OSPDEPREC
268          * 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.
269          *
270          * @brief       <i> [Deprecated] </i>
271          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
272          * @since               2.0
273          * @endif
274          */
275         virtual ~GroupedList(void);
276
277         /**
278          * @if OSPDEPREC
279          * Initializes this instance of %GroupedList with the specified parameters.
280          *
281          * @brief       <i> [Deprecated] </i>
282          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
283          * @since                       2.0
284          *
285          * @return              An error code
286          * @param[in]   rect                    An instance of the Graphics::Rectangle class @n
287          *                                                              This instance represents the X, Y coordinates of the top-left corner of the created %GroupedList along with the width and
288          *                                                              height.
289          * @param[in]   style                   The style of the %GroupedList control
290          * @param[in]   itemDivider             Set to @c true to display an item divider, @n
291          *                                                              else @c false
292          * @param[in]   fastScroll              Set to @c true if to use a fast scroll, @n
293          *                                                              else @c false
294          * @exception   E_SUCCESS               The method is successful.
295          * @exception   E_INVALID_ARG   A specified input parameter is invalid.
296          * @exception   E_SYSTEM                A system error has occurred.
297          * @remarks    The size of the control must be within the range as defined by the minimum and maximum size.
298          * @remarks    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.
299          * @endif
300          */
301         result Construct(const Tizen::Graphics::Rectangle& rect, CustomListStyle style, bool itemDivider = true, bool fastScroll = false);
302
303         /**
304          * @if OSPDEPREC
305          * Adds the group to the %GroupedList control.
306          *
307          * @brief       <i> [Deprecated] </i>
308          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
309          * @since               2.0
310          *
311          * @return              An error code
312          * @param[in]   text                            The string of the group to be appended
313          * @param[in]   pBackgroundBitmap       The background bitmap of the group
314          * @param[in]   groupId                         The ID of the group
315          * @exception   E_SUCCESS                       The method is successful.
316          * @exception   E_SYSTEM                    A system error has occurred.
317          * @endif
318          */
319         result AddGroup(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int groupId = LIST_ITEM_UNSPECIFIED_ID);
320
321         /**
322          * @if OSPDEPREC
323          * Inserts the group of the %GroupedList control at the specified index.
324          *
325          * @brief       <i> [Deprecated] </i>
326          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
327          * @since               2.0
328          *
329          * @return              An error code
330          * @param[in]   groupIndex                      The group index
331          * @param[in]   text                            The name of the group item
332          * @param[in]   pBackgroundBitmap       The background bitmap of the group item
333          * @param[in]   groupId                         The ID of the group item
334          * @exception   E_SUCCESS                       The method is successful.
335          * @exception   E_INVALID_ARG           The @c groupIndex is out of bounds.
336          * @exception   E_SYSTEM                        A system error has occurred.
337          * @endif
338          */
339         result InsertGroupAt(int groupIndex, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int groupId = LIST_ITEM_UNSPECIFIED_ID);
340
341         /**
342          * @if OSPDEPREC
343          * Sets the contents of the group of the %GroupedList control at the index.
344          *
345          * @brief       <i> [Deprecated] </i>
346          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
347          * @since               2.0
348          *
349          * @return              An error code
350          * @param[in]   groupIndex                  The group index
351          * @param[in]   text                        The string of the group to be appended
352          * @param[in]   pBackgroundBitmap       The bitmap of the group
353          * @param[in]   groupId                         The ID of the group
354          * @exception   E_SUCCESS                   The method is successful.
355          * @exception   E_INVALID_ARG           The specified @c groupIndex is invalid.
356          * @exception   E_SYSTEM                    A system error has occurred.
357          * @endif
358          */
359         result SetGroupAt(int groupIndex, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int groupId = LIST_ITEM_UNSPECIFIED_ID);
360
361         /**
362          * @if OSPDEPREC
363          * Removes the group of the %GroupedList control at the index.
364          *
365          * @brief       <i> [Deprecated] </i>
366          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
367          * @since               2.0
368          *
369          * @return              An error code
370          * @param[in]   groupIndex              The group index
371          * @exception   E_SUCCESS               The method is successful.
372          * @exception   E_INVALID_ARG   The specified @c groupIndex is invalid.
373          * @exception   E_SYSTEM                A system error has occurred.
374          * @remarks             When the specified group is removed, all the items in the group are also removed. @n
375          *                              The removed list items are deleted from the memory.
376          * @endif
377          */
378         result RemoveGroupAt(int groupIndex);
379
380         /**
381          * @if OSPDEPREC
382          * Removes all the groups of the %GroupedList control.
383          *
384          * @brief       <i> [Deprecated] </i>
385          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
386          * @since               2.0
387          *
388          * @return              An error code
389          * @exception   E_SUCCESS               The method is successful.
390          * @exception   E_SYSTEM                A system error has occurred.
391          * @remarks             When the specified group is removed, all the items in the group are also removed. @n
392          *                              The removed list items are deleted from the memory.
393          * @endif
394          */
395         result RemoveAllGroups(void);
396
397         /**
398          * @if OSPDEPREC
399          * Counts all the groups of the %GroupedList control.
400          *
401          * @brief       <i> [Deprecated] </i>
402          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
403          * @since               2.0
404          *
405          * @return              The count of all the groups
406          * @endif
407          */
408         int GetGroupCount(void) const;
409
410         /**
411          * @if OSPDEPREC
412          * Adds the item to the specified group.
413          *
414          * @brief       <i> [Deprecated] </i>
415          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
416          * @since               2.0
417          *
418          * @return              An error code
419          * @param[in]   groupIndex              The group index
420          * @param[in]   item                    The custom list item object to be added
421          * @param[in]   itemId                  The specified item ID for this item
422          * @exception   E_SUCCESS               The method is successful.
423          * @exception   E_INVALID_ARG   The specified @c groupIndex or @c itemId is invalid.
424          * @exception   E_SYSTEM                A system error has occurred.
425          * @remarks     The added item is deleted automatically when the list is destroyed. @n
426          *                              Do not add, insert, or set an item that already belongs to a %GroupedList control.
427          * @endif
428          */
429         result AddItem(int groupIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
430
431         /**
432          * @if OSPDEPREC
433          * Inserts the item to the specified group.
434          *
435          * @brief       <i> [Deprecated] </i>
436          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
437          * @since               2.0
438          *
439          * @return              An error code
440          * @param[in]   groupIndex              The group index
441          * @param[in]   itemIndex               The item index in the specified group
442          * @param[in]   item            The custom list item to be inserted
443          * @param[in]   itemId                  The item ID for this item
444          * @exception   E_SUCCESS               The method is successful.
445          * @exception   E_INVALID_ARG   The specified @c groupIndex or @c itemId is invalid.
446          * @exception   E_SYSTEM                A system error has occurred.
447          * @remarks     The inserted item is deleted automatically when the list is destroyed.
448          *                              Do not add, insert, or set an item that already belongs to a %GroupedList control.
449          * @endif
450          */
451         result InsertItemAt(int groupIndex, int itemIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
452
453         /**
454          * @if OSPDEPREC
455          * Sets the contents of the item in the specified group.
456          *
457          * @brief       <i> [Deprecated] </i>
458          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
459          * @since               2.0
460          *
461          * @return              An error code
462          * @param[in]   groupIndex              The group index
463          * @param[in]   itemIndex               The item index in the specified group
464          * @param[in]   item                    The custom list item to be set
465          * @param[in]   itemId                  The item ID for this item
466          * @exception   E_SUCCESS               The method is successful.
467          * @exception   E_INVALID_ARG   The specified @c groupIndex or @c itemId is invalid.
468          * @exception   E_SYSTEM                A system error has occurred.
469          * @remarks             Do not add, insert, or set an item that already belongs to a %GroupedList control.
470          * @endif
471          */
472         result SetItemAt(int groupIndex, int itemIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
473
474         /**
475          * @if OSPDEPREC
476          * Sets the checked status for the specified item.
477          *
478          * @brief       <i> [Deprecated] </i>
479          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
480          * @since                       2.0
481          *
482          * @return                                              An error code
483          * @param[in]   groupIndex              The group index of the item
484          * @param[in]   itemIndex               The item index
485          * @param[in]   check                   Set to @c true to check the item, @n
486          *                                                              else @c false
487          * @exception   E_SUCCESS               The method is successful.
488          * @exception   E_INVALID_ARG   The specified @c groupIndex or @c itemIndex is invalid.
489          * @exception   E_SYSTEM                A system error has occurred.
490          * @endif
491          */
492         result SetItemChecked(int groupIndex, int itemIndex, bool check);
493
494         /**
495          * @if OSPDEPREC
496          * Enables or disables the item at the specified index of the %GroupedList.
497          *
498          * @brief       <i> [Deprecated] </i>
499          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
500          * @since               2.0
501          *
502          * @return              An error code
503          * @param[in]   groupIndex              The group index of the item
504          * @param[in]   itemIndex               The item index
505          * @param[in]   enable                  Set to @c true to enable the item, @n
506          *                                                              else @c false
507          * @exception   E_SUCCESS               The method is successful.
508          * @exception   E_INVALID_ARG   The specified @c groupIndex or @c itemIndex is invalid.
509          * @exception   E_SYSTEM                A system error has occurred.
510          * @endif
511          */
512         result SetItemEnabled(int groupIndex, int itemIndex, bool enable);
513
514         /**
515          * @if OSPDEPREC
516          * Sets the background color of this control.
517          *
518          * @brief       <i> [Deprecated] </i>
519          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
520          * @since       2.0
521          *
522          * @param[in]   color   The background color
523          * @endif
524          */
525         void SetBackgroundColor(const Tizen::Graphics::Color& color);
526
527         /**
528          * @if OSPDEPREC
529          * Sets the text that is displayed when %GroupedList is empty.
530          *
531          * @brief       <i> [Deprecated] </i>
532          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
533          * @since               2.0
534          *
535          * @param[in]   text    The empty list test
536          * @endif
537          */
538         void SetTextOfEmptyList(const Tizen::Base::String& text);
539
540         /**
541          * @if OSPDEPREC
542          * Sets the color of the text that is displayed when %GroupedList is empty.
543          *
544          * @brief       <i> [Deprecated] </i>
545          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
546          * @since     2.0
547          *
548          * @param[in]   color   The color of the text to be displayed
549          * @endif
550          */
551         void SetTextColorOfEmptyList(const Tizen::Graphics::Color& color);
552
553         /**
554          * @if OSPDEPREC
555          * Gets the color of the text that is displayed when %GroupedList is empty.
556          *
557          * @brief       <i> [Deprecated] </i>
558          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
559          * @since       2.0
560          *
561          * @return      The color of the text to be displayed
562          * @endif
563          */
564         Tizen::Graphics::Color GetTextColorOfEmptyList(void) const;
565
566         /**
567          * @if OSPDEPREC
568          * Checks whether the item at the specified index of this grouped list is checked.
569          *
570          * @brief       <i> [Deprecated] </i>
571          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
572          * @since               2.0
573          *
574          * @return              @c true if the item is checked, @n
575          *              else @c false
576          * @param[in]   groupIndex              The group index of the item
577          * @param[in]   itemIndex               The item index
578          * @exception   E_SUCCESS               The method is successful.
579          * @exception   E_INVALID_ARG   The specified @c groupIndex or @c itemIndex is invalid.
580          * @exception   E_SYSTEM                A system error has occurred.
581          * @remarks             This method can only be used when the style of the list allows selection.
582          * @endif
583          */
584         bool IsItemChecked(int groupIndex, int itemIndex) const;
585
586         /**
587          * @if OSPDEPREC
588          * Checks whether the item at the specified index is enabled.
589          *
590          * @brief       <i> [Deprecated] </i>
591          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
592          * @since               2.0
593          *
594          * @return              @c true if the item is enabled, @n
595          *                              else @c false
596          * @param[in]   groupIndex              The group index of the item
597          * @param[in]   itemIndex               The item index
598          * @exception   E_SUCCESS               The method is successful.
599          * @exception   E_INVALID_ARG   The specified @c groupIndex or @c itemIndex is invalid.
600          * @exception   E_SYSTEM                A system error has occurred.
601          * @endif
602          */
603         bool IsItemEnabled(int groupIndex, int itemIndex) const;
604
605         /**
606          * @if OSPDEPREC
607          * Removes an item in the specified group.
608          *
609          * @brief       <i> [Deprecated] </i>
610          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
611          * @since               2.0
612          *
613          * @return              An error code
614          * @param[in]   groupIndex              The group index
615          * @param[in]   itemIndex               The item index
616          * @exception   E_SUCCESS               The method is successful.
617          * @exception   E_INVALID_ARG   The specified @c groupIndex or @c itemIndex is invalid.
618          * @exception   E_SYSTEM                A system error has occurred.
619          * @remarks     The removed list item is deleted from the memory.
620          * @endif
621          */
622         result RemoveItemAt(int groupIndex, int itemIndex);
623
624         /**
625          * @if OSPDEPREC
626          * Removes all the items in the specified group.
627          *
628          * @brief       <i> [Deprecated] </i>
629          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
630          * @since               2.0
631          *
632          * @return              An error code
633          * @param[in]   groupIndex              The group index
634          * @exception   E_SUCCESS               The method is successful.
635          * @exception   E_INVALID_ARG   The specified @c groupIndex is invalid.
636          * @exception   E_SYSTEM                A system error has occurred.
637          * @remarks     The removed list items are deleted from the memory.
638          * @endif
639          */
640         result RemoveAllItemsAt(int groupIndex);
641
642         /**
643          * @if OSPDEPREC
644          * Removes all the checked items in the specified group.
645          *
646          * @brief       <i> [Deprecated] </i>
647          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
648          * @since               2.0
649          *
650          * @return              An error code
651          * @param[in]   groupIndex              The group index
652          * @exception   E_SUCCESS               The method is successful.
653          * @exception   E_INVALID_ARG   The specified @c groupIndex is invalid.
654          * @exception   E_SYSTEM                A system error has occurred.
655          * @remarks     The removed list items are deleted from the memory.
656          * @endif
657          */
658         result RemoveAllCheckedItemsAt(int groupIndex);
659
660         /**
661          * @if OSPDEPREC
662          * Counts all items of the %GroupedList instance.
663          *
664          * @brief       <i> [Deprecated] </i>
665          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
666          * @since               2.0
667          *
668          * @return              The item count of the specified group
669          * @param[in]   groupIndex              The group index
670          * @exception   E_SUCCESS               The method is successful.
671          * @exception   E_INVALID_ARG   The specified @c groupIndex is invalid.
672          * @exception   E_SYSTEM                A system error has occurred.
673          * @endif
674          */
675         int GetItemCountAt(int groupIndex) const;
676
677         /**
678          * @if OSPDEPREC
679          * Gets the item ID of the item at the specified index.
680          *
681          * @brief       <i> [Deprecated] </i>
682          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
683          * @since               2.0
684          *
685          * @return              The item ID
686          * @param[in]   groupIndex              The group index
687          * @param[in]   itemIndex               The item index in the specified group
688          * @exception   E_SUCCESS               The method is successful.
689          * @exception   E_INVALID_ARG   The specified @c groupIndex or @c itemIndex is invalid.
690          * @exception   E_SYSTEM                A system error has occurred.
691          * @endif
692          */
693         int GetItemIdAt(int groupIndex, int itemIndex) const;
694
695         /**
696          * @if OSPDEPREC
697          * Gets the item index by the specified item ID.
698          *
699          * @brief       <i> [Deprecated] </i>
700          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
701          * @since                       2.0
702          *
703          * @return                      An error code
704          * @param[in]           itemId                  The item ID
705          * @param[out]      groupIndex          The group index
706          * @param[out]      itemIndex           The item index in the specified group
707          * @exception           E_SUCCESS               The method is successful.
708          * @exception           E_SYSTEM                A system error has occurred.
709          * @endif
710          */
711         result GetItemIndexFromItemId(int itemId, int& groupIndex, int& itemIndex) const;
712
713         /**
714          * @if OSPDEPREC
715          * Gets the group ID at the specified index.
716          *
717          * @brief       <i> [Deprecated] </i>
718          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
719          * @since               2.0
720          *
721          * @return              The group ID
722          * @param[in]   groupIndex              The group index
723          * @exception   E_SUCCESS               The method is successful.
724          * @exception   E_INVALID_ARG   The specified @c groupIndex is invalid.
725          * @exception   E_SYSTEM                A system error has occurred.
726          * @endif
727          */
728         int GetGroupIdAt(int groupIndex) const;
729
730         /**
731          * @if OSPDEPREC
732          * Gets the group index from the specified group ID.
733          *
734          * @brief       <i> [Deprecated] </i>
735          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
736          * @since               2.0
737          *
738          * @return              The group index
739          * @param[in]   groupId             The ID of the group
740          * @exception   E_SUCCESS               The method is successful.
741          * @exception   E_SYSTEM                A system error has occurred.
742          * @endif
743          */
744         int GetGroupIndexFromGroupId(int groupId) const;
745
746         /**
747          * @if OSPDEPREC
748          * Gets the index of the last item checked.
749          *
750          * @brief       <i> [Deprecated] </i>
751          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
752          * @since               2.0
753          *
754          * @return              An error code
755          * @param[out]  groupIndex              The group index
756          * @param[out]  itemIndex               The item index in the specified group
757          * @exception   E_SUCCESS               The method is successful.
758          * @exception   E_SYSTEM                A system error has occurred.
759          * @endif
760          */
761         result GetLastCheckedItemIndex(int& groupIndex, int& itemIndex) const;
762
763         /**
764          * @if OSPDEPREC
765          * Gets the index of the next checked item.
766          *
767          * @brief       <i> [Deprecated] </i>
768          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
769          * @since                       2.0
770          *
771          * @return                      An error code
772          * @param[in,out]   groupIndex          The group index
773          * @param[in,out]   itemIndex           The item index in the specified group
774          * @exception           E_SUCCESS               The method is successful.
775          * @exception           E_SYSTEM                A system error has occurred.
776          * @endif
777          */
778         result GetNextCheckedItemIndexAfter(int& groupIndex, int& itemIndex) const;
779
780         /**
781          * @if OSPDEPREC
782          * Gets the index of the item at the specified item position.
783          *
784          * @brief       <i> [Deprecated] </i>
785          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
786          * @since               2.0
787          *
788          * @return              An error code
789          * @param[in]   x                               The x position of the point
790          * @param[in]   y                               The y position of the point
791          * @param[out]  groupIndex              The index of the group which the item belongs to
792          * @param[out]  itemIndex               The index of the item
793          * @exception   E_SUCCESS               The method is successful.
794          * @exception   E_SYSTEM        A system error has occurred. @n
795          *                                                              There is no item at the specified position.
796          * @endif
797          */
798         result GetItemIndexFromPosition(int x, int y, int& groupIndex, int& itemIndex) const;
799
800         /**
801          * @if OSPDEPREC
802          * Gets the index of the item at the specified item position.
803          *
804          * @brief       <i> [Deprecated] </i>
805          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
806          * @since               2.0
807          *
808          * @return              An error code
809          * @param[in]   position        The position of the point
810          * @param[out]  groupIndex      The index of the group which the item belongs to
811          * @param[out]  itemIndex       The index of the item
812          * @exception   E_SUCCESS               The method is successful.
813          * @exception   E_SYSTEM        A system error has occurred. @n
814          *                                                              There is no item at the specified position.
815          * @endif
816          */
817         result GetItemIndexFromPosition(const Tizen::Graphics::Point& position, int& groupIndex, int& itemIndex) const;
818
819         /**
820          * @if OSPDEPREC
821          * Gets the index of the current top drawn list item.
822          *
823          * @brief       <i> [Deprecated] </i>
824          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
825          * @since               2.0
826          *
827          * @return              An error code
828          * @param[out]  groupIndex          The group index of the item
829          * @param[out]  itemIndex               The item index of the item
830          * @exception   E_SUCCESS               The method is successful.
831          * @exception   E_SYSTEM                A system error has occurred.
832          * @endif
833          */
834         result GetTopDrawnItemIndex(int& groupIndex, int& itemIndex) const;
835
836         /**
837          * @if OSPDEPREC
838          * Removes all the items of the %GroupedList control.
839          *
840          * @brief       <i> [Deprecated] </i>
841          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
842          * @since               2.0
843          *
844          * @return              An error code
845          * @exception   E_SUCCESS               The method is successful.
846          * @exception   E_SYSTEM                A system error has occurred.
847          * @remarks     The removed list items are deleted from the memory.
848          * @endif
849          */
850         result RemoveAllItems(void);
851
852         /**
853          * @if OSPDEPREC
854          * Removes all the checked items of the %GroupedList control.
855          *
856          * @brief       <i> [Deprecated] </i>
857          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
858          * @since               2.0
859          *
860          * @return              An error code
861          * @exception   E_SUCCESS               The method is successful.
862          * @exception   E_SYSTEM                A system error has occurred.
863          * @remarks     The removed list items are deleted from the memory.
864          * @endif
865          */
866         result RemoveAllCheckedItems(void);
867
868         /**
869          * @if OSPDEPREC
870          * Gets the specified item of the %GroupedList control.
871          *
872          * @brief       <i> [Deprecated] </i>
873          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
874          * @since               2.0
875          *
876          * @return              A custom list item
877          * @param[in]   groupIndex                      The index of the group which the item belongs to
878          * @param[in]   itemIndex                   The index of the item
879          * @exception   E_SUCCESS                       The method is successful.
880          * @exception   E_INVALID_ARG           The specified @c groupIndex or @c itemIndex is invalid.
881          * @exception   E_SYSTEM                        A system error has occurred.
882          * @endif
883          */
884         const CustomListItem* GetItemAt(int groupIndex, int itemIndex) const;
885
886         /**
887          * @if OSPDEPREC
888          * Scrolls to the bottom of the %GroupedList control.
889          *
890          * @brief       <i> [Deprecated] </i>
891          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
892          * @since       2.0
893          * @endif
894          */
895         void ScrollToBottom(void);
896
897         /**
898          * @if OSPDEPREC
899          * Scrolls to the top of the %GroupedList.
900          *
901          * @brief       <i> [Deprecated] </i>
902          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
903          * @since       2.0
904          * @endif
905          */
906         void ScrollToTop(void);
907
908         /**
909          * @if OSPDEPREC
910          * Scrolls to the item at the specified index. @n
911          * The specified item is drawn at the top of the %GroupedList control.
912          *
913          * @brief       <i> [Deprecated] </i>
914          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
915          * @since               2.0
916          *
917          * @return              An error code
918          * @param[in]   groupIndex              The group index
919          * @param[in]   itemIndex               The item index
920          * @exception   E_SUCCESS               The method is successful.
921          * @exception   E_INVALID_ARG   The specified @c groupIndex or @c itemIndex is invalid.
922          * @exception   E_SYSTEM                A system error has occurred.
923          * @endif
924          */
925         result ScrollToTop(int groupIndex, int itemIndex);
926
927         /**
928          * @if OSPDEPREC
929          * Scrolls to the group at the specified index. @n
930          * The specified group is drawn at the top of the %GroupedList control.
931          *
932          * @brief       <i> [Deprecated] </i>
933          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
934          * @since               2.0
935          *
936          * @return              An error code
937          * @param[in]   groupIndex              The group index
938          * @exception   E_SUCCESS               The method is successful.
939          * @exception   E_INVALID_ARG   The specified @c groupIndex is invalid.
940          * @exception   E_SYSTEM                A system error has occurred.
941          * @endif
942          */
943         result ScrollToTop(int groupIndex);
944
945         /**
946          * @if OSPDEPREC
947          * Sets the first index list of scroll by text.
948          *
949          * @brief       <i> [Deprecated] </i>
950          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
951          * @since               2.0
952          *
953          * @return              An error code
954          * @param[in]   text                    The text of the first index
955          * @exception   E_SUCCESS               The method is successful.
956          * @exception   E_SYSTEM                A system error has occurred.
957          * @endif
958          */
959         result SetFastScrollMainIndex(const Tizen::Base::String& text);
960
961         /**
962          * @if OSPDEPREC
963          * Adds the fast scroll event listener.
964          *
965          * @brief       <i> [Deprecated] </i>
966          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
967          * @since               2.0
968          *
969          * @param[in]   listener        The listener to be added
970          * @endif
971          */
972         void AddFastScrollEventListener(Tizen::Ui::IFastScrollEventListener& listener);
973
974         /**
975          * @if OSPDEPREC
976          * Removes the fast scroll event listener.
977          *
978          * @brief       <i> [Deprecated] </i>
979          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
980          * @since               2.0
981          *
982          * @param[in]   listener        The listener to be removed
983          * @endif
984          */
985         void RemoveFastScrollEventListener(Tizen::Ui::IFastScrollEventListener& listener);
986
987         /**
988          * @if OSPDEPREC
989          * Adds the grouped list item event listener.
990          *
991          * @brief       <i> [Deprecated] </i>
992          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
993          * @since               2.0
994          *
995          * @param[in]   listener        The listener to be added
996          * @endif
997          */
998         void AddGroupedItemEventListener(Tizen::Ui::IGroupedItemEventListener& listener);
999
1000         /**
1001          * @if OSPDEPREC
1002          * Removes the grouped list item event listener.
1003          *
1004          * @brief       <i> [Deprecated] </i>
1005          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
1006          * @since               2.0
1007          *
1008          * @param[in]   listener        The listener to be removed
1009          * @endif
1010          */
1011         void RemoveGroupedItemEventListener(Tizen::Ui::IGroupedItemEventListener& listener);
1012
1013         /**
1014          * @if OSPDEPREC
1015          * Gets the index of the first checked list item.
1016          *
1017          * @brief       <i> [Deprecated] </i>
1018          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
1019          * @since               2.0
1020          *
1021          * @return              An error code
1022          * @param[out]  groupIndex          The group index of the item
1023          * @param[out]  itemIndex               The item index of the item
1024          * @exception   E_SUCCESS           The method is successful.
1025          * @exception   E_SYSTEM                A system error has occurred.
1026          * @endif
1027          */
1028         result GetFirstCheckedItemIndex(int& groupIndex, int& itemIndex) const;
1029
1030         /**
1031          * @if OSPDEPREC
1032          * Sets the checked status of all the items of the specified group with the given value.
1033          *
1034          * @brief       <i> [Deprecated] </i>
1035          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
1036          * @since               2.0
1037          *
1038          * @return              An error code
1039          * @param[in]   groupIndex          The group index of the item
1040          * @param[in]   check                   Set to @c true to check all the items, @n
1041          *                                                          else @c false
1042          * @exception   E_SUCCESS           The method is successful.
1043          * @exception   E_INVALID_ARG   The specified @c groupIndex is invalid.
1044          * @exception   E_SYSTEM                A system error has occurred.
1045          * @endif
1046          */
1047         result SetAllItemsChecked(int groupIndex, bool check);
1048
1049         /**
1050          * @if OSPDEPREC
1051          * Gets the index of the current bottom drawn list item.
1052          *
1053          * @brief       <i> [Deprecated] </i>
1054          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
1055          * @since               2.0
1056          *
1057          * @return              An error code
1058          * @param[out]  groupIndex          The group index of the item
1059          * @param[out]  itemIndex               The item index of the item
1060          * @exception   E_SUCCESS           The method is successful.
1061          * @exception   E_SYSTEM                A system error has occurred.
1062          * @endif
1063          */
1064         result GetBottomDrawnItemIndex(int& groupIndex, int& itemIndex) const;
1065
1066         /**
1067          * @if OSPDEPREC
1068          * Draws and shows the item of %GroupedList control.
1069          *
1070          * @brief       <i> [Deprecated] </i>
1071          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
1072          * @since                       2.0
1073          *
1074          * @return              An error code
1075          * @param[in]   groupIndex                      The group index
1076          * @param[in]   itemIndex                       The item index
1077          * @exception   E_SUCCESS                       The method is successful.
1078          * @exception   E_INVALID_ARG           The specified @c groupIndex or @c itemIndex is invalid.
1079          * @exception   E_INVALID_OPERATION     The item has never been drawn before calling this method.
1080          * @exception   E_SYSTEM                        A system error has occurred.
1081          * @endif
1082          */
1083         result RefreshItem(int groupIndex, int itemIndex);
1084
1085         /**
1086          * @if OSPDEPREC
1087          * Draws and shows the group of %GroupedList control.
1088          *
1089          * @brief       <i> [Deprecated] </i>
1090          * @deprecated  This class is deprecated. Instead of using this class, use GroupedListView class.
1091          * @since               2.0
1092          *
1093          * @return              An error code
1094          * @param[in]   groupIndex              The group index
1095          * @exception   E_SUCCESS               The method is successful.
1096          * @exception   E_INVALID_ARG   The specified @c groupIndex is invalid.
1097          * @exception   E_SYSTEM                A system error has occurred.
1098          * @endif
1099          */
1100         result RefreshGroup(int groupIndex);
1101
1102 private:
1103         //
1104         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
1105         //
1106         GroupedList(const GroupedList& rhs);
1107
1108         //
1109         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
1110         //
1111         GroupedList& operator =(const GroupedList& rhs);
1112
1113         friend class _GroupedListImpl;
1114 }; //GroupedList
1115 }}} // Tizen::Ui::Controls
1116 #endif // _FUI_CTRL_GROUPED_LIST_H_