pEditPresenter->CalculateAbsoluteCursorBounds(__rowIndex, __columnIndex, cursorBounds);
}
__pCopyPasteMagnifier = _EditCopyPasteMagnifier::CreateInstanceN(FloatPoint(cursorBounds.x, cursorBounds.y), __handlerCursorPos, __pCopyPasteManager);
- SysTryReturn(NID_UI_CTRL, pEdit, false, E_INVALID_STATE, "[E_INVALID_STATE] pEdit is null.\n");
+ SysTryReturn(NID_UI_CTRL, __pCopyPasteMagnifier, false, E_INVALID_STATE, "[E_INVALID_STATE] __pCopyPasteMagnifier is null.\n");
+
+ __pCopyPasteMagnifier->SetRowColumnIndex(__rowIndex, __columnIndex);
}
return true;
}
break;
case COPY_PASTE_COPY_ID:
+ ReleaseCopyPastePopup();
SendCopyPasteEvent(CORE_COPY_PASTE_STATUS_HIDE, CORE_COPY_PASTE_ACTION_COPY);
break;
case COPY_PASTE_CLIPBOARD_ID:
__needToReleaseBlock = false;
pClipBoard->ShowPopup(CLIPBOARD_DATA_TYPE_TEXT, *__pEdit);
+ ReleaseCopyPastePopup();
SendCopyPasteEvent(CORE_COPY_PASTE_STATUS_HIDE, CORE_COPY_PASTE_ACTION_CLIPBOARD);
break;
case COPY_PASTE_SEARCH_ID:
return __pCopyPastePopup;
}
+void
+_EditCopyPasteManager::GetHandlerRowColumnIndex(bool singleHandler, bool leftHandler, int& rowIndex, int& columnIndex) const
+{
+ HandlerType handlerType = HANDLER_TYPE_MAX;
+ if (singleHandler)
+ {
+ handlerType = HANDLER_TYPE_CENTER;
+ }
+ else if (leftHandler)
+ {
+ handlerType = HANDLER_TYPE_LEFT;
+ }
+ else
+ {
+ handlerType = HANDLER_TYPE_RIGHT;
+ }
+
+ if (__pHandle[handlerType])
+ {
+ __pHandle[handlerType]->GetHandlerRowColumnIndex(rowIndex, columnIndex);
+ }
+ else
+ {
+ rowIndex = -1;
+ columnIndex = -1;
+ }
+
+ return;
+}
+
}}} // Tizen::Ui::Controls
}
int startRange = 0;
int lengthRange = 0;
+ int rowIndex = -1;
+ int columnIndex = -1;
+
+ Color textBlockLineColor;
+ GET_COLOR_CONFIG(EDIT::CURSOR_NORMAL, textBlockLineColor);
GetBlockRange(startRange, lengthRange);
FloatRectangle textObjectBounds = __textObjectBounds;
textObjectBounds.x -= 1;
textObjectBounds.width = textObjectBounds.width + 2;
- CalculateCursorBounds(__textObjectBounds, cursorBounds, startRange);
- Color textBlockLineColor;
- GET_COLOR_CONFIG(EDIT::CURSOR_NORMAL, textBlockLineColor);
+
+ if (__pCopyPasteManager)
+ {
+ __pCopyPasteManager->GetHandlerRowColumnIndex(false, true, rowIndex, columnIndex);
+ }
+
+ if (rowIndex != -1 && columnIndex != -1)
+ {
+ CalculateCursorBounds(__textObjectBounds, cursorBounds, rowIndex, columnIndex);
+ }
+ else
+ {
+ CalculateCursorBounds(__textObjectBounds, cursorBounds, startRange);
+ }
if (cursorBounds.x != -1)
{
canvas.FillRectangle(textBlockLineColor, cursorBounds);
}
- if (__rowCursorIndex != -1 && __columnCursorIndex != -1)
+ rowIndex = -1;
+ columnIndex = -1;
+
+ if (__pCopyPasteManager)
{
- CalculateCursorBounds(__textObjectBounds, cursorBounds, __rowCursorIndex, __columnCursorIndex);
+ __pCopyPasteManager->GetHandlerRowColumnIndex(false, false, rowIndex, columnIndex);
+ }
+ if (rowIndex != -1 && columnIndex != -1)
+ {
+ CalculateCursorBounds(__textObjectBounds, cursorBounds, rowIndex, columnIndex);
}
else
{
{
SetCursorPosition(cursorPos);
}
+ else
+ {
+ cursorPos = GetTextLength();
+ SetCursorPosition(cursorPos);
+ }
ScrollPanelToCursorPosition();
GetCursorBounds(true, cursorBounds);
break;
case CORE_COPY_PASTE_ACTION_CUT:
__pEdit->CutText();
+ InitializeCopyPasteManager();
break;
case CORE_COPY_PASTE_ACTION_PASTE:
__pEdit->PasteText();
+ InitializeCopyPasteManager();
break;
case CORE_COPY_PASTE_ACTION_SEARCH:
+ InitializeCopyPasteManager();
+ break;
case CORE_COPY_PASTE_ACTION_CLIPBOARD:
__clipboardConnected = true;
- //fall through
+ break;
default:
break;
}
- InitializeCopyPasteManager();
__pEdit->Invalidate();
return;
{
cursorPos--;
}
-
- if (IsDelimiter(__pTextBuffer[cursorPos]) && cursorPos > 0)
+ else
{
- cursorPos--;
+ if (IsDelimiter(__pTextBuffer[cursorPos]) && cursorPos > 0)
+ {
+ cursorPos--;
+ }
}
for (int i = cursorPos; i >= 0; i--)
ADD_COLOR_CONFIG(CLEAR_ICON_PRESSED, $B042);
ADD_COLOR_CONFIG(CUT_LINK_TEXT_NORMAL, $B052L5);
ADD_COLOR_CONFIG(CUT_LINK_BG_NORMAL, $B0217);
- ADD_COLOR_CONFIG(CURSOR_NORMAL, $F011L12);
+ ADD_COLOR_CONFIG(CURSOR_NORMAL, $F052);
ADD_IMAGE_CONFIG(BG_NORMAL, #00_edit_field_no_line_square_bg.#.png);
ADD_IMAGE_CONFIG(BG_PRESSED, #00_edit_field_no_line_square_bg.#.png);