Changed indicator bg color.
[platform/framework/native/uifw.git] / src / ui / controls / FUiCtrlTableViewSimpleItem.cpp
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0/
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         FUiCtrlTableViewSimpleItem.cpp
20 * @brief        This file contains implementation of TableViewSimpleItem class
21 */
22
23
24 //includes
25 #include <FUiCtrlTableViewSimpleItem.h>
26 #include <FUiCtrlLabel.h>
27 #include "FUiCtrl_TableViewItemImpl.h"
28
29
30 using namespace Tizen::Graphics;
31
32 namespace Tizen { namespace Ui { namespace Controls
33 {
34
35 TableViewSimpleItem::TableViewSimpleItem(void)
36         : TableViewItem()
37 {
38         // empty statement
39 }
40
41 TableViewSimpleItem::~TableViewSimpleItem(void)
42 {
43         // empty statement
44 }
45
46 result
47 TableViewSimpleItem::Construct(const Tizen::Graphics::Dimension& itemSize, TableViewAnnexStyle style)
48 {
49         return TableViewItem::Construct(itemSize, style);
50 }
51
52 result
53 TableViewSimpleItem::Construct(const Tizen::Graphics::FloatDimension& itemSize, TableViewAnnexStyle style)
54 {
55         return TableViewItem::Construct(itemSize, style);
56 }
57
58 result
59 TableViewSimpleItem::Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Dimension& itemSize, TableViewAnnexStyle style)
60 {
61         return TableViewItem::Construct(layout, itemSize, style);
62 }
63
64 result
65 TableViewSimpleItem::Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatDimension& itemSize, TableViewAnnexStyle style)
66 {
67         return TableViewItem::Construct(layout, itemSize, style);
68 }
69
70 result
71 TableViewSimpleItem::SetItemContents(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBitmap)
72 {
73         _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this);
74         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
75
76         return pImpl->SetSimpleItemContents(text, pBitmap);
77 }
78
79 void
80 TableViewSimpleItem::SetTextColor(const Tizen::Graphics::Color& color, TableViewItemDrawingStatus status)
81 {
82         _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this);
83         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
84
85         pImpl->SetSimpleItemTextColor(color, status);
86 }
87
88 Tizen::Graphics::Color
89 TableViewSimpleItem::GetTextColor(TableViewItemDrawingStatus status) const
90 {
91         const _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this);
92         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
93
94         return pImpl->GetSimpleItemTextColor(status);
95 }
96
97 result
98 TableViewSimpleItem::SetTextSize(int size)
99 {
100         _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this);
101         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
102
103         return pImpl->SetSimpleItemTextSize(size);
104 }
105
106 int
107 TableViewSimpleItem::GetTextSize(void) const
108 {
109         const _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this);
110         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
111
112         return pImpl->GetSimpleItemTextSize();
113 }
114
115 }}}
116