Fixed to add the AllWindowList
[platform/framework/native/uifw.git] / inc / FUiCtrlITableViewItemEventListener.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 * @file FUiCtrlITableViewItemEventListener.h
19 * @brief This is the header file for the %ITableViewItemEventListener interface.
20 *
21 * This header file contains the declarations of the %ITableViewItemEventListener interface. @n
22 * If an item event is generated, a method of this interface is called.
23 * So, if an application does some jobs related to the item event, use the methods of this interface.
24 *
25 */
26 #ifndef _FUI_CTRL_ITABLE_VIEW_ITEM_EVENT_LISTENER_H_
27 #define _FUI_CTRL_ITABLE_VIEW_ITEM_EVENT_LISTENER_H_
28
29 #include <FBaseRtIEventListener.h>
30 #include <FUiCtrlTableViewTypes.h>
31
32 namespace Tizen { namespace Ui { namespace Controls
33 {
34 class TableView;
35 class TableViewItem;
36 class TableViewContextItem;
37
38 /**
39 * @interface ITableViewItemEventListener
40 * @brief  This interface implements the listener for item event.
41 *
42 * @since 2.0
43 *
44 * The %ITableViewItemEventListener interface implements a listener for receiving item change events.
45 * The class that is interested in processing an item event implements this interface,
46 * and the instance created with that class is registered with a UI control, using the control's
47 * AddTableViewItemEventListener() method. When the item event occurs, the OnItemStateChanged() method of that object is invoked.
48 */
49 class _OSP_EXPORT_ ITableViewItemEventListener
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 when the destructor of this interface is called.
56         *
57         * @since 2.0
58         */
59         virtual ~ITableViewItemEventListener(void) {}
60
61         /**
62         * Called when the state of a TableViewItem in the TableView is changed.
63         *
64         * @since 2.0
65         *
66         * @param[in] tableView                          The source of the event
67         * @param[in] itemIndex                          The item index
68         * @param[in] pItem                                      The target item
69         * @param[in] status                                     The status of the item
70         * @remarks
71         *                       - This method is called when a TableViewItem in the TableView is checked, unchecked, or selected.
72         *                       - The application can change @c pItem in this method, but should not keep @c pItem for later use.
73         */
74         virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status) = 0;
75
76         /**
77         * Called when the TableViewContextItem is opened or closed.
78         *
79         * @since 2.0
80         *
81         * @param[in] tableView                          The source of the event
82         * @param[in] itemIndex                          The item index
83         * @param[in] pContextItem                       The context item which is opened or closed
84         * @param[in] activated                          @c true if a context item is opened, @n
85         *                                   else @c false
86         */
87         virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated) = 0;
88
89         /**
90         * Called when the item is reordered.
91         *
92         * @since 2.0
93         *
94         * @param[in] tableView                          The source of the event
95         * @param[in] itemIndexFrom                      The start item index of the item
96         * @param[in] itemIndexTo                        The final item index of the item
97         */
98         virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView, int itemIndexFrom, int itemIndexTo) = 0;
99
100 protected:
101         //
102         // This method is for internal use only. Using this method can cause behavioral, security-related,
103         // and consistency-related issues in the application.
104         //
105         // This method is reserved and may change its name at any time without prior notice.
106         //
107         // @since 2.0
108         //
109         virtual void ITableViewItemEventListener_Reserved1(void) {}
110
111         //
112         // This method is for internal use only. Using this method can cause behavioral, security-related,
113         // and consistency-related issues in the application.
114         //
115         // This method is reserved and may change its name at any time without prior notice.
116         //
117         // @since 2.0
118         //
119         virtual void ITableViewItemEventListener_Reserved2(void) {}
120
121         //
122         // This method is for internal use only. Using this method can cause behavioral, security-related,
123         // and consistency-related issues in the application.
124         //
125         // This method is reserved and may change its name at any time without prior notice..
126         //
127         // @since 2.0
128         //
129         virtual void ITableViewItemEventListener_Reserved3(void) {}
130 }; // ITableViewItemEventListener
131
132 }}} //Tizen::Ui::Controls
133
134 #endif // _FUI_CTRL_ITABLE_VIEW_ITEM_EVENT_LISTENER_H_