Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_ListItemCommon.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_ListItemCommon.h
20  * @brief       This is the header file for the _ListItemCommon class.
21  *
22  * This header file contains the declarations of the _ListItemCommon class.
23  */
24
25
26 #ifndef _FUI_CTRL_INTERNAL_LIST_ITEM_COMMON_H_
27 #define _FUI_CTRL_INTERNAL_LIST_ITEM_COMMON_H_
28
29 #include "FUiCtrl_IListItemCommon.h"
30
31
32 namespace Tizen { namespace Ui { namespace Controls
33 {
34
35 class _OSP_EXPORT_ _ListItemCommon
36         : public _IListItemCommon
37 {
38 public:
39         virtual ~_ListItemCommon(void);
40
41         virtual bool DrawItem(Tizen::Graphics::Rectangle& rcItem, ListItemState isFocused, bool itemDivider = false) = 0;
42
43         virtual int GetItemHeight(void) const;
44
45         virtual void SetItemHeight(int itemHeight);
46
47         virtual void SetChecked(bool checked);
48
49         virtual bool IsChecked(void) const;
50
51         virtual void SetItemEnabled(bool enabled);
52
53         virtual bool IsItemEnabled(void) const;
54
55         virtual bool IsReorderMode(void) const;
56
57         virtual void SetReorderMode(bool enabled);
58
59         virtual void SetItemChanged(bool changed);
60
61         virtual bool IsItemChanged(void) const;
62
63         virtual void SetAppInfo(const void* pAppInfo);
64
65         virtual void* GetAppInfo(void) const;
66
67         ListItemType GetItemType(void) const;
68
69         void SetItemType(ListItemType);
70
71         int AddRef(void);
72
73         int Release(void);
74
75 protected:
76         _ListItemCommon(void);
77
78 private:
79         void* __pAppInfo;
80         int __refCount;
81         int __itemHeight;
82         bool __checkedState;
83         bool __enabledState;
84         bool __itemChanged;
85         ListItemType __itemType;
86         bool __reorderMode;
87 }; // _ListItemCommon
88
89 }}} // Tizen::Ui::Controls
90
91 #endif // _FUI_CTRL_INTERNAL_LIST_ITEM_COMMON_H_