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