2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 // http://floralicense.org/license/
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.
19 * @file FUiICustomItemEventListener.h
20 * @brief This is the header file for the %ICustomItemEventListener interface.
22 * This header file contains the declarations of the ICustomItemEventListener interface. @n
23 * If an item event is generated, a method of this interface is called. @n
24 * Application doing tasks related to the item event use the methods of this interface.
27 #ifndef _FUI_ICUSTOM_ITEM_EVENT_LISTENER_H_
28 #define _FUI_ICUSTOM_ITEM_EVENT_LISTENER_H_
30 #include <FBaseRtIEventListener.h>
31 #include <FUiIItemEventListener.h>
33 namespace Tizen { namespace Ui
38 namespace Tizen {namespace Ui
43 * @interface ICustomItemEventListener
44 * @brief <i> [Deprecated] </i> This interface implements the listener for the item event.
46 * @deprecated This class is deprecated. Instead of using this class, use IListViewItemEventListener class.
49 * The %ICustomItemEventListener interface is the listener interface for receiving item events. The class that processes an item event
50 * implements this interface, and the instance created with that class is registered with a UI control, using the control's
51 * AddCustomItemEventListener() method. When the item event occurs, the OnItemStateChanged() method of that object is invoked.
54 class _OSP_EXPORT_ ICustomItemEventListener
55 : public Tizen::Base::Runtime::IEventListener
61 * This is the destructor for this class.
63 * @brief <i> [Deprecated] </i>
64 * @deprecated This class is deprecated. Instead of using this class, use IListViewItemEventListener class.
68 virtual ~ICustomItemEventListener(void) {}
72 * Called when the state of CustomListItem is changed.
74 * @brief <i> [Deprecated] </i>
75 * @deprecated This class is deprecated. Instead of using this class, use IListViewItemEventListener class.
78 * @param[in] source The source control from which the event is fired
79 * @param[in] index The index of the item
80 * @param[in] itemId The item ID
81 * @param[in] status The state of the item
82 * @remarks Implement this method in a class which derives %ICustomItemEventListener to handle the user interaction at the CustomListItem.
83 * @remarks If CustomList is constructed with CUSTOM_LIST_STYLE_RADIO_WITH_DIVIDER, this method is called when the radio button is selected.
86 virtual void OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, Tizen::Ui::ItemStatus status) = 0;
91 * Called when the state of an element in the CustomListItem is changed.
93 * @brief <i> [Deprecated] </i>
94 * @deprecated This class is deprecated. Instead of using this class, use IListViewItemEventListener class.
97 * @param[in] source The source control from which the event is fired
98 * @param[in] index The index of the item
99 * @param[in] itemId The item ID
100 * @param[in] elementId The element ID
101 * @param[in] status The state of the element
102 * @remarks Implement this method in a class which derives %ICustomItemEventListener to handle the user interaction at the element in
104 * @remarks If CustomList is constructed with CUSTOM_LIST_STYLE_RADIO_WITH_DIVIDER, this method is not called when the radio button is selected.
105 * Instead, OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, Tizen::Ui::ItemStatus status) is called.
108 virtual void OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, int elementId, Tizen::Ui::ItemStatus status) = 0;
111 }; //ICustomItemEventListener
115 #endif // _FUI_ICUSTOM_ITEM_EVENT_LISTENER_H_