88ee2bc81d9ab4e845bfb66a6c45718a2c5d46fb
[platform/framework/native/uifw.git] / inc / FUiCtrlISectionTableViewItemEventListener.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 * @file FUiCtrlISectionTableViewItemEventListener.h
19 * @brief This is the header file for the %ISectionTableViewItemEventListener interface.
20 *
21 * This header file contains the declarations of the %ISectionTableViewItemEventListener 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_ISECTION_TABLE_VIEW_ITEM_EVENT_LISTENER_H_
27 #define _FUI_CTRL_ISECTION_TABLE_VIEW_ITEM_EVENT_LISTENER_H_
28
29 #include <FBaseRtIEventListener.h>
30
31 namespace Tizen { namespace Ui { namespace Controls
32 {
33 class SectionTableView;
34 class TableViewItem;
35 class TableViewContextItem;
36
37
38 /**
39 * @interface ISectionTableViewItemEventListener
40 * @brief  This interface implements the listener for item event.
41 *
42 * @since 2.0
43 *
44 * The %ISectionTableViewItemEventListener 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 * AddSectionTableViewItemEventListener() method. When the item event occurs, the OnItemStateChanged() method of that object is invoked.
48 */
49 class _OSP_EXPORT_ ISectionTableViewItemEventListener
50         : virtual public Tizen::Base::Runtime::IEventListener
51 {
52 public:
53         /**
54         * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
55         *
56         * @since 2.0
57         */
58
59         virtual ~ISectionTableViewItemEventListener(void) {}
60         /**
61         * Called when the state of a TableViewItem in the SectionTableView is changed.
62         *
63         * @since 2.0
64         *
65         * @param[in] tableView                          The source of the event
66         * @param[in] sectionIndex                       The section index
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  This method is called when the TableViewItem in the SectionTableView is checked, unchecked, or selected.
71         */
72         virtual void OnSectionTableViewItemStateChanged(Tizen::Ui::Controls::SectionTableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status) = 0;
73
74         /**
75         * Called when the TableViewContextItem is opened or closed.
76         *
77         * @since 2.0
78         *
79         * @param[in] tableView                          The source of the event
80         * @param[in] sectionIndex                       The section index
81         * @param[in] itemIndex                          The item index
82         * @param[in] pContextItem                       The context item which is opened or closed
83         * @param[in] activated                          @c true if a context item is opened,@n
84         *                                   @c false, otherwise
85         */
86         virtual void OnSectionTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::SectionTableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated) = 0;
87
88 protected:
89         //
90         // This method is for internal use only. Using this method can cause behavioral, security-related,
91         // and consistency-related issues in the application.
92         //
93         // The following method is reserved, and its name can be changed at any time without prior notice.
94         //
95         // @since 2.0
96         //
97         virtual void ISectionTableViewItemEventListener_Reserved1(void) {}
98
99         //
100         // This method is for internal use only. Using this method can cause behavioral, security-related,
101         // and consistency-related issues in the application.
102         //
103         // The following method is reserved, and its name can be changed at any time without prior notice.
104         //
105         // @since 2.0
106         //
107         virtual void ISectionTableViewItemEventListener_Reserved2(void) {}
108
109         //
110         // This method is for internal use only. Using this method can cause behavioral, security-related,
111         // and consistency-related issues in the application.
112         //
113         // The following method is reserved, and its name can be changed at any time without prior notice.
114         //
115         // @since 2.0
116         //
117         virtual void ISectionTableViewItemEventListener_Reserved3(void) {}
118 }; // ISectionTableViewItemEventListener
119
120 }}} //Tizen::Ui::Controls
121
122 #endif // _FUI_CTRL_ISECTION_TABLE_VIEW_ITEM_EVENT_LISTENER_H_