2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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>
25 #include <dali/integration-api/debug.h>
26 #include <dali-toolkit/internal/controls/alignment/alignment-impl.h>
34 Alignment::Alignment()
38 Alignment Alignment::New( Type horizontal, Type vertical )
40 return Internal::Alignment::New( horizontal, vertical );
43 Alignment::Alignment(const Alignment& alignment)
44 : Control( alignment )
48 Alignment::~Alignment()
52 Alignment Alignment::DownCast( BaseHandle handle )
54 return Control::DownCast<Alignment, Internal::Alignment>(handle);
57 void Alignment::SetAlignmentType( Type type )
59 GetImpl( *this ).SetAlignmentType( type );
62 Alignment::Type Alignment::GetAlignmentType() const
64 return GetImpl( *this ).GetAlignmentType();
67 void Alignment::SetScaling( Scaling scaling )
69 GetImpl( *this ).SetScaling( scaling );
72 Alignment::Scaling Alignment::GetScaling() const
74 return GetImpl( *this ).GetScaling();
77 void Alignment::SetPadding( const Alignment::Padding& padding )
79 GetImpl( *this ).SetPadding( padding );
82 const Alignment::Padding& Alignment::GetPadding() const
84 return GetImpl( *this ).GetPadding();
87 Alignment::Alignment( Internal::Alignment& implementation )
88 : Control( implementation )
92 Alignment& Alignment::operator=(const Alignment& alignment)
94 if( &alignment != this )
96 Control::operator=( alignment );
101 Alignment::Alignment( Dali::Internal::CustomActor* internal )
102 : Control( internal )
104 VerifyCustomActorPointer<Internal::Alignment>(internal);
107 } // namespace Toolkit