X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-controller.h;h=aaa3a66de5c27e846ab77faaf6db13da549441ac;hp=40286efd69ef800837a834555e28eb0cc418d95c;hb=3feac03362a8bb2d90a8b3e5defe9d2d704d2d3c;hpb=4ac6c8f30c89b605f18ad7dd3e0e5a1f13b1d416 diff --git a/dali-toolkit/internal/text/text-controller.h b/dali-toolkit/internal/text/text-controller.h index 40286ef..aaa3a66 100644 --- a/dali-toolkit/internal/text/text-controller.h +++ b/dali-toolkit/internal/text/text-controller.h @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -184,12 +185,14 @@ public: // Constructor. * @param[in] controlInterface The control's interface. * @param[in] editableControlInterface The editable control's interface. * @param[in] selectableControlInterface The selectable control's interface. + * @param[in] anchorControlInterface The anchor control's interface. * * @return A pointer to a new Controller. */ static ControllerPtr New(ControlInterface* controlInterface, EditableControlInterface* editableControlInterface, - SelectableControlInterface* selectableControlInterface); + SelectableControlInterface* selectableControlInterface, + AnchorControlInterface* anchorControlInterface); public: // Configure the text controller. /** @@ -1295,6 +1298,13 @@ public: // Default style & Input style */ void SetControlInterface(ControlInterface* controlInterface); + /** + * @brief Set the anchor control's interface. + * + * @param[in] anchorControlInterface The control's interface. + */ + void SetAnchorControlInterface(AnchorControlInterface* anchorControlInterface); + public: // Queries & retrieves. /** * @brief Return the layout engine. @@ -1494,6 +1504,13 @@ public: // Text-input Event Queuing. bool KeyEvent(const Dali::KeyEvent& event); /** + * @brief Called by anchor when a tap gesture occurs. + * @param[in] x The x position relative to the top-left of the parent control. + * @param[in] y The y position relative to the top-left of the parent control. + */ + void AnchorEvent(float x, float y); + + /** * @brief Called by editable UI controls when a tap gesture occurs. * @param[in] tapCount The number of taps. * @param[in] x The x position relative to the top-left of the parent control. @@ -1700,6 +1717,26 @@ private: // Update. */ bool RemoveSelectedText(); + /** + * @brief Update anchor position from given number of inserted characters. + * + * @param[in] numberOfCharacters The number of inserted characters. + * @param[in] previousCursorIndex A cursor position before event occurs. + */ + void InsertTextAnchor(int numberOfCharacters, + CharacterIndex previousCursorIndex); + + /** + * @brief Update anchor position from given number of removed characters. + * + * @param[in] cursorOffset Start position from the current cursor position to start deleting characters. + * @param[in] numberOfCharacters The number of removed characters. + * @param[in] previousCursorIndex A cursor position before event occurs. + */ + void RemoveTextAnchor(int cursorOffset, + int numberOfCharacters, + CharacterIndex previousCursorIndex); + private: // Relayout. /** * @brief Lays-out the text. @@ -1792,7 +1829,8 @@ private: // Private contructors & copy operator. */ Controller(ControlInterface* controlInterface, EditableControlInterface* editableControlInterface, - SelectableControlInterface* selectableControlInterface); + SelectableControlInterface* selectableControlInterface, + AnchorControlInterface* anchorControlInterface); // Undefined Controller(const Controller& handle);