Fix to adjust the position of the partial Frame
[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 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        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.
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  This method is called when an element of the %CustomItem control in the %GroupedListView control is checked, unchecked, or selected. @n
74          *              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.
75          */
76         virtual void OnGroupedListViewItemStateChanged(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListItemStatus status) = 0;
77
78         /**
79          * Called when ListItem is swept.
80          *
81          * @since       2.0
82          * @param[in] listView                  The source of the event
83          * @param[in] groupIndex                The index of the group item
84          * @param[in] itemIndex                 The index of the item in the group
85          * @param[in] direction                 The sweep direction
86          */
87         virtual void OnGroupedListViewItemSwept(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, Tizen::Ui::Controls::SweepDirection direction) = 0;
88
89         /**
90          * Called when the state of an element in the ListContextItem control is changed.
91          *
92          * @since       2.0
93          *
94          * @param[in] listView                  The source of the event
95          * @param[in] groupIndex                The index of the group item
96          * @param[in] itemIndex                 The index of the item in the group
97          * @param[in] elementId                 The element ID
98          * @param[in] status                    The status of the element
99          */
100         virtual void OnGroupedListViewContextItemStateChanged(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListContextItemStatus status) = 0;
101
102         /**
103          * Called when the item or the element is long pressed.
104          *
105          * @since   2.0
106          *
107          * @param[in] listView                  The source of the event
108          * @param[in] groupIndex                The index of the group
109          * @param[in] itemIndex                 The index of the item in the group
110          * @param[in] elementId                 The element ID
111          * @param[in,out] invokeListViewItemCallback    Indicates whether to invoke %GroupedListView item callback after this method returns
112          * @remarks  This method is invoked when an item or an element is long pressed. @n
113          *              When the event comes from the annex or the whole item, @c elementId is always -1. @n
114          *              Setting @c invokeListViewItemCallback to @c true invokes GroupedListView item callbacks after this method returns. @n
115          *              Set @c invokeListViewItemCallback to @c false to not invoke %GroupedListView item callbacks. The default value of
116          *              @c invokeListViewItemCallback is @c true. @n
117          *              Note that other %GroupedListView item callbacks are not called even though @c invokeListViewItemCallback is @c true, if
118          *              %GroupedListView loses focus, for example, due to invoking a Popup or a ContextMenu in this method.
119          */
120         virtual void OnGroupedListViewItemLongPressed(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, bool& invokeListViewItemCallback);
121
122         /**
123          * Called when GroupItem is selected.
124          *
125          * @since 2.0
126          *
127          * @param[in] listView                  The source of the event
128          * @param[in] groupIndex                The index of the group item
129          */
130         virtual void OnGroupedListViewGroupItemSelected(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex);
131
132         /**
133          * Called when the item is reordered.
134          *
135          * @since 2.0
136          *
137          * @param[in] listView   The source of the event
138          * @param[in] groupIndexFrom The source group index of the item
139          * @param[in] itemIndexFrom The source item index of the item
140          * @param[in] groupIndexTo The target group index of the item
141          * @param[in] itemIndexTo The target item index of the item
142          */
143         virtual void OnGroupedListViewItemReordered(Tizen::Ui::Controls::GroupedListView& listView, int groupIndexFrom, int itemIndexFrom, int groupIndexTo, int itemIndexTo);
144
145 protected:
146         //
147         // Following methods are reserved and may change its name at any time without prior notice.
148         //
149         virtual void IGroupedListViewItemEventListener_Reserved1(void) {}
150         virtual void IGroupedListViewItemEventListener_Reserved2(void) {}
151         virtual void IGroupedListViewItemEventListener_Reserved3(void) {}
152 }; // IGroupedListViewItemEventListener
153
154 }}} // Tizen::Ui::Controls
155
156 #endif // _FUI_CTRL_IGROUPED_LIST_VIEW_ITEM_EVENT_LISTENER_H_