2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 // http://floralicense.org/license/
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.
19 * @file FUiCtrl_ListItemBaseImpl.h
20 * @brief This is the header file for the _ListItemBaseImpl class.
22 * This header file contains the declarations of the _ListItemBaseImpl class.
25 #ifndef _FUI_CTRL_LIST_ITEM_BASE_IMPL_H_
26 #define _FUI_CTRL_LIST_ITEM_BASE_IMPL_H_
28 #include <FUiCtrlListViewTypes.h>
29 #include "FUiCtrl_IActionEventListener.h"
30 #include "FUiCtrl_IUiListViewItemEventListener.h"
32 namespace Tizen { namespace Ui { namespace Controls
36 class _ListContextItemImpl;
38 class _UiListViewItemEvent;
40 class _ListItemBaseImpl
41 : public Tizen::Base::Object
42 , public Tizen::Ui::Controls::_IActionEventListener
43 , virtual public Tizen::Base::Runtime::IEventListener
47 static _ListItemBaseImpl* CreateListItemBaseImplN(ListItemBase* pPublic, const Tizen::Graphics::FloatDimension& itemSize, ListAnnexStyle style);
49 _ListItemBaseImpl(ListItemBase* pPublic);
51 virtual ~_ListItemBaseImpl(void);
53 virtual const char* GetPublicClassName(void) const;
55 virtual const ListItemBase& GetPublic(void) const;
57 virtual ListItemBase& GetPublic(void);
59 result Construct(const Tizen::Graphics::FloatDimension& itemSize, ListAnnexStyle style);
61 _ListViewItem* GetListViewItem(void) const;
63 Tizen::Graphics::FloatDimension GetItemSize(void) const;
65 result SetBackgroundBitmap(ListItemDrawingStatus status, const Tizen::Graphics::Bitmap* pBitmap);
67 result SetBackgroundColor(ListItemDrawingStatus status, const Tizen::Graphics::Color& color);
69 Tizen::Graphics::Color GetBackgroundColor(ListItemDrawingStatus status) const;
71 result SetContextItem(const _ListContextItemImpl* pItem);
73 result SetDescriptionText(const Tizen::Base::String& text);
75 result SetDescriptionTextColor(const Tizen::Graphics::Color& color);
77 static float GetAnnexWidth(ListAnnexStyle style);
79 ListAnnexStyle GetListItemAnnexStyle(void);
81 bool SetTextColor(int elementId, Tizen::Graphics::Color textColor);
83 bool GetTextColor(int elementId, Tizen::Graphics::Color& textColor) const;
85 void AddListViewItemEventListener(_IUiListViewItemEventListener& listener);
87 void RemoveListViewItemEventListener(_IUiListViewItemEventListener& listener);
89 virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId);
92 static _ListItemBaseImpl* GetInstance(ListItemBase& listItemBase);
94 static const _ListItemBaseImpl* GetInstance(const ListItemBase& listItemBase);
97 _ListItemBaseImpl(const _ListItemBaseImpl& rhs);
99 _ListItemBaseImpl& operator =(const _ListItemBaseImpl& rhs);
102 friend class _ListViewItemProviderAdaptor;
103 friend class _GroupedListViewItemProviderAdaptor;
106 ListItemBase* __pPublic;
107 _ListViewItem* __pListViewItem;
109 Tizen::Graphics::FloatDimension __itemSize;
110 ListAnnexStyle __style;
112 _UiListViewItemEvent* __pEvent;
113 }; // _ListItemBaseImpl
115 }}} // Tizen::Ui::Controls
117 #endif //_FUI_CTRL_LIST_ITEM_BASE_IMPL_H_