#define DALI_TOOLKIT_TEXT_FIELD_DEVEL_H
/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
ELLIPSIS = Dali::Toolkit::TextField::Property::ELLIPSIS,
/**
- * @brief Enables Text selection using Shift key.
- * @details Name "enableShiftSelection", type Property::BOOLEAN.
- */
+ * @brief Enables Text selection using Shift key.
+ * @details Name "enableShiftSelection", type Property::BOOLEAN.
+ */
ENABLE_SHIFT_SELECTION = ELLIPSIS + 1,
/**
- * @brief Enables the grab handles for text selection.
- * @details Name "enableGrabHandle", type Property::BOOLEAN.
- * @note The default value is true, which means the grab handles are enabled by default.
- */
+ * @brief Enables the grab handles for text selection.
+ * @details Name "enableGrabHandle", type Property::BOOLEAN.
+ * @note The default value is true, which means the grab handles are enabled by default.
+ */
ENABLE_GRAB_HANDLE = ELLIPSIS + 2,
/**
- * @brief Modifies the default text alignment to match the direction of the system language.
- * @details Name "matchSystemLanguageDirection", type (Property::BOOLEAN), Read/Write
- * @note The default value is false
- */
+ * @brief Modifies the default text alignment to match the direction of the system language.
+ * @details Name "matchSystemLanguageDirection", type (Property::BOOLEAN), Read/Write
+ * @note The default value is false
+ */
MATCH_SYSTEM_LANGUAGE_DIRECTION = ELLIPSIS + 3,
/**
- * @brief Enables the grab handle popup for text selection.
- * @details Name "enableGrabHandlePopup", type Property::BOOLEAN.
- * @note The default value is true, which means the grab handle popup is enabled by default.
- */
+ * @brief Enables the grab handle popup for text selection.
+ * @details Name "enableGrabHandlePopup", type Property::BOOLEAN.
+ * @note The default value is true, which means the grab handle popup is enabled by default.
+ */
ENABLE_GRAB_HANDLE_POPUP = ELLIPSIS + 4,
/**
- * @brief The default text background parameters.
- * @details Name "textBackground", type Property::VECTOR4.
- * @note Use "textBackground" as property name to avoid conflict with Control's "background" property.
- * @note The default value is Color::TRANSPARENT.
- */
+ * @brief The default text background parameters.
+ * @details Name "textBackground", type Property::VECTOR4.
+ * @note Use "textBackground" as property name to avoid conflict with Control's "background" property.
+ * @note The default value is Color::TRANSPARENT.
+ */
BACKGROUND = ELLIPSIS + 5,
/**
- * @brief The selected text in UTF-8 format.
- * @details Name "selectedText", type Property::STRING.
- * @note This property is read-only.
- */
+ * @brief The selected text in UTF-8 format.
+ * @details Name "selectedText", type Property::STRING.
+ * @note This property is read-only.
+ */
SELECTED_TEXT = ELLIPSIS + 6,
/**
- * @brief The type or rendering e.g. bitmap-based.
- * @details Name "renderingBackend", type Property::INTEGER.
- */
+ * @brief The type or rendering e.g. bitmap-based.
+ * @details Name "renderingBackend", type Property::INTEGER.
+ */
RENDERING_BACKEND = ELLIPSIS + 7,
/**
*/
SELECTED_TEXT_END,
+ /**
+ * @brief The Editable state of control.
+ * @details Name "enableEditing", type Property::BOOLEAN.
+ */
+ ENABLE_EDITING,
+
+ /**
+ * @brief The font size scale.
+ * @details name "fontSizeScale", type Property::FLOAT.
+ * @note The default value is 1.0 which does nothing.
+ * The given font size scale value is used for multiplying the specified font size before querying fonts.
+ *
+ * e.g. The rendering results of both cases are same.
+ * - fontSize: 15pt, fontSizeScale: 1.0
+ * - fontSize: 10pt, fontSizeScale: 1.5
+ */
+ FONT_SIZE_SCALE,
+
+ /**
+ * @brief The position for primary cursor.
+ * @details Name "primaryCursorPosition", type Property::INTEGER.
+ */
+ PRIMARY_CURSOR_POSITION,
+
+ /**
+ * @brief The color of the grab color.
+ * @details Name "grabHandleColor", type Property::VECTOR4.
+ */
+ GRAB_HANDLE_COLOR,
};
} // namespace Property
DALI_TOOLKIT_API InputMethodContext GetInputMethodContext(TextField textField);
/**
+ * @brief Anchor clicked signal type.
+ *
+ * @note Signal
+ * - const char* : href of clicked anchor.
+ * - uint32_t : length of href.
+ */
+using AnchorClickedSignalType = Signal<void(TextField, const char*, uint32_t)>;
+
+/**
+ * @brief This signal is emitted when the anchor is clicked.
+ *
+ * A callback of the following type may be connected:
+ * @code
+ * void YourCallbackName(TextField textField, const char* href, uint32_t hrefLength);
+ * @endcode
+ * @param[in] textField The instance of TextField.
+ * @return The signal to connect to.
+ */
+DALI_TOOLKIT_API AnchorClickedSignalType& AnchorClickedSignal(TextField textField);
+
+/**
* @brief Select the whole text of TextField.
*
* @param[in] textField The instance of TextField.