X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=base%2Fdali-toolkit%2Finternal%2Fcontrols%2Ftext-input%2Ftext-input-impl.h;h=76160de3edd641d9142d8fc133226315dfc80967;hb=0697056b2ada1017c577c441c1c517ce8c08279f;hp=c9e3b18fbd000439a09a8ccb9458b3226174f278;hpb=5123f931b66ad8269c6c8e0823ec7d74697b0f1a;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/base/dali-toolkit/internal/controls/text-input/text-input-impl.h b/base/dali-toolkit/internal/controls/text-input/text-input-impl.h index c9e3b18..76160de 100644 --- a/base/dali-toolkit/internal/controls/text-input/text-input-impl.h +++ b/base/dali-toolkit/internal/controls/text-input/text-input-impl.h @@ -18,6 +18,15 @@ * */ +// EXTERNAL INCLUDES +#include +#include +#include +#include +#include +#include +#include + // INTERNAL INCLUDES #include #include @@ -25,9 +34,6 @@ #include #include -#include -#include - namespace Dali { @@ -615,7 +621,7 @@ private: * @param actor Handle of the selection or grab handle. * @param gesture Data structure with the parameters of the gesture. */ - void OnHandlePan(Actor actor, PanGesture gesture); + void OnHandlePan(Actor actor, const PanGesture& gesture); /** * Callback for touch down on Grab handle @@ -643,21 +649,21 @@ private: * @param[in] actor * @param[in] tap touch event */ - void OnTextTap(Dali::Actor actor, Dali::TapGesture tap); + void OnTextTap(Dali::Actor actor, const Dali::TapGesture& tap); /** * Callback for double tap on TextInput * @param[in] actor * @param[in] tap touch event */ - void OnDoubleTap(Dali::Actor actor, Dali::TapGesture tap); + void OnDoubleTap(Dali::Actor actor, const Dali::TapGesture& tap); /** * Callback for long press on TextInput * @param[in] actor * @param[in] longPress long press event */ - void OnLongPress(Dali::Actor actor, Dali::LongPressGesture longPress); + void OnLongPress(Dali::Actor actor, const Dali::LongPressGesture& longPress); /** * Callback for the ClipboardEventNotifier when text is selected in the clipboard window. @@ -702,6 +708,22 @@ private: bool OnKeyUpEvent(const KeyEvent& event); /** + * Chooses from all handle position and alternative handle positions where to set the position of the two selection handles. + * + * @param[in] cursorPositionOne The initial position of the first selection handle. + * @param[in] cursorPositionTwo The initial position of the second selection handle. + * @param[in] altPositionValidOne Whether there is an alternative position for the first selection handle. + * @param[in] altPositionValidTwo Whether there is an alternative position for the second selection handle. + * @param[in] altPositionOne The alternative position of the first selection handle. + * @param[in] altPositionTwo The alternative position of the second selection handle. + */ + void ChooseRtlSelectionHandlePosition( const Vector3& cursorPositionOne, + const Vector3& cursorPositionTwo, + bool altPositionValidOne, + bool altPositionValidTwo, + const Vector3& altPositionOne, + const Vector3& altPositionTwo ); + /** * Callback called when the text-view is scrolled. * * Updates the selection and grab handles, and the highlighted text. @@ -880,9 +902,8 @@ public: // Public to allow internal testing. /** * Draw a cursor / caret at position where new text should appear - * @param[in] nthChar the position along the text string in which new text should appear. */ - void DrawCursor(const std::size_t nthChar = 0); + void DrawCursor(); /** * Sets cursor visibility @@ -1017,15 +1038,6 @@ public: // Public to allow internal testing. void SetSelectionHandlePosition(SelectionHandleId handleId); /** - * Gets the visual position of a logical position. - * @note This is preferred over directly accessing the Map, as it resolves visual - * positions outside of the character map range. - * @param[in] logicalPosition The logical position - * @return Visual position is returned. - */ - std::size_t GetVisualPosition(std::size_t logicalPosition) const; - - /** * Gets a table of the visual text positions which has a flag * for each Character. The flag is either true (character selected) * or false (character deselected) @@ -1043,6 +1055,11 @@ public: // Public to allow internal testing. HighlightInfo CalculateHighlightInfo(); /** + * This method was added to fix a PLM. it creates one quad per character so the mesh can show different selection boxes when a mix of right to left and left to right text is selected. + */ + HighlightInfo CalculateHighlightInfoRtl(); + + /** * Calculates new Mesh data so highlight moves with selection handles. */ void UpdateHighlight(); @@ -1154,6 +1171,15 @@ public: // Public to allow internal testing. std::size_t GetRowStartFromCharacterPosition(std::size_t logicalPosition) const; /** + * Retrieves the first character of a group of characters with the same direction. + * + * @param[in] logicalPosition Index to a character. + * + * @return Index to the character. + */ + std::size_t GetFirstCharacterWithSameDirection( std::size_t logicalPosition ) const; + + /** * Retrieve the dimensions of this row of text that the character resides on. * @param[in] characterPosition the position in the 'string' of characters. * @return The size of the rectangle representing this row @@ -1347,6 +1373,12 @@ public: // Public to allow internal testing. */ const Vector4& GetOffsetFromText() const; + /** + * Show the Placeholder text with an already created StyleTextArray + * @param[in] stylePlaceHolderText Required placeholder text to be used + */ + void ShowPlaceholderText( const MarkupProcessor::StyledTextArray& stylePlaceHolderText ); + // Properties /**