X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-controller.h;h=73f132b7dd7870dd5c5e0b696ff9b7e70bdc5865;hb=5247947358fb8bd9a1b27a6f0f347d6836b6e4f0;hp=40286efd69ef800837a834555e28eb0cc418d95c;hpb=d0b0cfa4a44953be9af9128885eb6ef5d83a214e;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/text-controller.h b/dali-toolkit/internal/text/text-controller.h index 40286ef..73f132b 100644 --- a/dali-toolkit/internal/text/text-controller.h +++ b/dali-toolkit/internal/text/text-controller.h @@ -28,7 +28,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -184,12 +186,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 +1299,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. @@ -1376,6 +1387,16 @@ public: // Queries & retrieves. void GetHiddenInputOption(Property::Map& options); /** + * @brief Used to set the input filter option + */ + void SetInputFilterOption(const Property::Map& options); + + /** + * @brief Used to get the input filter option + */ + void GetInputFilterOption(Property::Map& options); + + /** * @brief Sets the Placeholder Properties. * * @param[in] map The placeholder property map @@ -1408,6 +1429,18 @@ public: // Queries & retrieves. void SetVerticalLineAlignment(Toolkit::DevelText::VerticalLineAlignment::Type alignment); /** + * @brief Retrieves ellipsis position + * @return The ellipsis position + */ + Toolkit::DevelText::EllipsisPosition::Type GetEllipsisPosition() const; + + /** + * @brief Sets ellipsis position + * @param[in] ellipsisPosition The ellipsis position for the text + */ + void SetEllipsisPosition(Toolkit::DevelText::EllipsisPosition::Type ellipsisPosition); + + /** * @brief Retrieves ignoreSpaceAfterText value from model * @return The value of ignoreSpaceAfterText */ @@ -1420,24 +1453,36 @@ public: // Queries & retrieves. void SetIgnoreSpacesAfterText(bool ignore); /** - * @brief Retrieves matchSystemLanguageDirection value from model - * @return The value of matchSystemLanguageDirection + * @brief Sets SetMatchLayoutDirection value to model + * @param[in] match The value of matchLayoutDirection for the text */ - bool IsMatchSystemLanguageDirection() const; + void SetMatchLayoutDirection(DevelText::MatchLayoutDirection type); /** - * @brief Sets matchSystemLanguageDirection value to model - * @param[in] match The value of matchSystemLanguageDirection for the text + * @brief Retrieves matchLayoutDirection value from model + * @return The value of matchLayoutDirection */ - void SetMatchSystemLanguageDirection(bool match); + DevelText::MatchLayoutDirection GetMatchLayoutDirection() const; /** - * @brief Sets layoutDirection value - * @param[in] layoutDirection The value of system language direction + * @brief Sets layoutDirection type value. + * @param[in] layoutDirection The value of the layout direction type. */ void SetLayoutDirection(Dali::LayoutDirection::Type layoutDirection); /** + * @brief Gets layoutDirection type value. + * @param[in] actor The actor which will get the layout direction type. + * @return The value of the layout direction type. + */ + Dali::LayoutDirection::Type GetLayoutDirection(Dali::Actor& actor) const; + + /** + * @brief Sets the layout direction changed. + */ + void ChangedLayoutDirection(); + + /** * @brief Retrieves if showing real text or not. * @return The value of showing real text. */ @@ -1494,6 +1539,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 +1752,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 +1864,8 @@ private: // Private contructors & copy operator. */ Controller(ControlInterface* controlInterface, EditableControlInterface* editableControlInterface, - SelectableControlInterface* selectableControlInterface); + SelectableControlInterface* selectableControlInterface, + AnchorControlInterface* anchorControlInterface); // Undefined Controller(const Controller& handle);