Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_IconListViewItemEventArg.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                FUiCtrl_IconListViewItemEventArg.h
20  * @brief               This is the header file for _IconListViewItemEventArg class.
21  *
22  * This header file contains declaration of _IconListViewItemEventArg class.
23  *
24  */
25
26 #ifndef _FUI_CTRL_INTERNAL_ICON_LIST_VIEW_ITEM_EVENT_ARG_H_
27 #define _FUI_CTRL_INTERNAL_ICON_LIST_VIEW_ITEM_EVENT_ARG_H_
28
29 #include <FBaseObject.h>
30 #include <FBaseRtIEventArg.h>
31 #include <FUiCtrlIconListView.h>
32 #include <FUiCtrlIconListViewTypes.h>
33 #include <FBaseRt_Event.h>
34
35 namespace Tizen { namespace Ui { namespace Controls
36 {
37
38 enum _IconListViewItemEventType
39 {
40         EVENT_TYPE_ITEM_SELECTED = 0,
41         EVENT_TYPE_OVERLAY_BITMAP_SELECTED,
42         EVENT_TYPE_ITEM_REORDERED
43 };
44
45 //
46 // @class       _IconListViewItemEventArg
47 // @brief       This class is used as the argument to item event listener.
48 //
49 // This class is used as the argument to item event listener. When an item event is generated
50 // (such as when a button is pressed) the ItemEvent calls ItemEventListener's OnItemStateChanged
51 // with an instance of this class as an argument.
52 //
53 // From this class, one can find out, the (event) source object and item event type.
54 //
55 class _IconListViewItemEventArg
56         : public Tizen::Base::Object
57         , public Tizen::Base::Runtime::IEventArg
58 {
59 // Lifecycle
60 public:
61         _IconListViewItemEventArg(int index, _IconListViewItemEventType eventType);
62
63         virtual ~_IconListViewItemEventArg(void);
64
65 // Access
66 public:
67         int GetIndex(void) const;
68
69         IconListViewItemStatus GetStatus(void) const;
70
71         void SetStatus(const IconListViewItemStatus status);
72
73         int GetOverlayBitmapId(void) const;
74
75         void SetOverlayBitmapId(const int overlayBitmapId);
76
77         int GetFromIndex(void) const;
78
79         int GetToIndex(void) const;
80
81         void SetToIndex(int toIndex);
82
83         _IconListViewItemEventType GetEventType(void) const;
84
85 // Attribute
86 private:
87         // The index of an item
88         int __itemIndex;
89
90         int __toIndex;
91
92         int __overlayBitmapId;
93
94         // The status of an item
95         IconListViewItemStatus __itemStatus;
96
97         _IconListViewItemEventType __eventType;
98 }; // _IconListViewItemEventArg
99
100 }}} // Tizen::Ui::Controls
101
102 #endif // _FUI_CTRL_INTERNAL_ICON_LIST_VIEW_ITEM_EVENT_ARG_H_