{
if (__isCopyPasteManagerExist)
{
- __pCopyPasteManager->CreateHandle();
- __pCopyPasteManager->CreateCopyPastePopup();
- __pCopyPasteManager->Show();
+ PostInternalEvent(String(L"ShowCopyPaste"));
}
__rotated = false;
}
int textLength = 0;
int start = 0;
int end = 0;
+ FloatRectangle panelAbsBounds(0.0f, 0.0f, 0.0f, 0.0f);
+ FloatRectangle absCursorBounds(0.0f, 0.0f, 0.0f, 0.0f);
if (IsViewModeEnabled() == true)
{
SetCursorPosition(__cursorPos-1);
}
+ if (__pParentPanel)
+ {
+ panelAbsBounds = __pParentPanel->GetAbsoluteBoundsF();
+ GetCursorBounds(true, absCursorBounds);
+
+ if (!panelAbsBounds.Contains(FloatPoint(absCursorBounds.x, absCursorBounds.y + absCursorBounds.height)))
+ {
+ ScrollPanelToCursorPosition();
+ }
+ }
+
if ((__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) == false)
{
DrawText();
int firstTextIndex = __pTextObject->GetFirstTextIndexAt(curCursorLine-1);
int newCursorPosition = offset + firstTextIndex;
int textLength = __pTextObject->GetTextLengthAt(curCursorLine-1);
- FloatRectangle clientBounds(0.0f, 0.0f, 0.0f, 0.0f);
- FloatRectangle absCursorBounds(0.0f, 0.0f, 0.0f, 0.0f);
if (offset<textLength)
{
int startPosition = -1;
}
}
- if (__pParentForm)
+ if (__pParentPanel)
{
- clientBounds = __pParentForm->GetClientBoundsF();
+ panelAbsBounds = __pParentPanel->GetAbsoluteBoundsF();
GetCursorBounds(true, absCursorBounds);
- if (!clientBounds.Contains(FloatPoint(absCursorBounds.x, absCursorBounds.y)))
+ if (!panelAbsBounds.Contains(FloatPoint(absCursorBounds.x, absCursorBounds.y)))
{
ScrollPanelToCursorPosition();
- __pParentForm->Draw();
}
}
if ((__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) == false)
int firstTextIndex = __pTextObject->GetFirstTextIndexAt(curCursorLine+1);
int newCursorPosition = offset + firstTextIndex;
int textLength = __pTextObject->GetTextLengthAt(curCursorLine+1);
- FloatRectangle clientBounds(0.0f, 0.0f, 0.0f, 0.0f);
- FloatRectangle absCursorBounds(0.0f, 0.0f, 0.0f, 0.0f);
if (offset<textLength)
{
}
}
- if (__pParentForm)
+ if (__pParentPanel)
{
- clientBounds = __pParentForm->GetClientBoundsF();
+ panelAbsBounds = __pParentPanel->GetAbsoluteBoundsF();
GetCursorBounds(true, absCursorBounds);
- if (!clientBounds.Contains(FloatPoint(absCursorBounds.x, absCursorBounds.y + absCursorBounds.height)))
+ if (!panelAbsBounds.Contains(FloatPoint(absCursorBounds.x, absCursorBounds.y + absCursorBounds.height)))
{
ScrollPanelToCursorPosition();
- __pParentForm->Draw();
}
}
if ((__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) == false)
SetCursorPosition(__cursorPos+1);
}
+ if (__pParentPanel)
+ {
+ panelAbsBounds = __pParentPanel->GetAbsoluteBoundsF();
+ GetCursorBounds(true, absCursorBounds);
+
+ if (!panelAbsBounds.Contains(FloatPoint(absCursorBounds.x, absCursorBounds.y + absCursorBounds.height)))
+ {
+ ScrollPanelToCursorPosition();
+ }
+ }
+
if ((__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) == false)
{
DrawText();
_EditPresenter::OnNotifiedN(IList* pArgs)
{
String showKeypad(L"ShowKeypad");
+ String showCopyPaste(L"ShowCopyPaste");
+
String* pType = dynamic_cast <String*>(pArgs->GetAt(0));
if (pType)
ShowFullscreenKeypad();
}
}
+ else if (*pType == showCopyPaste)
+ {
+ if (__pCopyPasteManager)
+ {
+ __pCopyPasteManager->CreateHandle();
+ __pCopyPasteManager->CreateCopyPastePopup();
+ __pCopyPasteManager->Show();
+ }
+ }
pArgs->RemoveAll(true);
delete pArgs;