[dali_2.3.24] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / tool-bar / tool-bar.cpp
1 /*
2  * Copyright (c) 2022 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 "tool-bar.h"
21
22 // EXTERNAL INCLUDES
23
24 // INTERNAL INCLUDES
25
26 #include <dali-toolkit/internal/controls/tool-bar/tool-bar-impl.h>
27 #include <dali/integration-api/debug.h>
28
29 namespace Dali
30 {
31 namespace Toolkit
32 {
33 const Toolkit::Alignment::Padding ToolBar::DEFAULT_PADDING(0.f, 0.f, 0.f, 0.f);
34
35 ToolBar::ToolBar()
36 {
37 }
38
39 ToolBar::ToolBar(const ToolBar& handle) = default;
40
41 ToolBar& ToolBar::operator=(const ToolBar& handle) = default;
42
43 ToolBar::ToolBar(ToolBar&& handle) = default;
44
45 ToolBar& ToolBar::operator=(ToolBar&& handle) = default;
46
47 ToolBar::~ToolBar()
48 {
49 }
50
51 ToolBar ToolBar::New()
52 {
53   return Internal::ToolBar::New();
54 }
55
56 ToolBar ToolBar::DownCast(BaseHandle handle)
57 {
58   return Control::DownCast<ToolBar, Internal::ToolBar>(handle);
59 }
60
61 void ToolBar::AddControl(Actor control, float relativeSize, Toolkit::Alignment::Type alignment, const Toolkit::Alignment::Padding& padding)
62 {
63   GetImpl(*this).AddControl(control, relativeSize, alignment, padding);
64 }
65
66 void ToolBar::RemoveControl(Actor control)
67 {
68   GetImpl(*this).RemoveControl(control);
69 }
70
71 ToolBar::ToolBar(Internal::ToolBar& implementation)
72 : Control(implementation)
73 {
74 }
75
76 ToolBar::ToolBar(Dali::Internal::CustomActor* internal)
77 : Control(internal)
78 {
79   VerifyCustomActorPointer<Internal::ToolBar>(internal);
80 }
81
82 } // namespace Toolkit
83
84 } // namespace Dali