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