1 #ifndef DALI_ADAPTOR_ATSPI_EDITABLE_TEXT_H
2 #define DALI_ADAPTOR_ATSPI_EDITABLE_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.
24 #include <dali/devel-api/atspi-interfaces/accessible.h>
25 #include <dali/devel-api/atspi-interfaces/text.h>
27 namespace Dali::Accessibility
30 * @brief Interface representing objects which can store editable texts.
32 * @note Paste method is entirely implemented inside bridge
34 * @see Dali::Accessibility::EditableText
36 class DALI_ADAPTOR_API EditableText : public virtual Accessible, public virtual Text
40 * @brief Copies text in range to system clipboard.
42 * @param[in] startPosition The index of first character
43 * @param[in] endPosition The index of first character after the last one expected
45 * @return true on success, false otherwise
47 virtual bool CopyText(std::size_t startPosition, std::size_t endPosition) = 0;
50 * @brief Cuts text in range to system clipboard.
52 * @param[in] startPosition The index of first character
53 * @param[in] endPosition The index of first character after the last one expected
55 * @return true on success, false otherwise
57 virtual bool CutText(std::size_t startPosition, std::size_t endPosition) = 0;
60 * @brief Deletes text in range.
62 * @param[in] startPosition The index of first character
63 * @param[in] endPosition The index of first character after the last one expected
65 * @return true on success, false otherwise
67 virtual bool DeleteText(std::size_t startPosition, std::size_t endPosition) = 0;
70 * @brief Inserts text at startPosition.
72 * @param[in] startPosition The index of first character
73 * @param[in] text The text content
75 * @return true on success, false otherwise
77 virtual bool InsertText(std::size_t startPosition, std::string text) = 0;
80 * @brief Replaces text with content.
82 * @param[in] newContents The text content
84 * @return true on success, false otherwise
86 virtual bool SetTextContents(std::string newContents) = 0;
89 } // namespace Dali::Accessibility
91 #endif // DALI_ADAPTOR_ATSPI_EDITABLE_TEXT_H