[dali_2.1.0] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / text-controller-placeholder-handler.h
1 #ifndef DALI_TOOLKIT_TEXT_CONTROLLER_PLACEHOLDER_HANDLER_H
2 #define DALI_TOOLKIT_TEXT_CONTROLLER_PLACEHOLDER_HANDLER_H
3
4 /*
5  * Copyright (c) 2021 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <dali/public-api/math/vector4.h>
23 #include <dali/public-api/object/property-map.h>
24
25 // INTERNAL INCLUDES
26 #include <dali-toolkit/internal/text/text-controller.h>
27 #include <dali-toolkit/internal/text/text-definitions.h>
28
29 namespace Dali
30 {
31 namespace Toolkit
32 {
33 namespace Text
34 {
35 struct Controller::PlaceholderHandler
36 {
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::Impl& impl);
59   static void               CreatePlaceholderFont(Controller& controller);
60 };
61
62 } // namespace Text
63
64 } // namespace Toolkit
65
66 } // namespace Dali
67
68 #endif // DALI_TOOLKIT_TEXT_CONTROLLER_PLACEHOLDER_HANDLER_H