X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Fcontrols%2Ftext-controls%2Ftext-field-devel.h;h=042841fef84c4e40c27ad24a5dbaefdbed6a934a;hp=b67850809e321fdc516d42348ed2ba3168db6174;hb=d291d609514dccb254a291e4d0374bde5a3380f3;hpb=d26f555fd84d43b0a3e650c66a0e626e841dd9c6 diff --git a/dali-toolkit/devel-api/controls/text-controls/text-field-devel.h b/dali-toolkit/devel-api/controls/text-controls/text-field-devel.h old mode 100644 new mode 100755 index b678508..042841f --- a/dali-toolkit/devel-api/controls/text-controls/text-field-devel.h +++ b/dali-toolkit/devel-api/controls/text-controls/text-field-devel.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_TEXT_FIELD_DEVEL_H /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 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. @@ -17,6 +17,8 @@ * limitations under the License. * */ +// EXTERNAL INCLUDES +#include // INTERNAL INCLUDES #include @@ -32,7 +34,7 @@ namespace DevelTextField namespace Property { - enum Type + enum { RENDERING_BACKEND = Dali::Toolkit::TextField::Property::RENDERING_BACKEND, TEXT = Dali::Toolkit::TextField::Property::TEXT, @@ -47,8 +49,8 @@ namespace Property VERTICAL_ALIGNMENT = Dali::Toolkit::TextField::Property::VERTICAL_ALIGNMENT, TEXT_COLOR = Dali::Toolkit::TextField::Property::TEXT_COLOR, PLACEHOLDER_TEXT_COLOR = Dali::Toolkit::TextField::Property::PLACEHOLDER_TEXT_COLOR, - SHADOW_OFFSET = Dali::Toolkit::TextField::Property::SHADOW_OFFSET, - SHADOW_COLOR = Dali::Toolkit::TextField::Property::SHADOW_COLOR, + RESERVED_PROPERTY_01 = Dali::Toolkit::TextField::Property::RESERVED_PROPERTY_01, + RESERVED_PROPERTY_02 = Dali::Toolkit::TextField::Property::RESERVED_PROPERTY_02, PRIMARY_CURSOR_COLOR = Dali::Toolkit::TextField::Property::PRIMARY_CURSOR_COLOR, SECONDARY_CURSOR_COLOR = Dali::Toolkit::TextField::Property::SECONDARY_CURSOR_COLOR, ENABLE_CURSOR_BLINK = Dali::Toolkit::TextField::Property::ENABLE_CURSOR_BLINK, @@ -81,55 +83,80 @@ namespace Property INPUT_EMBOSS = Dali::Toolkit::TextField::Property::INPUT_EMBOSS, OUTLINE = Dali::Toolkit::TextField::Property::OUTLINE, INPUT_OUTLINE = Dali::Toolkit::TextField::Property::INPUT_OUTLINE, + HIDDEN_INPUT_SETTINGS = Dali::Toolkit::TextField::Property::HIDDEN_INPUT_SETTINGS, + PIXEL_SIZE = Dali::Toolkit::TextField::Property::PIXEL_SIZE, + ENABLE_SELECTION = Dali::Toolkit::TextField::Property::ENABLE_SELECTION, + PLACEHOLDER = Dali::Toolkit::TextField::Property::PLACEHOLDER, + ELLIPSIS = Dali::Toolkit::TextField::Property::ELLIPSIS, /** - * @brief Hides the input characters and instead shows a default character for password or pin entry. - * @details name "hiddenInputSettings", type map. - * @note Optional. - * @see HiddenInput + * @brief Enables Text selection using Shift key. + * @details Name "enableShiftSelection", type Property::BOOLEAN. */ - HIDDEN_INPUT_SETTINGS = INPUT_OUTLINE + 1, + ENABLE_SHIFT_SELECTION = ELLIPSIS + 1, /** - * @brief The size of font in pixels. - * - * Conversion from Point size to Pixel size : - * Pixel size = Point size * DPI / 72 - * @details name "pixelSize", type float + * @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. */ - PIXEL_SIZE = INPUT_OUTLINE + 2, + ENABLE_GRAB_HANDLE = ELLIPSIS + 2, /** - * @brief Enables Text selection, such as the cursor, handle, clipboard, and highlight color. - * @details name "enableSelection", type bool + * @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 */ - ENABLE_SELECTION = INPUT_OUTLINE + 3, + MATCH_SYSTEM_LANGUAGE_DIRECTION = ELLIPSIS + 3, /** - * @brief Sets the placeholder : text, color, font family, font style, point size, and pixel size. - * - * @code - * Property::Map propertyMap; - * propertyMap["placeholderText"] = "Setting Placeholder Text"; - * propertyMap["placeholderColor"] = Color::RED; - * propertyMap["placeholderFontFamily"] = "Arial"; - * propertyMap["placeholderPointSize"] = 12.0f; - * - * Property::Map fontStyleMap; - * fontstyleMap.Insert( "weight", "bold" ); - * fontstyleMap.Insert( "width", "condensed" ); - * fontstyleMap.Insert( "slant", "italic" ); - * propertyMap["placeholderFontStyle"] = fontStyleMap; - * - * field.SetProperty( DevelTextField::Property::PLACEHOLDER, propertyMap ); - * @endcode - * - * @details name "placeholder", type MAP + * @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. + */ + BACKGROUND = ELLIPSIS + 5, + + + /** + * @brief The selected text in UTF-8 format. + * @details Name "selectedText", type Property::STRING. + * @note This property is read-only. */ - PLACEHOLDER = INPUT_OUTLINE + 4 + SELECTED_TEXT = ELLIPSIS + 6 + }; } // namespace Property +/** + * @brief Return the input method context of TextField. + * + * @param[in] textField The instance of TextField. + * @return InputMethodContext instance. + */ +DALI_TOOLKIT_API InputMethodContext GetInputMethodContext( TextField textField ); + +/** + * @brief Select the whole text of TextField. + * + * @param[in] textField The instance of TextField. + */ +DALI_TOOLKIT_API void SelectWholeText( TextField textField ); + +/** + * @brief Unselect the whole text of TextField. + * + * @param[in] textField The instance of TextField. + */ +DALI_TOOLKIT_API void SelectNone( TextField textField ); + } // namespace DevelText } // namespace Toolkit