2 * Copyright (c) 2018 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #include <dali-toolkit/devel-api/layouting/layout-group.h>
18 #include <dali-toolkit/devel-api/layouting/layout-group-impl.h>
25 LayoutGroup::LayoutGroup()
30 LayoutGroup LayoutGroup::New( Handle& handle )
32 Internal::LayoutGroupPtr layout = Internal::LayoutGroup::New( handle );
33 return LayoutGroup( layout.Get() );
36 LayoutGroup LayoutGroup::DownCast( BaseHandle handle )
38 return LayoutGroup( dynamic_cast< Dali::Toolkit::Internal::LayoutGroup* >( handle.GetObjectPtr() ) );
41 LayoutGroup::LayoutId LayoutGroup::Add( LayoutItem& child )
43 return GetImplementation( *this ).Add( GetImplementation(child) );
46 void LayoutGroup::Remove( LayoutGroup::LayoutId childId )
48 GetImplementation( *this ).Remove( childId );
51 void LayoutGroup::Remove( LayoutItem& child )
53 GetImplementation( *this ).Remove( GetImplementation(child) );
56 LayoutItem LayoutGroup::GetChild( LayoutGroup::LayoutId childId ) const
58 Internal::LayoutItemPtr child = GetImplementation( *this ).GetChild( childId );
59 return LayoutItem( child.Get() );
62 LayoutItem LayoutGroup::GetChildAt( unsigned int childId ) const
64 Internal::LayoutItemPtr child = GetImplementation( *this ).GetChildAt( childId );
65 return LayoutItem( child.Get() );
68 unsigned int LayoutGroup::GetChildCount() const
70 return GetImplementation( *this ).GetChildCount();
73 LayoutGroup::LayoutGroup( Internal::LayoutGroup* layoutGroup )
74 : LayoutItem( layoutGroup )
78 } // namespace Toolkit