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 FUiCtrlGroupItem.cpp
20 * @brief This is the implementation file for GroupItem class.
22 * This header file contains the implementation of GroupItem class.
25 #include <FBaseSysLog.h>
26 #include <FUiCtrlGroupItem.h>
27 #include "FUiCtrl_GroupItemImpl.h"
29 using namespace Tizen::Base;
30 using namespace Tizen::Graphics;
32 namespace Tizen { namespace Ui { namespace Controls
35 GroupItem::GroupItem(void)
40 GroupItem::~GroupItem(void)
47 GroupItem::Construct(const Dimension& itemSize)
51 _GroupItemImpl* pGroupItemImpl = _GroupItemImpl::GetInstance(*this);
52 SysAssertf((pGroupItemImpl == null),
53 "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
55 pGroupItemImpl = _GroupItemImpl::CreateGroupItemImpN(this, itemSize);
56 SysTryReturn(NID_UI_CTRL, (pGroupItemImpl != null), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
58 _pImpl = pGroupItemImpl;
64 GroupItem::SetBackgroundBitmap(const Bitmap* pBitmap)
66 SysAssertf(_pImpl != null, "Not yet constructed. Construct() should be called before use.");
68 return _pImpl->SetBackgroundBitmap(pBitmap);
72 GroupItem::SetBackgroundColor(const Color& color)
74 SysAssertf(_pImpl != null, "Not yet constructed. Construct() should be called before use.");
76 return _pImpl->SetBackgroundColor(color);
80 GroupItem::GetBackgroundColor(void) const
82 SysAssertf(_pImpl != null, "Not yet constructed. Construct() should be called before use.");
84 return _pImpl->GetBackgroundColor();
88 GroupItem::SetTextColor(const Color& color)
90 SysAssertf(_pImpl != null, "Not yet constructed. Construct() should be called before use.");
92 return _pImpl->SetTextColor(color);
96 GroupItem::GetTextColor(void) const
98 SysAssertf(_pImpl != null, "Not yet constructed. Construct() should be called before use.");
100 return _pImpl->GetTextColor();
104 GroupItem::SetTextSize(int size)
106 SysAssertf(_pImpl != null, "Not yet constructed. Construct() should be called before use.");
108 return _pImpl->SetTextSize(size);
112 GroupItem::GetTextSize(void) const
114 SysAssertf(_pImpl != null, "Not yet constructed. Construct() should be called before use.");
116 return _pImpl->GetTextSize();
120 GroupItem::SetElement(const String& text, const Bitmap* pBitmap)
122 SysAssertf(_pImpl != null, "Not yet constructed. Construct() should be called before use.");
124 return _pImpl->SetElement(text, pBitmap);
127 }}} //Tizen::Ui::Controls