1 #ifndef DALI_INTERNAL_AUTOFILL_ITEM_IMPL_X_H
2 #define DALI_INTERNAL_AUTOFILL_ITEM_IMPL_X_H
5 * Copyright (c) 2019 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/object/base-object.h>
26 #include <dali/internal/input/common/autofill-item-impl.h>
38 * @brief This class is used to pass on data from the AutofillItem of control.
40 class AutofillItemX : public Dali::Internal::Adaptor::AutofillItem
48 * @param[in] id A unique ID for this AutofillItem
49 * @param[in] label An auxiliary means to guess what data is
50 * @param[in] hint The hint - id (username), name, password, phone, credit card number, organization, and so on
51 * @param[in] sensitiveData Whether this AutofillItem is a sensitive data or not. (The default is false)
52 * @return A public handle to the newly allocated AutofillItem
54 static Dali::AutofillItem New( const std::string& id, const std::string& label, Dali::AutofillItem::Hint hint, bool sensitiveData );
57 * @brief Initialize AutofillItem constructor.
59 void Initialize() override;
62 * @copydoc Dali::AutofillItem::GetId()
64 const std::string& GetId() const override;
67 * @copydoc Dali::AutofillItem::GetLabel()
69 const std::string& GetLabel() const override;
72 * @copydoc Dali::AutofillItem::GetHint()
74 Dali::AutofillItem::Hint GetHint() const override;
77 * @copydoc Dali::AutofillItem::IsSensitiveData()
79 bool IsSensitiveData() const override;
82 * @copydoc Dali::AutofillItem::SetSaveValue()
84 void SetSaveValue( const std::string& value ) override;
87 * @copydoc Dali::AutofillItem::GetSaveValue()
89 const std::string& GetSaveValue() const override;
92 * @brief Adds the presentation text to fill out in the list.
94 * @param[in] presentationText The presentation text to fill out
96 void AddPresentationList( const std::string& presentationText ) override;
99 * @brief Adds the value to fill out in the list.
101 * @param[in] fillValue The value to fill out
103 void AddFillValueList( const std::string& fillValue ) override;
106 * @copydoc Dali::AutofillItem::GetPresentationText()
108 const std::string& GetPresentationText( int index ) const override;
111 * @copydoc Dali::AutofillItem::GetFillValue()
113 const std::string& GetFillValue( int index ) const override;
116 * @copydoc Dali::AutofillItem::ClearPresentationTextList()
118 void ClearPresentationTextList() override;
121 * @copydoc Dali::AutofillItem::ClearFillValueList()
123 void ClearFillValueList() override;
126 * @copydoc Dali::AutofillItem::GetFillValueCount()
128 unsigned int GetFillValueCount() override;
134 explicit AutofillItemX( const std::string& id, const std::string& label, Dali::AutofillItem::Hint hint, bool sensitiveData );
143 // Undefined copy constructor
144 explicit AutofillItemX( const AutofillItemX& autofillItem ) = delete;
146 // Undefined assignment operator
147 AutofillItemX& operator=( AutofillItemX& autofillItem ) = delete;
152 std::string mId; ///< The AutofillItem ID
153 std::string mLabel; ///< The AutofillItem Label
154 Dali::AutofillItem::Hint mHint; ///< The AutofillItem Hint (id (username), name, password, phone, credit card number, organization, so on)
155 bool mSensitiveData; ///< Whether the data is sensitive or not
159 std::vector<std::string> mPresentationTextList; ///< The list for the presentation text to fill out
160 std::vector<std::string> mValueList; ///< The list for the value to fill out
165 } // namespace Adaptor
167 } // namespace Internal
171 #endif // DALI_INTERNAL_AUTOFILL_ITEM_IMPL_X_H