Blocking traversaltag setting on KeyRelease: Fix for N_SE-53471
[platform/framework/native/uifw.git] / inc / FUiCtrlIGroupedListViewItemEventListener.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  * @file        FUiCtrlIGroupedListViewItemEventListener.h
20  * @brief       This is the header file for the %IGroupedListViewItemEventListener interface.
21  *
22  * This header file contains the declarations of the %IGroupedListViewItemEventListener interface.
23  */
24
25 #ifndef _FUI_CTRL_IGROUPED_LIST_VIEW_ITEM_EVENT_LISTENER_H_
26 #define _FUI_CTRL_IGROUPED_LIST_VIEW_ITEM_EVENT_LISTENER_H_
27
28 #include <FBaseRtIEventListener.h>
29 #include <FUiCtrlListViewTypes.h>
30
31 namespace Tizen { namespace Ui { namespace Controls
32 {
33
34 class GroupedListView;
35
36 /**
37  * @interface   IGroupedListViewItemEventListener
38  * @brief               This interface implements the listener for the events generated by the items of the %GroupedListView control.
39  *
40  * @since               2.0
41  *
42  * The %IGroupedListViewItemEventListener interface is the listener interface for receiving GroupedListView item events.
43  * The class that processes a list item event implements this interface, and the instance created with that class is registered
44  *  with a UI control, using the control's AddGroupedListViewItemEventListener() method. When the list item event occurs, a
45  *  method of that instance is invoked.
46  *
47  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_listviews.htm">ListViews</a>.
48  */
49 class _OSP_EXPORT_ IGroupedListViewItemEventListener
50         : virtual public Tizen::Base::Runtime::IEventListener
51 {
52 public:
53         /**
54          * This polymorphic destructor should be overridden if required. @n
55          * This way, the destructors of the derived classes are called
56          * when the destructor of this interface is called.
57          *
58          * @since   2.0
59          */
60         virtual ~IGroupedListViewItemEventListener(void) {};
61
62         /**
63          * Called when the state of an element of a GroupedListView item is changed.
64          *
65          * @since       2.0
66          *
67          * @param[in] listView                  The source of the event
68          * @param[in] groupIndex                The index of the group item
69          * @param[in] itemIndex                 The index of the item in the group
70          * @param[in] elementId                 The element ID
71          * @param[in] status                    The status of the element
72          *
73          * @remarks
74          *                      - This method is called when an element of the %CustomItem control in the %GroupedListView control is checked, unchecked,
75          *                      or selected.
76          *                      - If the method is called to notify the state change of an item's annex or the item itself, the specified elementId is set to @c -1.
77          */
78         virtual void OnGroupedListViewItemStateChanged(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListItemStatus status) = 0;
79
80         /**
81          * Called when ListItem is swept.
82          *
83          * @since       2.0
84          * @param[in] listView                  The source of the event
85          * @param[in] groupIndex                The index of the group item
86          * @param[in] itemIndex                 The index of the item in the group
87          * @param[in] direction                 The sweep direction
88          */
89         virtual void OnGroupedListViewItemSwept(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, Tizen::Ui::Controls::SweepDirection direction) = 0;
90
91         /**
92          * Called when the state of an element in the ListContextItem control is changed.
93          *
94          * @since       2.0
95          *
96          * @param[in] listView                  The source of the event
97          * @param[in] groupIndex                The index of the group item
98          * @param[in] itemIndex                 The index of the item in the group
99          * @param[in] elementId                 The element ID
100          * @param[in] status                    The status of the element
101          */
102         virtual void OnGroupedListViewContextItemStateChanged(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListContextItemStatus status) = 0;
103
104         /**
105          * Called when the item or the element is long pressed.
106          *
107          * @since   2.0
108          *
109          * @param[in] listView                  The source of the event
110          * @param[in] groupIndex                The index of the group
111          * @param[in] itemIndex                 The index of the item in the group
112          * @param[in] elementId                 The element ID
113          * @param[in,out] invokeListViewItemCallback    Indicates whether to invoke %GroupedListView item callback after this method returns
114          * @remarks
115          *                      - This method is invoked when an item or an element is long pressed. @n
116          *                      When the event comes from the annex or the whole item, @c elementId is always -1.
117          *                      - Setting @c invokeListViewItemCallback to @c true invokes GroupedListView item callbacks after this method returns.
118          *                      - Set @c invokeListViewItemCallback to @c false to not invoke %GroupedListView item callbacks. The default value of
119          *                      @c invokeListViewItemCallback is @c true.
120          *                      - Note that other %GroupedListView item callbacks are not called even though @c invokeListViewItemCallback is @c true, if
121          *                      %GroupedListView loses focus, for example, due to invoking a Popup or a ContextMenu in this method.
122          */
123         virtual void OnGroupedListViewItemLongPressed(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, bool& invokeListViewItemCallback);
124
125         /**
126          * Called when GroupItem is selected.
127          *
128          * @since 2.0
129          *
130          * @param[in] listView                  The source of the event
131          * @param[in] groupIndex                The index of the group item
132          */
133         virtual void OnGroupedListViewGroupItemSelected(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex);
134
135         /**
136          * Called when the item is reordered.
137          *
138          * @since 2.0
139          *
140          * @param[in] listView   The source of the event
141          * @param[in] groupIndexFrom The source group index of the item
142          * @param[in] itemIndexFrom The source item index of the item
143          * @param[in] groupIndexTo The target group index of the item
144          * @param[in] itemIndexTo The target item index of the item
145          */
146         virtual void OnGroupedListViewItemReordered(Tizen::Ui::Controls::GroupedListView& listView, int groupIndexFrom, int itemIndexFrom, int groupIndexTo, int itemIndexTo);
147
148 protected:
149         //
150         // The following methods are reserved and may change its name at any time without prior notice.
151         //
152         virtual void IGroupedListViewItemEventListener_Reserved1(void) {}
153         virtual void IGroupedListViewItemEventListener_Reserved2(void) {}
154         virtual void IGroupedListViewItemEventListener_Reserved3(void) {}
155 }; // IGroupedListViewItemEventListener
156
157 }}} // Tizen::Ui::Controls
158
159 #endif // _FUI_CTRL_IGROUPED_LIST_VIEW_ITEM_EVENT_LISTENER_H_