2 * Copyright (c) 2014 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.
20 #include <dali-toolkit/public-api/controls/alignment/alignment.h>
26 #include <dali/integration-api/debug.h>
27 #include <dali-toolkit/internal/controls/alignment/alignment-impl.h>
35 Alignment::Alignment()
39 Alignment Alignment::New( Type horizontal, Type vertical )
41 return Internal::Alignment::New( horizontal, vertical );
44 Alignment::Alignment(const Alignment& alignment)
45 : Control( alignment )
49 Alignment::~Alignment()
53 Alignment Alignment::DownCast( BaseHandle handle )
55 return Control::DownCast<Alignment, Internal::Alignment>(handle);
58 void Alignment::SetAlignmentType( Type type )
60 GetImpl( *this ).SetAlignmentType( type );
63 Alignment::Type Alignment::GetAlignmentType() const
65 return GetImpl( *this ).GetAlignmentType();
68 void Alignment::SetScaling( Scaling scaling )
70 GetImpl( *this ).SetScaling( scaling );
73 Alignment::Scaling Alignment::GetScaling() const
75 return GetImpl( *this ).GetScaling();
78 void Alignment::SetPadding( const Alignment::Padding& padding )
80 GetImpl( *this ).SetPadding( padding );
83 const Alignment::Padding& Alignment::GetPadding() const
85 return GetImpl( *this ).GetPadding();
88 Alignment::Alignment( Internal::Alignment& implementation )
89 : Control( implementation )
93 Alignment& Alignment::operator=(const Alignment& alignment)
95 if( &alignment != this )
97 Control::operator=( alignment );
102 Alignment::Alignment( Dali::Internal::CustomActor* internal )
103 : Control( internal )
105 VerifyCustomActorPointer<Internal::Alignment>(internal);
108 } // namespace Toolkit