if (!enableState)
{
- _pEditPresenter->ChangeToUnbindState();
+ _pEditPresenter->ChangeToUnbindState(false);
+ }
+
+ if (this == dynamic_cast< const _Edit* >(&control))
+ {
+ _pEditPresenter->SetKeypadEventSkipped(!enableState);
+ _pEditPresenter->SetCursorDisabled(!enableState);
}
Invalidate();
if (!visibleState)
{
- _pEditPresenter->ChangeToUnbindState();
+ _pEditPresenter->ChangeToUnbindState(false);
}
Invalidate();
return true;
}
}
+ else
+ {
+ return __pEdit->IsInternalFocused();
+ }
}
_EditPresenter*
if (__pInputConnection)
{
- __pInputConnection->SetKeyEventSkipped(enable);
+ if (enable)
+ {
+ __pInputConnection->SetKeyEventSkipped(true);
+ }
+ else
+ {
+ if (IsKeypadEnabled())
+ {
+ __pInputConnection->SetKeyEventSkipped(false);
+ }
+ }
}
return __pEditModel->SetViewModeEnabled(enable);
if (__pInputConnection)
{
- __pInputConnection->SetKeyEventSkipped(!enable);
+ if (!enable)
+ {
+ __pInputConnection->SetKeyEventSkipped(true);
+ }
+ else
+ {
+ if (!__pEditModel->IsViewModeEnabled())
+ {
+ __pInputConnection->SetKeyEventSkipped(false);
+ }
+ }
}
return;
}
+void
+_EditPresenter::SetKeypadEventSkipped(bool skip)
+{
+ if (skip)
+ {
+ __pInputConnection->SetKeyEventSkipped(true);
+ }
+ else
+ {
+ if (__pEdit->IsEnabled() && !__pEditModel->IsViewModeEnabled() && IsKeypadEnabled())
+ {
+ __pInputConnection->SetKeyEventSkipped(false);
+ }
+ }
+}
+
bool
_EditPresenter::IsKeypadEnabled(void)
{
}
void
-_EditPresenter::ChangeToUnbindState(void)
+_EditPresenter::ChangeToUnbindState(bool removeFocus)
{
if(__latestBoundedContext != (unsigned int)this)//context is already changed.
{
if (__isInputConnectionBound)
{
- if (__isKeypadExist)
- {
- HideKeypad(false);
- }
+ HideKeypad(removeFocus);
if (__isClipboardExist)
{
result
_EditPresenter::DrawFocusRing(Tizen::Graphics::Canvas& canvas) const
{
+ if (IsViewModeEnabled() || !__pEdit->IsEnabled())
+ {
+ return E_SUCCESS;
+ }
+
result r = E_SUCCESS;
Bitmap* pFocusRing = null;
Color color = __pEdit->GetColor(EDIT_STATUS_HIGHLIGHTED);
virtual result Draw(Tizen::Graphics::Canvas& canvas);
virtual result DrawCursor(Tizen::Graphics::Canvas& canvas, Tizen::Graphics::FloatRectangle& cursorRect, bool isCursorOpaque);
virtual result DrawScrollBar(void);
- virtual void ChangeToUnbindState(void);
+ virtual void ChangeToUnbindState(bool removeFocus);
virtual bool OnFocusGained(void);
virtual bool OnFocusLost(void);
bool IsFocused(void) const;
bool IsInternalFocused(void) const;
bool IsKeypadActionEnabled(void) ;
+ void SetKeypadEventSkipped(bool skip);
bool IsKeypadEnabled(void) ;
bool IsLowerCaseModeEnabled(void) const;
bool IsKeypadCommandButtonVisible(void) const;