X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=docs%2Fcontent%2Fshared-javascript-and-cpp-documentation%2Ftext-field.md;h=e51c4ff3407dfa7952c986aa85800717d7a8e470;hp=79e20edc40c0acaf1b9bfd0d54fd93a717db4a25;hb=4f57485f55654cd12420a18b57013090d7067d2f;hpb=9f9bd6287b64fab61422e8b4a0d61a379c47176c diff --git a/docs/content/shared-javascript-and-cpp-documentation/text-field.md b/docs/content/shared-javascript-and-cpp-documentation/text-field.md index 79e20ed..e51c4ff 100644 --- a/docs/content/shared-javascript-and-cpp-documentation/text-field.md +++ b/docs/content/shared-javascript-and-cpp-documentation/text-field.md @@ -51,22 +51,7 @@ console.log( field.text ); ### Font Selection -TextField will automatically select a suitable fonts, in the same was as TextLabel. -The preferred font can also be selected from a JSON stylesheet: - -~~~{.json} -{ - "styles": - { - "textfield": - { - "font-family":"Arial", - "font-style":"Regular", - "point-size":8 - } - } -} -~~~ +By default TextField will automatically select a suitable font from the platform. However, a different font could be selected. See the [Font Selection](@ref font-selection) section for more details. ### Text Alignment @@ -85,6 +70,28 @@ field.SetProperty( TextField::Property::HORIZONTAL_ALIGNMENT, "BEGIN" ); // "CEN field.HorizontalAlignment = "BEGIN"; // "CENTER" or "END" ~~~ +### Copy and Paste (Selection) + +Text can be selected by a long press or double tapping it. Depending on certain conditions a popup could be shown giving options including [CUT][COPY][PASTE], [SELECT ALL] or [CLIPBOARD]. Below these conditions will be explained. + +[CUT] or [COPY] send the selected text to the clipboard ready to be pasted directly or via the clipboard UI. Pressing [PASTE] will paste the top item from the clipboard (what has just been copied, possibly from another application). If the system supports a clipboard UI this can be displayed by pressing the [CLIPBOARD] button. + +Empty text means the user has not inputted any text, a TextField containing special characters or purely whitespace is not empty. + +Below shows how the popup will look depending on the state of the TextField + +| | | +|--|--| +| Condition: Long press/double tap when empty text but clipboard has content | Condition: Long press/double tap when TextField contains text | +|[PASTE][CLIPBOARD] buttons shown| [CUT][COPY], [SELECT ALL] unless all text selected and [PASTE][CLIPBOARD] if content to paste. | +| ![ ](../assets/img/text-controls/EmptyTextClipboardHasContent.png) ![ ](./EmptyTextClipboardHasContent.png) | ![ ](../assets/img/text-controls/SelectingText.png) ![ ](./SelectingText.png) | +| Condition: Long press/double tap popup when TextField contains just whitespace | Condition: Empty text & clipboard empty | +| Whitespace treated as regular text, [CUT][COPY] shown and [PASTE][CLIPBOARD] if content to paste. As all text is selected there is no need for [SELECT ALL] | No popup shown after longpress/double tap| +| ![ ](../assets/img/text-controls/SelectAllWhitespace.png) ![ ](./SelectAllWhitespace.png) | ![ ](../assets/img/text-controls/EmptyTextAndNoContentToPaste.png) ![ ](./EmptyTextAndNoContentToPaste.png)| +| Condition: Longpress/(double tap) on whitespace which is following text | Condition: Tapping text or panning grab handle | +| [PASTE][CLIPBOARD] shown if something to paste. [SELECT ALL] as more text to select | If content in clipboard [PASTE][CLIPBOARD] popup will be shown. | +| ![ ](../assets/img/text-controls/SelectWhitespaceAfterText.png) ![ ](./SelectWhitespaceAfterText.png) | ![ ](../assets/img/text-controls/TapAfterCopyingText.png) ![ ](./TapAfterCopyingText.png) | + ### TextField Decorations #### Color