bool
_EditCopyPasteHandler::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo)
{
- __pCopyPasteManager->ReleaseCopyPastePopup();
+ _ContextMenu* pCopyPastePopup = __pCopyPasteManager->GetCopyPastePopup();
+ if (pCopyPastePopup)
+ {
+ pCopyPastePopup->SetVisibleState(false);
+ pCopyPastePopup->Close();
+ }
+
#if EDIT_COPY_PASTE_MAGNIFIER
- CreateCopyPasteMagnifier();
+ if (!__pCopyPasteMagnifier)
+ {
+ CreateCopyPasteMagnifier();
+ }
+ else
+ {
+ __pCopyPasteMagnifier->SetVisibleState(true);
+ __pCopyPasteMagnifier->Open();
+ }
#endif
__touchPressedPoint = touchinfo.GetCurrentPosition();
__absoluteTouchPressedPoint = FloatPoint(GetBoundsF().x + __touchPressedPoint.x, GetBoundsF().y + __touchPressedPoint.y);
CheckReverseStatus();
__isTouchPressed = false;
__absoluteTouchPressedPoint = FloatPoint(0.0f, 0.0f);
- DestroyCopyPasteMagnifier();
- __pCopyPasteManager->CreateCopyPastePopup();
+ if (__pCopyPasteMagnifier)
+ {
+ __pCopyPasteMagnifier->SetVisibleState(false);
+ __pCopyPasteMagnifier->Close();
+ }
+ _ContextMenu* pCopyPastePopup = __pCopyPasteManager->GetCopyPastePopup();
+ if (pCopyPastePopup && !__isTouchMoving)
+ {
+ pCopyPastePopup->SetVisibleState(true);
+ pCopyPastePopup->Open();
+ }
+ else
+ {
+ __pCopyPasteManager->CreateCopyPastePopup();
+ }
__pCopyPasteManager->Show();
__pCopyPasteManager->SendTextBlockEvent();
Invalidate();
editShowAreaAbsRect.y = panelAbsoulteBounds.y;
editShowAreaAbsRect.height -= (panelAbsoulteBounds.y - editShowAreaAbsRect.y);
}
- __editVisibleArea = editShowAreaAbsRect;
+ __editVisibleArea = CoordinateSystem::AlignToDevice(editShowAreaAbsRect);
}
FloatPoint copyPastePoint(0.0f, 0.0f);
__contextMenuAlign = CONTEXT_MENU_CORE_ALIGN_UP;