1 #ifndef DALI_TOOLKIT_TEXT_CONTROLLER_PLACEHOLDER_HANDLER_H
2 #define DALI_TOOLKIT_TEXT_CONTROLLER_PLACEHOLDER_HANDLER_H
5 * Copyright (c) 2020 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>
38 struct Controller::PlaceholderHandler
40 static void SetPlaceholderTextElideEnabled(Controller& controller, bool enabled);
41 static bool IsPlaceholderTextElideEnabled(const Controller& controller);
42 static void SetPlaceholderText(Controller& controller, PlaceholderType type, const std::string& text);
43 static void GetPlaceholderText(const Controller& controller, PlaceholderType type, std::string& text);
44 static void SetPlaceholderFontFamily(Controller& controller, const std::string& placeholderTextFontFamily);
45 static const std::string& GetPlaceholderFontFamily(const Controller& controller);
46 static void SetPlaceholderTextFontWeight(Controller& controller, FontWeight weight);
47 static bool IsPlaceholderTextFontWeightDefined(const Controller& controller);
48 static FontWeight GetPlaceholderTextFontWeight(const Controller& controller);
49 static void SetPlaceholderTextFontWidth(Controller& controller, FontWidth width);
50 static bool IsPlaceholderTextFontWidthDefined(const Controller& controller);
51 static FontWidth GetPlaceholderTextFontWidth(const Controller& controller);
52 static void SetPlaceholderTextFontSlant(Controller& controller, FontSlant slant);
53 static bool IsPlaceholderTextFontSlantDefined(const Controller& controller);
54 static FontSlant GetPlaceholderTextFontSlant(const Controller& controller);
55 static void SetPlaceholderTextFontSize(Controller& controller, float fontSize, FontSizeType type);
56 static float GetPlaceholderTextFontSize(const Controller& controller, FontSizeType type );
57 static void SetPlaceholderTextColor(Controller& controller, const Vector4& textColor );
58 static const Vector4& GetPlaceholderTextColor(const Controller& controller);
59 static void SetPlaceholderProperty(Controller& controller, const Property::Map& map );
60 static void GetPlaceholderProperty(Controller& controller, Property::Map& map);
65 } // namespace Toolkit
69 #endif // DALI_TOOLKIT_TEXT_CONTROLLER_PLACEHOLDER_HANDLER_H