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.
18 * @file FUi_CardLayoutImpl.cpp
19 * @brief This is the implementation file for _CardLayoutImpl class.
21 * This file contains the implementation of _CardLayoutImpl class.
24 #include "FUi_CardLayoutImpl.h"
26 namespace Tizen { namespace Ui
29 // _CardLayoutImpl implementation
30 _CardLayoutImpl::_CardLayoutImpl(CardLayout* pPublicLayout, _Layout::AbsoluteLayout* pCoreLayout)
31 : _LayoutImpl(pPublicLayout, pCoreLayout)
35 _CardLayoutImpl::~_CardLayoutImpl(void)
40 _CardLayoutImpl::GetLayoutType(void) const
46 _CardLayoutImpl::CreateCardLayoutImplN(CardLayout* pPublicLayout)
50 _Layout::AbsoluteLayout* pCoreLayout = null;
51 _CardLayoutImpl* pImplLayout = null;
54 pCoreLayout = _Layout::AbsoluteLayout::CreateAbsoluteLayoutN(true);
56 SysTryReturn(NID_UI, pCoreLayout != null, null, r, "[%s] Propagating.", GetErrorMessage(r));
58 pImplLayout = new (std::nothrow) _CardLayoutImpl(pPublicLayout, pCoreLayout);
59 r = CheckConstruction(pCoreLayout, pImplLayout);
60 SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
66 _CardLayoutImpl::GetPublicClassName(void) const
68 return "Tizen::Ui::CardLayout";
72 _CardLayoutImpl::GetPublic(void) const
74 return static_cast <const CardLayout&>(_LayoutImpl::GetPublic());
78 _CardLayoutImpl::GetPublic(void)
80 return static_cast <CardLayout&>(_LayoutImpl::GetPublic());
83 const _Layout::AbsoluteLayout&
84 _CardLayoutImpl::GetCore(void) const
86 return static_cast <const _Layout::AbsoluteLayout&>(_LayoutImpl::GetCore());
89 _Layout::AbsoluteLayout&
90 _CardLayoutImpl::GetCore(void)
92 return static_cast <_Layout::AbsoluteLayout&>(_LayoutImpl::GetCore());
95 const _CardLayoutImpl*
96 _CardLayoutImpl::GetInstance(const CardLayout& layout)
98 return static_cast<const _CardLayoutImpl*>(_LayoutImpl::GetInstance(layout));
102 _CardLayoutImpl::GetInstance(CardLayout& layout)
104 return static_cast<_CardLayoutImpl*>(_LayoutImpl::GetInstance(layout));