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 FUiCtrlTableViewSimpleItem.cpp
20 * @brief This file contains implementation of TableViewSimpleItem class
25 #include <FUiCtrlTableViewSimpleItem.h>
26 #include <FUiCtrlLabel.h>
27 #include "FUiCtrl_TableViewItemImpl.h"
30 using namespace Tizen::Graphics;
32 namespace Tizen { namespace Ui { namespace Controls
35 TableViewSimpleItem::TableViewSimpleItem(void)
41 TableViewSimpleItem::~TableViewSimpleItem(void)
47 TableViewSimpleItem::Construct(const Tizen::Graphics::Dimension& itemSize, TableViewAnnexStyle style)
49 return TableViewItem::Construct(itemSize, style);
53 TableViewSimpleItem::SetItemContents(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBitmap)
55 _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this);
56 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
58 return pImpl->SetSimpleItemContents(text, pBitmap);
62 TableViewSimpleItem::SetTextColor(const Tizen::Graphics::Color& color, TableViewItemDrawingStatus status)
64 _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this);
65 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
67 pImpl->SetSimpleItemTextColor(color, status);
70 Tizen::Graphics::Color
71 TableViewSimpleItem::GetTextColor(TableViewItemDrawingStatus status) const
73 const _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this);
74 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
76 return pImpl->GetSimpleItemTextColor(status);
80 TableViewSimpleItem::SetTextSize(int size)
82 _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this);
83 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
85 return pImpl->SetSimpleItemTextSize(size);
89 TableViewSimpleItem::GetTextSize(void) const
91 const _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this);
92 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
94 return pImpl->GetSimpleItemTextSize();