1 #ifndef DALI_TOOLKIT_TEXT_CONTROLLER_PLACEHOLDER_HANDLER_H
2 #define DALI_TOOLKIT_TEXT_CONTROLLER_PLACEHOLDER_HANDLER_H
5 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <dali/public-api/math/vector4.h>
23 #include <dali/public-api/object/property-map.h>
26 #include <dali-toolkit/internal/text/text-controller.h>
27 #include <dali-toolkit/internal/text/text-definitions.h>
35 struct Controller::PlaceholderHandler
37 static void SetPlaceholderTextElideEnabled(Controller& controller, bool enabled);
38 static bool IsPlaceholderTextElideEnabled(const Controller& controller);
39 static void SetPlaceholderText(Controller& controller, PlaceholderType type, const std::string& text);
40 static void GetPlaceholderText(const Controller& controller, PlaceholderType type, std::string& text);
41 static void SetPlaceholderFontFamily(Controller& controller, const std::string& placeholderTextFontFamily);
42 static const std::string& GetPlaceholderFontFamily(const Controller& controller);
43 static void SetPlaceholderTextFontWeight(Controller& controller, FontWeight weight);
44 static bool IsPlaceholderTextFontWeightDefined(const Controller& controller);
45 static FontWeight GetPlaceholderTextFontWeight(const Controller& controller);
46 static void SetPlaceholderTextFontWidth(Controller& controller, FontWidth width);
47 static bool IsPlaceholderTextFontWidthDefined(const Controller& controller);
48 static FontWidth GetPlaceholderTextFontWidth(const Controller& controller);
49 static void SetPlaceholderTextFontSlant(Controller& controller, FontSlant slant);
50 static bool IsPlaceholderTextFontSlantDefined(const Controller& controller);
51 static FontSlant GetPlaceholderTextFontSlant(const Controller& controller);
52 static void SetPlaceholderTextFontSize(Controller& controller, float fontSize, FontSizeType type);
53 static float GetPlaceholderTextFontSize(const Controller& controller, FontSizeType type);
54 static void SetPlaceholderTextColor(Controller& controller, const Vector4& textColor);
55 static const Vector4& GetPlaceholderTextColor(const Controller& controller);
56 static void SetPlaceholderProperty(Controller& controller, const Property::Map& map);
57 static void GetPlaceholderProperty(Controller& controller, Property::Map& map);
58 static void ShowPlaceholderText(Controller& controller);
63 } // namespace Toolkit
67 #endif // DALI_TOOLKIT_TEXT_CONTROLLER_PLACEHOLDER_HANDLER_H