2 * Copyright (c) 2021 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/text-controls/text-label-devel.h>
20 #include <dali-toolkit/internal/controls/text-controls/text-label-impl.h>
26 namespace DevelTextLabel
28 AnchorClickedSignalType& AnchorClickedSignal(TextLabel textLabel)
30 return GetImpl(textLabel).AnchorClickedSignal();
33 TextFitChangedSignalType& TextFitChangedSignal(TextLabel textLabel)
35 return GetImpl(textLabel).TextFitChangedSignal();
38 Vector<Vector2> GetTextSize(TextLabel textLabel, const uint32_t startIndex, const uint32_t endIndex)
40 return GetImpl(textLabel).GetTextSize(startIndex, endIndex);
43 Vector<Vector2> GetTextPosition(TextLabel textLabel, const uint32_t startIndex, const uint32_t endIndex)
45 return GetImpl(textLabel).GetTextPosition(startIndex, endIndex);
48 Rect<> GetTextBoundingRectangle(TextLabel textLabel, uint32_t startIndex, uint32_t endIndex)
50 return GetImpl(textLabel).GetTextBoundingRectangle(startIndex, endIndex);
53 void SetTextFitArray(TextLabel textLabel, const bool enable, std::vector<FitOption>& fitOptions)
55 GetImpl(textLabel).SetTextFitArray(enable, fitOptions);
58 std::vector<FitOption>& GetTextFitArray(TextLabel textLabel)
60 return GetImpl(textLabel).GetTextFitArray();
63 bool IsTextFitArrayEnabled(TextLabel textLabel)
65 return GetImpl(textLabel).IsTextFitArrayEnabled();
68 void SetRemoveFrontInset(TextLabel textLabel, const bool remove)
70 GetImpl(textLabel).SetRemoveFrontInset(remove);
73 bool IsRemoveFrontInset(TextLabel textLabel)
75 return GetImpl(textLabel).IsRemoveFrontInset();
78 void SetRemoveBackInset(TextLabel textLabel, const bool remove)
80 GetImpl(textLabel).SetRemoveBackInset(remove);
83 bool IsRemoveBackInset(TextLabel textLabel)
85 return GetImpl(textLabel).IsRemoveBackInset();
88 } // namespace DevelTextLabel
90 } // namespace Toolkit