Fixed showstate of indicator when form isn't added to frame.
[framework/osp/uifw.git] / inc / FUiIItemEventListener.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        FUiIItemEventListener.h
20  * @brief       This is the header file for the %IItemEventListener interface.
21  *
22  * This header file contains the declarations of the %IItemEventListener interface. @n
23  * If an item event is generated, a method of this interface is called. @n
24  * So, if an application performs tasks related to the item event, use the methods of this interface.
25  *
26  */
27 #ifndef _FUI_IITEM_EVENT_LISTENER_H_
28 #define _FUI_IITEM_EVENT_LISTENER_H_
29
30 #include <FBaseRtIEventListener.h>
31
32 namespace Tizen { namespace Ui
33 {
34 class Control;
35 } }
36
37 namespace Tizen {namespace Ui
38 {
39 /**
40  * @if OSPDEPREC
41  * @enum                ItemStatus
42  *
43  * Defines the constants used to identify the item state.
44  *
45  * @brief <i> [Deprecated]  </i>
46  * @deprecated This enum is deprecated. Instead of using this enum, use the ListItemStatus enumeration.
47  * @since       2.0
48  * @endif
49  */
50 enum ItemStatus
51 {
52         ITEM_CHECKED = 0,           /**< @if OSPDEPREC The item has been checked (toggle of the check area) @endif */
53         ITEM_UNCHECKED,             /**< @if OSPDEPREC The item has been unchecked (toggle of the check area) @endif */
54         ITEM_SELECTED,              /**< @if OSPDEPREC The item has been selected (non-check area of the item) @endif */
55         ITEM_HIGHLIGHTED            /**< @if OSPDEPREC The item has been highlighted (non-check area of the item) @b Since: @b 1.1 @endif */
56 };
57
58 /**
59  * @if OSPDEPREC
60  * @interface           IItemEventListener
61  * @brief                       <i> [Deprecated] </i> This interface implements the listener for the item event.
62  * @deprecated      This interface is deprecated. Instead of using this interface, use the IListViewItemEventListener interface.
63  * @since                       2.0
64  *
65  * The %IItemEventListener interface is the listener interface for receiving item events. The class that processes an item event
66  * implements this interface, and the instance created with that class is registered with a UI control, using the control's
67  * AddItemEventListener() method. When the item event occurs, the OnItemStateChanged() method of that instance is invoked.
68  * @endif
69  */
70 class _OSP_EXPORT_ IItemEventListener
71         : public Tizen::Base::Runtime::IEventListener
72 {
73 // Operation
74 public:
75         /**
76          * @if OSPDEPREC
77          * This is the destructor for this class.
78          *
79          * @brief               <i> [Deprecated] </i>
80          * @deprecated  This interface is deprecated. Instead of using this interface, use the IListViewItemEventListener interface.
81          * @since               2.0
82          * @endif
83          */
84         virtual ~IItemEventListener(void) {}
85
86         /**
87          * @if OSPDEPREC
88          * Called when an item event occurs.
89          *
90          * @brief               <i> [Deprecated] </i>
91          * @deprecated  This interface is deprecated. Instead of using this interface, use the IListViewItemEventListener interface.
92          * @since               2.0
93          *
94          * @param[in]   source          The source of the event
95          * @param[in]   index           The index of the item
96          * @param[in]   itemId          The item ID
97          * @param[in]   status          The item status
98          * @endif
99          */
100         virtual void OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, Tizen::Ui::ItemStatus status) = 0;
101 }; //IItemEventListener
102
103 }} // Tizen::Ui
104
105 #endif // _FUI_IITEM_EVENT_LISTENER_H_