Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_IUiListViewItemEventListener.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                FUiCtrl_IUiListViewItemEventListener.h
20  * @brief       This is the header file for the _IUiListViewItemEventListener class.
21  *
22  * This header file contains the declarations of the _IUiListViewItemEventListener
23  * class. @n
24  * If an item event is generated, a method of this class is called. @n
25  * So, if an application does some jobs related to the item event,
26  * use the methods of this class.
27  *
28  */
29
30 #ifndef _FUI_CTRL_INTERNAL_ILIST_VIEW_ITEM_EVENT_LISTENER_H_
31 #define _FUI_CTRL_INTERNAL_ILIST_VIEW_ITEM_EVENT_LISTENER_H_
32
33 #include <FBaseRtIEventListener.h>
34 #include <FUiCtrlListViewTypes.h>
35 #include "FUi_Control.h"
36
37 namespace Tizen { namespace Ui { namespace Controls
38 {
39
40 class _IUiListViewItemEventListener
41         : virtual public Tizen::Base::Runtime::IEventListener
42 {
43
44 public:
45         /**
46          * This polymorphic destructor should be overridden if required.
47          * This way, the destructors of the derived classes are called
48          * when the destructor of this interface is called.
49          *
50          * @since 2.0
51          */
52         virtual ~_IUiListViewItemEventListener(void) {}
53
54         /**
55          * Notifies when the state of an element in the ListContextItem is changed.
56          *
57          * @since 2.0
58          *
59          * @param[in]   groupIndex      The group index of the list
60          * @param[in]   itemIndex       The item index of the list
61          * @param[in]   elementId       The element ID
62          * @param[in]   status                  The status of the element
63          */
64         virtual void OnListViewContextItemStateChanged(Tizen::Ui::_Control& source, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListContextItemStatus status) = 0;
65
66         /**
67          * Called when the item or the element is long pressed.
68          *
69          * @since 2.0
70          *
71          * @param[in]   groupIndex      The group index of the list
72          * @param[in]   itemIndex       The item index of the list
73          * @param[in]   elementId       The element ID
74          */
75         virtual void OnListViewItemLongPressed(Tizen::Ui::_Control& source, int groupIndex, int itemIndex, int elementId) = 0;
76
77
78 protected:
79         // reserved virtual methods for later extension
80         //
81         // Following methods are reserved and may change its name at any time without prior notice.
82         //
83         virtual void _IUiListViewItemEventListener_Reserved1(void) {}
84         virtual void _IUiListViewItemEventListener_Reserved2(void) {}
85         virtual void _IUiListViewItemEventListener_Reserved3(void) {}
86 }; // _IUiListViewItemEventListener
87
88 }}} // Tizen::Ui::Controls
89
90 #endif  // _FUI_CTRL_INTERNAL_ILIST_VIEW_ITEM_EVENT_LISTENER_H_