Merge "Remove obsolete and non functional SizeChanged signal from actor" into tizen
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / alignment / alignment.cpp
1 /*
2  * Copyright (c) 2014 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
18 // CLASS HEADER
19
20 #include <dali-toolkit/public-api/controls/alignment/alignment.h>
21
22 // EXTERNAL INCLUDES
23
24 // INTERNAL INCLUDES
25
26 #include <dali/integration-api/debug.h>
27 #include <dali-toolkit/internal/controls/alignment/alignment-impl.h>
28
29 namespace Dali
30 {
31
32 namespace Toolkit
33 {
34
35 Alignment::Alignment()
36 {
37 }
38
39 Alignment Alignment::New( Type horizontal, Type vertical )
40 {
41   return Internal::Alignment::New( horizontal, vertical );
42 }
43
44 Alignment::Alignment(const Alignment& alignment)
45 : Control( alignment )
46 {
47 }
48
49 Alignment::~Alignment()
50 {
51 }
52
53 Alignment Alignment::DownCast( BaseHandle handle )
54 {
55   return Control::DownCast<Alignment, Internal::Alignment>(handle);
56 }
57
58 void Alignment::SetAlignmentType( Type type )
59 {
60   GetImpl( *this ).SetAlignmentType( type );
61 }
62
63 Alignment::Type Alignment::GetAlignmentType() const
64 {
65   return GetImpl( *this ).GetAlignmentType();
66 }
67
68 void Alignment::SetScaling( Scaling scaling )
69 {
70   GetImpl( *this ).SetScaling( scaling );
71 }
72
73 Alignment::Scaling Alignment::GetScaling() const
74 {
75   return GetImpl( *this ).GetScaling();
76 }
77
78 void Alignment::SetPadding( const Alignment::Padding& padding )
79 {
80   GetImpl( *this ).SetPadding( padding );
81 }
82
83 const Alignment::Padding& Alignment::GetPadding() const
84 {
85   return GetImpl( *this ).GetPadding();
86 }
87
88 Alignment::Alignment( Internal::Alignment& implementation )
89 : Control( implementation )
90 {
91 }
92
93 Alignment& Alignment::operator=(const Alignment& alignment)
94 {
95   if( &alignment != this )
96   {
97     Control::operator=( alignment );
98   }
99   return *this;
100 }
101
102 Alignment::Alignment( Dali::Internal::CustomActor* internal )
103 : Control( internal )
104 {
105   VerifyCustomActorPointer<Internal::Alignment>(internal);
106 }
107
108 } // namespace Toolkit
109
110 } // namespace Dali