Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_ListItemEventArg.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_ListItemEventArg.h
20  * @brief       This is the header file for the _ListItemEventArg class.
21  *
22  * This header file contains the declarations of the _ListItemEventArg class.
23  */
24
25 #ifndef _FUI_CTRL_INTERNAL_LIST_ITEM_EVENT_ARG_H_
26 #define _FUI_CTRL_INTERNAL_LIST_ITEM_EVENT_ARG_H_
27
28 #include <FBaseObject.h>
29 #include <FBaseRtIEventArg.h>
30 #include <FUiControl.h>
31 #include <FUiCtrlListViewTypes.h>
32 #include <FBaseRt_Event.h>
33
34 namespace Tizen { namespace Ui { namespace Controls
35 {
36
37 enum NotifyType
38 {
39         NOTIFY_TYPE_SELECTED_ITEM = 0,
40         NOTIFY_TYPE_HIGHLIGHED_ITEM,
41         NOTIFY_TYPE_ANNEX_CHECK,
42         NOTIFY_TYPE_ANNEX_UNCHECK,
43         NOTIFY_TYPE_ANNEX_MORE,
44         NOTIFY_TYPE_LONG_PRESSED_ITEM,
45         NOTIFY_TYPE_SWEPT_ITEM,
46         NOTIFY_TYPE_REORDERED_ITEM,
47         NOTIFY_TYPE_SELCTED_CONTEXT_ITEM
48 };
49
50 class _ListItemEventArg
51         : public Tizen::Base::Runtime::IEventArg
52 {
53 // Lifecycle
54 public:
55         _ListItemEventArg(int arg1, int arg2, int arg3, int arg4, NotifyType type);
56
57         virtual ~_ListItemEventArg(void);
58
59 // Accessor
60         int GetEventArg1(void) const;
61
62         int GetEventArg2(void) const;
63
64         int GetEventArg3(void) const;
65
66         int GetEventArg4(void) const;
67
68         void GetEventArgs(int& arg1, int& arg2, int& arg3, int& arg4);
69
70         NotifyType GetNotifyType(void) const;
71
72 private:
73         _ListItemEventArg(const _ListItemEventArg& rhs);
74         _ListItemEventArg& operator=(const _ListItemEventArg& rhs);
75
76 // Attribute
77 private:
78         // Case 1. ListView event
79         //              normal event : __arg1 - itemIndex / __arg2 - elementId
80         //              reorder event : __arg1 - itemIndexFrom / __arg2 - itemIndexTo
81         // Case 2. GroupedListView event
82         //              normal event : __arg1 - groupIndex / __arg2 - itemIndex / __arg3 - elementId
83         //              reorder event : __arg1 - groupIndexFrom / __arg2 - itemIndexFrom / __arg3 - groupIndexTo / __arg4 - itemIndexTo
84         int __arg1;
85         int __arg2;
86         int __arg3;
87         int __arg4;
88         NotifyType __type;
89 }; // _ListItemEventArg
90
91 }}} // Tizen::Ui::Controls
92
93 #endif // _FUI_CTRL_INTERNAL_LIST_ITEM_EVENT_ARG_H_