, __pCommandButton(null)
, __pInputConnection(null)
, __isInputConnectionBound(false)
+ , __sentKeypadEvent(CORE_KEYPAD_EVENT_STATUS_CLOSE)
, __pClipboard(null)
, __guideText()
, __titleText()
}
else
{
- if (!__isClipboardExist)
+ if (GetLastSentKeypadEvent() != CORE_KEYPAD_EVENT_STATUS_OPEN)
{
- __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_OPEN);
+ if (!__isClipboardExist)
+ {
+ __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_OPEN);
+ }
+ __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_OPENED);
}
- __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_OPENED);
}
}
else if (showState == INPUT_PANEL_SHOW_STATE_HIDE)// 1.unbound 2.bounded&usb off -> usb on 3.Flick keypad hide
}
else
{
- if (__isInputConnectionBound)// keypad drag down
+ if (__isInputConnectionBound)// keypad hided by back key or prediction hided by usb mode changed(on -> off)
{
if (!__isKeypadCommandButtonVisible && !__isClipboardExist)
{
if (__pParentForm)
{
- SysLog(NID_UI_CTRL, "Form deflate RESET!!!!!!!!!!");
+ SysLog(NID_UI_CTRL, "Form deflate RESET!!!");
__pParentForm->DeflateClientRectHeight(0.0f);
}
AdjustParentPanelHeight(true);
if (__pParentForm)
{
- SysLog(NID_UI_CTRL, "Form deflate RESET!!!!!!!!!!");
+ SysLog(NID_UI_CTRL, "Form deflate RESET!!!");
__pParentForm->DeflateClientRectHeight(0.0f);
__pParentForm->Draw();
}
if (__pParentForm)
{
- SysLog(NID_UI_CTRL, "Form deflate RESET!!!!!!!!!!");
+ SysLog(NID_UI_CTRL, "Form deflate RESET!!!");
__pParentForm->DeflateClientRectHeight(0.0f);
}
return false;
}
+void
+_EditPresenter::SetSentKeypadEvent(CoreKeypadEventStatus sentKeypadEvent)
+{
+ __sentKeypadEvent = sentKeypadEvent;
+}
+
+CoreKeypadEventStatus
+_EditPresenter::GetLastSentKeypadEvent(void)
+{
+ return __sentKeypadEvent;
+}
+
+
_EditPresenter*
_EditPresenter::CreateInstanceN(void)
{
return true;
}
- FloatRectangle absoluteEditRect = __pEdit->GetAbsoluteBoundsF();
+ FloatRectangle absoluteEditRect = __pEdit->GetAbsoluteBoundsF(true);
FloatPoint touchStartPoint = __pressedAbsolutePoint;
//After internal touch core complete the float conversion, we need to change the code here
FloatPoint touchPoint = touchInfo.GetCurrentPosition();
__pScrollEffect->previousX = _CoordinateSystemUtils::ConvertToFloat(touchInfo.GetCurrentPosition().x);
__pScrollEffect->currentX = _CoordinateSystemUtils::ConvertToFloat(touchInfo.GetCurrentPosition().x);
- __pScrollEffect->previousAbsX = _CoordinateSystemUtils::ConvertToFloat(__pEdit->GetAbsoluteBoundsF().x + touchInfo.GetCurrentPosition().x);
- __pScrollEffect->currentAbsX = _CoordinateSystemUtils::ConvertToFloat(__pEdit->GetAbsoluteBoundsF().x + touchInfo.GetCurrentPosition().x);
- __pScrollEffect->previousAbsY = _CoordinateSystemUtils::ConvertToFloat(__pEdit->GetAbsoluteBoundsF().y + touchInfo.GetCurrentPosition().y);
- __pScrollEffect->currentAbsY = _CoordinateSystemUtils::ConvertToFloat(__pEdit->GetAbsoluteBoundsF().y + touchInfo.GetCurrentPosition().y);
+ __pScrollEffect->previousAbsX = _CoordinateSystemUtils::ConvertToFloat(__pEdit->GetAbsoluteBoundsF(true).x + touchInfo.GetCurrentPosition().x);
+ __pScrollEffect->currentAbsX = _CoordinateSystemUtils::ConvertToFloat(__pEdit->GetAbsoluteBoundsF(true).x + touchInfo.GetCurrentPosition().x);
+ __pScrollEffect->previousAbsY = _CoordinateSystemUtils::ConvertToFloat(__pEdit->GetAbsoluteBoundsF(true).y + touchInfo.GetCurrentPosition().y);
+ __pScrollEffect->currentAbsY = _CoordinateSystemUtils::ConvertToFloat(__pEdit->GetAbsoluteBoundsF(true).y + touchInfo.GetCurrentPosition().y);
__pScrollEffect->cursorPosition = GetCursorPosition();
- FloatRectangle absoluteEditRect = __pEdit->GetAbsoluteBoundsF();
+ FloatRectangle absoluteEditRect = __pEdit->GetAbsoluteBoundsF(true);
__pressedPoint = touchInfo.GetCurrentPosition();
__pressedAbsolutePoint.x = __pressedPoint.x + absoluteEditRect.x;
}
}
}
+ else
+ {
+ if ((__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) == false)
+ {
+ SetCursorPosition(GetTextLength());
+ }
+ }
+
FadeOutScrollBar();
if (!__isCopyPasteManagerExist && !__pFlickAnimationTimer)
{
if (IsCurrentFocused() && !tokenEditting && needToCreatePopup)
{
+ if (__pPasswordTimer)
+ {
+ ChangePasswordToEchoCharacter(__pTextBuffer, __echoChar);
+ StopPasswordTimer();
+ }
__pCopyPasteManager = new (std::nothrow) _EditCopyPasteManager(*__pEdit);
SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, false, E_SYSTEM, "Unable to create _EditCopyPasteManager instance.");
__pCopyPasteManager->AddCopyPasteEventListener(*this);
__isTouchMoving = false;
__pEdit->Invalidate();
+ if (GetSearchBarFlag())
+ {
+ return false;
+ }
+
return true;
}
__pScrollEffect->currentY = touchInfo.GetCurrentPosition().y;
__pScrollEffect->previousAbsY = __pScrollEffect->currentAbsY;
- __pScrollEffect->currentAbsY = _CoordinateSystemUtils::ConvertToFloat(__pEdit->GetAbsoluteBoundsF().y + touchInfo.GetCurrentPosition().y);
+ __pScrollEffect->currentAbsY = _CoordinateSystemUtils::ConvertToFloat(__pEdit->GetAbsoluteBoundsF(true).y + touchInfo.GetCurrentPosition().y);
// float moveGap = __pScrollEffect->previousY - __pScrollEffect->currentY;
float moveGap = __pScrollEffect->previousAbsY - __pScrollEffect->currentAbsY;
__isMovingCursorByTouchMove = false;
}
- if (!(__pEdit->GetEditStyle() & EDIT_STYLE_NOSCROLL))
+ if (!(__pEdit->GetEditStyle() & EDIT_STYLE_NOSCROLL) && !(__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN))
{
if (__pScrollBar)
{
if (__pParentPanel)
{
- panelAbsBounds = __pParentPanel->GetAbsoluteBoundsF();
+ panelAbsBounds = __pParentPanel->GetAbsoluteBoundsF(true);
GetCursorBounds(true, absCursorBounds);
if (!panelAbsBounds.Contains(FloatPoint(absCursorBounds.x, absCursorBounds.y + absCursorBounds.height)))
if (__pParentPanel)
{
- panelAbsBounds = __pParentPanel->GetAbsoluteBoundsF();
+ panelAbsBounds = __pParentPanel->GetAbsoluteBoundsF(true);
GetCursorBounds(true, absCursorBounds);
if (!panelAbsBounds.Contains(FloatPoint(absCursorBounds.x, absCursorBounds.y)))
{
if (__pParentPanel)
{
- panelAbsBounds = __pParentPanel->GetAbsoluteBoundsF();
+ panelAbsBounds = __pParentPanel->GetAbsoluteBoundsF(true);
GetCursorBounds(true, absCursorBounds);
if (!panelAbsBounds.Contains(FloatPoint(absCursorBounds.x, absCursorBounds.y + absCursorBounds.height)))
if (__pParentPanel)
{
- panelAbsBounds = __pParentPanel->GetAbsoluteBoundsF();
+ panelAbsBounds = __pParentPanel->GetAbsoluteBoundsF(true);
GetCursorBounds(true, absCursorBounds);
if (!panelAbsBounds.Contains(FloatPoint(absCursorBounds.x, absCursorBounds.y + absCursorBounds.height)))
}
else if (_KEY_OEM_1 == keyCode)
{
- __pClipboard->ShowPopup(CLIPBOARD_DATA_TYPE_TEXT, *__pEdit);
+ __pClipboard->ShowPopup(CLIPBOARD_DATA_TYPE_TEXT, *__pEdit, true);
__clipboardConnected = true;
return true;
}
{
return true;
}
+ else if (_KEY_TAB == keyCode)
+ {
+ if (__isCopyPasteManagerExist)
+ {
+ InitializeCopyPasteManager();
+ if ((__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) == false)
+ {
+ DrawText();
+ }
+ else
+ {
+ __pEdit->Invalidate();
+ }
+ }
+ return false;
+ }
return false;
}
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
}
+ ScrollPanelToCursorPosition();
+
__pEdit->SendTextEvent(CORE_TEXT_EVENT_CHANGED);
__pEdit->Invalidate();
FinishTextComposition();
+ if (__pPasswordTimer)
+ {
+ ChangePasswordToEchoCharacter(__pTextBuffer, __echoChar);
+ StopPasswordTimer();
+ }
+
int cursorPos = GetCursorPositionAt(__pressedPoint);
if (cursorPos != -1)
{
delete pClipboardItem;
ReplaceTextIntoPasswordHyphenString();
+ if (__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD)
+ {
+ __pTextObject->NotifyTextChanged(__pTextBuffer, 0, __pTextString->GetLength(), 0);
+ }
ScrollPanelToCursorPosition();
__isInputConnectionBound = false;
AdjustParentPanelHeight(true);
- SysLog(NID_UI_CTRL, "Form deflate RESET!!!!!!!!!!");
+ SysLog(NID_UI_CTRL, "Form deflate RESET!!!");
__pParentForm->DeflateClientRectHeight(0);
if (!__pEdit->IsFullScreenKeypadEdit())
bool
_EditPresenter::IsContained(FloatRectangle& paramRect) const
{
- FloatRectangle absBounds = __pEdit->GetAbsoluteBoundsF();
+ FloatRectangle absBounds = __pEdit->GetAbsoluteBoundsF(true);
if ((paramRect.x < absBounds.x) ||
(paramRect.y < absBounds.y) ||
float cursorRelativeX = 0.0f;
float cursorRelativeY = 0.0f;
- FloatRectangle absBounds = __pEdit->GetAbsoluteBoundsF();
+ FloatRectangle absBounds = __pEdit->GetAbsoluteBoundsF(true);
__pTextObject->SetBounds(GetTextBoundsF());
if (index != __cursorPos)
float cursorRelativeX = 0.0f;
float cursorRelativeY = 0.0f;
- FloatRectangle absBounds = __pEdit->GetAbsoluteBoundsF();
+ FloatRectangle absBounds = __pEdit->GetAbsoluteBoundsF(true);
__pTextObject->SetBounds(GetTextBoundsF());
if (isAbsRect)
{
- FloatRectangle absBounds = __pEdit->GetAbsoluteBoundsF();
+ FloatRectangle absBounds = __pEdit->GetAbsoluteBoundsF(true);
cursorBounds.x += absBounds.x;
cursorBounds.y += absBounds.y;
}
{
__pCommandButton->SetResizable(true);
__pCommandButton->SetMovable(true);
- SysLog(NID_UI_CTRL, "Command position changed!!!! bounds(%f, %f, %f, %f)", bounds.x, bounds.y, bounds.width, bounds.height);
+ SysLog(NID_UI_CTRL, "Command position changed!!! bounds(%f, %f, %f, %f)", bounds.x, bounds.y, bounds.width, bounds.height);
r = __pCommandButton->SetBounds(bounds);
__pCommandButton->SetResizable(false);
__pCommandButton->SetResizable(true);
__pCommandButton->SetMovable(true);
- SysLog(NID_UI_CTRL, "Command created!!!! bounds(%f, %f, %f, %f)", bounds.x, bounds.y, bounds.width, bounds.height);
+ SysLog(NID_UI_CTRL, "Command created!!! bounds(%f, %f, %f, %f)", bounds.x, bounds.y, bounds.width, bounds.height);
r = __pCommandButton->SetBounds(bounds);
SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
{
if (isVisible)
{
- SysLog(NID_UI_CTRL, "SetFooterVisible TRUE!!!!!");
+ SysLog(NID_UI_CTRL, "SetFooterVisible TRUE!!!");
}
else
{
- SysLog(NID_UI_CTRL, "SetFooterVisible FALSE!!!!!");
+ SysLog(NID_UI_CTRL, "SetFooterVisible FALSE!!!");
}
__footerVisibleChanged = true;
if (__pParentForm)
{
- SysLog(NID_UI_CTRL, "Form deflate RESET!!!!!!!!!!");
+ SysLog(NID_UI_CTRL, "Form deflate RESET!!!");
__pParentForm->DeflateClientRectHeight(0);
__pParentForm->Draw();
}
{
if ((absKeypadBounds.y != screenSize.height))
{
- SysLog(NID_UI_CTRL, "KEYPAD EXIST!!!!Keypad(y: %f, w: %f, h: %f)", absKeypadBounds.y, absKeypadBounds.width, absKeypadBounds.height);
+ SysLog(NID_UI_CTRL, "KEYPAD EXIST!!!Keypad(y: %f, w: %f, h: %f)", absKeypadBounds.y, absKeypadBounds.width, absKeypadBounds.height);
return true;
}
else
{
- SysLog(NID_UI_CTRL, "NO KEYPAD!!!!Keypad(y: %f, w: %f, h: %f)", absKeypadBounds.y, absKeypadBounds.width, absKeypadBounds.height);
+ SysLog(NID_UI_CTRL, "NO KEYPAD!!!Keypad(y: %f, w: %f, h: %f)", absKeypadBounds.y, absKeypadBounds.width, absKeypadBounds.height);
return false;
}
}
else
{
- SysLog(NID_UI_CTRL, "NO KEYPAD!!!!Keypad(y: %f, w: %f, h: %f)", absKeypadBounds.y, absKeypadBounds.width, absKeypadBounds.height);
+ SysLog(NID_UI_CTRL, "NO KEYPAD!!!Keypad(y: %f, w: %f, h: %f)", absKeypadBounds.y, absKeypadBounds.width, absKeypadBounds.height);
return false;
}
}
//layout rearrange
if (__isUSBKeyboardConnected)
{
- SysLog(NID_UI_CTRL, "ShowKeypad called in USB ON mode!!!!");
+ SysLog(NID_UI_CTRL, "ShowKeypad called in USB ON mode!!!");
__isKeypadExist = CheckKeypadExist(__pEdit->GetOrientation()); //prediction alreaedy exists
SetFooterVisible(false);
ChangeLayoutInternal(__pEdit->GetOrientation());
AdjustParentPanelHeight(false);
+ ScrollPanelToCursorPosition();
__pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_OPEN);
__pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_OPENED);
+
+ if (__pParentForm)
+ {
+ __pParentForm->Draw();
+ }
}
else
{
if (__isKeypadExist)
{
+ if (__pParentForm)
+ {
+ sendKeypadEventForcely = !__pParentForm->IsDeflated();
+ }
+
+ if (sendKeypadEventForcely)
+ {
+ __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CREATED);
+ __pEdit->AttachScrollPanelEvent();
+ __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_CREATED);
+ }
+
ChangeLayoutInternal(__pEdit->GetOrientation());
AdjustParentPanelHeight(false);
+ ScrollPanelToCursorPosition();
+
+ if (__pParentForm)
+ {
+ __pParentForm->Draw();
+ }
+
+ if (sendKeypadEventForcely)
+ {
+ __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_OPEN);
+ __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_OPENED);
+ }
}
}
-
- ScrollPanelToCursorPosition();
}
else
{
- SysLog(NID_UI_CTRL, "ShowKeypad called in USB OFF mode!!!!");
+ SysLog(NID_UI_CTRL, "ShowKeypad called in USB OFF mode!!!");
__isKeypadExist = CheckKeypadExist(__pEdit->GetOrientation()); //call once only from here.
{
if(!__isClipboardExist && __pParentPanel)
{
- __initialParentHeight = 0.0f;
+ if (__initialParentHeight)
+ {
+ AdjustParentPanelHeight(true);
+ }
}
ScrollPanelToCursorPosition();
}
if (__pParentForm)
{
- SysLog(NID_UI_CTRL, "Form deflate RESET!!!!!!!!!!");
+ SysLog(NID_UI_CTRL, "Form deflate RESET!!!");
__pParentForm->DeflateClientRectHeight(0.0f);
}
{
if (__pParentPanel == null)
{
+ SysLog(NID_UI_CTRL, "__pParentPanel is NULL!!!, so skip resizing scrollpanel");
return;
}
__pParentPanel->SetBounds(scrollPanelBounds);
__pParentPanel->Invalidate();
}
+ else
+ {
+ SysLog(NID_UI_CTRL, "initialParentHeight is ZERO!!!, so skip scrollPanel height recovery!!!");
+ }
}
else
{
GET_SHAPE_CONFIG(FOOTER::HEIGHT, orientation, commandButtonHeight);
}
- absScrollPanelBounds = __pParentPanel->GetAbsoluteBoundsF();
+ absScrollPanelBounds = __pParentPanel->GetAbsoluteBoundsF(true);
displayedPanelHeight = screenSize.height - commandButtonHeight - absScrollPanelBounds.y;
gapY = (absKeypadBounds.y - commandButtonHeight)- absScrollPanelBounds.y;
if (__isUSBKeyboardConnected)
{
- SysLog(NID_UI_CTRL, "HideKeypad called in USB ON mode!!!!");
+ SysLog(NID_UI_CTRL, "HideKeypad called in USB ON mode!!!");
if (__pCommandButton && __isKeypadCommandButtonVisible)
{
SetFooterVisible(true);
if (__pParentForm)
{
- SysLog(NID_UI_CTRL, "Form deflate RESET!!!!!!!!!!");
+ SysLog(NID_UI_CTRL, "Form deflate RESET!!!");
__pParentForm->DeflateClientRectHeight(0.0f);
}
}
else
{
- SysLog(NID_UI_CTRL, "HideKeypad called in USB OFF mode!!!!");
+ SysLog(NID_UI_CTRL, "HideKeypad called in USB OFF mode!!!");
if (__pCommandButton && __isKeypadCommandButtonVisible)
{
if (!__isKeypadExist)
if (__pParentForm)
{
- SysLog(NID_UI_CTRL, "Form deflate RESET!!!!!!!!!!");
+ SysLog(NID_UI_CTRL, "Form deflate RESET!!!");
__pParentForm->DeflateClientRectHeight(0.0f);
}
__pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CLOSE);
dspStrBuffer[bufferLength] = null;
__isCursorChanged = true;
+ __pTextObject->NotifyTextChanged(__pTextBuffer, 0, __pTextString->GetLength(), 0);
+ UpdateComponentInformation();
+
return r;
}
if (!__pParentPanel)
return;
- FloatRectangle editAbsoluteBounds = __pEdit->GetAbsoluteBoundsF();
- FloatRectangle panelAbsoluteBounds = __pParentPanel->GetAbsoluteBoundsF();
+ FloatRectangle editAbsoluteBounds = __pEdit->GetAbsoluteBoundsF(true);
+ FloatRectangle panelAbsoluteBounds = __pParentPanel->GetAbsoluteBoundsF(true);
float scrollPosition = __pParentPanel->GetScrollPosition() + (editAbsoluteBounds.y - panelAbsoluteBounds.y);
__pParentPanel->SetScrollPosition(scrollPosition);
result r = E_SUCCESS;
+ UpdateComponentInformation();
+
FloatRectangle absCursorBounds(0.0f, 0.0f, 0.0f, 0.0f);
r = CalculateAbsoluteCursorBounds(__cursorPos, absCursorBounds);
return;
}
- FloatRectangle absPanelRect = __pParentPanel->GetAbsoluteBoundsF();
+ FloatRectangle absPanelRect = __pParentPanel->GetAbsoluteBoundsF(true);
float panelHeight = __pParentPanel->GetBoundsF().height;
float scrollPosition = __pParentPanel->GetScrollPosition();
if (upSideGap > 0.0f || downSideGap > 0.0f)
{
float gap = 0.0f;
- float topTextMargin = __textObjectBounds.y;
- float bottomTextMargin = __pEdit->GetBoundsF().height - __textObjectBounds.y - __textObjectBounds.height;
+ float topTextMargin = 0.0f;
+ float bottomTextMargin = 0.0f;
+
+ if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE)
+ {
+ topTextMargin = __pEdit->GetBoundsF().y;
+ bottomTextMargin = __pEdit->GetBoundsF().height;
+ }
+ else
+ {
+ topTextMargin = __textObjectBounds.y;
+ bottomTextMargin = __pEdit->GetBoundsF().height - __textObjectBounds.y - __textObjectBounds.height;
+ }
if (upSideGap > 0.0f)
{