Ref Count implementation at Impl layer for ContextItem
[framework/osp/uifw.git] / inc / FUiCtrlList.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  * @if OSPDEPREC
19  * @file        FUiCtrlList.h
20  * @brief       This is the header file for the %List class.
21  *
22  * This header file contains the declarations of the %List class and its helper classes.
23  * @endif
24  */
25
26 #ifndef _FUI_CTRL_LIST_H_
27 #define _FUI_CTRL_LIST_H_
28
29 #include <FBaseObject.h>
30 #include <FBaseTypes.h>
31 #include <FGrpRectangle.h>
32 #include <FUiControl.h>
33 #include <FUiContainer.h>
34 #include <FUiCtrlListTypes.h>
35 #include <FUiCtrlControlsTypes.h>
36 #include <FUiIItemEventListener.h>
37
38
39 namespace Tizen { namespace Base { namespace Runtime
40 {
41 class IEvent;
42 }}} // Tizen::Base::Runtime
43
44 namespace Tizen { namespace Ui { namespace Controls
45 {
46
47 /**
48  * @if OSPDEPREC
49  * @class       List
50  * @brief               <i> [Deprecated] </i> This class defines the common behavior of the %List control.
51  *
52  * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
53  * @since               2.0
54  *
55  * The %List class defines the common behavior of the %List control.
56  * A list displays the user selection in the form of a list of items. When an item
57  * on the list is selected or deselected, an item event occurs. It is passed on to
58  * any item event listeners that have registered an interest in item events generated
59  * by this list.
60  *
61  * If an application wants to perform something based on a list being selected and
62  * deselected, it must realize IItemEventListener and register the listener to
63  * receive events from this list, by calling the list's AddItemEventListener() method.
64  *
65  * There are several styles supported with differences in the number of columns, rows and
66  * types of data that can be set. The Construct has a parameter for the size of
67  * all 4 aspects of a list item. If the item has less than 2 rows or 2 columns, you
68  * only need to specify the width and height information relevant to the style selected.
69  * Also, the check style causes some space to be taken up on the right side of the list
70  * item. The framework will try to make room for the check from the right-most column,
71  * so the actual width of each column may be different from what you have set.
72  *
73  * @image html ui_controls_list_construct.png
74  *
75  * If the application directly allocates resources, the resources must be deleted
76  * (for example, text or bitmap).
77  *
78  * Example:
79  *
80  * @image html ui_controls_list.png
81  *
82  *
83  * This is a simple UI application which uses a list control.
84  *
85  *
86 * @code
87 //Sample code for ListSample.h
88 #include <FUi.h>
89
90 class ListSample
91         : public Tizen::Ui::Controls::Form
92         , public Tizen::Ui::IItemEventListener
93 {
94 public:
95         ListSample(void)
96         : __pList(null){}
97
98         bool Initialize(void);
99         virtual result OnInitializing(void);
100         virtual void OnItemStateChanged(const Tizen::Ui::Control &source, int index, int itemId, Tizen::Ui::ItemStatus status);
101
102 private:
103         static const int ID_LIST_FIRSTITEM = 101;
104         static const int ID_LIST_SECONDITEM = 102;
105
106         Tizen::Ui::Controls::List* __pList;
107 };
108  *      @endcode
109  *
110  *      @code
111 //Sample code for ListSample.cpp
112 #include <FGraphics.h>
113
114 #include "ListSample.h"
115
116 using namespace Tizen::Base;
117 using namespace Tizen::Ui;
118 using namespace Tizen::Graphics;
119 using namespace Tizen::Ui::Controls;
120
121 bool
122 ListSample::Initialize(void)
123 {
124         Construct(FORM_STYLE_NORMAL);
125         return true;
126 }
127
128 result
129 ListSample::OnInitializing(void)
130 {
131         result r = E_SUCCESS;
132
133         // Creates an instance of List
134         __pList = new List();
135         __pList->Construct(Rectangle(0, 0, GetClientAreaBounds().width, 500),
136                         LIST_STYLE_NORMAL, LIST_ITEM_SINGLE_TEXT, 100, 0, GetClientAreaBounds().width, 0);
137         __pList->AddItemEventListener(*this);
138
139         // Sets Strings
140         String itemText1(L"List Item 1");
141         String itemText2(L"List Item 2");
142
143         // Adds the items to the list
144         __pList->AddItem(&itemText1, null, null, null, ID_LIST_FIRSTITEM);
145         __pList->AddItem(&itemText2, null, null, null, ID_LIST_SECONDITEM);
146
147         // Adds the list to the form
148         AddControl(__pList);
149
150         return r;
151 }
152
153 // IItemEventListener implementation
154 void
155 ListSample::OnItemStateChanged (const Tizen::Ui::Control &source, int index, int itemId, Tizen::Ui::ItemStatus status)
156 {
157         switch (itemId)
158         {
159         case ID_LIST_FIRSTITEM:
160                 {
161                         // ....
162                 }
163                 break;
164         case ID_LIST_SECONDITEM:
165                 {
166                         // ....
167                 }
168                 break;
169         default:
170                 break;
171         }
172 }
173  * @endcode
174  * @endif
175  */
176 class _OSP_EXPORT_ List
177         : public Tizen::Ui::Control
178 {
179 public:
180         /**
181          * @if OSPDEPREC
182          * The object is not fully constructed after this constructor is called.  @n
183          * For full construction, the List::Construct() method must be called right after calling this constructor.
184          *
185          * @brief               <i> [Deprecated] </i>
186          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
187          * @since               2.0
188          * @endif
189          */
190         List(void);
191
192         /**
193          * @if OSPDEPREC
194          * This polymorphic destructor should be overridden if required.@n
195          * This way, the destructors of the derived classes are called when the destructor of this interface is called.
196          *
197          * @brief               <i> [Deprecated] </i>
198          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
199          * @since               2.0
200          * @endif
201          */
202         virtual ~List(void);
203
204         /**
205          * @if OSPDEPREC
206          * Initializes this instance of %List with the specified parameters.
207          *
208          * @brief               <i> [Deprecated] </i>
209          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
210          * @since                                       2.0
211          *
212          * @return              An error code
213          * @param[in]   rect                An instance of the Graphics::Rectangle class @n
214          *                                                          This instance represents the x and y coordinates of the top-left corner of the created list along with
215          *                                                          the width and height of the list.
216          * @param[in]   style                       The style set of the list
217          * @param[in]   itemFormat                  The layout of the list items
218          * @param[in]   row1Height                  The height of the first row
219          * @param[in]   row2Height                  The height of the second row
220          * @param[in]   column1Width            The width of the first column
221          * @param[in]   column2Width            The width of the second column
222          * @exception   E_SUCCESS           The method is successful.
223          * @exception   E_INVALID_ARG       A specified input parameter is invalid.
224          * @exception   E_SYSTEM                    A system error has occurred.
225          * @remarks
226          *                      - A control is fully usable only after it has been added to a container, therefore some methods may fail if used earlier.
227          *                      - If the given size is less than the minimum size, %List is constructed with the minimum size.
228          *                      - When, %List is constructed with ::LIST_STYLE_NUMBER style, the maximum number of items supported is @c 99.
229          *                      - The size of the control must be within the range defined by the minimum size and the maximum size.
230          *                      - The minimum size of this control is 92 x 72 on a WVGA screen, 60 x 48 on a HVGA screen and 46 x 36 on a WQVGA screen.
231          * @endif
232          */
233         result Construct(const Tizen::Graphics::Rectangle& rect, ListStyle style, ListItemFormat itemFormat, int row1Height, int row2Height, int column1Width, int column2Width);
234
235         /**
236          * @if OSPDEPREC
237          * Adds the specified listener instance. @n
238          * The added listener can listen to the item events when they are fired. Only an item event with the ITEM_SELECTED state is fired.
239          *
240          * @brief               <i> [Deprecated] </i>
241          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
242          * @since                       2.0
243          *
244          * @param[in]   listener        The event listener to add
245          * @endif
246          */
247         void AddItemEventListener(Tizen::Ui::IItemEventListener& listener);
248
249         /**
250          * @if OSPDEPREC
251          * Removes the specified listener instance. @n
252          * The removed listener cannot listen to events when they are fired.
253          *
254          * @brief               <i> [Deprecated] </i>
255          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
256          * @since                       2.0
257          *
258          * @param[in]   listener        The event listener to remove
259          * @endif
260          */
261         void RemoveItemEventListener(Tizen::Ui::IItemEventListener& listener);
262
263         /**
264          * @if OSPDEPREC
265          * Adds the item to the current %List instance.
266          *
267          * @brief               <i> [Deprecated] </i>
268          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
269          * @since                       2.0
270          *
271          * @return              An error code
272          * @param[in]   pText1              A pointer to the first string
273          * @param[in]   pText2              A pointer to the second string
274          * @param[in]   pBitmap1            A pointer to the first normal bitmap
275          * @param[in]   pBitmap2            A pointer to the second normal bitmap
276          * @param[in]   itemId              The itemId for this item
277          * @exception   E_SUCCESS               The method is successful.
278          * @exception   E_MAX_EXCEEDED  The number of items has exceeded the maximum limit.
279          * @exception   E_SYSTEM                A system error has occurred.
280          * @remarks
281          *                      - The contents of the specified texts and bitmaps are copied and kept by the list.
282          *                      - If the size of the text exceeds the displayable area, the text will slide automatically when the list item is selected.
283          * @endif
284          */
285         result AddItem(const Tizen::Base::String* pText1, const Tizen::Base::String* pText2, const Tizen::Graphics::Bitmap* pBitmap1, const Tizen::Graphics::Bitmap* pBitmap2, int itemId = LIST_ITEM_UNSPECIFIED_ID);
286
287         /**
288          * @if OSPDEPREC
289          * Inserts the specified item to list, at the specified index.
290          *
291          * @brief               <i> [Deprecated] </i>
292          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
293          * @since                                       2.0
294          *
295          * @return              An error code
296          * @param[in]   index                   The index at which the item is inserted
297          * @param[in]   pText1              A pointer to the first string
298          * @param[in]   pText2              A pointer to the second string
299          * @param[in]   pBitmap1            A pointer to the first normal bitmap
300          * @param[in]   pBitmap2            A pointer to the second normal bitmap
301          * @param[in]   itemId              The item ID for this item
302          * @exception   E_SUCCESS               The method is successful.
303          * @exception   E_OUT_OF_RANGE  The specified @c index is less than @c 0 or greater than the item count.
304          * @exception   E_MAX_EXCEEDED  The number of items has exceeded the maximum limit.
305          * @exception   E_SYSTEM                A system error has occurred.
306          * @remarks
307          *                      - The contents of the specified texts and bitmaps are copied and kept by the list.
308          *                      - If the size of the text exceeds the displayable area, the text will slide automatically when a list item is selected.
309          * @endif
310          */
311         result InsertItemAt(int index, const Tizen::Base::String* pText1, const Tizen::Base::String* pText2, const Tizen::Graphics::Bitmap* pBitmap1, const Tizen::Graphics::Bitmap* pBitmap2, int itemId = LIST_ITEM_UNSPECIFIED_ID);
312
313         /**
314          * @if OSPDEPREC
315          * Sets the contents of the specified item to list at the specified index.
316          *
317          * @brief               <i> [Deprecated] </i>
318          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
319          * @since                                       2.0
320          *
321          * @return              An error code
322          * @param[in]   index                   The index at which the contents of the item is set
323          * @param[in]   pText1                  A pointer to the first string
324          * @param[in]   pText2                  A pointer to the second string
325          * @param[in]   pBitmap1                A pointer to the first normal bitmap
326          * @param[in]   pBitmap2                A pointer to the second normal bitmap
327          * @param[in]   itemId                  The item ID for this item
328          * @exception   E_SUCCESS               The method is successful.
329          * @exception   E_OUT_OF_RANGE          The specified @c index is less than @c 0 or greater than or equal to the item count.
330          * @exception   E_SYSTEM                A system error has occurred.
331          * @remarks
332          *                      - The contents of the specified texts and bitmaps are copied and kept in the list.
333          *                      - If the size of the text exceeds the displayable area, the text will slide automatically when a list item is selected.
334          * @endif
335          */
336         result SetItemAt(int index, const Tizen::Base::String* pText1, const Tizen::Base::String* pText2, const Tizen::Graphics::Bitmap* pBitmap1, const Tizen::Graphics::Bitmap* pBitmap2, int itemId = LIST_ITEM_UNSPECIFIED_ID);
337
338         /**
339          * @if OSPDEPREC
340          * Removes the item at the specified index of the list.
341          *
342          * @brief               <i> [Deprecated] </i>
343          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
344          * @since                       2.0
345          *
346          * @return              An error code
347          * @param[in]   index                   The index at which the item is deleted
348          * @exception   E_SUCCESS               The method is successful.
349          * @exception   E_OUT_OF_RANGE  The specified @c index is less than @c 0 or greater than or equal to the item count.
350          * @exception   E_SYSTEM                A system error has occurred.
351          * @endif
352          */
353         result RemoveItemAt(int index);
354
355         /**
356          * @if OSPDEPREC
357          * Removes all the items of the list.
358          *
359          * @brief               <i> [Deprecated] </i>
360          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
361          * @since                       2.0
362          *
363          * @return              An error code
364          * @exception   E_SUCCESS               The method is successful.
365          * @exception   E_SYSTEM                A system error has occurred.
366          * @endif
367          */
368         result RemoveAllItems(void);
369
370         /**
371          * @if OSPDEPREC
372          * Gets the item count of the list.
373          *
374          * @brief               <i> [Deprecated] </i>
375          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
376          * @since                       2.0
377          *
378          * @return              The number of items in the list
379          * @endif
380          */
381         int GetItemCount(void) const;
382
383         /**
384          * @if OSPDEPREC
385          * Sets the enabled status of the specified item of the list.
386          *
387          * @brief               <i> [Deprecated] </i>
388          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
389          * @since                       2.0
390          *
391          * @return              An error code
392          * @param[in]   index           The index of the list item for which status is set
393          * @param[in]   enable      Set to @c true to enable the item, @n
394          *                                                      else @c false
395          * @exception   E_SUCCESS       The method is successful.
396          * @exception   E_SYSTEM        A system error has occurred.
397          * @endif
398          */
399         result SetItemEnabled(int index, bool enable);
400
401         /**
402          * @if OSPDEPREC
403          * Checks whether the specified item is enabled.
404          *
405          * @brief               <i> [Deprecated] </i>
406          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
407          * @since                       2.0
408          *
409          * @return              @c true if the item is enabled, @n
410          *                              else @c false
411          * @param[in]   index           The index of the list item
412          * @endif
413          */
414         bool IsItemEnabled(int index) const;
415
416         /**
417          * @if OSPDEPREC
418          * Sets the background bitmap image of the focused item.
419          *
420          * @brief               <i> [Deprecated] </i>
421          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
422          * @since                       2.0
423          *
424          * @param[in]   bitmap          The background bitmap of the focused item
425          * @endif
426          */
427         void SetFocusedItemBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap);
428
429         /**
430          * @if OSPDEPREC
431          * Sets the highlighted background image on the rectangle of each list item.
432          *
433          * @brief               <i> [Deprecated] </i>
434          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
435          * @since               2.0
436          *
437          * @param[in]     bitmap            The background image
438          * @remarks             When a user navigates a user interface with directional keys, the selected UI control is highlighted and takes the focus.
439          * @endif
440          */
441         void SetHighlightedItemBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap);
442
443         /**
444          * @if OSPDEPREC
445          * Sets the background image on the rectangle of each list item.
446          *
447          * @brief               <i> [Deprecated] </i>
448          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
449          * @since                       2.0
450          *
451          * @param[in]   bitmap          The background image
452          * @endif
453          */
454         void SetNormalItemBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap);
455
456         /**
457          * @if OSPDEPREC
458          * Gets the index of the top-drawn item of the list.
459          *
460          * @brief               <i> [Deprecated] </i>
461          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
462          * @since                       2.0
463          *
464          * @return              The index of the top-drawn item
465          * @endif
466          */
467         int GetTopDrawnItemIndex(void) const;
468
469         /**
470          * @if OSPDEPREC
471          * Gets the index of the bottom-drawn item of the list.
472          *
473          * @brief               <i> [Deprecated] </i>
474          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
475          * @since                       2.0
476          *
477          * @return              The index of the bottom-drawn item
478          * @endif
479          */
480         int GetBottomDrawnItemIndex(void) const;
481
482         /**
483          * @if OSPDEPREC
484          * Sets the text to be displayed when the list is empty.
485          *
486          * @brief               <i> [Deprecated] </i>
487          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
488          * @since                       2.0
489          *
490          * @param[in]   text    The text message to display
491          * @endif
492          */
493         void SetTextOfEmptyList(const Tizen::Base::String& text);
494
495         /**
496          * @if OSPDEPREC
497          * Sets the color of the text that is displayed when the list is empty.
498          *
499          * @brief               <i> [Deprecated] </i>
500          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
501          * @since                               2.0
502          *
503          * @param[in]       color       The color of the text for an empty List
504          * @endif
505          */
506         void SetTextColorOfEmptyList(const Tizen::Graphics::Color& color);
507
508         /**
509          * @if OSPDEPREC
510          * Gets the color of the empty text that is displayed when the list is empty.
511          *
512          * @brief               <i> [Deprecated] </i>
513          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
514          * @since                       2.0
515          *
516          * @return              The empty text color, @n
517          *                              else RGBA(0, 0, 0, 0) if the instance is invalid
518          * @endif
519          */
520         Tizen::Graphics::Color GetTextColorOfEmptyList(void) const;
521
522         /**
523          * @if OSPDEPREC
524          * Sets the background color of this control.
525          *
526          * @brief               <i> [Deprecated] </i>
527          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
528          * @since                 2.0
529          *
530          * @param[in]     color    The background color
531          * @endif
532          */
533         void SetBackgroundColor(const Tizen::Graphics::Color& color);
534
535         /**
536          * @if OSPDEPREC
537          * Sets the item text color.
538          *
539          * @brief               <i> [Deprecated] </i>
540          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
541          * @since                                       2.0
542          *
543          * @param[in]   textIndex The index of the text
544          * @param[in]   textColor The color of the text
545          * @endif
546          */
547         void SetItemTextColor(ListItemText textIndex, const Tizen::Graphics::Color& textColor);
548
549         /**
550          * @if OSPDEPREC
551          * Gets the text color of item.
552          *
553          * @brief               <i> [Deprecated] </i>
554          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
555          * @since                               2.0
556          *
557          * @return      The item text color
558          * @param[in]   textIndex The index of the text, @n
559          *                              else RGBA(0, 0, 0, 0) if the instance is invalid
560          * @endif
561          */
562         Tizen::Graphics::Color GetItemTextColor(ListItemText textIndex) const;
563
564         /**
565          * @if OSPDEPREC
566          * Enables the text slide.
567          *
568          * @brief               <i> [Deprecated] </i>
569          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
570          * @since                       2.0
571          *
572          * @param[in] textIndex  The text index of the list item format to slide
573          * @remarks             If text slide is enabled, the texts which are too long to fit in the given list item slide show the remnant contents when a user touches
574          *                              the item for a long time.
575          * @endif
576          */
577         void EnableTextSlide(ListItemText textIndex);
578
579         /**
580          * @if OSPDEPREC
581          * Disables the text sliding.
582          *
583          * @brief               <i> [Deprecated] </i>
584          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
585          * @since               2.0
586          * @endif
587          */
588         void DisableTextSlide(void);
589
590         /**
591          * @if OSPDEPREC
592          * Gets the height of the list item.
593          *
594          * @brief               <i> [Deprecated] </i>
595          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
596          * @since                       2.0
597          *
598          * @return              The height of the item
599          * @endif
600          */
601         int GetItemHeight(void) const;
602
603         /**
604          * @if OSPDEPREC
605          * Gets the row1 height of the current list
606          *
607          * @brief               <i> [Deprecated] </i>
608          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
609          * @since                       2.0
610          *
611          * @return              The row1 height of the item
612          * @endif
613          */
614         int GetRow1Height(void) const;
615
616         /**
617          * @if OSPDEPREC
618          * Gets the row2 height of the current list
619          *
620          * @brief               <i> [Deprecated] </i>
621          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
622          * @since                       2.0
623          *
624          * @return              The row2 height of the item
625          * @endif
626          */
627         int GetRow2Height(void) const;
628
629         /**
630          * @if OSPDEPREC
631          * Gets the column1 width of the current list
632          *
633          * @brief               <i> [Deprecated] </i>
634          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
635          * @since                       2.0
636          *
637          * @return              The column1 width of the item
638          * @endif
639          */
640         int GetColumn1Width(void) const;
641
642         /**
643          * @if OSPDEPREC
644          * Gets the column2 width of the current list
645          *
646          * @brief               <i> [Deprecated] </i>
647          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
648          * @since                       2.0
649          *
650          * @return              The column2 width of the item
651          * @endif
652          */
653         int GetColumn2Width(void) const;
654
655         /**
656          * @if OSPDEPREC
657          * Sets the row1 height of the current List
658          *
659          * @brief               <i> [Deprecated] </i>
660          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
661          * @since                                       2.0
662          *
663          * @return              An error code
664          * @param[in]   row1Height              The row1 height of the list item
665          * @exception   E_SUCCESS       The method is successful.
666          * @exception   E_SYSTEM                A system error has occurred.
667          * @remarks             In logical pixels, the minimum height of the rows is 48.
668          * @endif
669          */
670         result SetRow1Height(int row1Height);
671
672         /**
673          * @if OSPDEPREC
674          * Sets the row2 height of the current list.
675          *
676          * @brief               <i> [Deprecated] </i>
677          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
678          * @since                                       2.0
679          *
680          * @return              An error code
681          * @param[in]   row2Height      The row2 height of the list item
682          * @exception   E_SUCCESS       The method is successful.
683          * @exception   E_SYSTEM        A system error has occurred.
684          * @remarks             In logical pixels, the minimum height of the rows is 48.
685          * @endif
686          */
687         result SetRow2Height(int row2Height);
688
689         /**
690          * @if OSPDEPREC
691          * Sets the column1 width of the current %List
692          *
693          * @brief               <i> [Deprecated] </i>
694          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
695          * @since                                       2.0
696          *
697          * @return              An error code
698          * @param[in]   column1Width            The column1 width of the list item
699          * @exception   E_SUCCESS                       The method is successful.
700          * @exception   E_SYSTEM                        A system error has occurred.
701          * @endif
702          */
703         result SetColumn1Width(int column1Width);
704
705         /**
706          * @if OSPDEPREC
707          * Sets the column2 width of the current %List
708          *
709          * @brief               <i> [Deprecated] </i>
710          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
711          * @since                                       2.0
712          *
713          * @return              An error code
714          * @param[in]   column2Width    The column2 width of the list item
715          * @exception   E_SUCCESS               The method is successful.
716          * @exception   E_SYSTEM                A system error has occurred.
717          * @endif
718          */
719         result SetColumn2Width(int column2Width);
720
721         /**
722          * @if OSPDEPREC
723          * Sets the check status of the specified item of the list.
724          *
725          * @brief               <i> [Deprecated] </i>
726          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
727          * @since                               2.0
728          *
729          * @return                      An error code
730          * @param[in]   index       The index of the list
731          * @param[in]   check       The check status
732          * @exception   E_SUCCESS   The method is successful.
733          * @exception   E_SYSTEM    A system error has occurred.
734          *
735          * @remarks     This method can only be used when the style of the list allows selection.
736          * @endif
737          */
738         result SetItemChecked(int index, bool check);
739
740         /**
741          * @if OSPDEPREC
742          * Checks whether the specified item of the list is checked.
743          *
744          * @brief               <i> [Deprecated] </i>
745          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
746          * @since                       2.0
747          *
748          * @return              @c true if the item is checked, @n
749          *                              else @c false
750          * @param[in]   index           The index of the list item
751          *
752          * @remarks             This method can only be used when the style of the list allows selection.
753          * @endif
754          */
755         bool IsItemChecked(int index) const;
756
757         /**
758          * @if OSPDEPREC
759          * Sets the checked status of all the items of the list.
760          *
761          * @brief               <i> [Deprecated] </i>
762          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
763          * @since                                       2.0
764          *
765          * @return              An error code
766          * @param[in]   check                   Set to @c true to check all the items, @n
767          *                                                              else @c false
768          * @exception   E_SUCCESS               The method is successful.
769          * @exception   E_SYSTEM                A system error has occurred.
770          * @remarks     This method can only be used when the style of the list allows multiple selections.
771          * @endif
772          */
773         result SetAllItemsChecked(bool check);
774
775         /**
776          * @if OSPDEPREC
777          * Removes all the checked items of the list.
778          *
779          * @brief               <i> [Deprecated] </i>
780          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
781          * @since                                               2.0
782          *
783          * @return      An error code
784          * @exception   E_SUCCESS               The method is successful.
785          * @exception   E_SYSTEM        A system error has occurred.
786          * @remarks     This method can only be used when the style of the list allows multiple selections.
787          * @endif
788          */
789         result RemoveAllCheckedItems(void);
790
791         /**
792          * @if OSPDEPREC
793          * Gets the index of the first checked item from the list.
794          *
795          * @brief               <i> [Deprecated] </i>
796          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
797          * @since                       2.0
798          *
799          * @return              The index of the first checked item
800          * @remarks         This method can only be used when the style of the list allows multiple selections.
801          * @endif
802          */
803         int GetFirstCheckedItemIndex(void) const;
804
805         /**
806          * @if OSPDEPREC
807          * Gets the index of the last checked item from the list.
808          *
809          * @brief               <i> [Deprecated] </i>
810          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
811          * @since                       2.0
812          *
813          * @return              The index of the last checked item
814          * @remarks             This method can only be used when the style of the list allows multiple selections.
815          * @endif
816          */
817         int GetLastCheckedItemIndex(void) const;
818
819         /**
820          * @if OSPDEPREC
821          * Gets the index of the next checked item after the specified index from the list.
822          *
823          * @brief               <i> [Deprecated] </i>
824          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
825          * @since                       2.0
826          *
827          * @return              The index of the next checked item
828          * @param[in]   index           The index of the item
829          * @remarks             This method can only be used when the style of the list allows multiple selections.
830          * @endif
831          */
832         int GetNextCheckedItemIndexAfter(int index) const;
833
834         /**
835          * @if OSPDEPREC
836          * Gets the index of the item with the specified item ID.
837          *
838          * @brief               <i> [Deprecated] </i>
839          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
840          * @since                       2.0
841          *
842          * @return              The index of the item
843          * @param[in]   itemId          The item ID of the list
844          * @remarks             The method returns -1 when there is no list item with the specified item ID.
845          * @endif
846          */
847         int GetItemIndexFromItemId(int itemId) const;
848
849         /**
850          * @if OSPDEPREC
851          * Gets the index of the item at the specified item position.
852          *
853          * @brief               <i> [Deprecated] </i>
854          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
855          * @since               2.0
856          *
857          * @return              The index of the item, @n
858          *                              else @c -1 if there is no list item at the specified position
859          * @param[in]   x   The x position of the point
860          * @param[in]   y   The y position of the point
861          * @endif
862          */
863         int GetItemIndexFromPosition(int x, int y) const;
864
865         /**
866          * @if OSPDEPREC
867          * Gets the index of the item at the specified item position.
868          *
869          * @brief               <i> [Deprecated] </i>
870          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
871          * @since               2.0
872          *
873          * @return              The index of the item, @n
874          *                              else @c -1 if there is no list item at the specified position
875          * @param[in]   position    The position of the point
876          * @endif
877          */
878         int GetItemIndexFromPosition(const Tizen::Graphics::Point& position) const;
879
880         /**
881          * @if OSPDEPREC
882          * Gets the item ID of the item at the specified index.
883          *
884          * @brief               <i> [Deprecated] </i>
885          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
886          * @since               2.0
887          *
888          * @return      The ID of the item, @n
889          *                              else @c -1 if there is no list item at the specified index
890          * @param[in]   index           The index of the list item
891          * @endif
892          */
893         int GetItemIdAt(int index) const;
894
895         /**
896          * @if OSPDEPREC
897          * Scrolls to the bottom of the List.
898          *
899          * @brief               <i> [Deprecated] </i>
900          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
901          * @since               2.0
902          * @endif
903          */
904         void ScrollToBottom(void);
905
906         /**
907          * @if OSPDEPREC
908          * Scrolls to the top of the List.
909          *
910          * @brief               <i> [Deprecated] </i>
911          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
912          * @since               2.0
913          * @endif
914          */
915         void ScrollToTop(void);
916
917         /**
918          * @if OSPDEPREC
919          * Scrolls to the item at the specified index. @n
920          * The specified item is drawn at the top of the list.
921          *
922          * @brief               <i> [Deprecated] </i>
923          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
924          * @since                       2.0
925          *
926          * @return              An error code
927          * @param[in]   index                   The index of the list item
928          * @exception   E_SUCCESS               The method is successful.
929          * @exception   E_SYSTEM                A system error has occurred.
930          * @exception   E_INVALID_ARG   The specified input parameter is invalid.
931          * @endif
932          */
933         result ScrollToTop(int index);
934
935         /**
936          * @if OSPDEPREC
937          * Draws and shows the item of the list.
938          *
939          * @brief               <i> [Deprecated] </i>
940          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
941          * @since                       2.0
942          *
943          * @return              An error code
944          * @param[in]   index                   The index of the list item
945          * @exception   E_SUCCESS               The method is successful.
946          * @exception   E_SYSTEM                A system error has occurred.
947          * @exception   E_INVALID_ARG   The specified input parameter is invalid.
948          * @endif
949          */
950         result RefreshItem(int index);
951
952
953 private:
954         //
955         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
956         //
957         List(const List& rhs);
958
959         //
960         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
961         //
962         List& operator =(const List& rhs);
963
964         friend class _ListImpl;
965 }; //List
966
967 }}} // Tizen::Ui::Controls
968
969 #endif // _FUI_CTRL_LIST_H_