2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0/
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::Construct(const Tizen::Graphics::FloatDimension& itemSize, TableViewAnnexStyle style)
55 return TableViewItem::Construct(itemSize, style);
59 TableViewSimpleItem::Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Dimension& itemSize, TableViewAnnexStyle style)
61 return TableViewItem::Construct(layout, itemSize, style);
65 TableViewSimpleItem::Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatDimension& itemSize, TableViewAnnexStyle style)
67 return TableViewItem::Construct(layout, itemSize, style);
71 TableViewSimpleItem::SetItemContents(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBitmap)
73 _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this);
74 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
76 return pImpl->SetSimpleItemContents(text, pBitmap);
80 TableViewSimpleItem::SetTextColor(const Tizen::Graphics::Color& color, TableViewItemDrawingStatus status)
82 _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this);
83 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
85 pImpl->SetSimpleItemTextColor(color, status);
88 Tizen::Graphics::Color
89 TableViewSimpleItem::GetTextColor(TableViewItemDrawingStatus status) const
91 const _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this);
92 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
94 return pImpl->GetSimpleItemTextColor(status);
98 TableViewSimpleItem::SetTextSize(int size)
100 _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this);
101 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
103 return pImpl->SetSimpleItemTextSize(size);
107 TableViewSimpleItem::GetTextSize(void) const
109 const _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this);
110 SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
112 return pImpl->GetSimpleItemTextSize();