1 #ifndef DALI_HIDDEN_TEXT_H
2 #define DALI_HIDDEN_TEXT_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/adaptor-framework/timer.h>
23 #include <dali/public-api/object/property-map.h>
26 #include <dali-toolkit/internal/text/text-definitions.h>
27 #include <dali-toolkit/public-api/controls/text-controls/hidden-input-properties.h>
36 static constexpr const uint32_t STAR = 0x2A; // Set default substitute character as '*'
39 * Class to handle the hidden text
41 class HiddenText : public ConnectionTracker
48 * @brief Invoked when the time to show last character is expired
50 virtual void DisplayTimeExpired() = 0;
55 * @param[in] observer The Observer pointer.
57 HiddenText(Observer* observer);
59 public: // Intended for internal use
61 * @brief Used to set options of hidden text
62 * @param[in] map The property map describing the option
64 void SetProperties(const Property::Map& map);
67 * @brief Retrieve property map of hidden text options
68 * @param[out] map The hidden text option
70 void GetProperties(Property::Map& map);
73 * @brief Convert source text to destination text according to current option
74 * @param[in] source The original text
75 * @param[out] destination The applied text
77 void Substitute(const Vector<Character>& source, Vector<Character>& destination);
80 * @brief Invoked when the timer is expired
91 Length mPreviousTextCount;
96 } // namespace Toolkit
100 #endif // DALI_HIDDEN_TEXT_H