}
}
+bool
+_EditPresenter::IsCurrentFocused(void) const
+{
+ _ControlManager* pControlManager = _ControlManager::GetInstance();
+ if (pControlManager)
+ {
+ _Control* pControl = pControlManager->GetFocusControl();
+ if (pControl != __pEdit)
+ {
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+}
+
_EditPresenter*
_EditPresenter::CreateInstanceN(void)
{
}
}
- if (GetSearchBarFlag() && __pEdit->IsFocused() && __pEdit->IsSearchFieldFocused())
+ if (GetSearchBarFlag() && IsCurrentFocused() && __pEdit->IsSearchFieldFocused())
{
Bitmap* pFocusBitmap = null;
Bitmap* pReplacementColorFocusBitmap = null;
pReplacementColorFocusBitmap = null;
}
-
if (borderRoundEnable)
{
if (pEditBgBitmap)
}
else
{
- DrawBackgroundBitmap(canvas, __pEdit->IsFocused());
+ DrawBackgroundBitmap(canvas, IsCurrentFocused());
}
DrawFocusRing(canvas);
pTitleTextCanvas->Clear();
titleAction = __pTitleTextObject->GetAction();
- if (__pEdit->IsFocused() == true)
+ if (IsCurrentFocused() == true)
{
__pTitleTextObject->SetForegroundColor(__pEdit->GetTitleTextColor(EDIT_STATUS_HIGHLIGHTED), 0, __pTitleTextObject->GetTextLength());
{
result r = E_SUCCESS;
- if (!(__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD) && __pEdit->IsFocused() == false)
+ if (!(__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD) && IsCurrentFocused() == false)
{
__pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV);
}
EditStatus editStatus = GetCurrentStatus();
- if (__pEdit->IsFocused() == false)
+ if (IsCurrentFocused() == false)
{
if (__isCursorChanged == true)
{
}
else
{
- DrawSingleLineBackgroundBitmap(canvas, __pEdit->IsFocused());
+ DrawSingleLineBackgroundBitmap(canvas, IsCurrentFocused());
}
DrawFocusRing(canvas);
r = InitializeAtFirstDrawing();
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Faild to initialize.");
- if (__pEdit->IsFocused() == true && __isInputConnectionBound == false)
+ if (IsCurrentFocused() == true && __isInputConnectionBound == false)
{
if (IsViewModeEnabled() == false)
{
}
else
{
- if (!__pEdit->IsFocused())
+ if (!IsCurrentFocused())
{
__pEdit->SetFocused();
}
}
if (!__isCopyPasteManagerExist) // Copy&Paste
{
- if ((__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) == true && __pEdit->IsFocused() == false)
+ if ((__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) == true && IsCurrentFocused() == false)
{
__isCursorChanged = true;
}
needToCreatePopup = false;
}
- if (__pEdit->IsFocused() && !tokenEditting && needToCreatePopup)
+ if (IsCurrentFocused() && !tokenEditting && needToCreatePopup)
{
__pCopyPasteManager = new (std::nothrow) _EditCopyPasteManager(*__pEdit);
SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, false, E_SYSTEM, "Unable to create _EditCopyPasteManager instance.");
{
if (IsViewModeEnabled() == false)
{
- if (__pEdit->IsFocused())
+ if (IsCurrentFocused())
{
ShowKeypad(false);
}
{
if (IsViewModeEnabled() == false)
{
- if (__pEdit->IsFocused())
+ if (IsCurrentFocused())
{
ShowKeypad(false);
}
{
return true;
}
- else if (__pEdit->IsFocused() == false && !IsViewModeEnabled())
+ else if (IsCurrentFocused() == false && !IsViewModeEnabled())
{
return true;
}
return false;
}
- if (__pEdit->IsFocused() == false)
+ if (IsCurrentFocused() == false)
{
return true;
}
result
_EditPresenter::SetViewModeEnabled(bool enable)
{
- if (!enable && __pEditModel->IsViewModeEnabled() && __pEdit->IsFocused() && (__pEdit->GetInputStyle() == INPUT_STYLE_OVERLAY))
+ if (!enable && __pEditModel->IsViewModeEnabled() && IsCurrentFocused() && (__pEdit->GetInputStyle() == INPUT_STYLE_OVERLAY))
{
__pEdit->SetFocused(false);
}
InitializeCopyPasteManager();
}
- if (__pEdit->IsFocused())
+ if (__isInputConnectionBound)
{
- HideKeypad(false);
+ if (__isKeypadExist)
+ {
+ HideKeypad(false);
+ }
+
+ if (__isClipboardExist)
+ {
+ if (__pClipboard)
+ {
+ __pClipboard->HidePopup();
+ OnClipboardPopupClosed();
+ }
+ }
}
if (__isKeypadHiding)
if (__pEdit->IsEnabled())
{
- if (__pEdit->IsFocused())
+ if (IsCurrentFocused())
{
editState = EDIT_STATUS_HIGHLIGHTED;
}
__pFullscreenKeypad = null;
}
+ __isKeypadExist = CheckKeypadExist(__pEdit->GetOrientation());
+ if (__isKeypadExist) //overlay style keypad exist before create fullscreen edit.
+ {
+ AdjustParentPanelHeight(true);
+
+ if (__pParentForm)
+ {
+ SysLog(NID_UI_CTRL, "Form deflate RESET!!!!!!!!!!");
+ __pParentForm->DeflateClientRectHeight(0);
+ __pParentForm->Draw();
+ }
+ }
+
int editStyle = __pEdit->GetEditStyle();
_KeypadStyleInfo keypadStyleInfo;
if (__isKeypadExist) //edit switiching
{
- sendKeypadEventForcely = !__pParentForm->IsDeflated();
+ if (__pParentForm)
+ {
+ sendKeypadEventForcely = !__pParentForm->IsDeflated();
+ }
+
if (sendKeypadEventForcely)
{
__pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CREATED);
ChangeLayoutInternal(__pEdit->GetOrientation());
AdjustParentPanelHeight(false);
ScrollPanelToCursorPosition();
+
if (__pParentForm)
{
__pParentForm->Draw();
__pInputConnection->HideInputPanel();
__pInputConnection->UnbindInputMethod();
-
if (__isKeypadExist)
{
__isKeypadHiding = true;
{
StopCursorTimer();
- if (__isCursorDisabled == false && __pEdit->IsFocused() && __isTextBlocked == false)
+ if (__isCursorDisabled == false && IsCurrentFocused() && __isTextBlocked == false)
{
FloatRectangle cursorBounds;
CalculateCursorBounds(__textObjectBounds, cursorBounds);
void
_EditPresenter::OnCursorTimerExpired(void)
{
- if (!__pEdit->IsFocused() && __isCursorDisabled)
+ if (!IsCurrentFocused() && __isCursorDisabled)
{
StopCursorTimer();
return;
{
result r = E_SUCCESS;
- if (!__pEdit->IsFocused())
+ if (!IsCurrentFocused())
{
StopTitleSlidingTimer();
return r;
{
result r = E_SUCCESS;
- if (!__pEdit->IsFocused())
+ if (!IsCurrentFocused())
{
return E_SYSTEM;
}
return null;
}
- if (__pEdit->GetInputStyle() == INPUT_STYLE_FULLSCREEN)
- {
- return null;
- }
-
if (__pParentForm == null)
{
result r = E_SUCCESS;
Bitmap* pFocusRing = null;
Color color = __pEdit->GetColor(EDIT_STATUS_HIGHLIGHTED);
- if (__pEdit->IsFocused() && color.GetAlpha())
+ if (IsCurrentFocused() && color.GetAlpha())
{
Color focusColor;
GET_COLOR_CONFIG(EDIT::CURSOR_NORMAL, focusColor);