2 * Copyright (c) 2020 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/devel-api/controls/alignment/alignment.h>
22 #include <dali/integration-api/debug.h>
25 #include <dali-toolkit/internal/controls/alignment/alignment-impl.h>
31 Alignment::Alignment()
35 Alignment Alignment::New(Type horizontal, Type vertical)
37 return Internal::Alignment::New(horizontal, vertical);
40 Alignment::Alignment(const Alignment& alignment)
45 Alignment::~Alignment()
49 Alignment Alignment::DownCast(BaseHandle handle)
51 return Control::DownCast<Alignment, Internal::Alignment>(handle);
54 void Alignment::SetAlignmentType(Type type)
56 GetImpl(*this).SetAlignmentType(type);
59 Alignment::Type Alignment::GetAlignmentType() const
61 return GetImpl(*this).GetAlignmentType();
64 void Alignment::SetScaling(Scaling scaling)
66 GetImpl(*this).SetScaling(scaling);
69 Alignment::Scaling Alignment::GetScaling() const
71 return GetImpl(*this).GetScaling();
74 void Alignment::SetPadding(const Alignment::Padding& padding)
76 GetImpl(*this).SetPadding(padding);
79 const Alignment::Padding& Alignment::GetPadding() const
81 return GetImpl(*this).GetPadding();
84 Alignment::Alignment(Internal::Alignment& implementation)
85 : Control(implementation)
89 Alignment& Alignment::operator=(const Alignment& alignment)
91 if(&alignment != this)
93 Control::operator=(alignment);
98 Alignment::Alignment(Dali::Internal::CustomActor* internal)
101 VerifyCustomActorPointer<Internal::Alignment>(internal);
104 } // namespace Toolkit