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.cpp;h=15db50b9cd08f78f8c34bcf9c4355061b87931f3;hp=f29ab2294ff0cc5d69ba6c4756165c471bf7e542;hb=3feac03362a8bb2d90a8b3e5defe9d2d704d2d3c;hpb=4ac6c8f30c89b605f18ad7dd3e0e5a1f13b1d416 diff --git a/dali-toolkit/internal/text/text-controller.cpp b/dali-toolkit/internal/text/text-controller.cpp index f29ab22..15db50b 100644 --- a/dali-toolkit/internal/text/text-controller.cpp +++ b/dali-toolkit/internal/text/text-controller.cpp @@ -75,11 +75,13 @@ ControllerPtr Controller::New(ControlInterface* controlInterface) ControllerPtr Controller::New(ControlInterface* controlInterface, EditableControlInterface* editableControlInterface, - SelectableControlInterface* selectableControlInterface) + SelectableControlInterface* selectableControlInterface, + AnchorControlInterface* anchorControlInterface) { return ControllerPtr(new Controller(controlInterface, editableControlInterface, - selectableControlInterface)); + selectableControlInterface, + anchorControlInterface)); } // public : Configure the text controller. @@ -1722,6 +1724,11 @@ bool Controller::KeyEvent(const Dali::KeyEvent& keyEvent) return EventHandler::KeyEvent(*this, keyEvent); } +void Controller::AnchorEvent(float x, float y) +{ + EventHandler::AnchorEvent(*this, x, y); +} + void Controller::TapEvent(unsigned int tapCount, float x, float y) { EventHandler::TapEvent(*this, tapCount, x, y); @@ -1936,6 +1943,19 @@ bool Controller::RemoveSelectedText() return TextUpdater::RemoveSelectedText(*this); } +void Controller::InsertTextAnchor(int numberOfCharacters, + CharacterIndex previousCursorIndex) +{ + TextUpdater::InsertTextAnchor(*this, numberOfCharacters, previousCursorIndex); +} + +void Controller::RemoveTextAnchor(int cursorOffset, + int numberOfCharacters, + CharacterIndex previousCursorIndex) +{ + TextUpdater::RemoveTextAnchor(*this, cursorOffset, numberOfCharacters, previousCursorIndex); +} + // private : Relayout. bool Controller::DoRelayout(const Size& size, @@ -2060,6 +2080,11 @@ void Controller::SetControlInterface(ControlInterface* controlInterface) mImpl->mControlInterface = controlInterface; } +void Controller::SetAnchorControlInterface(AnchorControlInterface* anchorControlInterface) +{ + mImpl->mAnchorControlInterface = anchorControlInterface; +} + bool Controller::ShouldClearFocusOnEscape() const { return mImpl->mShouldClearFocusOnEscape; @@ -2073,19 +2098,20 @@ Actor Controller::CreateBackgroundActor() // private : Private contructors & copy operator. Controller::Controller() -: Controller(nullptr, nullptr, nullptr) +: Controller(nullptr, nullptr, nullptr, nullptr) { } Controller::Controller(ControlInterface* controlInterface) -: Controller(controlInterface, nullptr, nullptr) +: Controller(controlInterface, nullptr, nullptr, nullptr) { } Controller::Controller(ControlInterface* controlInterface, EditableControlInterface* editableControlInterface, - SelectableControlInterface* selectableControlInterface) -: mImpl(new Controller::Impl(controlInterface, editableControlInterface, selectableControlInterface)) + SelectableControlInterface* selectableControlInterface, + AnchorControlInterface* anchorControlInterface) +: mImpl(new Controller::Impl(controlInterface, editableControlInterface, selectableControlInterface, anchorControlInterface)) { }