Tizen 2.1 base
[framework/osp/uifw.git] / inc / FUiIExpandableItemEventListener.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        FUiIExpandableItemEventListener.h
20  * @brief       This is the header file for the %IExpandableItemEventListener interface.
21  *
22  * This header file contains the declarations of the %IExpandableItemEventListener interface. @n
23  * If an item event is generated, a method of this interface is called.
24  *
25  */
26 #ifndef _FUI_IEXPANDABLE_ITEM_EVENT_LISTENER_H_
27 #define _FUI_IEXPANDABLE_ITEM_EVENT_LISTENER_H_
28
29 #include <FBaseRtIEventListener.h>
30 #include <FUiIItemEventListener.h>
31
32 namespace Tizen { namespace Ui
33 {
34 class Control;
35 } }
36
37 namespace Tizen {namespace Ui
38 {
39
40 /**
41  * @if OSPDEPREC
42  * @interface   IExpandableItemEventListener
43  * @brief      <i> [Deprecated] </i>  This interface implements a listener for the item events.
44  *
45  * @deprecated  This listener is deprecated. Instead of using this class, use IGroupedTableViewItemEventListener.
46  * @since               2.0
47  *
48  * The %IExpandableItemEventListener interface implements a listener for the item events.
49  * A class that needs to process an item event
50  * must implement this interface. The object created with that class is registered with a UI Control using the controls.
51  * ExpandableList::AddExpandableItemEventListener() method. When the item event occurs, that instance's OnItemStateChanged() method is invoked.
52  * @endif
53  */
54 class _OSP_EXPORT_ IExpandableItemEventListener
55         : public Tizen::Base::Runtime::IEventListener
56 {
57 // Operation
58 public:
59         /**
60          * @if OSPDEPREC
61          * This is the destructor for this class.
62          *
63          * @brief       <i> [Deprecated] </i>
64          * @deprecated  This listener is deprecated. This listener is deprecated. Instead of using this class, use
65          * IGroupedTableViewEventListener.
66          * @since                       2.0
67          * @endif
68          */
69         virtual ~IExpandableItemEventListener(void) {}
70
71         /**
72          * @if OSPDEPREC
73          * Called when the state of CustomListItem in the ExpandableList is changed. @n
74          * If a main item is selected, the index of the sub-item is @c -1.
75          *
76          * @brief       <i> [Deprecated] </i>
77          * @deprecated  This listener is deprecated. Instead of using this class, use IGroupedTableViewEventListener.
78          * @since               2.0
79          *
80          * @param[in]  source           The source control from which the event is fired
81          * @param[in]  mainIndex        The main index of the item
82          * @param[in]  subIndex     The sub index of the item
83          * @param[in]  itemId       The item ID
84          * @param[in]  status       The state of the item
85          * @remarks Implement this method in a class that derives %IExpandableItemEventListener to handle the user interaction at the CustomListItem of the
86          *                      ExpandableList.
87          * @endif
88          */
89         virtual void OnItemStateChanged(const Tizen::Ui::Control& source, int mainIndex, int subIndex, int itemId, Tizen::Ui::ItemStatus status) = 0;
90
91
92         /**
93          * @if OSPDEPREC
94          * Called when the state of an element in CustomListItem in ExpandableList is changed. @n
95          * If a main item is selected, the index of the sub-item is @c -1.
96          * @brief       <i> [Deprecated] </i>
97          * @deprecated  This listener is deprecated. Instead of using this class, use IGroupedTableViewEventListener.
98          * @since               2.0
99          *
100          * @param[in]   source                  The source control from which the event is fired
101          * @param[in]   mainIndex               The main index of the item
102          * @param[in]   subIndex                The sub index of the item
103          * @param[in]  itemId                   The item ID
104          * @param[in]  elementId                The element ID
105          * @param[in]  status          The state of the element
106          * @remarks Implement this method in a class that derives %IExpandableItemEventListener to handle the user interaction at the element in
107          *                      CustomListItem of ExpandableList.
108          * @endif
109          */
110         virtual void OnItemStateChanged(const Tizen::Ui::Control& source, int mainIndex, int subIndex, int itemId, int elementId, Tizen::Ui::ItemStatus status) = 0;
111
112 }; //IExpandableItemEventListener
113
114 }} // Tizen::Ui
115
116 #endif // _FUI_IEXPANDABLE_ITEM_EVENT_LISTENER_H_