Formatting API
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / tool-bar / tool-bar.cpp
1 /*
2  * Copyright (c) 2020 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)
40 : Control(handle)
41 {
42 }
43
44 ToolBar& ToolBar::operator=(const ToolBar& handle)
45 {
46   if(&handle != this)
47   {
48     Control::operator=(handle);
49   }
50   return *this;
51 }
52
53 ToolBar::~ToolBar()
54 {
55 }
56
57 ToolBar ToolBar::New()
58 {
59   return Internal::ToolBar::New();
60 }
61
62 ToolBar ToolBar::DownCast(BaseHandle handle)
63 {
64   return Control::DownCast<ToolBar, Internal::ToolBar>(handle);
65 }
66
67 void ToolBar::AddControl(Actor control, float relativeSize, Toolkit::Alignment::Type alignment, const Toolkit::Alignment::Padding& padding)
68 {
69   GetImpl(*this).AddControl(control, relativeSize, alignment, padding);
70 }
71
72 void ToolBar::RemoveControl(Actor control)
73 {
74   GetImpl(*this).RemoveControl(control);
75 }
76
77 ToolBar::ToolBar(Internal::ToolBar& implementation)
78 : Control(implementation)
79 {
80 }
81
82 ToolBar::ToolBar(Dali::Internal::CustomActor* internal)
83 : Control(internal)
84 {
85   VerifyCustomActorPointer<Internal::ToolBar>(internal);
86 }
87
88 } // namespace Toolkit
89
90 } // namespace Dali