const float xPosition = x - controller.mImpl->mModel->mScrollPosition.x;
const float yPosition = y - controller.mImpl->mModel->mScrollPosition.y;
const float xPosition = x - controller.mImpl->mModel->mScrollPosition.x;
const float yPosition = y - controller.mImpl->mModel->mScrollPosition.y;
// Whether to touch point hits on a glyph.
bool matchedCharacter = false;
cursorPosition = Text::GetClosestCursorIndex(controller.mImpl->mModel->mVisualModel,
controller.mImpl->mModel->mLogicalModel,
controller.mImpl->mMetrics,
xPosition,
// Whether to touch point hits on a glyph.
bool matchedCharacter = false;
cursorPosition = Text::GetClosestCursorIndex(controller.mImpl->mModel->mVisualModel,
controller.mImpl->mModel->mLogicalModel,
controller.mImpl->mMetrics,
xPosition,
// TODO: in mutable text, the anchor color and underline run index should be able to be updated.
if(!controller.IsEditable())
{
// TODO: in mutable text, the anchor color and underline run index should be able to be updated.
if(!controller.IsEditable())
{
if(controller.mImpl->mModel->mLogicalModel->mColorRuns.Count() > anchor.colorRunIndex)
{
ColorRun& colorRun = *(controller.mImpl->mModel->mLogicalModel->mColorRuns.Begin() + anchor.colorRunIndex);
if(controller.mImpl->mModel->mLogicalModel->mColorRuns.Count() > anchor.colorRunIndex)
{
ColorRun& colorRun = *(controller.mImpl->mModel->mLogicalModel->mColorRuns.Begin() + anchor.colorRunIndex);
}
if(controller.mImpl->mModel->mLogicalModel->mUnderlinedCharacterRuns.Count() > anchor.underlinedCharacterRunIndex)
{
UnderlinedCharacterRun& underlineRun = *(controller.mImpl->mModel->mLogicalModel->mUnderlinedCharacterRuns.Begin() + anchor.underlinedCharacterRunIndex);
}
if(controller.mImpl->mModel->mLogicalModel->mUnderlinedCharacterRuns.Count() > anchor.underlinedCharacterRunIndex)
{
UnderlinedCharacterRun& underlineRun = *(controller.mImpl->mModel->mLogicalModel->mUnderlinedCharacterRuns.Begin() + anchor.underlinedCharacterRunIndex);
else if((controller.mImpl->mEventData->mPrimaryCursorPosition > 0) && (keyCode == Dali::DALI_KEY_BACKSPACE))
{
// Remove the character before the current cursor position
else if((controller.mImpl->mEventData->mPrimaryCursorPosition > 0) && (keyCode == Dali::DALI_KEY_BACKSPACE))
{
// Remove the character before the current cursor position
- removed = TextUpdater::RemoveText(controller, -1, 1, UPDATE_INPUT_STYLE);
+ removed = TextUpdater::RemoveText(controller, -1, 1, UPDATE_INPUT_STYLE, false);
}
else if((controller.mImpl->mEventData->mPrimaryCursorPosition < controller.mImpl->mModel->mLogicalModel->mText.Count()) &&
(keyCode == Dali::DevelKey::DALI_KEY_DELETE))
{
// Remove the character after the current cursor position
}
else if((controller.mImpl->mEventData->mPrimaryCursorPosition < controller.mImpl->mModel->mLogicalModel->mText.Count()) &&
(keyCode == Dali::DevelKey::DALI_KEY_DELETE))
{
// Remove the character after the current cursor position
- removed = TextUpdater::RemoveText(controller, 0, 1, UPDATE_INPUT_STYLE);
+ removed = TextUpdater::RemoveText(controller, 0, 1, UPDATE_INPUT_STYLE, false);
const bool textDeleted = TextUpdater::RemoveText(controller,
inputMethodContextEvent.cursorOffset,
inputMethodContextEvent.numberOfChars,
const bool textDeleted = TextUpdater::RemoveText(controller,
inputMethodContextEvent.cursorOffset,
inputMethodContextEvent.numberOfChars,