else if (__handlerDirection == HANDLER_DIRECTION_REVERSE_2)
{
rect.x = rect.x - __pHandlerBitmap->GetWidthF();
- rect.y -= rect.height;
+ rect.y -= (rect.height + cursorRect.height);
}
else if (__handlerDirection == HANDLER_DIRECTION_REVERSE_3)
{
- rect.y -= rect.height;
+ rect.y -= (rect.height + cursorRect.height);
}
}
else
}
else if (__handlerDirection == HANDLER_DIRECTION_REVERSE_2)
{
- rect.y -= rect.height;
+ rect.y -= (rect.height + cursorRect.height);
}
else if (__handlerDirection == HANDLER_DIRECTION_REVERSE_3)
{
rect.x = rect.x - __pHandlerBitmap->GetWidthF();
- rect.y -= rect.height;
+ rect.y -= (rect.height + cursorRect.height);
}
}
}
if ((__handlerDirection == HANDLER_DIRECTION_NONE) && ((rect.y + rect.height) > screenSize.height))
{
__handlerDirection = HANDLER_DIRECTION_REVERSE_3;
- rect.y -= rect.height;
+ rect.y -= (rect.height + cursorAbsBounds.height);
}
else if ((__handlerDirection == HANDLER_DIRECTION_NONE) && ((rect.y + rect.height) <= screenSize.height))
{
else if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_2) && ((rect.y + 2*rect.height) <= screenSize.height))
{
__handlerDirection = HANDLER_DIRECTION_REVERSE_1;
- rect.y += rect.height;
+ rect.y += (rect.height + cursorAbsBounds.height);
}
ChangeHandlerBitmap();
rect.x += rect.width;
if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_1) && ((rect.y + rect.height) > screenSize.height))
{
__handlerDirection = HANDLER_DIRECTION_REVERSE_2;
- rect.y -= rect.height;
+ rect.y -= (rect.height + cursorAbsBounds.height);
}
else if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_1) && ((rect.y + rect.height) <= screenSize.height))
{
else if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_3) && ((rect.y + 2*rect.height) <= screenSize.height))
{
__handlerDirection = HANDLER_DIRECTION_NONE;
- rect.y += rect.height;
+ rect.y += (rect.height + cursorAbsBounds.height);
}
ChangeHandlerBitmap();
rect.x -= rect.width;
{
__handlerDirection = HANDLER_DIRECTION_REVERSE_3;
}
- rect.y -= rect.height;
+ rect.y -= (rect.height + cursorAbsBounds.height);
ChangeHandlerBitmap();
__reverseCheck = true;
}
- else if (((__handlerDirection == HANDLER_DIRECTION_REVERSE_2) || (__handlerDirection == HANDLER_DIRECTION_REVERSE_3)) && ((rect.y + 2*rect.height) <= screenSize.height))
+ else if (((__handlerDirection == HANDLER_DIRECTION_REVERSE_2) || (__handlerDirection == HANDLER_DIRECTION_REVERSE_3)) && ((rect.y + 2*rect.height + cursorAbsBounds.height) <= screenSize.height))
{
if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_2) && rect.x < 0.0f)
{
{
__handlerDirection = HANDLER_DIRECTION_REVERSE_1;
}
- rect.y += rect.height;
+ rect.y += (rect.height + cursorAbsBounds.height);
ChangeHandlerBitmap();
__reverseCheck = true;
}
if ((__handlerDirection == HANDLER_DIRECTION_NONE) && ((rect.y + rect.height) > screenSize.height))
{
__handlerDirection = HANDLER_DIRECTION_REVERSE_3;
- rect.y -= rect.height;
+ rect.y -= (rect.height + cursorAbsBounds.height);
}
else if ((__handlerDirection == HANDLER_DIRECTION_NONE) && ((rect.y + rect.height) <= screenSize.height))
{
else if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_2) && ((rect.y + 2*rect.height) <= screenSize.height))
{
__handlerDirection = HANDLER_DIRECTION_REVERSE_1;
- rect.y += rect.height;
+ rect.y += (rect.height + cursorAbsBounds.height);
}
ChangeHandlerBitmap();
rect.x -= rect.width;
if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_1) && ((rect.y + rect.height) > screenSize.height))
{
__handlerDirection = HANDLER_DIRECTION_REVERSE_2;
- rect.y -= rect.height;
+ rect.y -= (rect.height + cursorAbsBounds.height);
}
else if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_1) && ((rect.y + rect.height) <= screenSize.height))
{
else if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_3) && ((rect.y + 2*rect.height) <= screenSize.height))
{
__handlerDirection = HANDLER_DIRECTION_NONE;
- rect.y += rect.height;
+ rect.y += (rect.height + cursorAbsBounds.height);
}
ChangeHandlerBitmap();
rect.x += rect.width;
{
__handlerDirection = HANDLER_DIRECTION_REVERSE_3;
}
- rect.y -= rect.height;
+ rect.y -= (rect.height + cursorAbsBounds.height);
ChangeHandlerBitmap();
__reverseCheck = true;
}
- else if (((__handlerDirection == HANDLER_DIRECTION_REVERSE_2) || (__handlerDirection == HANDLER_DIRECTION_REVERSE_3)) && ((rect.y + 2*rect.height) <= screenSize.height))
+ else if (((__handlerDirection == HANDLER_DIRECTION_REVERSE_2) || (__handlerDirection == HANDLER_DIRECTION_REVERSE_3)) && ((rect.y + 2*rect.height + cursorAbsBounds.height) <= screenSize.height))
{
if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_2) && ((rect.x + rect.width) <= screenSize.width))
{
{
__handlerDirection = HANDLER_DIRECTION_REVERSE_1;
}
- rect.y += rect.height;
+ rect.y += (rect.height + cursorAbsBounds.height);
ChangeHandlerBitmap();
__reverseCheck = true;
}
}
FloatPoint absoluteTouchMovedPoint = FloatPoint(GetBoundsF().x + point.x, GetBoundsF().y + point.y);
+ if (__handlerDirection == HANDLER_DIRECTION_REVERSE_2 || __handlerDirection == HANDLER_DIRECTION_REVERSE_3)
+ {
+ absoluteTouchMovedPoint.y += (GetBoundsF().height + absCursorRect.height);
+ }
if (__rowIndex == -1 && __columnIndex == -1)
{
pEditPresenter->CalculateCursorBounds(pEditPresenter->GetTextBoundsF(), cursorRect,__handlerCursorPos);
SetFooterVisible(true);// must be called ahead of DeflateClientRectHeight
}
- if ( __isTextComposing)
- {
- __pInputConnection->FinishTextComposition();
- __isTextComposing = false;
- __composingTextLength = 0;
- }
+ FinishTextComposition();
ChangeLayoutInternal(__pEdit->GetOrientation());
int textLength = composingText.GetLength();
- if (__isTextComposing == true)
+ if (__isTextComposing == false)
+ {
+ if (textLength == 0)
+ {
+ return;
+ }
+ }
+ else
{
int compositionStart = GetCursorPosition();
textObjectBounds.x -= 1;
textObjectBounds.width = textObjectBounds.width + 2;
CalculateCursorBounds(__textObjectBounds, cursorBounds, startRange);
- Color textBlockLineColor(0x3B, 0x73, 0xB6);
+ Color textBlockLineColor;
+ GET_COLOR_CONFIG(EDIT::CURSOR_NORMAL, textBlockLineColor);
if (cursorBounds.x != -1)
{
switch (keyCode)
{
case _KEY_A:
- if (__isInputConnectionBound && __isTextComposing)
- {
- __pInputConnection->FinishTextComposition();
- __isTextComposing = false;
- __composingTextLength = 0;
- }
+ FinishTextComposition();
if (__isCopyPasteManagerExist)
{
InitializeCopyPasteManager();
}
- if (__isInputConnectionBound != false && __isTextComposing != false)
- {
- __pInputConnection->FinishTextComposition();
- __isTextComposing = false;
- __composingTextLength = 0;
- }
+ FinishTextComposition();
int curCursorLine = __pTextObject->GetLineIndexAtTextIndex(__pTextObject->GetCursorIndex());
int firstTextIndex = __pTextObject->GetFirstTextIndexAt(curCursorLine);
InitializeCopyPasteManager();
}
- if (__isInputConnectionBound != false && __isTextComposing != false)
- {
- __pInputConnection->FinishTextComposition();
- __isTextComposing = false;
- __composingTextLength = 0;
- }
+ FinishTextComposition();
if (__cursorPos != 0)
{
InitializeCopyPasteManager();
}
- if (__isInputConnectionBound != false && __isTextComposing != false)
- {
- __pInputConnection->FinishTextComposition();
- __isTextComposing = false;
- __composingTextLength = 0;
- }
+ FinishTextComposition();
int curCursorLine = __pTextObject->GetLineIndexAtTextIndex(__pTextObject->GetCursorIndex());
if (curCursorLine !=0 )
InitializeCopyPasteManager();
}
- if (__isInputConnectionBound != false && __isTextComposing != false)
- {
- __pInputConnection->FinishTextComposition();
- __isTextComposing = false;
- __composingTextLength = 0;
- }
+ FinishTextComposition();
int curCursorLine = __pTextObject->GetLineIndexAtTextIndex(__pTextObject->GetCursorIndex());
int totalLine = __pTextObject->GetTotalLineCount();
InitializeCopyPasteManager();
}
- if (__isInputConnectionBound != false && __isTextComposing != false)
- {
- __pInputConnection->FinishTextComposition();
- __isTextComposing = false;
- __composingTextLength = 0;
- }
+ FinishTextComposition();
if (__cursorPos == GetTextLength())
{
}
else
{
- if (__isInputConnectionBound && __isTextComposing)
- {
- __pInputConnection->FinishTextComposition();
- __isTextComposing = false;
- __composingTextLength = 0;
- }
+ FinishTextComposition();
int cursorPosition = GetCursorPosition();
if ((__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) == false)
InitializeCopyPasteManager();
}
- if (__isInputConnectionBound != false && __isTextComposing != false)
- {
- __pInputConnection->FinishTextComposition();
- __isTextComposing = false;
- __composingTextLength = 0;
- }
+ FinishTextComposition();
int curCursorLine = __pTextObject->GetLineIndexAtTextIndex(__pTextObject->GetCursorIndex());
int totalLine = __pTextObject->GetTotalLineCount();
return true;
}
- if (__isInputConnectionBound && __isTextComposing)
- {
- __pInputConnection->FinishTextComposition();
- __isTextComposing = false;
- __composingTextLength = 0;
- }
+ FinishTextComposition();
int cursorPos = GetCursorPositionAt(__pressedPoint);
if (cursorPos != -1)
}
}
- if (__isInputConnectionBound && __isTextComposing)
- {
- __pInputConnection->FinishTextComposition();
- __isTextComposing = false;
- __composingTextLength = 0;
- }
+ FinishTextComposition();
GetWordPosition(cursorPos, start, end);
SetBlockRange(start, end);
SysTryReturnResult(NID_UI_CTRL, length <= __limitLength, E_INVALID_ARG, "The Invalid argument is given.");
}
- if (__isInputConnectionBound && __isTextComposing)
- {
- __pInputConnection->FinishTextComposition();
- __isTextComposing = false;
- __composingTextLength = 0;
- }
+ FinishTextComposition();
__pTextString->Clear();
__pTextString->Append(text);
ReplaceTextIntoPasswordHyphenString();
+ __pTextObject->NotifyTextChanged(__pTextBuffer, 0, __pTextString->GetLength(), 0);
+
SetCursorPosition(length);
if (__pEdit->GetEditStyle() & EDIT_STYLE_FLEXIBLE)
result r = E_SUCCESS;
- if (__isInputConnectionBound && __isTextComposing)
- {
- __pInputConnection->FinishTextComposition();
- __isTextComposing = false;
- __composingTextLength = 0;
- }
+ FinishTextComposition();
int textLength = GetTextLength();
SysTryReturnResult(NID_UI_CTRL, totalLength <= __limitLength, E_MAX_EXCEEDED, "The text exceeds the limitation length.");
}
- if (__isInputConnectionBound == true && __isTextComposing == true)
- {
- __pInputConnection->FinishTextComposition();
- __isTextComposing = false;
- __composingTextLength = 0;
- }
+ FinishTextComposition();
r = __pTextString->Insert(text, position);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
}
}
- __pInputConnection->FinishTextComposition();
+ FinishTextComposition();
__pInputConnection->HideInputPanel();
__pInputConnection->UnbindInputMethod();
- __isTextComposing = false;
- __composingTextLength = 0;
+
if (__isKeypadExist)
{
if (__isCursorDisabled == false)
{
-// Color cursorColor;
-// GET_COLOR_CONFIG(EDIT::CURSOR_NORMAL, cursorColor);
- Color cursorColor(0x3B, 0x73, 0xB6);
+ Color cursorColor;
+ GET_COLOR_CONFIG(EDIT::CURSOR_NORMAL, cursorColor);
if (__isCursorInitialized)
{
void
_EditPresenter::FinishTextComposition(void)
{
- if (__isInputConnectionBound)
+ if (__isInputConnectionBound && __isTextComposing)
{
+ __pEdit->SetTextEventEnabled(false);
__pInputConnection->FinishTextComposition();
__isTextComposing = false;
__composingTextLength = 0;
+ __pEdit->SetTextEventEnabled(true);
}
return;
InitializeCopyPasteManager();
- if (__isInputConnectionBound && __isTextComposing)
- {
- __pInputConnection->FinishTextComposition();
- __isTextComposing = false;
- __composingTextLength = 0;
- }
+ FinishTextComposition();
if (__isPasswordVisible)
{