Merge "Spannable: Add BoldSpan" into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / text-controls / text-selection-toolbar.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 #include <dali-toolkit/devel-api/controls/text-controls/text-selection-toolbar.h>
20
21 // INTERNAL INCLUDES
22 #include <dali-toolkit/internal/controls/text-controls/text-selection-toolbar-impl.h>
23
24 using namespace Dali;
25
26 namespace Dali
27 {
28 namespace Toolkit
29 {
30 TextSelectionToolbar TextSelectionToolbar::New()
31 {
32   return Internal::TextSelectionToolbar::New();
33 }
34
35 TextSelectionToolbar::TextSelectionToolbar()
36 {
37 }
38
39 TextSelectionToolbar::TextSelectionToolbar(const TextSelectionToolbar& handle) = default;
40
41 TextSelectionToolbar& TextSelectionToolbar::operator=(const TextSelectionToolbar& handle) = default;
42
43 TextSelectionToolbar::TextSelectionToolbar(TextSelectionToolbar&& handle) = default;
44
45 TextSelectionToolbar& TextSelectionToolbar::operator=(TextSelectionToolbar&& handle) = default;
46
47 TextSelectionToolbar::~TextSelectionToolbar()
48 {
49 }
50
51 void TextSelectionToolbar::AddOption(Actor& option)
52 {
53   GetImpl(*this).AddOption(option);
54 }
55
56 void TextSelectionToolbar::AddDivider(Actor& divider)
57 {
58   GetImpl(*this).AddDivider(divider);
59 }
60
61 void TextSelectionToolbar::ResizeDividers(Size& size)
62 {
63   GetImpl(*this).ResizeDividers(size);
64 }
65
66 void TextSelectionToolbar::RaiseAbove(Actor target)
67 {
68   GetImpl(*this).RaiseAbove(target);
69 }
70
71 void TextSelectionToolbar::ScrollTo(const Vector2& position)
72 {
73   GetImpl(*this).ScrollTo(position);
74 }
75
76 TextSelectionToolbar TextSelectionToolbar::DownCast(BaseHandle handle)
77 {
78   return Control::DownCast<TextSelectionToolbar, Internal::TextSelectionToolbar>(handle);
79 }
80
81 TextSelectionToolbar::TextSelectionToolbar(Internal::TextSelectionToolbar& implementation)
82 : Control(implementation)
83 {
84 }
85
86 TextSelectionToolbar::TextSelectionToolbar(Dali::Internal::CustomActor* internal)
87 : Control(internal)
88 {
89   VerifyCustomActorPointer<Internal::TextSelectionToolbar>(internal);
90 }
91
92 } // namespace Toolkit
93
94 } // namespace Dali