1 #ifndef DALI_TOOLKIT_TEXT_ANCHOR_DEVEL_H
2 #define DALI_TOOLKIT_TEXT_ANCHOR_DEVEL_H
5 * Copyright (c) 2022 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-toolkit/public-api/controls/control.h>
28 namespace Internal DALI_INTERNAL
34 * @brief A control which renders anchor (hyperlink) in hypertext.
36 class DALI_TOOLKIT_API TextAnchor : public Control
40 * @brief The start and end property ranges for this control.
44 PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1,
45 PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserve property indices
49 * @brief An enumeration of properties belonging to the TextAnchor class.
56 * @brief The index of a character in text at which an anchor starts.
57 * @details Name "startCharacterIndex", type INTEGER.
59 START_CHARACTER_INDEX = PROPERTY_START_INDEX,
62 * @brief The index of a character in text that stands one position after the anchor's last character.
63 * @details Name "endCharacterIndex", type INTEGER.
68 * @brief The URI associated with an anchor.
69 * @details Name "uri", type STRING.
76 * @brief Creates the TextAnchor control.
77 * @return A handle to the TextAnchor control.
79 static TextAnchor New();
82 * @brief Creates an empty handle.
87 * @brief Copy constructor.
89 * @param[in] handle The handle to copy from.
91 TextAnchor(const TextAnchor& handle);
94 * @brief Assignment operator.
96 * @param[in] handle The handle to copy from.
97 * @return A reference to this.
99 TextAnchor& operator=(const TextAnchor& handle);
102 * @brief Move constructor.
104 * @param[in] handle The handle to move from.
106 TextAnchor(TextAnchor&& handle);
109 * @brief Move assignment operator.
111 * @param[in] handle The handle to move from.
112 * @return A reference to this.
114 TextAnchor& operator=(TextAnchor&& handle);
119 * This is non-virtual since derived Handle types must not contain data or virtual methods.
124 * @brief Downcast a handle to TextAnchor.
126 * If the BaseHandle points is a TextAnchor the downcast returns a valid handle.
127 * If not the returned handle is left empty.
129 * @param[in] handle Handle to an object
130 * @return handle to a TextAnchor or an empty handle
132 static TextAnchor DownCast(BaseHandle handle);
134 public: // Not intended for application developers
136 * @brief Creates a handle using the Toolkit::Internal implementation.
138 * @param[in] implementation The Control implementation.
140 DALI_INTERNAL TextAnchor(Internal::TextAnchor& implementation);
143 * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
145 * @param[in] internal A pointer to the internal CustomActor.
147 explicit DALI_INTERNAL TextAnchor(Dali::Internal::CustomActor* internal);
149 }; // Class TextAnchor
151 } // namespace Toolkit
155 #endif // DALI_TOOLKIT_TEXT_ANCHOR_DEVEL_H