Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / controls / FUiCtrlTableViewSimpleGroupItem.cpp
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                 FUiCtrlTableViewSimpleGroupItem.cpp
20 * @brief                This is the implementation file for TableViewSimpleGroupItem class.
21 *
22 * This header file contains the implementation of TableViewSimpleGroupItem class.
23 */
24
25 #include <FUiCtrlTableViewSimpleGroupItem.h>
26 #include "FUiCtrl_TableViewItemImpl.h"
27
28 using namespace Tizen::Base;
29 using namespace Tizen::Graphics;
30
31 namespace Tizen { namespace Ui { namespace Controls
32 {
33
34 TableViewSimpleGroupItem::TableViewSimpleGroupItem(void)
35 {
36 }
37
38 TableViewSimpleGroupItem::~TableViewSimpleGroupItem(void)
39 {
40 }
41
42 result
43 TableViewSimpleGroupItem::Construct(const Dimension& itemSize)
44 {
45         return TableViewGroupItem::Construct(itemSize);
46 }
47
48 result
49 TableViewSimpleGroupItem::SetItemContents(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBitmap)
50 {
51         _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this);
52         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
53
54         return pImpl->SetSimpleItemContents(text, pBitmap, true);
55 }
56
57 result
58 TableViewSimpleGroupItem::SetTextColor(const Tizen::Graphics::Color& color, TableViewItemDrawingStatus status)
59 {
60         _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this);
61         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
62
63         return pImpl->SetSimpleItemTextColor(color, status);
64 }
65
66 Tizen::Graphics::Color
67 TableViewSimpleGroupItem::GetTextColor(TableViewItemDrawingStatus status) const
68 {
69         const _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this);
70         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
71
72         return pImpl->GetSimpleItemTextColor(status);
73 }
74
75 result
76 TableViewSimpleGroupItem::SetTextSize(int size)
77 {
78         _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this);
79         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
80
81         return pImpl->SetSimpleItemTextSize(size);
82 }
83
84 int
85 TableViewSimpleGroupItem::GetTextSize(void) const
86 {
87         const _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this);
88         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
89
90         return pImpl->GetSimpleItemTextSize();
91 }
92
93 }}} //Tizen::Ui::Controls