{
if (__isCopyPasteManagerExist)
{
- __pCopyPasteManager->CreateHandle();
- __pCopyPasteManager->CreateCopyPastePopup();
- __pCopyPasteManager->Show();
+ PostInternalEvent(String(L"ShowCopyPaste"));
}
__rotated = false;
}
cursorBounds.height -= cursorHeightDiff;
}
- if (cursorBounds.x == textBounds.x + textBounds.width)
+ if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE)
{
- cursorBounds.x -= 1.0f;
+ if (__pTextObject->GetBlock() == false)
+ {
+ cursorBounds.x -= 1.0f;
+ }
+
+ if (cursorBounds.x > textBounds.x + textBounds.width)
+ {
+ if (cursorBounds.x <= textBounds.x + textBounds.width + cursorBounds.width)
+ {
+ cursorBounds.x = textBounds.x + textBounds.width;
+ }
+ else
+ {
+ return E_SYSTEM;
+ }
+ }
+
+ if (cursorBounds.x < textBounds.x)
+ {
+ if (cursorBounds.x > textBounds.x - cursorBounds.width)
+ {
+ cursorBounds.x = textBounds.x;
+ }
+ else
+ {
+ return E_SYSTEM;
+ }
+ }
}
- else if (cursorBounds.x > textBounds.x + textBounds.width)
+ else
{
- cursorBounds.x = textBounds.x + textBounds.width;
- return E_SYSTEM;
- }
+ if (cursorBounds.x == textBounds.x + textBounds.width)
+ {
+ cursorBounds.x -= 1.0f;
+ }
+ else if (cursorBounds.x > textBounds.x + textBounds.width)
+ {
+ cursorBounds.x = textBounds.x + textBounds.width;
+ return E_SYSTEM;
+ }
- if (__pTextObject->GetBlock() == false)
- {
- cursorBounds.x -= 1.0f;
- if (cursorBounds.x < textBounds.x)
+ if (__pTextObject->GetBlock() == false)
{
- cursorBounds.x = textBounds.x;
+ cursorBounds.x -= 1.0f;
+ if (cursorBounds.x < textBounds.x)
+ {
+ cursorBounds.x = textBounds.x;
+ }
}
}
cursorBounds.height -= cursorHeightDiff;
}
- if (cursorBounds.x == textBounds.x + textBounds.width)
+ if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE)
{
- cursorBounds.x -= 1.0f;
+ if (__pTextObject->GetBlock() == false)
+ {
+ cursorBounds.x -= 1.0f;
+ }
+
+ if (cursorBounds.x > textBounds.x + textBounds.width)
+ {
+ if (cursorBounds.x <= textBounds.x + textBounds.width + cursorBounds.width)
+ {
+ cursorBounds.x = textBounds.x + textBounds.width;
+ }
+ else
+ {
+ return E_SYSTEM;
+ }
+ }
+
+ if (cursorBounds.x < textBounds.x)
+ {
+ if (cursorBounds.x > textBounds.x - cursorBounds.width)
+ {
+ cursorBounds.x = textBounds.x;
+ }
+ else
+ {
+ return E_SYSTEM;
+ }
+ }
}
- else if (cursorBounds.x > textBounds.x + textBounds.width)
+ else
{
- cursorBounds.x = textBounds.x + textBounds.width;
- return E_SYSTEM;
- }
+ if (cursorBounds.x == textBounds.x + textBounds.width)
+ {
+ cursorBounds.x -= 1.0f;
+ }
+ else if (cursorBounds.x > textBounds.x + textBounds.width)
+ {
+ cursorBounds.x = textBounds.x + textBounds.width;
+ return E_SYSTEM;
+ }
- if (__pTextObject->GetBlock() == false)
- {
- cursorBounds.x -= 1.0f;
- if (cursorBounds.x < textBounds.x)
+ if (__pTextObject->GetBlock() == false)
{
- cursorBounds.x = textBounds.x;
+ cursorBounds.x -= 1.0f;
+ if (cursorBounds.x < textBounds.x)
+ {
+ cursorBounds.x = textBounds.x;
+ }
}
}
if (!__isCopyPasteManagerExist && !__pFlickAnimationTimer)
{
bool tokenEditting = false;
+ bool needToCreatePopup = true;
if (__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN)
{
_TokenEditPresenter* pTokenEditPresenter = dynamic_cast < _TokenEditPresenter* >(this);
}
}
- if (IsInternalFocused() && !tokenEditting)
+ // need to check the status of CheckKeypadExist() API.
+ /*
+ if (!__isUSBKeyboardConnected && !__isKeypadExist)
+ {
+ needToCreatePopup = false;
+ }
+ */
+
+ _AccessibilityManager* pAccessibilityManager = _AccessibilityManager::GetInstance();
+ SysTryReturn(NID_UI_CTRL, pAccessibilityManager, false, E_SYSTEM, "pAccessibilityManager is null");
+ if (pAccessibilityManager->IsActivated())
+ {
+ needToCreatePopup = false;
+ }
+
+ if (IsInternalFocused() && !tokenEditting && needToCreatePopup)
{
__pCopyPasteManager = new (std::nothrow) _EditCopyPasteManager(*__pEdit);
SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, false, E_SYSTEM, "Unable to create _EditCopyPasteManager instance.");
if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE)
{
float horizontalGap = touchInfo.GetCurrentPosition().x - __pScrollEffect->currentX;
- FloatDimension currentCharacterDimension;
- int currentLineOffset = __pTextObject->GetTextOffsetAtLine(0);
- int currentLineLength = __pTextObject->GetTextLengthAtLine(0);
- if (horizontalGap < 0.0f && currentLineOffset+currentLineLength < GetTextLength())
+ FloatRectangle lineBounds = __pTextObject->GetBoundsAtLineF(0);
+ float textDisplayPositionX = __pTextObject->GetFirstDisplayPositionXF();
+ float newTextDisplayPositionX = 0;
+
+ if (horizontalGap < 0.0f && lineBounds.width - textDisplayPositionX > __textObjectBounds.width)
{
- currentCharacterDimension = __pTextObject->GetTextExtentF(currentLineOffset+currentLineLength, 1);
- if (Math::Abs(horizontalGap) >= currentCharacterDimension.width)
+ newTextDisplayPositionX = textDisplayPositionX - horizontalGap;
+
+ if (newTextDisplayPositionX > lineBounds.width - __textObjectBounds.width)
{
- __pScrollEffect->previousX = __pScrollEffect->currentX;
- __pScrollEffect->currentX = touchInfo.GetCurrentPosition().x;
- __isMovingCursorByTouchMove = true;
- __isTouchReleaseSkipped = true;
- StopCursorTimer();
+ newTextDisplayPositionX = lineBounds.width - __textObjectBounds.width;
+ }
- SetCursorPosition(currentLineOffset+currentLineLength+1);
- UpdateComponentInformation();
+ __pScrollEffect->previousX = __pScrollEffect->currentX;
+ __pScrollEffect->currentX = touchInfo.GetCurrentPosition().x;
+ __isMovingCursorByTouchMove = true;
+ __isTouchReleaseSkipped = true;
+ StopCursorTimer();
- currentLineOffset = __pTextObject->GetTextOffsetAtLine(0);
- if (__pScrollEffect->cursorPosition > currentLineOffset)
- {
- SetCursorPosition(__pScrollEffect->cursorPosition);
- }
- else
- {
- __pScrollEffect->cursorPosition = currentLineOffset + 1;
- SetCursorPosition(__pScrollEffect->cursorPosition);
- }
- __pEdit->Invalidate();
- return true;
- }
+ __pTextObject->SetFirstDisplayPositionX(newTextDisplayPositionX);
+ __pEdit->Invalidate();
+ return true;
}
- if (horizontalGap > 0.0f && currentLineOffset > 0)
+ if (horizontalGap > 0.0f && textDisplayPositionX > 0)
{
- currentCharacterDimension = __pTextObject->GetTextExtentF(currentLineOffset-1, 1);
- if (horizontalGap >= currentCharacterDimension.width)
+ newTextDisplayPositionX = textDisplayPositionX - horizontalGap;
+ if (newTextDisplayPositionX < 0)
{
- __pScrollEffect->previousX = __pScrollEffect->currentX;
- __pScrollEffect->currentX = touchInfo.GetCurrentPosition().x;
- __isMovingCursorByTouchMove = true;
- __isTouchReleaseSkipped = true;
- StopCursorTimer();
-
- SetCursorPosition(currentLineOffset);
- UpdateComponentInformation();
- currentLineOffset = __pTextObject->GetTextOffsetAtLine(0);
- currentLineLength = __pTextObject->GetTextLengthAtLine(0);
- if (__pScrollEffect->cursorPosition < currentLineOffset + currentLineLength)
- {
- SetCursorPosition(__pScrollEffect->cursorPosition);
- }
- else
- {
- __pScrollEffect->cursorPosition = currentLineOffset + currentLineLength;
- SetCursorPosition(__pScrollEffect->cursorPosition);
- }
- __pEdit->Invalidate();
- return true;
+ newTextDisplayPositionX = 0;
}
+
+ __pScrollEffect->previousX = __pScrollEffect->currentX;
+ __pScrollEffect->currentX = touchInfo.GetCurrentPosition().x;
+ __isMovingCursorByTouchMove = true;
+ __isTouchReleaseSkipped = true;
+ StopCursorTimer();
+
+ __pTextObject->SetFirstDisplayPositionX(newTextDisplayPositionX);
+ __pEdit->Invalidate();
+ return true;
}
}
else
FloatRectangle panelAbsBounds(0.0f, 0.0f, 0.0f, 0.0f);
FloatRectangle absCursorBounds(0.0f, 0.0f, 0.0f, 0.0f);
+ _AccessibilityManager* pAccessibilityManager = _AccessibilityManager::GetInstance();
+ SysTryReturn(NID_UI_CTRL, pAccessibilityManager, false, E_SYSTEM, "pAccessibilityManager is null");
+
if (IsViewModeEnabled() == true)
{
return false;
r = __pEdit->SendTextBlockEvent(0, textLength);
UpdateComponentInformation();
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r));
- __pCopyPasteManager = new (std::nothrow) _EditCopyPasteManager(*__pEdit);
- SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, true, E_OUT_OF_MEMORY, "Unable to create _EditCopyPasteManager instance.");
- __pCopyPasteManager->AddCopyPasteEventListener(*this);
- __pCopyPasteManager->CreateCopyPastePopup();
- __pCopyPasteManager->Show();
- __isCopyPasteManagerExist = true;
+
+ if (!pAccessibilityManager->IsActivated())
+ {
+ __pCopyPasteManager = new (std::nothrow) _EditCopyPasteManager(*__pEdit);
+ SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, true, E_OUT_OF_MEMORY, "Unable to create _EditCopyPasteManager instance.");
+ __pCopyPasteManager->AddCopyPasteEventListener(*this);
+ __pCopyPasteManager->CreateCopyPastePopup();
+ __pCopyPasteManager->Show();
+ __isCopyPasteManagerExist = true;
+ }
+
break;
case _KEY_C:
textLength = __pEdit->GetTextLength();
}
else if (__textBlockMoving)
{
- __pCopyPasteManager = new (std::nothrow) _EditCopyPasteManager(*__pEdit);
- SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, true, E_OUT_OF_MEMORY, "Unable to create _EditCopyPasteManager instance.");
- __pCopyPasteManager->AddCopyPasteEventListener(*this);
- __pCopyPasteManager->CreateCopyPastePopup();
- __pCopyPasteManager->Show();
- __isCopyPasteManagerExist = true;
-
+ _AccessibilityManager* pAccessibilityManager = _AccessibilityManager::GetInstance();
+ SysTryReturn(NID_UI_CTRL, pAccessibilityManager, false, E_SYSTEM, "pAccessibilityManager is null");
+ if (!pAccessibilityManager->IsActivated())
+ {
+ __pCopyPasteManager = new (std::nothrow) _EditCopyPasteManager(*__pEdit);
+ SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, true, E_OUT_OF_MEMORY, "Unable to create _EditCopyPasteManager instance.");
+ __pCopyPasteManager->AddCopyPasteEventListener(*this);
+ __pCopyPasteManager->CreateCopyPastePopup();
+ __pCopyPasteManager->Show();
+ __isCopyPasteManagerExist = true;
+ }
__textBlockMoving = false;
}
return true;
{
SysLog(NID_UI_CTRL, "OnLongPressGestureDetected");
+ _AccessibilityManager* pAccessibilityManager = _AccessibilityManager::GetInstance();
+ SysTryReturn(NID_UI_CTRL, pAccessibilityManager, false, E_SYSTEM, "pAccessibilityManager is null");
+ if (pAccessibilityManager->IsActivated())
+ {
+ SysLog(NID_UI_CTRL, "Copy&Paste is not created (ScreenReader is activated)");
+ return false;
+ }
+
if (__isClearIconPressed)
{
return true;
{
SysLog(NID_UI_CTRL, "OnTapGestureDetected");
+ _AccessibilityManager* pAccessibilityManager = _AccessibilityManager::GetInstance();
+ SysTryReturn(NID_UI_CTRL, pAccessibilityManager, false, E_SYSTEM, "pAccessibilityManager is null");
+ if (pAccessibilityManager->IsActivated())
+ {
+ SysLog(NID_UI_CTRL, "Copy&Paste is not created (ScreenReader is activated)");
+ return false;
+ }
+
if (IsInternalFocused() == false)
{
return true;
{
if (__pCopyPasteManager)
{
+ DrawText();
__pCopyPasteManager->CreateHandle();
__pCopyPasteManager->CreateCopyPastePopup();
__pCopyPasteManager->Show();