, __pTextFilter(null)
, __textBlockMoveLeft(false)
, __textBlockMoving(false)
+ , __clipboardConnected(false)
{
}
if (showState == INPUT_PANEL_SHOW_STATE_SHOW)// 1. bounded 2.bounded&rotate
{
__isKeypadShowing = false;
- __isKeypadExist = true;//[TWT]temporary test
+ __isKeypadExist = true;
CheckUSBKeyboardStatus();
- CheckKeypadStatus();
if (__isInputConnectionBound)
{
else if (showState == INPUT_PANEL_SHOW_STATE_HIDE)// 1.unbound 2.bounded&usb off -> usb on 3.Flick keypad hide
{
CheckUSBKeyboardStatus();
- CheckKeypadStatus();
- __isKeypadExist = false;//[TWT]temporary test
+ __isKeypadExist = false;
if (__isCopyPasteManagerExist)
{
_EditPresenter::OnInputConnectionPanelBoundsChanged(InputConnection& source, const Rectangle& bounds)
{
CheckUSBKeyboardStatus();
- CheckKeypadStatus();
- if ((__isUSBKeyboardConnected == false) && (IsKeypadExist() == false))
+ if ((__isUSBKeyboardConnected == false) && (__isKeypadExist == false))
{
return;
}
void
_EditPresenter::OnInputConnectionTextPredictionShowStateChanged(InputConnection& source, bool isShown)
{
- /*
- CheckUSBKeyboardStatus();
- CheckKeypadStatus();
-
- if ((__isUSBKeyboardConnected == false) && (IsKeypadExist() == false))
- {
- return;
- }
-
- ChangeLayoutInternal(__pEdit->GetOrientation());
- AdjustParentPanelHeight(false, true);
- if (__pParentForm)
- {
- __pParentForm->Draw();
- ScrollPanelToCursorPosition();
- }
-
- __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED);
- */
return;
}
void
_EditPresenter::OnClipboardPopupOpened(Tizen::Graphics::Dimension& clipboardPopupSize)
{
- //if (__isInputConnectionBound)//[twt]already keypad closed before clipboard show, __isInputConnectionBound cann't be clue at this point.
FloatDimension floatClipboardPopupSize = _CoordinateSystemUtils::ConvertToFloat(clipboardPopupSize);
- if (IsFocused()) //temporal condition
+
+ SysLog(NID_UI_CTRL, "clipboard opended!: EditPresent(%x), clipboard connected(%d)", this, __clipboardConnected);
+
+ if (__clipboardConnected)
{
__isClipboardExist = true;
FloatRectangle absKeypadBounds;
__clipboardHeight = floatClipboardPopupSize.height;
- SysLog(NID_UI_CTRL, "clipboard popup : opened! height = %f, keypad height = %f", floatClipboardPopupSize.height, absKeypadBounds.height);
+ SysLog(NID_UI_CTRL, "clipboard height = %f, keypad height = %f", floatClipboardPopupSize.height, absKeypadBounds.height);
- if (IsKeypadExist()) //resize as difference between clipboard height vs keypad height
+ if (__isKeypadExist) //resize as difference between clipboard height vs keypad height
{
if (floatClipboardPopupSize.height > absKeypadBounds.height)
{
void
_EditPresenter::OnClipboardPopupBoundsChanged(Tizen::Graphics::Dimension& clipboardPopupSize)
{
- //if (__isInputConnectionBound)
FloatDimension floatClipboardPopupSize = _CoordinateSystemUtils::ConvertToFloat(clipboardPopupSize);
- if (IsFocused())//[twt]temporal condition
+
+ SysLog(NID_UI_CTRL, "clipboard rotated!: EditPresent(%x), clipboard connected(%d)", this, __clipboardConnected);
+
+ if (__clipboardConnected)
{
FloatRectangle absKeypadBounds;
GetKeypadBounds(absKeypadBounds);
CheckUSBKeyboardStatus();
- //CheckKeypadStatus();
+
__clipboardHeight = floatClipboardPopupSize.height;
- SysLog(NID_UI_CTRL, "clipboard popup : bounds changed! height = %f, keypad height = %f", floatClipboardPopupSize.height, absKeypadBounds.height);
+ SysLog(NID_UI_CTRL, "clipboard height = %f, keypad height = %f", floatClipboardPopupSize.height, absKeypadBounds.height);
- if (IsKeypadExist())
+ if (__isKeypadExist)
{
if (floatClipboardPopupSize.height > absKeypadBounds.height)
{
void
_EditPresenter::OnClipboardPopupClosed(void)
{
- //if (__isInputConnectionBound)
- if (IsFocused())//[twt]temporal condition
+ SysLog(NID_UI_CTRL, "clipboard closed!: EditPresent(%x), clipboard connected(%d)", this, __clipboardConnected);
+
+ if (__clipboardConnected)
{
__isClipboardExist = false;
FloatRectangle absKeypadBounds;
__clipboardHeight = 0.0f;
- SysLog(NID_UI_CTRL, "clipboard popup : closed!keypad height = %f", absKeypadBounds.height);
+ SysLog(NID_UI_CTRL, "clipboard closed!keypad height = %f", absKeypadBounds.height);
ChangeLayoutInternal(__pEdit->GetOrientation());
- if (IsKeypadExist())
+ if (__isKeypadExist)
{
AdjustParentPanelHeight(false, true);
__pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED);
__pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_CLOSED);
__pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CLOSE);
}
+
+ __clipboardConnected = false;
}
return;
AdjustParentPanelHeight(true);
}
- //if (__isInputConnectionBound)
- if (__isClipboardExist)//[twt]temporal condition
+ if (__clipboardConnected)
{
__pClipboard->HidePopup();
__isClipboardExist = false;
return E_SUCCESS;
}
-void
-_EditPresenter::CheckKeypadStatus(void)
-{
-/*
- if (!__pEdit)
- {
- return ;
- }
-
- FloatDimension screenSize;
- FloatRectangle absKeypadBounds;
- _ControlManager* pControlManager = _ControlManager::GetInstance();
-
- GetKeypadBounds(absKeypadBounds);
-
- _ControlOrientation orientation = __pEdit->GetOrientation();
-
- if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
- {
- screenSize.height = pControlManager->GetScreenSizeF().height;
- }
- else
- {
- screenSize.height = pControlManager->GetScreenSizeF().width;
- }
-
- if (absKeypadBounds.w == 0 && absKeypadBounds.h == 0)
- {
- __isKeypadExist = false;
- return;
- }
-
- if (absKeypadBounds.y != screenSize.height)
- {
- __isKeypadExist = true;
- }
- else
- {
- __isKeypadExist = false;
- }
-*/
- return;
-}
-
bool
_EditPresenter::IsKeypadExist(void) const
{
}
else
{
- CheckKeypadStatus();
- if (!IsKeypadExist() || !__isInputConnectionBound)
+ if (!__isKeypadExist || !__isInputConnectionBound)
{
if (__pEdit->GetInputStyle() == INPUT_STYLE_OVERLAY)
{
__isTouchReleaseSkipped = false;
__isUSBKeyboardConnected = false;
- if (__isClipboardExist)//[twt]check later
+ if (__clipboardConnected)
{
if (__pClipboard)
{
return E_SUCCESS;
}*/
- CheckKeypadStatus();
CheckUSBKeyboardStatus();
__pInputConnection->BindInputMethod();
{
__pInputConnection->ShowInputPanel();
- if (!IsKeypadExist())
+ if (!__isKeypadExist)
{
__pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CREATED);
}
SetFooterVisible(false);
}
- if (IsKeypadExist())
+ if (__isKeypadExist)
{
ChangeLayoutInternal(__pEdit->GetOrientation());
AdjustParentPanelHeight(false);
CheckUSBKeyboardStatus();
- if (__isInputConnectionBound || IsFocused())//[twt]IsFocused() condition will be deleted
+ if (__isInputConnectionBound || __clipboardConnected)
{
if (__pParentForm)
{
__pCommandButton->SetVisibleState(false);
}
- //if (IsKeypadExist() || __isClipboardExist)
- if (IsKeypadExist()) //Only keypad Exist should be checked because clipboard boundschanged callback will be called after onchagelayout
+ if (__isKeypadExist) //Only keypad Exist should be checked because clipboard boundschanged callback will be called after onchagelayout
{
__initialParentHeight = 0.0f;
ChangeLayoutInternal(orientation);
screenSize.height = pControlManager->GetScreenSizeF().width;
}
- //if (__isInputConnectionBound)
- if (__isInputConnectionBound || IsFocused())//[twt]temporal
+ if (__isInputConnectionBound || __clipboardConnected)
{
GetKeypadBounds(keypadBounds);
- if (IsKeypadExist())
+ if (__isKeypadExist)
{
if (__isClipboardExist)
{
{
formDeflateHeight += commandButtonBounds.height;
- if (IsKeypadExist())
+ if (__isKeypadExist)
{
formDeflateHeight += shrinkedHeight;
commandButtonBounds.y = screenSize.height - shrinkedHeight - commandButtonBounds.height - __pParentForm->GetClientBoundsF().y;
}
else
{
- if (IsKeypadExist())
+ if (__isKeypadExist)
{
commandButtonBounds.y = screenSize.height - shrinkedHeight - commandButtonBounds.height;
}
{
if (__pParentForm)
{
- if (IsKeypadExist() || __isClipboardExist)
+ if (__isKeypadExist || __isClipboardExist)
{
formDeflateHeight += shrinkedHeight;
}
if (__pParentForm)
{
+ SysLog(NID_UI_CTRL, "ChangeLayoutInternal: formDeflateHeight:%f, KeypadExist(%d), ClipboardExist(%d), CommandButtonVisible(%d)",
+ formDeflateHeight, __isKeypadExist, __isClipboardExist, __isKeypadCommandButtonVisible);
__pParentForm->DeflateClientRectHeight(formDeflateHeight);
}
}
else
{
- if (IsKeypadExist())
+ if (__isKeypadExist)
{
GetKeypadBounds(absKeypadBounds);
__pCommandButton->SetVisibleState(false);
}
- if (IsKeypadExist())
+ if (__isKeypadExist)
{
if (__pParentForm)
{
break;
case CORE_COPY_PASTE_ACTION_SEARCH:
case CORE_COPY_PASTE_ACTION_CLIPBOARD:
+ __clipboardConnected = true;
//fall through
default:
break;