Merge "Exporting one constructor used by csharpbinder and making an API private....
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / layouting / linear-layout.cpp
1 /*
2  * Copyright (c) 2018 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 //CLASS HEADER
18 #include "linear-layout.h"
19
20 //INTERNAL INCLUDES
21 #include <dali-toolkit/internal/layouting/linear-layout-impl.h>
22
23 namespace Dali
24 {
25 namespace Toolkit
26 {
27
28 LinearLayout::LinearLayout()
29 {
30 }
31
32 LinearLayout LinearLayout::New()
33 {
34   Internal::LinearLayoutPtr internal = Internal::LinearLayout::New();
35   return LinearLayout( internal.Get() );
36 }
37
38 LinearLayout LinearLayout::DownCast( BaseHandle handle )
39 {
40   return LinearLayout( dynamic_cast< Dali::Toolkit::Internal::LinearLayout*>( handle.GetObjectPtr() ) );
41 }
42
43 LinearLayout::LinearLayout( const LinearLayout& other )
44 : LayoutGroup( other )
45 {
46 }
47
48 LinearLayout& LinearLayout::operator=( const LinearLayout& other )
49 {
50   if( &other != this )
51   {
52     LayoutGroup::operator=( other );
53   }
54   return *this;
55 }
56
57 void LinearLayout::SetCellPadding( LayoutSize size )
58 {
59   GetImplementation(*this).SetCellPadding( size );
60   GetImplementation(*this).RequestLayout();
61 }
62
63 LayoutSize LinearLayout::GetCellPadding()
64 {
65   return GetImplementation(*this).GetCellPadding();
66   GetImplementation(*this).RequestLayout();
67 }
68
69 void LinearLayout::SetOrientation( LinearLayout::Orientation orientation )
70 {
71   GetImplementation(*this).SetOrientation( orientation );
72   GetImplementation(*this).RequestLayout();
73 }
74
75 LinearLayout::Orientation LinearLayout::GetOrientation()
76 {
77   return GetImplementation(*this).GetOrientation();
78   GetImplementation(*this).RequestLayout();
79 }
80
81 LinearLayout::LinearLayout( Dali::Toolkit::Internal::LinearLayout* object )
82 : LayoutGroup( object )
83 {
84 }
85
86 } // namespace Toolkit
87 } // namespace Dali