(Text Controller) Moved ShowPlaceholder method into PlaceholderHandler
[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) 2020 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
32 namespace Toolkit
33 {
34
35 namespace Text
36 {
37
38 struct Controller::PlaceholderHandler
39 {
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);
61   static void ShowPlaceholderText(Controller& controller);
62 };
63
64 } // namespace Text
65
66 } // namespace Toolkit
67
68 } // namespace Dali
69
70 #endif // DALI_TOOLKIT_TEXT_CONTROLLER_PLACEHOLDER_HANDLER_H