Merge "Fix Ime Rotation" into tizen_2.1
[platform/framework/native/uifw.git] / inc / FUiCtrlSlidableList.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        FUiCtrlSlidableList.h
20  * @brief       This is the header file for the %SlidableList class.
21  *
22  * This header file contains the declarations of the %SlidableList class and its helper classes.
23  */
24
25 #ifndef _FUI_CTRL_SLIDABLE_LIST_H_
26 #define _FUI_CTRL_SLIDABLE_LIST_H_
27
28 //Includes
29 #include <FBaseObject.h>
30 #include <FBaseTypes.h>
31 #include <FUiCtrlIListViewItemProvider.h>
32 #include <FUiCtrlIListViewItemEventListener.h>
33 #include <FUiCtrlIFastScrollListener.h>
34 #include <FUiCtrlIScrollEventListener.h>
35 #include <FUiCtrlListTypes.h>
36 #include <FUiCtrlCustomList.h>
37 #include <FUiCtrlCustomListItem.h>
38 #include <FUiISlidableListEventListener.h>
39 #include <FUiCtrlCustomListItem.h>
40
41
42 namespace Tizen { namespace Base { namespace Runtime
43 {
44 class IEvent;
45 }}} // Tizen::Base::Runtime
46
47 namespace Tizen { namespace Ui { namespace Controls
48 {
49
50 /**
51  * @if OSPDEPREC
52  * @class       SlidableList
53  * @brief               <i> [Deprecated] </i> This class defines the common behavior of a %SlidableList control.
54  *
55  * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
56  * @since               2.0
57  *
58  * The %SlidableList class represents a list which loads items on demand and
59  * unloads unused items to save memory. The operation of %SlidableList is the same
60  * as that of a List, except that a %SlidableList does not hold all the items in the memory.
61  * Most of the item manipulations are available when they are loaded, but the check
62  * state is maintained for all items whether they are loaded or not.
63  * ISlidableListEventListener must be implemented so that an application can be
64  * notified when items need to be loaded as the user scrolls through a list.
65  * If an application wants to perform tasks when the state of a list item is changed,
66  * then it must implement ICustomItemEventListener and register it to the slidable list,
67  * It will then receive related events from %SlidableList.
68  *
69  * Note that CustomListItem and CustomListItemFormat need to be created on a heap. CustomListItems will be deleted automatically
70  * when the %SlidableList itself is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). CustomListItemFormat
71  * must be deleted by the application.
72  *
73  * Refer to CustomListItem and CustomListItemFormat.
74  *
75  * Example:
76  *
77  * @image html ui_controls_slidablelist.png
78  *
79  * This is the simple UI application which uses a %SlidableList control.
80  *
81  * @code
82 // Sample code for SlidableListSample.h
83 #include <FUi.h>
84
85 class SlidableListSample
86         : public Tizen::Ui::Controls::Form
87         , public Tizen::Ui::ICustomItemEventListener
88         , public Tizen::Ui::ISlidableListEventListener
89 {
90 public:
91         SlidableListSample(void)
92         : __pSlidableList(null)
93         , __pCustomListItemFormat(null){}
94
95         bool Initialize(void);
96         Tizen::Ui::Controls::CustomListItem* CreateListItem(Tizen::Base::String itemText,
97                                         Tizen::Graphics::Bitmap* pBitmapNormal, Tizen::Graphics::Bitmap* pBitmapFocused);
98
99         virtual result OnInitializing(void);
100         virtual result OnTerminating(void);
101
102         // ICustomItemEventListener
103         virtual void OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, Tizen::Ui::ItemStatus status);
104         virtual void OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, int elementId, Tizen::Ui::ItemStatus status);
105
106         // ISlidableEventListener
107         virtual void OnListPropertyRequested (const Tizen::Ui::Control &source);
108         virtual void OnLoadToTopRequested(const Tizen::Ui::Control &source, int index, int numItems);
109         virtual void OnLoadToBottomRequested(const Tizen::Ui::Control &source, int index, int numItems);
110         virtual void OnUnloadItemRequested(const Tizen::Ui::Control& source, int itemIndex);
111
112 private:
113         static const int ID_LIST_TEXT  = 101;
114         static const int ID_LIST_BITMAP = 102;
115         static const int ITEM_COUNT = 100;
116         static const int ITEM_HEIGHT = 100;
117
118         Tizen::Ui::Controls::SlidableList* __pSlidableList;
119         Tizen::Ui::Controls::CustomListItemFormat* __pCustomListItemFormat;
120 };
121  *      @endcode
122  *
123  *      @code
124 // Sample code for SlidableListSample.cpp
125 #include <FApp.h>
126 #include <FGraphics.h>
127
128 #include "SlidableListSample.h"
129
130 using namespace Tizen::App;
131 using namespace Tizen::Base;
132 using namespace Tizen::Ui;
133 using namespace Controls;
134 using namespace Tizen::Graphics;
135
136 bool
137 SlidableListSample::Initialize(void)
138 {
139         Construct(FORM_STYLE_NORMAL);
140         return true;
141 }
142
143 result
144 SlidableListSample::OnInitializing(void)
145 {
146         result r = E_SUCCESS;
147
148         // Creates an instance of SlidableList
149         __pSlidableList = new SlidableList();
150         __pSlidableList->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height), CUSTOM_LIST_STYLE_NORMAL);
151         __pSlidableList->AddCustomItemEventListener(*this);
152         __pSlidableList->AddSlidableListEventListener(*this);
153
154         // Creates an instance of CustomListItemFormat of the slidable list
155         __pCustomListItemFormat = new CustomListItemFormat();
156         __pCustomListItemFormat->Construct();
157         __pCustomListItemFormat->AddElement(ID_LIST_TEXT, Rectangle(10, 25, 200, 80));
158         __pCustomListItemFormat->AddElement(ID_LIST_BITMAP, Rectangle(220, 10, 70, 80));
159
160         // Adds the slidable list to the form
161         AddControl(*__pSlidableList);
162
163         return r;
164 }
165
166 result
167 SlidableListSample::OnTerminating(void)
168 {
169         result r = E_SUCCESS;
170
171         // Deallocates the item format
172         delete __pCustomListItemFormat;
173
174         return r;
175 }
176
177 CustomListItem*
178 SlidableListSample::CreateListItem(String itemText, Bitmap* pBitmapNormal, Bitmap* pBitmapFocused)
179 {
180         CustomListItem* pItem = new CustomListItem();
181
182         pItem->Construct(ITEM_HEIGHT);
183         pItem->SetItemFormat(*__pCustomListItemFormat);
184         pItem->SetElement(ID_LIST_TEXT, itemText);
185         pItem->SetElement(ID_LIST_BITMAP, *pBitmapNormal, pBitmapFocused);
186
187         return pItem;
188 }
189
190 // ICustomItemEventListener implementation
191 void
192 SlidableListSample::OnItemStateChanged(const Control& source, int index, int itemId, ItemStatus status)
193 {
194         switch (itemId)
195         {
196         case 1:
197                 {
198                         // ....
199                 }
200                 break;
201         default:
202                 break;
203         }
204 }
205
206 void
207 SlidableListSample::OnItemStateChanged(const Control& source, int index, int itemId, int elementId, ItemStatus status)
208 {
209         switch (itemId)
210         {
211         case 1:
212                 {
213                         switch (elementId)
214                         {
215                         case ID_LIST_TEXT:
216                                 {
217                                         // ....
218                                 }
219                                 break;
220                         case ID_LIST_BITMAP:
221                                 {
222                                         // ....
223                                 }
224                                 break;
225                         default:
226                                 break;
227                         }
228                 }
229                 break;
230         default:
231                 break;
232         }
233 }
234
235 // ISlidableEventListener implementation
236 void
237 SlidableListSample::OnListPropertyRequested (const Control &source)
238 {
239         // Sets the total count and the height of items
240         __pSlidableList->SetItemCountAndHeight(ITEM_COUNT, ITEM_COUNT * ITEM_HEIGHT);
241 }
242
243 void
244 SlidableListSample::OnLoadToTopRequested(const Control &source, int index, int numItems)
245 {
246         // Gets instances of Bitmap
247         AppResource *pAppResource = Application::GetInstance()->GetAppResource();
248         Bitmap *pBitmapNormal  = pAppResource->GetBitmapN(L"tizen.png");
249         Bitmap *pBitmapFocused = pAppResource->GetBitmapN(L"tizen.png");
250
251         // Creates items of the slidable list
252         for(int i = index; i > index - numItems; i--)
253         {
254                 String itemText = "ITEM_";
255                 itemText.Append(i);
256                 __pSlidableList->LoadItemToTop(*CreateListItem(itemText, pBitmapNormal, pBitmapFocused), i+1);
257         }
258
259         // Deallocates bitmaps
260         delete pBitmapNormal;
261         delete pBitmapFocused;
262 }
263
264 void
265 SlidableListSample::OnLoadToBottomRequested (const Control &source, int index, int numItems)
266 {
267         // Gets instances of Bitmap
268         AppResource *pAppResource = Application::GetInstance()->GetAppResource();
269         Bitmap *pBitmapNormal  = pAppResource->GetBitmapN(L"tizen.png");
270         Bitmap *pBitmapFocused = pAppResource->GetBitmapN(L"tizen.png");
271
272         // Creates items of the slidable list
273         for(int i = index; i < index + numItems; i++)
274         {
275                 String itemText = L"ITEM_";
276                 itemText.Append(i);
277                 __pSlidableList->LoadItemToBottom(*CreateListItem(itemText, pBitmapNormal, pBitmapFocused), i+1);
278         }
279
280         // Deallocates bitmaps
281         delete pBitmapNormal;
282         delete pBitmapFocused;
283 }
284
285 void
286 SlidableListSample::OnUnloadItemRequested(const Control& source, int itemIndex)
287 {
288         // Releases resources of the specified item
289         // ....
290 }
291  * @endcode
292  * @endif
293  */
294 class _OSP_EXPORT_ SlidableList
295         : public Tizen::Ui::Control
296 {
297 public:
298         /**
299          * @if OSPDEPREC
300          * 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.
301          *
302          * @brief               <i> [Deprecated] </i>
303          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
304          * @since                       2.0
305          * @endif
306          */
307         SlidableList(void);
308
309         /**
310          * @if OSPDEPREC
311          * 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.
312          *
313          * @brief               <i> [Deprecated] </i>
314          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
315          * @since                       2.0
316          * @endif
317          */
318         virtual ~SlidableList(void);
319
320 // Operation
321
322         /**
323          * @if OSPDEPREC
324          * Initializes this instance of %SlidableList with the specified parameters.
325          *
326          * @brief               <i> [Deprecated] </i>
327          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
328          * @since                       2.0
329          *
330          * @return              An error code
331          * @param[in]   rect                    This instance represents the X and Y coordinates of the top-left corner of the created %SlidableList along with the width and height
332          * @param[in]   style                   The style set of %CustomList
333          * @param[in]   itemDivider             Set to @c true to display an item divider, @n
334          *                                                              else @c false
335          * @exception   E_SUCCESS               The method is successful.
336          * @exception E_INVALID_ARG     A specified input parameter is invalid. @n
337          *                              Either the @c rect.width or the @c rect.height is @c 0 or negative.
338          * @exception   E_SYSTEM                The method has failed.
339          * @remarks     The size of the control must be within the range defined by the minimum size and the maximum size.
340          * @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.
341          *
342          * @endif
343          */
344         result Construct(const Tizen::Graphics::Rectangle& rect, CustomListStyle style, bool itemDivider = true);
345
346         /**
347          * @if OSPDEPREC
348          * Adds a listener instance.
349          * The added listener can listen to events on the context of the given event dispatcher when they are fired.
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          * @param[in]   listener        The event listener to add
356          * @endif
357          */
358         void AddSlidableListEventListener(Tizen::Ui::ISlidableListEventListener& listener);
359
360         /**
361          * @if OSPDEPREC
362          * Removes a listener instance.
363          * The removed listener cannot listen to events when they are fired.
364          *
365          * @brief               <i> [Deprecated] </i>
366          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
367          * @since                       2.0
368          *
369          * @param[in]   listener        The event listener to remove
370          * @endif
371          */
372         void RemoveSlidableListEventListener(Tizen::Ui::ISlidableListEventListener& listener);
373
374         /**
375          * @if OSPDEPREC
376          * Adds a listener instance. @n
377          * The added listener can listen to events on the context of the given event dispatcher when they are fired.
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          * @param[in]   listener        The event listener to add
384          * @endif
385          */
386         void AddCustomItemEventListener(Tizen::Ui::ICustomItemEventListener& listener);
387
388         /**
389          * @if OSPDEPREC
390          * Adds the specified item to the %SlidableList control.
391          *
392          * @brief               <i> [Deprecated] </i>
393          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
394          * @since                       2.0
395          *
396          * @return              An error code
397          * @param[in]   item                    The CustomListItem to add
398          * @param[in]   itemId                  The item ID
399          * @exception   E_SUCCESS               The method is successful.
400          * @exception   E_SYSTEM                A system error has occurred.
401          * @remarks     The added item is deleted automatically when the list is destroyed. @n
402          *                              Do not add, insert, or set an item which already belongs to %SlidableList.
403          * @endif
404          */
405         result AddItem(const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
406
407         /**
408          * @if OSPDEPREC
409          * Gets the index of the bottom drawn item from the %SlidableList control.
410          *
411          * @brief               <i> [Deprecated] </i>
412          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
413          * @since                       2.0
414          *
415          * @return              An integer value representing the index of the bottom drawn item
416          * @endif
417          */
418         int GetBottomDrawnItemIndex(void) const;
419
420         /**
421          * @if OSPDEPREC
422          * Gets the first item of all the checked items in the %SlidableList control.
423          *
424          * @brief               <i> [Deprecated] </i>
425          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
426          * @since                       2.0
427          *
428          * @return              The index of the first selected item
429          * @remarks   This method can only be used when the style of the list allows multiple selections.
430          * @endif
431          */
432         int GetFirstCheckedItemIndex(void) const;
433
434         /**
435          * @if OSPDEPREC
436          * Gets the count of the number of items in the %SlidableList control.
437          *
438          * @brief               <i> [Deprecated] </i>
439          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
440          * @since                       2.0
441          *
442          * @return              The number of items in the %SlidableList control
443          * @endif
444          */
445         int GetItemCount(void) const;
446
447         /**
448          * @if OSPDEPREC
449          * Gets the last item of all the checked items in the %SlidableList control.
450          *
451          * @brief               <i> [Deprecated] </i>
452          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
453          * @since                       2.0
454          *
455          * @return              The index of the last selected item
456          * @remarks             This method can only be used when the style of the list allows multiple selections.
457          * @endif
458          */
459         int GetLastCheckedItemIndex(void) const;
460
461         /**
462          * @if OSPDEPREC
463          * Gets the radio checked item of the %SlidableList control.
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 next item index
470          * @param[in]   index   The item index
471          * @remarks             This method can only be used when the style of the list allows multiple selections.
472          * @endif
473          */
474         int GetNextCheckedItemIndexAfter(int index) const;
475
476         /**
477          * @if OSPDEPREC
478          * Gets the index of the top drawn item of the %SlidableList control.
479          *
480          * @brief               <i> [Deprecated] </i>
481          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
482          * @since                       2.0
483          *
484          * @return              The index of the top drawn item
485          * @endif
486          */
487         int GetTopDrawnItemIndex(void) const;
488
489         /**
490          * @if OSPDEPREC
491          * Inserts the specified item in the %SlidableList control.
492          *
493          * @brief               <i> [Deprecated] </i>
494          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
495          * @since                       2.0
496          *
497          * @return              An error code
498          * @param[in]   index           The item index at which to insert the item
499          * @param[in]   item            The CustomListItem instance to insert
500          * @param[in]   itemId              The item ID for this item
501          * @exception   E_SUCCESS               The method is successful.
502          * @exception   E_INVALID_ARG   The specified @c index is less than @c 0 or greater than the item count.
503          * @exception   E_SYSTEM                A system error has occurred.
504          * @remarks   The inserted item is deleted automatically when the list is destroyed.
505          *                              Do not add, insert, or set an item that already belongs to %SlidableList.
506          * @endif
507          */
508         result InsertItemAt(int index, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
509
510         /**
511          * @if OSPDEPREC
512          * Removes all the items of the %SlidableList control.
513          *
514          * @brief               <i> [Deprecated] </i>
515          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
516          * @since                       2.0
517          *
518          * @return              An error code
519          * @exception   E_SUCCESS               The method is successful.
520          * @exception   E_SYSTEM                A system error has occurred.
521          * @remarks    The removed list items are deleted from the memory.
522          * @remarks             After items have been removed, the ISlidableListEventListener::OnListPropertyRequested() method is called.
523          * @see                         ISlidableListEventListener
524          * @endif
525          */
526         result RemoveAllItems(void);
527
528         /**
529          * @if OSPDEPREC
530          * Removes a listener instance. @n
531          * The removed listener cannot listen to events when they are fired.
532          *
533          * @brief               <i> [Deprecated] </i>
534          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
535          * @since                       2.0
536          *
537          * @param[in]   listener        The event listener to remove
538          * @endif
539          */
540         void RemoveCustomItemEventListener(Tizen::Ui::ICustomItemEventListener& listener);
541
542         /**
543          * @if OSPDEPREC
544          * Scrolls to the bottom of the %SlidableList control.
545          *
546          * @brief               <i> [Deprecated] </i>
547          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
548          * @since                       2.0
549          * @endif
550          */
551         void ScrollToBottom(void);
552
553         /**
554          * @if OSPDEPREC
555          * Scrolls to the top of the %SlidableList control.
556          *
557          * @brief               <i> [Deprecated] </i>
558          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
559          * @since                       2.0
560          * @endif
561          */
562         void ScrollToTop(void);
563
564         /**
565          * @if OSPDEPREC
566          * Scrolls to the item at the specified index. @n
567          * The specified item is drawn at the top of the %SlidableList control.
568          *
569          * @brief               <i> [Deprecated] </i>
570          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
571          * @since                       2.0
572          *
573          * @return              An error code
574          * @param[in]   index                   The item index
575          * @exception   E_SUCCESS               The method is successful.
576          * @exception   E_SYSTEM                A system error has occurred.
577          * @exception   E_INVALID_ARG   The specified input parameter is invalid.
578          * @endif
579          */
580         result ScrollToTop(int index);
581
582         /**
583          * @if OSPDEPREC
584          * Sets the check status for all items of the %SlidableList control.
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              An error code
591          * @param[in]   check           Set to @c true to check all the items, @n
592          *                                                      else @c false
593          * @exception   E_SUCCESS       The method is successful.
594          * @exception   E_SYSTEM        A system error has occurred.
595          * @remarks This method can only be used when the style of the list allows multiple selections.
596          * @endif
597          */
598         result SetAllItemsChecked(bool check);
599
600         /**
601          * @if OSPDEPREC
602          * Sets the check status of the item at the specified index of the %SlidableList control.
603          *
604          * @brief               <i> [Deprecated] </i>
605          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
606          * @since                                       2.0
607          *
608          * @return                      An error code
609          * @param[in]   index           The item index
610          * @param[in]   check           The check status
611          * @exception   E_SUCCESS       The method is successful.
612          * @exception   E_SYSTEM        A system error has occurred.
613          *
614          * @remarks      This method can only be used when the style of the list allows selection.
615          * @endif
616          */
617         result SetItemChecked(int index, bool check);
618
619         /**
620          * @if OSPDEPREC
621          * Enables or disables the status of the item at the specified index of the %SlidableList control.
622          *
623          * @brief               <i> [Deprecated] </i>
624          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
625          * @since                               2.0
626          *
627          * @return                      An error code
628          * @param[in]   index           The item index
629          * @param[in]   enable      Set to @c true to enable, @n
630          *                                                  else @c false
631          * @exception   E_SUCCESS       The method is successful.
632          * @exception   E_SYSTEM        A system error has occurred.
633          *
634          * @endif
635          */
636         result SetLoadedItemEnabled(int index, bool enable);
637
638         /**
639          * @if OSPDEPREC
640          * Sets the background color of the %SlidableList control.
641          *
642          * @brief               <i> [Deprecated] </i>
643          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
644          * @since               2.0
645          *
646          * @param[in]     color    The background color
647          * @endif
648          */
649         void SetBackgroundColor(const Tizen::Graphics::Color& color);
650
651         /**
652          * @if OSPDEPREC
653          * Sets the text to display in the absence of a %SlidableList item.
654          *
655          * @brief               <i> [Deprecated] </i>
656          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
657          * @since                       2.0
658          *
659          * @param[in] text              The text message
660          * @endif
661          */
662         void SetTextOfEmptyList(const Tizen::Base::String& text);
663
664         /**
665          * @if OSPDEPREC
666          * Sets a color of the text to display in the absence of a %SlidableList item.
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          * @param[in]   color   The color of the text to display
673          * @endif
674          */
675         void SetTextColorOfEmptyList(const Tizen::Graphics::Color& color);
676
677         /**
678          * @if OSPDEPREC
679          * Gets a color of the text to display in the absence of a %SlidableList item.
680          *
681          * @brief               <i> [Deprecated] </i>
682          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
683          * @since  2.0
684          *
685          * @return      The color of the text to be displayed
686          * @endif
687          */
688         Tizen::Graphics::Color GetTextColorOfEmptyList(void) const;
689
690         /**
691          * @if OSPDEPREC
692          * Gets the loaded item at the specified index of the %SlidableList control.
693          *
694          * @brief               <i> [Deprecated] </i>
695          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
696          * @since                       2.0
697          *
698          * @return              A CustomListItem
699          * @param[in] index             The item index
700          * @endif
701          */
702         const CustomListItem* GetLoadedItemAt(int index) const;
703
704         /**
705          * @if OSPDEPREC
706          * Gets the index of the loaded item at the specified item ID.
707          *
708          * @brief               <i> [Deprecated] </i>
709          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
710          * @since                       2.0
711          *
712          * @return              The item ID
713          * @param[in] index             The item index
714          * @endif
715          */
716         int GetLoadedItemIdAt(int index) const;
717
718         /**
719          * @if OSPDEPREC
720          * Checks whether the item at the specified index is enabled.
721          *
722          * @brief               <i> [Deprecated] </i>
723          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
724          * @since                       2.0
725          *
726          * @return              @c true if the item is enabled, @n
727          *                              else @c false
728          * @param[in] index             The item index
729          * @endif
730          */
731         bool IsItemChecked(int index) const;
732
733         /**
734          * @if OSPDEPREC
735          * Checks whether the loaded item at the specified index is enabled.
736          *
737          * @brief               <i> [Deprecated] </i>
738          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
739          * @since                       2.0
740          *
741          * @return              @c true if the item is enabled, @n
742          *                              else @c false
743          * @param[in] index             The item index
744          * @endif
745          */
746         bool IsLoadedItemEnabled(int index) const;
747
748         /**
749          * @if OSPDEPREC
750          * Gets the index of the loaded item at the specified item ID.
751          *
752          * @brief               <i> [Deprecated] </i>
753          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
754          * @since                                       2.0
755          *
756          * @return                              The index of the item
757          * @param[in]     itemId                The item ID
758          * @endif
759          */
760         int GetLoadedItemIndexFromItemId(int itemId) const;
761
762         /**
763          * @if OSPDEPREC
764          * Loads the item to the top of the %SlidableList control.
765          *
766          * @brief               <i> [Deprecated] </i>
767          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
768          * @since                       2.0
769          *
770          * @return              An error code
771          * @param[in]   item                    The CustomListItem instance to load
772          * @param[in]   itemId                  The item ID for this item
773          * @exception   E_SUCCESS               The method is successful.
774          * @exception   E_SYSTEM                A system error has occurred.
775          * @endif
776          */
777         result LoadItemToTop(const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
778
779         /**
780          * @if OSPDEPREC
781          * Loads the item to the end of the %SlidableList control.
782          *
783          * @brief               <i> [Deprecated] </i>
784          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
785          * @since                       2.0
786          *
787          * @return              An error code
788          * @param[in]   item                    The CustomListItem instance to load
789          * @param[in]   itemId                  The item ID for this item
790          * @exception   E_SUCCESS               The method is successful.
791          * @exception   E_SYSTEM                A system error has occurred.
792          * @endif
793          */
794         result LoadItemToBottom(const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
795
796         /**
797          * @if OSPDEPREC
798          * Unloads all loaded items of the %SlidableList control.
799          *
800          * @brief               <i> [Deprecated] </i>
801          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
802          * @since                       2.0
803          *
804          * @return              An error code
805          * @exception   E_SUCCESS               The method is successful.
806          * @exception   E_SYSTEM                A system error has occurred.
807          * @endif
808          */
809         result UnloadAllItems(void);
810
811         /**
812          * @if OSPDEPREC
813          * Sets the contents of the item at the specified index of the %SlidableList control.
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              An error code
820          * @param[in] index               The item index
821          * @param[in]   item                            The CustomListItem instance to set
822          * @param[in]   itemId                          The item ID for this item
823          * @exception   E_SUCCESS                       The method is successful.
824          * @exception   E_INVALID_ARG           The specified @c index is less than @c 0 or greater than or equal to the item count.
825          * @exception   E_SYSTEM                        A system error has occurred.
826          * @remarks             Do not add, insert, or set an item which already belongs to %SlidableList.
827          * @endif
828          */
829         result SetItemAt(int index, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID);
830
831         /**
832          * @if OSPDEPREC
833          * Removes the item at the specified index of the %SlidableList control.
834          *
835          * @brief               <i> [Deprecated] </i>
836          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
837          * @since                       2.0
838          *
839          * @return              An error code
840          * @param[in] index             The item index to delete
841          * @param[in] itemHeight        The height of the item to delete
842          * @exception   E_SUCCESS       The method is successful.
843          * @exception   E_SYSTEM        A system error has occurred.
844          * @remarks   The removed list item is deleted from the memory.
845          * @endif
846          */
847         result RemoveItemAt(int index, int itemHeight);
848
849         /**
850          * @if OSPDEPREC
851          * Removes all the checked items of the %SlidableList control.
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              An error code
858          * @param[in] itemHeight                The height of the item to delete
859          * @exception   E_SUCCESS               The method is successful.
860          * @exception   E_SYSTEM                A system error has occurred.
861          * @remarks   The removed list items are deleted from the memory.
862          * @remarks     This method can only be used when the style of the list allows multiple selections.
863          * @endif
864          */
865         result RemoveAllCheckedItems(int itemHeight);
866
867         /**
868          * @if OSPDEPREC
869          * Sets the number of items and the combined height of all the items of the %SlidableList control.
870          *
871          * @brief               <i> [Deprecated] </i>
872          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
873          * @since                               2.0
874          *
875          * @param[in]   count           The count of list items
876          * @param[in]   listHeight      The height of the list
877          * @endif
878          */
879         void SetItemCountAndHeight(int count, int listHeight);
880
881         /**
882          * @if OSPDEPREC
883          * Checks whether the specific item is loaded.
884          *
885          * @brief               <i> [Deprecated] </i>
886          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
887          * @since                               2.0
888          *
889          * @return              @c true if the item is loaded, @n
890          *                              else @c false
891          * @param[in]   index   The item index
892          * @endif
893          */
894         bool IsItemLoaded(int index) const;
895
896         /**
897          * @if OSPDEPREC
898          * Gets the index of the first loaded item.
899          *
900          * @brief               <i> [Deprecated] </i>
901          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
902          * @since                       2.0
903          *
904          * @return              The index of the first loaded item
905          * @endif
906          */
907         int GetFirstLoadedItemIndex(void) const;
908
909         /**
910          * @if OSPDEPREC
911          * Gets the index of the last loaded item.
912          *
913          * @brief               <i> [Deprecated] </i>
914          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
915          * @since                       2.0
916          *
917          * @return              The index of the last loaded item
918          * @endif
919          */
920         int GetLastLoadedItemIndex(void) const;
921
922         /**
923          * @if OSPDEPREC
924          * Gets the index of the item at the specified item position.
925          *
926          * @brief               <i> [Deprecated] </i>
927          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
928          * @since                               2.0
929          *
930          * @return      The index of the item, @n
931          *                              else @c -1 if there is no list item with the specified position
932          * @param[in]   x   The x position of the point
933          * @param[in]   y   The y position of the point
934          * @endif
935          */
936         int GetItemIndexFromPosition(int x, int y) const;
937
938         /**
939          * @if OSPDEPREC
940          * Gets the index of the item at the specified item position.
941          *
942          * @brief               <i> [Deprecated] </i>
943          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
944          * @since                               2.0
945          *
946          * @return              The index of the item, @n
947          *                              else @c -1 if there is no list item with the specified position
948          * @param[in]   position    The position of the point
949          * @endif
950          */
951         int GetItemIndexFromPosition(const Tizen::Graphics::Point& position) const;
952
953         /**
954          * @if OSPDEPREC
955          * Draws and shows the item of the %SlidableList control.
956          *
957          * @brief               <i> [Deprecated] </i>
958          * @deprecated  This class is deprecated. Instead of using this class, use the ListView class.
959          * @since                       2.0
960          *
961          * @return              An error code
962          * @param[in]   index                           The index of the %SlidableList item
963          * @exception   E_SUCCESS                       The method is successful.
964          * @exception   E_SYSTEM                        A system error has occurred.
965          * @exception   E_INVALID_OPERATION The item has never been drawn before calling this method.
966          * @exception   E_INVALID_ARG           The specified input parameter is invalid.
967          * @endif
968          */
969         result RefreshItem(int index);
970
971 protected:
972
973         friend class _SlidableListImpl;
974 private:
975         //
976         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
977         //
978         SlidableList(const SlidableList& rhs);
979
980         //
981         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
982         //
983         SlidableList& operator =(const SlidableList& rhs);
984 }; //SlidableList
985 }}} // Tizen::Ui::Controls
986 #endif // _FUI_CTRL_SLIDABLE_LIST_H_