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 FUiCtrlTableViewGroupItem.cpp
20 * @brief This is the implementation file for TableViewGroupItem class.
22 * This header file contains the implementation of TableViewGroupItem class.
25 #include <FUiCtrlTableViewGroupItem.h>
26 #include "FUiCtrl_TableViewItemImpl.h"
27 #include "FUi_CoordinateSystemUtils.h"
29 using namespace Tizen::Base;
30 using namespace Tizen::Graphics;
32 namespace Tizen { namespace Ui { namespace Controls
35 TableViewGroupItem::TableViewGroupItem(void)
39 TableViewGroupItem::~TableViewGroupItem(void)
44 TableViewGroupItem::Construct(const Dimension& itemSize)
46 return Construct(_CoordinateSystemUtils::ConvertToFloat(itemSize));
50 TableViewGroupItem::Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Dimension& itemSize)
52 return Construct(layout, layout, _CoordinateSystemUtils::ConvertToFloat(itemSize));
56 TableViewGroupItem::Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::Dimension& itemSize)
58 return Construct(portraitLayout, landscapeLayout, _CoordinateSystemUtils::ConvertToFloat(itemSize));
62 TableViewGroupItem::Construct(const FloatDimension& itemSize)
66 _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this);
67 SysAssertf(pImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
69 pImpl = _TableViewItemImpl::CreateTableViewItemImplN(this, itemSize);
72 SysTryReturn(NID_UI_CTRL, pImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
74 _pControlImpl = pImpl;
80 TableViewGroupItem::Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatDimension& itemSize)
82 return Construct(layout, layout, itemSize);
86 TableViewGroupItem::Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::FloatDimension& itemSize)
90 _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this);
91 SysAssertf(pImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
93 pImpl = _TableViewItemImpl::CreateTableViewItemImplN(this, itemSize, TABLE_VIEW_ANNEX_STYLE_NORMAL, &(const_cast <Layout&>(portraitLayout)), &(const_cast <Layout&>(landscapeLayout)));
96 SysTryReturn(NID_UI_CTRL, pImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
98 _pControlImpl = pImpl;
104 }}} //Tizen::Ui::Controls