remove APIs to apply [ACR][03/30][Remove] Remove APIs in Tizen::Ui namespace
[platform/framework/native/uifw.git] / src / ui / inc / FUiCtrl_ListItemBaseImpl.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_ListItemBaseImpl.h
20  * @brief       This is the header file for the _ListItemBaseImpl class.
21  *
22  * This header file contains the declarations of the _ListItemBaseImpl class.
23  */
24
25 #ifndef _FUI_CTRL_LIST_ITEM_BASE_IMPL_H_
26 #define _FUI_CTRL_LIST_ITEM_BASE_IMPL_H_
27
28 #include <FUiCtrlListViewTypes.h>
29 #include "FUiCtrl_IActionEventListener.h"
30 #include "FUiCtrl_IUiListViewItemEventListener.h"
31
32 namespace Tizen { namespace Ui { namespace Controls
33 {
34
35 class ListItemBase;
36 class _ListContextItemImpl;
37 class _ListViewItem;
38 class _UiListViewItemEvent;
39
40 class _ListItemBaseImpl
41         : public Tizen::Base::Object
42         , public Tizen::Ui::Controls::_IActionEventListener
43         , virtual public Tizen::Base::Runtime::IEventListener
44 {
45
46 public:
47         static _ListItemBaseImpl* CreateListItemBaseImplN(ListItemBase* pPublic, const Tizen::Graphics::FloatDimension& itemSize, ListAnnexStyle style);
48
49         _ListItemBaseImpl(ListItemBase* pPublic);
50
51         virtual ~_ListItemBaseImpl(void);
52
53         virtual const char* GetPublicClassName(void) const;
54
55         virtual const ListItemBase& GetPublic(void) const;
56
57         virtual ListItemBase& GetPublic(void);
58
59         result Construct(const Tizen::Graphics::FloatDimension& itemSize, ListAnnexStyle style);
60
61         _ListViewItem* GetListViewItem(void) const;
62
63         Tizen::Graphics::FloatDimension GetItemSize(void) const;
64
65         result SetBackgroundBitmap(ListItemDrawingStatus status, const Tizen::Graphics::Bitmap* pBitmap);
66
67         result SetBackgroundColor(ListItemDrawingStatus status, const Tizen::Graphics::Color& color);
68
69         Tizen::Graphics::Color GetBackgroundColor(ListItemDrawingStatus status) const;
70
71         result SetContextItem(const _ListContextItemImpl* pItem);
72
73         result SetDescriptionText(const Tizen::Base::String& text);
74
75         result SetDescriptionTextColor(const Tizen::Graphics::Color& color);
76
77         static float GetAnnexWidth(ListAnnexStyle style);
78
79         ListAnnexStyle GetListItemAnnexStyle(void);
80
81         bool SetTextColor(int elementId, Tizen::Graphics::Color textColor);
82
83         bool GetTextColor(int elementId, Tizen::Graphics::Color& textColor) const;
84
85         void AddListViewItemEventListener(_IUiListViewItemEventListener& listener);
86
87         void RemoveListViewItemEventListener(_IUiListViewItemEventListener& listener);
88
89         virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId);
90
91 public:
92         static _ListItemBaseImpl* GetInstance(ListItemBase& listItemBase);
93
94         static const _ListItemBaseImpl* GetInstance(const ListItemBase& listItemBase);
95
96 private:
97         _ListItemBaseImpl(const _ListItemBaseImpl& rhs);
98
99         _ListItemBaseImpl& operator =(const _ListItemBaseImpl& rhs);
100
101 protected:
102         friend class _ListViewItemProviderAdaptor;
103         friend class _GroupedListViewItemProviderAdaptor;
104
105 private:
106         ListItemBase* __pPublic;
107         _ListViewItem* __pListViewItem;
108
109         Tizen::Graphics::FloatDimension __itemSize;
110         ListAnnexStyle __style;
111
112         _UiListViewItemEvent* __pEvent;
113 }; // _ListItemBaseImpl
114
115 }}} // Tizen::Ui::Controls
116
117 #endif //_FUI_CTRL_LIST_ITEM_BASE_IMPL_H_