2 * Copyright (c) 2015 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.
19 #include <dali-toolkit/public-api/controls/alignment/alignment.h>
22 #include <dali/integration-api/debug.h>
25 #include <dali-toolkit/internal/controls/alignment/alignment-impl.h>
33 Alignment::Alignment()
37 Alignment Alignment::New( Type horizontal, Type vertical )
39 return Internal::Alignment::New( horizontal, vertical );
42 Alignment::Alignment(const Alignment& alignment)
43 : Control( alignment )
47 Alignment::~Alignment()
51 Alignment Alignment::DownCast( BaseHandle handle )
53 return Control::DownCast<Alignment, Internal::Alignment>(handle);
56 void Alignment::SetAlignmentType( Type type )
58 GetImpl( *this ).SetAlignmentType( type );
61 Alignment::Type Alignment::GetAlignmentType() const
63 return GetImpl( *this ).GetAlignmentType();
66 void Alignment::SetScaling( Scaling scaling )
68 GetImpl( *this ).SetScaling( scaling );
71 Alignment::Scaling Alignment::GetScaling() const
73 return GetImpl( *this ).GetScaling();
76 void Alignment::SetPadding( const Alignment::Padding& padding )
78 GetImpl( *this ).SetPadding( padding );
81 const Alignment::Padding& Alignment::GetPadding() const
83 return GetImpl( *this ).GetPadding();
86 Alignment::Alignment( Internal::Alignment& implementation )
87 : Control( implementation )
91 Alignment& Alignment::operator=(const Alignment& alignment)
93 if( &alignment != this )
95 Control::operator=( alignment );
100 Alignment::Alignment( Dali::Internal::CustomActor* internal )
101 : Control( internal )
103 VerifyCustomActorPointer<Internal::Alignment>(internal);
106 } // namespace Toolkit