Merging the changes from tizen_2.1 branch
authorPrakalathan Ponnusamy <prakalath.p@samsung.com>
Tue, 4 Jun 2013 05:54:05 +0000 (11:24 +0530)
committerPrakalathan Ponnusamy <prakalath.p@samsung.com>
Wed, 5 Jun 2013 04:51:59 +0000 (10:21 +0530)
Change-Id: I7354bd6914b2a50280d573a87ac3776ab22d03d9

41 files changed:
res/common/usr/share/osp/bitmaps/480x800/00_contacts_button_focus.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/480x800/00_search_edit_field_focus.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/480x800/black/00_contacts_button_focus_ef.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/480x800/default/00_contacts_button_focus_ef.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/480x800/white/00_contacts_button_focus_ef.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/720x1280/00_contacts_button_focus.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/720x1280/00_search_edit_field_focus.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/720x1280/black/00_contacts_button_focus_ef.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/720x1280/default/00_contacts_button_focus_ef.#.png [new file with mode: 0644]
res/common/usr/share/osp/bitmaps/720x1280/white/00_contacts_button_focus_ef.#.png [new file with mode: 0644]
src/ui/FUi_ControlImpl.cpp
src/ui/controls/FUiCtrl_DateTimeBar.cpp
src/ui/controls/FUiCtrl_Edit.cpp
src/ui/controls/FUiCtrl_EditDatePresenter.cpp
src/ui/controls/FUiCtrl_EditPresenter.cpp
src/ui/controls/FUiCtrl_EditTimePresenter.cpp
src/ui/controls/FUiCtrl_SearchBar.cpp
src/ui/controls/FUiCtrl_SearchBarImpl.cpp
src/ui/controls/FUiCtrl_SearchBarPresenter.cpp
src/ui/controls/FUiCtrl_SlidableGroupedListImpl.cpp
src/ui/controls/FUiCtrl_SplitPanel.cpp
src/ui/controls/FUiCtrl_SplitPanelPresenter.cpp
src/ui/controls/FUiCtrl_Tab.cpp
src/ui/controls/FUiCtrl_TabPresenter.cpp
src/ui/controls/FUiCtrl_TokenEdit.cpp
src/ui/controls/FUiCtrl_TokenEditPresenter.cpp
src/ui/inc/FUiCtrl_DateTimeBar.h
src/ui/inc/FUiCtrl_Edit.h
src/ui/inc/FUiCtrl_SearchBar.h
src/ui/inc/FUiCtrl_SearchBarImpl.h
src/ui/inc/FUiCtrl_SplitPanel.h
src/ui/inc/FUiCtrl_Tab.h
src/ui/inc/FUiCtrl_TokenEdit.h
src/ui/inc/FUiCtrl_TokenEditPresenter.h
src/ui/inc/FUi_ControlImpl.h
src/ui/inc/FUi_ResourceSearchBarConfig.h
src/ui/inc/FUi_ResourceTokenEditConfig.h
src/ui/resource/FUi_ResourceConfigParser.cpp
src/ui/resource/FUi_ResourceDateTimePickerConfig.cpp
src/ui/resource/FUi_ResourceSearchBarConfig.cpp
src/ui/resource/FUi_ResourceTokenEditConfig.cpp

diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_contacts_button_focus.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_contacts_button_focus.#.png
new file mode 100644 (file)
index 0000000..4563178
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/480x800/00_contacts_button_focus.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_search_edit_field_focus.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_search_edit_field_focus.#.png
new file mode 100644 (file)
index 0000000..924b51b
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/480x800/00_search_edit_field_focus.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_contacts_button_focus_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_contacts_button_focus_ef.#.png
new file mode 100644 (file)
index 0000000..b3daa2b
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/480x800/black/00_contacts_button_focus_ef.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_contacts_button_focus_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_contacts_button_focus_ef.#.png
new file mode 100644 (file)
index 0000000..b3daa2b
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/480x800/default/00_contacts_button_focus_ef.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_contacts_button_focus_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_contacts_button_focus_ef.#.png
new file mode 100644 (file)
index 0000000..b3daa2b
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/480x800/white/00_contacts_button_focus_ef.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_contacts_button_focus.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_contacts_button_focus.#.png
new file mode 100644 (file)
index 0000000..8d6cd8a
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/720x1280/00_contacts_button_focus.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_search_edit_field_focus.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_search_edit_field_focus.#.png
new file mode 100644 (file)
index 0000000..924b51b
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/720x1280/00_search_edit_field_focus.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_contacts_button_focus_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_contacts_button_focus_ef.#.png
new file mode 100644 (file)
index 0000000..a9b0f7c
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/720x1280/black/00_contacts_button_focus_ef.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_contacts_button_focus_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_contacts_button_focus_ef.#.png
new file mode 100644 (file)
index 0000000..a9b0f7c
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/720x1280/default/00_contacts_button_focus_ef.#.png differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_contacts_button_focus_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_contacts_button_focus_ef.#.png
new file mode 100644 (file)
index 0000000..a9b0f7c
Binary files /dev/null and b/res/common/usr/share/osp/bitmaps/720x1280/white/00_contacts_button_focus_ef.#.png differ
index fb1cf93..bf25396 100644 (file)
@@ -2170,6 +2170,12 @@ _ControlImpl::GetTouchEventListener(void) const
        return __pPublicTouchEventListeners;
 }
 
+Tizen::Base::Collection::LinkedListT <Tizen::Base::Runtime::IEventListener*>*
+_ControlImpl::GetKeyEventListener(void) const
+{
+       return __pPublicKeyEventListeners;
+}
+
 result
 _ControlImpl::AddDragDropEventListener(IDragDropEventListener& listener)
 {
index dc0b98c..ba0a1f5 100644 (file)
@@ -51,6 +51,7 @@ _DateTimeBar::_DateTimeBar(void)
        , __parentWindowBounds(0.0f, 0.0f, 0.0f, 0.0f)
        , __pOwner(null)
        , __accessibilityFocusOutIndex(-1)
+       , __isAnimating(false)
 {
 
 }
@@ -358,6 +359,10 @@ bool
 _DateTimeBar::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo)
 {
        ClearLastResult();
+       if (__isAnimating)
+       {
+               return true;
+       }
 
        return __pDateTimeBarPresenter->OnTouchPressed(source, touchinfo);
 }
@@ -366,6 +371,10 @@ bool
 _DateTimeBar::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo)
 {
        ClearLastResult();
+       if (__isAnimating)
+       {
+               return true;
+       }
 
        return __pDateTimeBarPresenter->OnTouchReleased(source, touchinfo);
 }
@@ -374,6 +383,10 @@ bool
 _DateTimeBar::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo)
 {
        ClearLastResult();
+       if (__isAnimating)
+       {
+               return true;
+       }
 
        return __pDateTimeBarPresenter->OnTouchMoved(source, touchinfo);
 }
@@ -905,6 +918,7 @@ _DateTimeBar::CloseDateTimeBar()
        VisualElement* pVisualElement = null;
        VisualElementAnimation *pAnimation = null;
 
+       __isAnimating = true;
        pVisualElement = GetVisualElement();
        SysTryReturnVoidResult(NID_UI_CTRL, pVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get visual element.");
        pAnimation = CreateAnimationN(*pVisualElement, false);
@@ -931,6 +945,7 @@ _DateTimeBar::OnVisualElementAnimationFinished (const VisualElementAnimation &an
                Close();
                target.SetBounds(bounds);
        }
+       __isAnimating = false;
 
        delete pUserData;
 }
index 5171511..4a6e93b 100644 (file)
@@ -107,7 +107,7 @@ private:
 
 _EditInternalTouchEventListener::_EditInternalTouchEventListener(const _Edit& edit)
 {
-       __pEdit = const_cast<_Edit*>(&edit);
+       __pEdit = const_cast< _Edit* >(&edit);
 }
 
 bool
@@ -228,6 +228,7 @@ _Edit::_Edit(void)
        , __pressedGuideTextColor(Color())
        , __isSettingGuideTextColor(false)
        , __pDefaultBackgroundEffectBitmap(null)
+       , __pDefaultFocusBitmap(null)
        , __pGestureFlick(null)
        , __pGestureLongPress(null)
        , __pGestureTap(null)
@@ -249,6 +250,7 @@ _Edit::_Edit(void)
        , __pTextFilter(null)
        , __previousBounds()
        , __isTouchMoving(false)
+       , __isSearchFieldFocused(false)
 {
        for (int status = 0; status < EDIT_COLOR_MAX; status++)
        {
@@ -278,10 +280,10 @@ _Edit::~_Edit(void)
                }
 
                if (__pDefaultBackgroundBitmap[status])
-       {
+               {
                        delete __pDefaultBackgroundBitmap[status];
                        __pDefaultBackgroundBitmap[status] = null;
-       }
+               }
        }
 
        if (__pDefaultBackgroundEffectBitmap)
@@ -290,6 +292,12 @@ _Edit::~_Edit(void)
                __pDefaultBackgroundEffectBitmap = null;
        }
 
+       if (__pDefaultFocusBitmap)
+       {
+               delete __pDefaultFocusBitmap;
+               __pDefaultFocusBitmap = null;
+       }
+
        if (__pTextBlockEvent)
        {
                delete __pTextBlockEvent;
@@ -322,7 +330,7 @@ _Edit::~_Edit(void)
 
        if (__pGestureFlick)
        {
-               _ITouchFlickGestureEventListener* pListener = dynamic_cast<_ITouchFlickGestureEventListener*>(this);
+               _ITouchFlickGestureEventListener* pListener = dynamic_cast< _ITouchFlickGestureEventListener* >(this);
                __pGestureFlick->RemoveGestureListener(*pListener);
                RemoveGestureDetector(*__pGestureFlick);
                delete __pGestureFlick;
@@ -331,7 +339,7 @@ _Edit::~_Edit(void)
 
        if (__pGestureLongPress)
        {
-               _ITouchLongPressGestureEventListener* pListener = dynamic_cast<_ITouchLongPressGestureEventListener*>(this);
+               _ITouchLongPressGestureEventListener* pListener = dynamic_cast< _ITouchLongPressGestureEventListener* >(this);
                __pGestureLongPress->RemoveGestureListener(*pListener);
                RemoveGestureDetector(*__pGestureLongPress);
                delete __pGestureLongPress;
@@ -340,7 +348,7 @@ _Edit::~_Edit(void)
 
        if (__pGestureTap)
        {
-               _ITouchTapGestureEventListener* pListener = dynamic_cast<_ITouchTapGestureEventListener*>(this);
+               _ITouchTapGestureEventListener* pListener = dynamic_cast< _ITouchTapGestureEventListener* >(this);
                __pGestureTap->RemoveGestureListener(*pListener);
                RemoveGestureDetector(*__pGestureTap);
                delete __pGestureTap;
@@ -490,14 +498,14 @@ _Edit::Initialize(int editStyle, InputStyle inputStyle, int limitLength, GroupSt
        __isConstructed = true;
 
        _AccessibilityContainer* pEditAccessibilityContainer = GetAccessibilityContainer();
-       if(pEditAccessibilityContainer)
+       if (pEditAccessibilityContainer)
        {
                pEditAccessibilityContainer->Activate(true);
        }
        if (pEditAccessibilityContainer)
        {
                __pTextAccessibilityElement = new _AccessibilityElement(true);
-               __pTextAccessibilityElement->SetBounds(FloatRectangle(0.0f,0.0f, GetBoundsF().width, GetBoundsF().height));
+               __pTextAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height));
                __pTextAccessibilityElement->SetLabel(GetTitleText() + GetGuideText() + GetText());
                __pTextAccessibilityElement->SetTrait(L"Edit Field");
                __pTextAccessibilityElement->SetName(L"EditText");
@@ -558,7 +566,7 @@ _Edit::SetPresenter(const _EditPresenter& pPresenter)
 {
        result r = E_SUCCESS;
 
-       _pEditPresenter = const_cast<_EditPresenter*>(&pPresenter);
+       _pEditPresenter = const_cast< _EditPresenter* >(&pPresenter);
 
        return r;
 }
@@ -577,7 +585,7 @@ _Edit::GetContentSizeInternalF(bool horizontalMode, bool verticalMode) const
                return FloatDimension(GetBoundsF().width, GetBoundsF().height);
        }
 
-       FloatDimension dimension(0.0f,0.0f);
+       FloatDimension dimension(0.0f, 0.0f);
        float leftMargin = 0.0f;
        float rightMargin = 0.0f;
        float textLeftMargin = 0.0f;
@@ -692,7 +700,7 @@ _Edit::GetContentSizeInternalF(bool horizontalMode, bool verticalMode) const
                dimension.height += textTopMargin + textBottomMargin;
        }
 
-       return  dimension;
+       return dimension;
 }
 
 bool
@@ -898,7 +906,7 @@ result
 _Edit::SetVerticalMargin(int margin, EditTextVerticalMargin marginType)
 {
        float floatMargin = _CoordinateSystemUtils::ConvertToFloat(margin);
-       return SetVerticalMargin( floatMargin,  marginType);
+       return SetVerticalMargin(floatMargin, marginType);
 }
 
 result
@@ -970,14 +978,14 @@ _Edit::GetKeypadAction(void) const
 {
        Variant var = GetProperty("keypadAction");
 
-       return (CoreKeypadAction)var.ToInt();
+       return (CoreKeypadAction) var.ToInt();
 }
 
 result
 _Edit::SetKeypadAction(CoreKeypadAction keypadAction)
 {
        SysTryReturn(NID_UI_CTRL, (__inputStyle == INPUT_STYLE_OVERLAY), E_UNSUPPORTED_OPERATION, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] The current state unable to this operation.");
-       Variant var((int)keypadAction);
+       Variant var((int) keypadAction);
 
        return SetProperty("keypadAction", var);
 }
@@ -1003,14 +1011,14 @@ _Edit::GetKeypadStyle(void) const
 {
        Variant var = GetProperty("keypadStyle");
 
-       return (KeypadStyle)var.ToInt();
+       return (KeypadStyle) var.ToInt();
 }
 
 result
 _Edit::SetKeypadStyle(KeypadStyle keypadStyle)
 {
        SysTryReturn(NID_UI_CTRL, (KEYPAD_STYLE_PASSWORD != keypadStyle), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The invalid argument is given.");
-       Variant var((int)keypadStyle);
+       Variant var((int) keypadStyle);
 
        return SetProperty("keypadStyle", var);
 }
@@ -1072,30 +1080,32 @@ _Edit::UpdateAccessibilityElement(EditAccessibilityElementType type)
                }
        }
 
-       switch(type)
+       switch (type)
        {
-               case EDIT_ACCESSIBILITY_ELEMENT_TYPE_TEXT:
-                       if (__pTextAccessibilityElement)
+       case EDIT_ACCESSIBILITY_ELEMENT_TYPE_TEXT:
+               if (__pTextAccessibilityElement)
+               {
+                       __pTextAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height));
+                       if ((GetEditStyle() & EDIT_STYLE_TITLE_TOP) || (GetEditStyle() & EDIT_STYLE_TITLE_LEFT))
                        {
-                               __pTextAccessibilityElement->SetBounds(FloatRectangle(0.0f,0.0f, GetBoundsF().width, GetBoundsF().height));
-                               if ((GetEditStyle() & EDIT_STYLE_TITLE_TOP) || (GetEditStyle() & EDIT_STYLE_TITLE_LEFT))
-                               {
-                                       __pTextAccessibilityElement->SetLabel(GetTitleText() + GetGuideText() + GetText());
-                               }
-                               else
-                               {
-                                       __pTextAccessibilityElement->SetLabel(GetGuideText() + GetText());
-                               }
+                               __pTextAccessibilityElement->SetLabel(GetTitleText() + GetGuideText() + GetText());
                        }
-                       break;
-               case EDIT_ACCESSIBILITY_ELEMENT_TYPE_CLEAR_ICON:
-                       if (__pClearButtonTextAccessibilityElement)
+                       else
                        {
-                               __pClearButtonTextAccessibilityElement->SetBounds(_pEditPresenter->GetClearIconBoundsF());
+                               __pTextAccessibilityElement->SetLabel(GetGuideText() + GetText());
                        }
-                       break;
-               default:
-                       break;
+               }
+               break;
+
+       case EDIT_ACCESSIBILITY_ELEMENT_TYPE_CLEAR_ICON:
+               if (__pClearButtonTextAccessibilityElement)
+               {
+                       __pClearButtonTextAccessibilityElement->SetBounds(_pEditPresenter->GetClearIconBoundsF());
+               }
+               break;
+
+       default:
+               break;
        }
 
        return;
@@ -1187,17 +1197,17 @@ _Edit::GetTextColor(EditTextColor type) const
        {
        case EDIT_TEXT_COLOR_NORMAL:
                variantColor = GetProperty("normalTextColor");
-               color =  variantColor.ToColor();
+               color = variantColor.ToColor();
                break;
 
        case EDIT_TEXT_COLOR_DISABLED:
                variantColor = GetProperty("disabledTextColor");
-               color =  variantColor.ToColor();
+               color = variantColor.ToColor();
                break;
 
        case EDIT_TEXT_COLOR_HIGHLIGHTED:
                variantColor = GetProperty("highlightedTextColor");
-               color =  variantColor.ToColor();
+               color = variantColor.ToColor();
                break;
 
        case EDIT_TEXT_COLOR_LINK:
@@ -1301,20 +1311,20 @@ _Edit::SetTextColor(EditTextColor type, const Color& color)
        switch (type)
        {
        case EDIT_TEXT_COLOR_NORMAL:
-               r =     SetProperty("normalTextColor", Variant(color));
+               r = SetProperty("normalTextColor", Variant(color));
                SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] System error occurred.", GetErrorMessage(r));
                break;
 
        case EDIT_TEXT_COLOR_DISABLED:
-               r =     SetProperty("disabledTextColor", Variant(color));
+               r = SetProperty("disabledTextColor", Variant(color));
                SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] System error occurred.", GetErrorMessage(r));
                break;
 
        case EDIT_TEXT_COLOR_HIGHLIGHTED:
-               r =     SetProperty("highlightedTextColor", Variant(color));
+               r = SetProperty("highlightedTextColor", Variant(color));
                SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] System error occurred.", GetErrorMessage(r));
 
-               r =     SetProperty("pressedTextColor", Variant(color));
+               r = SetProperty("pressedTextColor", Variant(color));
                SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] System error occurred.", GetErrorMessage(r));
                break;
 
@@ -1461,7 +1471,7 @@ _Edit::AddScrollPanelEventListener(const _IScrollPanelEventListener& listener)
                {
                        __pScrollPanelEvent = _ScrollPanelEvent::CreateScrollPanelEventN(*this);
                        SysTryReturn(NID_UI_CTRL, __pScrollPanelEvent,
-                               E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred.");
+                                                E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred.");
                }
        }
 
@@ -2010,7 +2020,7 @@ _Edit::OnAttachedToMainTree(void)
 
        if (__pTextAccessibilityElement)
        {
-               __pTextAccessibilityElement->SetBounds(FloatRectangle(0.0f,0.0f, GetBoundsF().width, GetBoundsF().height));
+               __pTextAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height));
        }
        if (__pClearButtonTextAccessibilityElement)
        {
@@ -2050,11 +2060,11 @@ _Edit::OnBoundsChanged(void)
 
                _pEditPresenter->Resize();
 
-               if(__isAccessibilityCreated)
+               if (__isAccessibilityCreated)
                {
                        if (__pTextAccessibilityElement)
                        {
-                               __pTextAccessibilityElement->SetBounds(FloatRectangle(0.0f,0.0f, GetBoundsF().width, GetBoundsF().height));
+                               __pTextAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height));
                        }
 
                        if (__pClearButtonTextAccessibilityElement)
@@ -2241,80 +2251,85 @@ _Edit::LoadDefaultBackgroundBitmap(GroupStyle groupStyle)
 {
        result r = E_SUCCESS;
 
-       switch(groupStyle)
-       {
-               case GROUP_STYLE_NONE:
-                       r = GET_BITMAP_CONFIG_N(EDIT::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_NORMAL]);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
-                       r = GET_BITMAP_CONFIG_N(EDIT::BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_DISABLED]);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
-                       r = GET_BITMAP_CONFIG_N(EDIT::BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_HIGHLIGHTED]);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
-                       r = GET_BITMAP_CONFIG_N(EDIT::BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_PRESSED]);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
-                       r = GET_BITMAP_CONFIG_N(EDIT::BG_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundEffectBitmap);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
-                       break;
-               case GROUP_STYLE_SINGLE:
-                       r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_NORMAL]);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
-                       r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_DISABLED]);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
-                       r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_HIGHLIGHTED]);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
-                       r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_PRESSED]);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
-                       r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_SINGLE_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundEffectBitmap);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
-                       break;
-               case GROUP_STYLE_TOP:
-                       r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_NORMAL]);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
-                       r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_DISABLED]);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
-                       r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_HIGHLIGHTED]);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
-                       r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_PRESSED]);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
-                       r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_TOP_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundEffectBitmap);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
-                       break;
-               case GROUP_STYLE_MIDDLE:
-                       r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_NORMAL]);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
-                       r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_DISABLED]);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
-                       r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_HIGHLIGHTED]);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
-                       r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_PRESSED]);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
-                       r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_MIDDLE_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundEffectBitmap);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
-                       break;
-               case GROUP_STYLE_BOTTOM:
-                       r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_NORMAL]);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
-                       r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_DISABLED]);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
-                       r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_HIGHLIGHTED]);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
-                       r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_PRESSED]);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
-                       r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_BOTTOM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundEffectBitmap);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
-                       break;
-               default:
-                       r = GET_BITMAP_CONFIG_N(EDIT::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_NORMAL]);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
-                       r = GET_BITMAP_CONFIG_N(EDIT::BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_DISABLED]);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
-                       r = GET_BITMAP_CONFIG_N(EDIT::BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_HIGHLIGHTED]);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
-                       r = GET_BITMAP_CONFIG_N(EDIT::BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_PRESSED]);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
-                       r = GET_BITMAP_CONFIG_N(EDIT::BG_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundEffectBitmap);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
-                       break;
+       switch (groupStyle)
+       {
+       case GROUP_STYLE_NONE:
+               r = GET_BITMAP_CONFIG_N(EDIT::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_NORMAL]);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+               r = GET_BITMAP_CONFIG_N(EDIT::BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_DISABLED]);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+               r = GET_BITMAP_CONFIG_N(EDIT::BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_HIGHLIGHTED]);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+               r = GET_BITMAP_CONFIG_N(EDIT::BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_PRESSED]);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+               r = GET_BITMAP_CONFIG_N(EDIT::BG_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundEffectBitmap);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+               break;
+
+       case GROUP_STYLE_SINGLE:
+               r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_NORMAL]);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+               r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_DISABLED]);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+               r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_HIGHLIGHTED]);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+               r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_PRESSED]);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+               r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_SINGLE_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundEffectBitmap);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+               break;
+
+       case GROUP_STYLE_TOP:
+               r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_NORMAL]);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+               r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_DISABLED]);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+               r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_HIGHLIGHTED]);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+               r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_PRESSED]);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+               r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_TOP_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundEffectBitmap);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+               break;
+
+       case GROUP_STYLE_MIDDLE:
+               r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_NORMAL]);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+               r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_DISABLED]);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+               r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_HIGHLIGHTED]);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+               r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_PRESSED]);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+               r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_MIDDLE_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundEffectBitmap);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+               break;
+
+       case GROUP_STYLE_BOTTOM:
+               r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_NORMAL]);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+               r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_DISABLED]);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+               r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_HIGHLIGHTED]);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+               r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_PRESSED]);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+               r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_BOTTOM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundEffectBitmap);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+               break;
+
+       default:
+               r = GET_BITMAP_CONFIG_N(EDIT::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_NORMAL]);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+               r = GET_BITMAP_CONFIG_N(EDIT::BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_DISABLED]);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+               r = GET_BITMAP_CONFIG_N(EDIT::BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_HIGHLIGHTED]);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+               r = GET_BITMAP_CONFIG_N(EDIT::BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_PRESSED]);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+               r = GET_BITMAP_CONFIG_N(EDIT::BG_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundEffectBitmap);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+               break;
        }
 
        return r;
@@ -2365,6 +2380,8 @@ _Edit::ReplaceDefaultBackgroundBitmapForSearchBar(void)
        SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
        r = GET_BITMAP_CONFIG_N(SEARCHBAR::EDIT_BG_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundEffectBitmap);
        SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
+       r = GET_BITMAP_CONFIG_N(SEARCHBAR::EDIT_BG_FOCUS, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultFocusBitmap);
+       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap");
 
        _pEditPresenter->SetSearchBarFlag(true);
 
@@ -2386,6 +2403,19 @@ CATCH:
        return r;
 }
 
+void
+_Edit::SetSearchFieldFocus(bool state)
+{
+       __isSearchFieldFocused = state;
+       return;
+}
+
+bool
+_Edit::IsSearchFieldFocused(void) const
+{
+       return __isSearchFieldFocused;
+}
+
 Bitmap*
 _Edit::GetDefaultBackgroundBitmap(EditStatus status) const
 {
@@ -2402,15 +2432,19 @@ _Edit::IsCustomDefaultBackgroundBitmap(EditStatus status) const
        case EDIT_STATUS_NORMAL:
                isCustomBitmap = IS_CUSTOM_BITMAP(EDIT::BG_NORMAL);
                break;
+
        case EDIT_STATUS_DISABLED:
                isCustomBitmap = IS_CUSTOM_BITMAP(EDIT::BG_DISABLED);
                break;
+
        case EDIT_STATUS_HIGHLIGHTED:
                isCustomBitmap = IS_CUSTOM_BITMAP(EDIT::BG_HIGHLIGHTED);
                break;
+
        case EDIT_STATUS_PRESSED:
                isCustomBitmap = IS_CUSTOM_BITMAP(EDIT::BG_PRESSED);
                break;
+
        default:
                isCustomBitmap = false;
                break;
@@ -2423,7 +2457,12 @@ Bitmap*
 _Edit::GetDefaultBackgroundEffectBitmap(void) const
 {
        return __pDefaultBackgroundEffectBitmap;
+}
 
+Bitmap*
+_Edit::GetDefaultFocusBitmap(void) const
+{
+       return __pDefaultFocusBitmap;
 }
 
 bool
@@ -2696,7 +2735,7 @@ _Edit::SendLanguageEvent(LanguageCode prevLanguageCode, LanguageCode currentLang
 result
 _Edit::AttachScrollPanelEvent(void)
 {
-       _ScrollPanel* pScrollPanelCore = dynamic_cast<_ScrollPanel*>(GetParent());
+       _ScrollPanel* pScrollPanelCore = dynamic_cast< _ScrollPanel* >(GetParent());
        if (pScrollPanelCore)
        {
                if (__pScrollPanelEvent)
@@ -2712,7 +2751,7 @@ _Edit::AttachScrollPanelEvent(void)
 result
 _Edit::DetachScrollPanelEvent(void)
 {
-       _ScrollPanel* pScrollPanelCore = dynamic_cast<_ScrollPanel*>(GetParent());
+       _ScrollPanel* pScrollPanelCore = dynamic_cast< _ScrollPanel* >(GetParent());
        if (pScrollPanelCore)
        {
                if (__pScrollPanelEvent && (pScrollPanelCore->GetScrollPanelEvent() == __pScrollPanelEvent))
@@ -2895,7 +2934,7 @@ _Edit::SetPropertyKeypadAction(const Variant& action)
 
        result r = E_SUCCESS;
 
-       r = _pEditPresenter->SetKeypadAction((CoreKeypadAction)action.ToInt());
+       r = _pEditPresenter->SetKeypadAction((CoreKeypadAction) action.ToInt());
 
        return r;
 }
@@ -2903,7 +2942,7 @@ _Edit::SetPropertyKeypadAction(const Variant& action)
 Variant
 _Edit::GetPropertyKeypadAction(void) const
 {
-       return Variant((int)_pEditPresenter->GetKeypadAction());
+       return Variant((int) _pEditPresenter->GetKeypadAction());
 }
 
 result
@@ -3047,16 +3086,16 @@ _Edit::SetPropertyKeypadStyle(const Variant& style)
 {
        if (!(GetEditStyle() & EDIT_STYLE_SINGLE_LINE))
        {
-               SysTryReturn(NID_UI_CTRL, (KEYPAD_STYLE_PASSWORD != (KeypadStyle)style.ToInt()), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The invalid argument is given.");
+               SysTryReturn(NID_UI_CTRL, (KEYPAD_STYLE_PASSWORD != (KeypadStyle) style.ToInt()), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The invalid argument is given.");
        }
 
-       return _pEditPresenter->SetKeypadStyle((KeypadStyle)style.ToInt());
+       return _pEditPresenter->SetKeypadStyle((KeypadStyle) style.ToInt());
 }
 
 Variant
 _Edit::GetPropertyKeypadStyle(void) const
 {
-       return Variant((int)_pEditPresenter->GetKeypadStyle());
+       return Variant((int) _pEditPresenter->GetKeypadStyle());
 }
 
 result
@@ -3120,7 +3159,7 @@ _Edit::SetPropertyAutoLinkMask(const Variant& autoLinks)
 Variant
 _Edit::GetPropertyAutoLinkMask(void) const
 {
-       SysTryReturn(NID_UI_CTRL, (__inputStyle == INPUT_STYLE_OVERLAY), Variant((unsigned long)LINK_TYPE_NONE), E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] The current state unable to this operation.");
+       SysTryReturn(NID_UI_CTRL, (__inputStyle == INPUT_STYLE_OVERLAY), Variant((unsigned long) LINK_TYPE_NONE), E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] The current state unable to this operation.");
 
        return Variant(_pEditPresenter->GetAutoLinkMask());
 }
@@ -3294,7 +3333,7 @@ _Edit::SetEditTextFilter(IEditTextFilter* pFilter)
 }
 
 void
-_Edit::SendOpaqueCommand (const String& command)
+_Edit::SendOpaqueCommand(const String& command)
 {
        _pEditPresenter->SendOpaqueCommand(command);
 
@@ -3311,4 +3350,10 @@ _Edit::OnSettingChanged(String& key)
        }
 }
 
+_AccessibilityElement*
+_Edit::GetTextAccessibilityElement(void) const
+{
+       return __pTextAccessibilityElement;
+}
+
 }}} // Tizen::Ui::Controls
index a777213..dc28e93 100644 (file)
@@ -1301,6 +1301,7 @@ _EditDatePresenter::OnTouchMoveHandled(const _Control& control)
 void
 _EditDatePresenter::Animate(void)
 {
+       SysTryReturnVoidResult(NID_UI_CTRL, !__isAnimating, E_SUCCESS, "Rolling animation is in progress.");
        SysAssertf((__pFont != null), "Font instance must not be null.");
 
        (_FontImpl::GetInstance(*__pFont))->SetSize(__dateFontSize);
@@ -1356,6 +1357,9 @@ _EditDatePresenter::Animate(void)
 
        __pFont->GetTextExtent(newValue, newValue.GetLength(), newTextDim);
        __pFont->GetTextExtent(__lastSelectedValue, __lastSelectedValue.GetLength(), oldTextDim);
+       newTextDim.width += 2.0f;
+       oldTextDim.width += 2.0f;
+
 
        if (newTextDim.width > oldTextDim.width)
        {
@@ -1391,6 +1395,7 @@ _EditDatePresenter::Animate(void)
        if (r != E_SUCCESS)
        {
                pNewVisualElement->Destroy();
+               pNewVisualElement = null;
        }
        SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
 
@@ -1398,6 +1403,7 @@ _EditDatePresenter::Animate(void)
        if (pOldVisualElement == null)
        {
                pNewVisualElement->Destroy();
+               pNewVisualElement = null;
        }
        SysTryCatch(NID_UI_CTRL, (pOldVisualElement != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
 
@@ -1406,6 +1412,8 @@ _EditDatePresenter::Animate(void)
        {
                pNewVisualElement->Destroy();
                pOldVisualElement->Destroy();
+               pNewVisualElement = null;
+               pOldVisualElement = null;
        }
        SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
 
@@ -1419,14 +1427,16 @@ _EditDatePresenter::Animate(void)
                __pContentProvider->SetBounds(FloatRectangle((rect.x + textPoint.x) * 1.0f, (rect.y + textPoint.y) * 1.0f, newTextDim.width * 1.0f, newTextDim.height * 1.0f));
                pNewVisualElement->SetBounds(FloatRectangle(0.0f, newTextDim.height * 1.0f, newTextDim.width * 1.0f, newTextDim.height * 1.0f));
 
-               rect.x = static_cast<int>(__pContentProvider->GetBounds().x);
-               rect.y = static_cast<int>(__pContentProvider->GetBounds().y);
-               rect.width = static_cast<int>(__pContentProvider->GetBounds().width);
-               rect.height = static_cast<int>(__pContentProvider->GetBounds().height);
+               rect.width = __pContentProvider->GetBounds().width;
+               rect.height = __pContentProvider->GetBounds().height;
 
                textPoint.x = (rect.width - oldTextDim.width) / 2.0f;
                textPoint.y = (rect.height - oldTextDim.height) / 2.0f;
 
+               rect.x = __pContentProvider->GetBounds().x - 2.0f;
+               rect.y = __pContentProvider->GetBounds().y;
+               rect.width = __pContentProvider->GetBounds().width + 4.0f;
+
                pOldVisualElement->SetBounds(FloatRectangle(textPoint.x * 1.0f, 0.0f, oldTextDim.width * 1.0f, oldTextDim.height * 1.0f));
        }
        else
@@ -1436,22 +1446,24 @@ _EditDatePresenter::Animate(void)
                __pContentProvider->SetBounds(FloatRectangle((rect.x + textPoint.x) * 1.0f, (rect.y + textPoint.y) * 1.0f, oldTextDim.width * 1.0f, oldTextDim.height * 1.0f));
                pOldVisualElement->SetBounds(FloatRectangle(0.0f, 0.0f, oldTextDim.width * 1.0f, oldTextDim.height * 1.0f));
 
-               rect.x = static_cast<int>(__pContentProvider->GetBounds().x);
-               rect.y = static_cast<int>(__pContentProvider->GetBounds().y);
-               rect.width = static_cast<int>(__pContentProvider->GetBounds().width);
-               rect.height = static_cast<int>(__pContentProvider->GetBounds().height);
+               rect.width = __pContentProvider->GetBounds().width;
+               rect.height = __pContentProvider->GetBounds().height;
 
                textPoint.x = (rect.width - newTextDim.width) / 2.0f;
                textPoint.y = (rect.height - newTextDim.height) / 2.0f;
 
+               rect.x = __pContentProvider->GetBounds().x - 2.0f;
+               rect.y = __pContentProvider->GetBounds().y;
+               rect.width = __pContentProvider->GetBounds().width + 4.0f;
+
                pNewVisualElement->SetBounds(FloatRectangle(textPoint.x * 1.0f, newTextDim.height * 1.0f, newTextDim.width * 1.0f, newTextDim.height * 1.0f));
        }
 
-
        pCanvas = pEditDateElement->GetCanvasN(rect);
        pCanvas->SetBackgroundColor(contentBgColor);
        pCanvas->Clear();
        delete pCanvas;
+       pCanvas = null;
 
        pEditDateElement->AttachChild(*__pContentProvider);
 
@@ -1518,6 +1530,7 @@ _EditDatePresenter::Animate(void)
        CATCH:
        __isAnimating = false;
        __pContentProvider->Destroy();
+       __pContentProvider = null;
 
        delete pNewBoundsAnimation;
        pNewBoundsAnimation = null;
@@ -1543,6 +1556,7 @@ _EditDatePresenter::OnVisualElementAnimationFinished (const VisualElementAnimati
 
        pEditDateElement->DetachChild(*__pContentProvider);
        __pContentProvider->Destroy();
+       __pContentProvider = null;
 
        Draw();
        return;
index 85ab198..93000af 100644 (file)
@@ -1573,6 +1573,35 @@ _EditPresenter::DrawChangeableBackground(Canvas& canvas, bool focused, int bitma
                }
        }
 
+       if (GetSearchBarFlag() && __pEdit->IsFocused() && __pEdit->IsSearchFieldFocused())
+       {
+               Bitmap* pFocusBitmap = null;
+               Bitmap* pReplacementColorFocusBitmap = null;
+
+               Color focusColor;
+               GET_COLOR_CONFIG(SEARCHBAR::EDIT_BG_FOCUS, focusColor);
+
+               pFocusBitmap = __pEdit->GetDefaultFocusBitmap();
+
+               pReplacementColorFocusBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pFocusBitmap, Color::GetColor(COLOR_ID_MAGENTA), focusColor);
+
+               if (pReplacementColorFocusBitmap)
+               {
+                       if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pReplacementColorFocusBitmap))
+                       {
+                               canvas.DrawNinePatchedBitmap(editRect, *pReplacementColorFocusBitmap);
+                       }
+                       else
+                       {
+                               canvas.DrawBitmap(editRect, *pReplacementColorFocusBitmap);
+                       }
+               }
+
+               delete pReplacementColorFocusBitmap;
+               pReplacementColorFocusBitmap = null;
+       }
+
+
        if (borderRoundEnable)
        {
                if (pEditBgBitmap)
@@ -7684,6 +7713,8 @@ _EditPresenter::SetGuideText(const String& guideText)
                __pGuideTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE);
        }
 
+       __pEdit->UpdateAccessibilityElement(EDIT_ACCESSIBILITY_ELEMENT_TYPE_TEXT);
+
        return r;
 }
 
index 5f49167..cbe4262 100644 (file)
@@ -1678,6 +1678,7 @@ _EditTimePresenter::UpdateTimeFormat(void)
 void
 _EditTimePresenter::Animate(void)
 {
+       SysTryReturnVoidResult(NID_UI_CTRL, !__isAnimating, E_SUCCESS, "Rolling animation is in progress.");
        SysAssertf((__pFont != null), "Font instance must not be null.");
 
        (_FontImpl::GetInstance(*__pFont))->SetSize(__timeFontSize);
@@ -1770,6 +1771,7 @@ _EditTimePresenter::Animate(void)
        if (r != E_SUCCESS)
        {
                pNewVisualElement->Destroy();
+               pNewVisualElement = null;
        }
        SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
 
@@ -1779,6 +1781,7 @@ _EditTimePresenter::Animate(void)
        if (pOldVisualElement == null)
        {
                pNewVisualElement->Destroy();
+               pNewVisualElement = null;
        }
        SysTryCatch(NID_UI_CTRL, (pOldVisualElement != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
 
@@ -1787,6 +1790,8 @@ _EditTimePresenter::Animate(void)
        {
                pNewVisualElement->Destroy();
                pOldVisualElement->Destroy();
+               pNewVisualElement = null;
+               pOldVisualElement = null;
        }
        SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
 
@@ -1897,6 +1902,7 @@ _EditTimePresenter::Animate(void)
 CATCH:
        __isAnimating = false;
        __pContentProvider->Destroy();
+       __pContentProvider = null;
 
        delete pNewBoundsAnimation;
        pNewBoundsAnimation = null;
@@ -1922,6 +1928,7 @@ _EditTimePresenter::OnVisualElementAnimationFinished (const VisualElementAnimati
 
        pEditTimeElement->DetachChild(*__pContentProvider);
        __pContentProvider->Destroy();
+       __pContentProvider = null;
 
        Draw();
        return;
index ae45a68..4f5c3f7 100644 (file)
 #include "FUi_AccessibilityElement.h"
 #include "FUi_AccessibilityManager.h"
 #include "FUi_CoordinateSystemUtils.h"
+#include "FUiCtrl_SearchBarImpl.h"
+#include "FUiCtrl_EditFieldImpl.h"
+#include "FUiCtrl_ButtonImpl.h"
+#include <FSys_SettingInfoImpl.h>
+
 
 using namespace Tizen::Graphics;
 using namespace Tizen::Ui;
@@ -47,6 +52,7 @@ using namespace Tizen::Ui::Animations;
 using namespace Tizen::Base;
 using namespace Tizen::Base::Runtime;
 using namespace Tizen::Locales;
+using namespace Tizen::System;
 
 namespace Tizen { namespace Ui { namespace Controls
 {
@@ -69,6 +75,9 @@ _SearchBar::_SearchBar(void)
        , __isUserGuideTextColor(false)
        , __isKeypadOpening(false)
        , __isupdateContentBounds(false)
+       , __isKeyPressed(false)
+       , __isFocusCallbackToBeFired(true)
+       , __isButtonTextChangedByApp(false)
        , __keypadAction(CORE_KEYPAD_ACTION_SEARCH)
        , __pBackgroundBitmap(null)
        , __backgroundColor(Color())
@@ -103,28 +112,11 @@ _SearchBar::_SearchBar(void)
 
 _SearchBar::~_SearchBar(void)
 {
+       SettingInfo::RemoveSettingEventListener(*this);
 
        delete __pSearchBarPresenter;
        __pSearchBarPresenter = null;
 
-       if (__pEdit)
-       {
-               __pEdit->HideKeypad();
-
-               __pClippedGroupControl->DetachChild(*__pEdit);
-
-               delete __pEdit;
-               __pEdit = null;
-       }
-
-       if (__pCancelButton)
-       {
-               __pClippedGroupControl->DetachChild(*__pCancelButton);
-
-               delete __pCancelButton;
-               __pCancelButton = null;
-       }
-
        if (__pClippedGroupControl)
        {
                DetachChild(*__pClippedGroupControl);
@@ -272,6 +264,10 @@ _SearchBar::Initialize(bool enableSearchBarButton, CoreKeypadAction keypadAction
        __pSearchBarPresenter = pPresenter;
 
        CreateAccessibilityElement();
+
+       r = _SettingInfoImpl::AddSettingEventListener(*this);
+       SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
        return r;
 
 CATCH:
@@ -328,13 +324,11 @@ _SearchBar::CreateSearchField(void)
        editBounds.width = (editBounds.width > searchBarMinWidthModeNormal) ? editBounds.width : searchBarMinWidthModeNormal;
        editBounds.height = (editBounds.height > searchFieldMinHeight) ? editBounds.height : searchFieldMinHeight;
 
-       __pEdit = _Edit::CreateEditN();
-       r = GetLastResult();
-       SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
+       _SearchBarImpl* pSearchBarImpl = static_cast<_SearchBarImpl*>(GetUserData());
+       __pEdit = &(pSearchBarImpl->GetEditFieldImpl()->GetCore());
 
-       r = __pEdit->Initialize(EDIT_STYLE_NORMAL | EDIT_STYLE_SINGLE_LINE | EDIT_STYLE_CLEAR | EDIT_STYLE_NOSCROLL, INPUT_STYLE_OVERLAY,
-                                                       SEARCHBAR_TEXT_LENGTH_MAX);
-       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+       SysTryReturnResult(NID_UI_CTRL, __pEdit != null, E_SYSTEM,
+                          "[E_SYSTEM] A system error has occured. Failed to get _Edit instance");
 
        __pEdit->SetKeypadCommandButtonVisible(false);
        __pEdit->SetBounds(editBounds);
@@ -386,7 +380,12 @@ _SearchBar::CreateCancelButton(void)
 
        _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation();
 
-       __pCancelButton = _Button::CreateButtonN();
+       _SearchBarImpl* pSearchBarImpl = static_cast<_SearchBarImpl*>(GetUserData());
+       __pCancelButton = &(pSearchBarImpl->GetButtonImpl()->GetCore());
+
+       SysTryReturnResult(NID_UI_CTRL, __pCancelButton != null, E_SYSTEM,
+                          "[E_SYSTEM] A system error has occured. Failed to get _Edit instance");
+
        r = GetLastResult();
        SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
 
@@ -672,6 +671,7 @@ _SearchBar::GetButtonStatus(void) const
 result
 _SearchBar::SetButtonText(const String& text)
 {
+       __isButtonTextChangedByApp = true;
        SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM,
                     "[E_SYSTEM] A system error has occurred. The cancel button instance is null.");
 
@@ -1589,8 +1589,6 @@ _SearchBar::OnPreviewTouchReleased(const _Control& source, const _TouchInfo& tou
                return _UI_TOUCH_EVENT_DELIVERY_YES;
        }
 
-       SetMode(SEARCH_BAR_MODE_INPUT);
-
        return _UI_TOUCH_EVENT_DELIVERY_YES;
 }
 
@@ -1664,6 +1662,8 @@ _SearchBar::OnKeypadClosed(void)
                __pKeypadEvent->Fire(*pEventArg);
        }
 
+       __isKeypadOpening = false;
+
        SetContentsArea();
        return;
 }
@@ -1773,41 +1773,53 @@ _SearchBar::OnFontInfoRequested(unsigned long& style, int& size)
 bool
 _SearchBar::OnFocusGained(const _Control& source)
 {
+       if (__isKeyPressed)
+       {
+               __isKeyPressed = false;
+               _Control::OnDrawFocus();
+
+               return true;
+       }
+
        if (GetVisibleState() == true)
        {
-               SetMode(SEARCH_BAR_MODE_INPUT);
                __pEdit->SetFocused();
        }
 
-       return false;
+       return true;
 }
 
 bool
-_SearchBar::OnFocusLost(const _Controlsource)
+_SearchBar::OnFocusLost(const _Control &source)
 {
-       return false;
+       __pEdit->SetSearchFieldFocus(false);
+       _Control::OnFocusLost(source);
+       return true;
 }
 
 bool
 _SearchBar::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
 {
-       if (!__pEdit->IsUsbKeyboardConnected())
-       {
-               return false;
-       }
-
        _KeyCode keyCode = keyInfo.GetKeyCode();
 
        if (keyCode == _KEY_RIGHT)
        {
-               if (__isButtonEnabled)
+               if (GetMode() == SEARCH_BAR_MODE_NORMAL)
+               {
+                       __pEdit->SetFocused();
+                       return true;
+               }
+
+               if (!__isButtonEnabled || __pCancelButton->IsFocused() || !__isUsableCancelButton)
                {
-                       __pEdit->SetFocused(false);
-                       __pCancelButton->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
-                       __pCancelButton->SetFocused();
-                       __pCancelButton->Invalidate(true);
+                       return true;
                }
 
+               __pCancelButton->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED);
+               SetFocusCallBackParameter(false);
+               __pCancelButton->SetFocused();
+               __pCancelButton->Invalidate(true);
+
                return true;
        }
 
@@ -1816,18 +1828,30 @@ _SearchBar::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
                if (__pCancelButton->GetButtonStatus() == _BUTTON_STATUS_HIGHLIGHTED)
                {
                        __pCancelButton->SetButtonStatus(_BUTTON_STATUS_NORMAL);
-                       __pCancelButton->SetFocused(false);
                        __pCancelButton->Invalidate();
-
+                       __pEdit->SetFocused();
                }
 
                if (__pCancelButton->GetButtonStatus() == _BUTTON_STATUS_DISABLED)      //Searchbar Button is disabled, left arrow key is pressed
                {
                        __pCancelButton->SetButtonStatus(_BUTTON_STATUS_NORMAL);
                        SetButtonEnabled(false);
+                       __pEdit->SetFocused();
                }
 
-               __pEdit->SetFocused();
+               return true;
+       }
+
+       if (keyCode == _KEY_ENTER || keyCode == _KEY_TAB)
+       {
+               if (GetMode() == SEARCH_BAR_MODE_NORMAL)
+               {
+                       return false;
+               }
+
+               SetMode(SEARCH_BAR_MODE_NORMAL);
+               __isKeyPressed = true;
+               SetFocused();
 
                return true;
        }
@@ -1835,10 +1859,23 @@ _SearchBar::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
        return false;
 }
 
-bool
-_SearchBar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
+void
+_SearchBar::OnSettingChanged(Tizen::Base::String& key)
 {
-       return false;
+       if (__isButtonTextChangedByApp || !__isUsableCancelButton)
+       {
+               return;
+       }
+
+       if (key.Equals(L"http://tizen.org/setting/locale.language", false))
+       {
+               String cancelText;
+               GET_STRING_CONFIG(IDS_COM_SK_CANCEL, cancelText);
+               __pCancelButton->SetText(cancelText);
+               __pCancelButton->Invalidate();
+       }
+
+       return;
 }
 
 _Control*
@@ -2477,7 +2514,7 @@ _SearchBar::CreateAccessibilityElement(void)
                __pAccessibilitySearchBarElement->SetTrait(ACCESSIBILITY_TRAITS_NONE);
                __pAccessibilitySearchBarElement->SetName("SearchBar");
                pContainer->AddElement(*__pAccessibilitySearchBarElement);
-        }
+       }
 
        return;
 }
@@ -2500,6 +2537,13 @@ _SearchBar::SetContentDimming(void)
        return;
 }
 
+void
+_SearchBar::OnDrawFocus(void)
+{
+       __pEdit->SetSearchFieldFocus(true);
+       return;
+}
+
 bool
 _SearchBar::IsContentAttachable(const _Control* pContent)
 {
@@ -2705,4 +2749,16 @@ _SearchBar::SendOpaqueCommand(const String& command)
        return;
 }
 
+void
+_SearchBar::SetFocusCallBackParameter(bool state)
+{
+       __isFocusCallbackToBeFired = state;
+       return;
+}
+
+bool
+_SearchBar::IsFocusCallBackToBeFired(void) const
+{
+       return __isFocusCallbackToBeFired;
+}
 }}} // Tizen::Ui::Controls
index 4d887b4..e501ddf 100644 (file)
@@ -33,6 +33,8 @@
 #include "FUiCtrl_PublicTextEvent.h"
 #include "FUiCtrl_SearchBarImpl.h"
 #include "FUi_CoordinateSystemUtils.h"
+#include "FUiCtrl_EditFieldImpl.h"
+#include "FUiCtrl_ButtonImpl.h"
 
 using namespace Tizen::App;
 using namespace Tizen::Base;
@@ -47,6 +49,8 @@ namespace Tizen { namespace Ui { namespace Controls
 _SearchBarImpl::_SearchBarImpl(SearchBar* pPublic, _SearchBar* pCore)
        : _ControlImpl(pPublic, pCore)
        , __pSearchBar(pCore)
+       , __pEditField(null)
+       , __pButton(null)
        , __pContentControl(null)
        , __pPublicActionEvent(null)
        , __pPublicKeypadEvent(null)
@@ -54,6 +58,7 @@ _SearchBarImpl::_SearchBarImpl(SearchBar* pPublic, _SearchBar* pCore)
        , __pPublicTextEvent(null)
        , __pPublicSearchBarEvent(null)
        , __pPublicLanguageEvent(null)
+       , __pPublicFocusEventListeners(null)
 {
        ClearLastResult();
 }
@@ -94,6 +99,24 @@ _SearchBarImpl::~_SearchBarImpl(void)
                delete __pPublicSearchBarEvent;
                __pPublicSearchBarEvent = null;
        }
+
+       if (__pEditField)
+       {
+               delete __pEditField;
+               __pEditField = null;
+       }
+
+       if (__pButton)
+       {
+               delete __pButton;
+               __pButton = null;
+       }
+
+       if (__pPublicFocusEventListeners)
+       {
+               delete __pPublicFocusEventListeners;
+               __pPublicFocusEventListeners = null;
+       }
 }
 
 _SearchBarImpl*
@@ -251,6 +274,38 @@ _SearchBarImpl::Initialize(bool enableSearchBarButton, KeypadAction keypadAction
                break;
        }
 
+       __pEditField = new (std::nothrow) EditField();
+       SysTryReturnResult(NID_UI_CTRL, __pEditField, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocate memory.");
+
+       r = __pEditField->Construct(GetBoundsF(), EDIT_FIELD_STYLE_NORMAL, INPUT_STYLE_OVERLAY, EDIT_FIELD_TITLE_STYLE_NONE, true);
+       SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       __pEditField->AddFocusEventListener(*this);
+       SysTryReturnResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+
+       __pEditField->AddKeyEventListener(*this);
+       SysTryReturnResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+
+       __pEditFieldImpl = _EditFieldImpl::GetInstance(*__pEditField);
+       SysTryReturnResult(NID_UI_CTRL, __pEditFieldImpl != null, E_SYSTEM,
+                          "[E_SYSTEM] A system error has occured. Failed to EditFieldImpl instance");
+
+       String cancelButtonText;
+       GET_STRING_CONFIG(IDS_COM_SK_CANCEL, cancelButtonText);
+
+       __pButton = new (std::nothrow) Button();
+       SysTryReturnResult(NID_UI_CTRL, __pButton, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocate memory.");
+
+       r = __pButton->Construct(GetBoundsF(), cancelButtonText);
+       SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       __pButton->AddFocusEventListener(*this);
+       SysTryReturnResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+
+       __pButtonImpl = _ButtonImpl::GetInstance(*__pButton);
+       SysTryReturnResult(NID_UI_CTRL, __pButtonImpl != null, E_SYSTEM,
+                          "[E_SYSTEM] A system error has occured. Failed to ButtonImpl instance");
+
        r = __pSearchBar->Initialize(enableSearchBarButton, coreKeypadAction);
        SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
 
@@ -296,6 +351,10 @@ _SearchBarImpl::Initialize(bool enableSearchBarButton, KeypadAction keypadAction
        r = __pSearchBar->AddLanguageEventListener(*this);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
+       __pPublicFocusEventListeners = CreatePublicEventListenerListN();
+       r = GetLastResult();
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
        return r;
 }
 
@@ -1400,6 +1459,175 @@ _SearchBarImpl::OnLanguageChanged(LanguageCode oldLanguage, LanguageCode newLang
        return;
 }
 
+void
+_SearchBarImpl::OnFocusEventListenerAdded(IFocusEventListener& listener)
+{
+       ClearLastResult();
+       SysTryReturnVoidResult(NID_UI,
+                               __pPublicFocusEventListeners->Add(const_cast <IFocusEventListener*>(&listener)) == E_SUCCESS, E_SYSTEM,
+                               "[E_SYSTEM] A system error has occured. Failed to add listener.");
+}
+
+void
+_SearchBarImpl::OnFocusEventListenerRemoved(IFocusEventListener& listener)
+{
+       ClearLastResult();
+       SysTryReturnVoidResult(NID_UI,
+                               __pPublicFocusEventListeners->Remove(&listener) == E_SUCCESS, E_SYSTEM,
+                               "[E_SYSTEM] A system error has occured. Failed to remove listener.");
+}
+
+void
+_SearchBarImpl::OnFocusGained(const Tizen::Ui::Control& source)
+{
+       SetMode(SEARCH_BAR_MODE_INPUT);
+
+       if (!__pSearchBar->IsFocusCallBackToBeFired())
+       {
+               return;
+       }
+
+       IEnumeratorT<IEventListener*>* pEnumerator = __pPublicFocusEventListeners->GetEnumeratorN();
+       if (pEnumerator)
+       {
+               while (pEnumerator->MoveNext() == E_SUCCESS)
+               {
+                       IEventListener* pListener = null;
+                       pEnumerator->GetCurrent(pListener);
+
+                       IFocusEventListener* pFocusEventListener = dynamic_cast <IFocusEventListener*>(pListener);
+
+                       if (pFocusEventListener != null )
+                       {
+                               pFocusEventListener->OnFocusGained(GetPublic());
+                       }
+               }
+
+               delete pEnumerator;
+       }
+
+       return;
+}
+
+void
+_SearchBarImpl::OnFocusLost(const Tizen::Ui::Control& source)
+{
+       if (&source == __pEditField && __pButtonImpl->GetCore().GetButtonStatus() != _BUTTON_STATUS_HIGHLIGHTED)        //Focus is lost from Edit, and button state is not Highlighted
+       {
+               SetMode(SEARCH_BAR_MODE_NORMAL);
+       }
+
+       if (&source == __pButton)       //Button is highlighted and a touch is performed on Edit.
+       {
+               if (__pButtonImpl->GetCore().GetButtonStatus() == _BUTTON_STATUS_HIGHLIGHTED)
+               {
+                       __pButtonImpl->GetCore().SetButtonStatus(_BUTTON_STATUS_NORMAL);
+                       __pButtonImpl->GetCore().Invalidate();
+               }
+       }
+
+       if (!__pSearchBar->IsFocusCallBackToBeFired())
+       {
+               return;
+       }
+
+       IEnumeratorT<IEventListener*>* pEnumerator = __pPublicFocusEventListeners->GetEnumeratorN();
+       if (pEnumerator)
+       {
+               while (pEnumerator->MoveNext() == E_SUCCESS)
+               {
+                       IEventListener* pListener = null;
+                       pEnumerator->GetCurrent(pListener);
+
+                       IFocusEventListener* pFocusEventListener = dynamic_cast <IFocusEventListener*>(pListener);
+
+                       if (pFocusEventListener != null )
+                       {
+                               pFocusEventListener->OnFocusLost(GetPublic());
+                       }
+               }
+
+               delete pEnumerator;
+       }
+
+       return;
+}
+
+void
+_SearchBarImpl::OnKeyPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode)
+{
+       IEnumeratorT<IEventListener*>* pEnumerator = GetKeyEventListener()->GetEnumeratorN();
+       if (pEnumerator)
+       {
+               while (pEnumerator->MoveNext() == E_SUCCESS)
+               {
+                       IEventListener* pListener = null;
+                       pEnumerator->GetCurrent(pListener);
+
+                       IKeyEventListener* pKeyEventListener = dynamic_cast <IKeyEventListener*>(pListener);
+
+                       if (pKeyEventListener != null )
+                       {
+                               pKeyEventListener->OnKeyPressed(GetPublic(), keyCode);
+                       }
+               }
+
+               delete pEnumerator;
+       }
+
+       return;
+}
+
+void
+_SearchBarImpl::OnKeyReleased(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode)
+{
+       IEnumeratorT<IEventListener*>* pEnumerator = GetKeyEventListener()->GetEnumeratorN();
+       if (pEnumerator)
+       {
+               while (pEnumerator->MoveNext() == E_SUCCESS)
+               {
+                       IEventListener* pListener = null;
+                       pEnumerator->GetCurrent(pListener);
+
+                       IKeyEventListener* pKeyEventListener = dynamic_cast <IKeyEventListener*>(pListener);
+
+                       if (pKeyEventListener != null )
+                       {
+                               pKeyEventListener->OnKeyReleased(GetPublic(), keyCode);
+                       }
+               }
+
+               delete pEnumerator;
+       }
+
+       return;
+}
+
+void
+_SearchBarImpl::OnKeyLongPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode)
+{
+       IEnumeratorT<IEventListener*>* pEnumerator = GetKeyEventListener()->GetEnumeratorN();
+       if (pEnumerator)
+       {
+               while (pEnumerator->MoveNext() == E_SUCCESS)
+               {
+                       IEventListener* pListener = null;
+                       pEnumerator->GetCurrent(pListener);
+
+                       IKeyEventListener* pKeyEventListener = dynamic_cast <IKeyEventListener*>(pListener);
+
+                       if (pKeyEventListener != null )
+                       {
+                               pKeyEventListener->OnKeyLongPressed(GetPublic(), keyCode);
+                       }
+               }
+
+               delete pEnumerator;
+       }
+
+       return;
+}
+
 KeypadAction
 _SearchBarImpl::ConvertKeypadAction(CoreKeypadAction keypadAction) const
 {
@@ -1449,6 +1677,18 @@ _SearchBarImpl::ConvertKeypadAction(CoreKeypadAction keypadAction) const
        return publicKeypadAction;
 }
 
+_EditFieldImpl*
+_SearchBarImpl::GetEditFieldImpl(void) const
+{
+       return __pEditFieldImpl;
+}
+
+_ButtonImpl*
+_SearchBarImpl::GetButtonImpl(void) const
+{
+       return __pButtonImpl;
+}
+
 class _SearchBarMaker
        : public _UiBuilderControlMaker
 {
index 2ff26e4..5cfb375 100644 (file)
@@ -59,12 +59,6 @@ _SearchBarPresenter::~_SearchBarPresenter(void)
        delete __pSearchBarModel;
        __pSearchBarModel = null;
 
-       if (__pIconElement)
-       {
-               __pIconElement->Destroy();
-               __pIconElement = null;
-       }
-
        if (__pReplacedSearchFieldNormalBitmap)
        {
                delete __pReplacedSearchFieldNormalBitmap;
@@ -462,6 +456,7 @@ _SearchBarPresenter::ChangeMode(SearchBarMode mode)
 
        if (mode == SEARCH_BAR_MODE_NORMAL)
        {
+               __pSearchBar->SetFocusCallBackParameter(true);
                InitializeViewModeLayout();
                SetCancelButtonVisible(false);
                SetContainerVisible(false);
@@ -470,7 +465,10 @@ _SearchBarPresenter::ChangeMode(SearchBarMode mode)
                {
                        __pEdit->ClearText();
                        __pEdit->SetBounds(__searchFieldBounds);
-                       __pEdit->HideKeypad();
+                       if (__pEdit->IsFocused())
+                       {
+                               __pEdit->HideKeypad();
+                       }
                }
 
                r = __pSearchBar->SendSearchBarEvent(_SEARCH_BAR_EVENT_MODE_CHANGE);
index e578235..6d77a92 100644 (file)
@@ -575,6 +575,7 @@ _SlidableGroupedListImpl::_SlidableGroupedListImpl(Control* pList, _TableView* p
        , __loadedCount(0)
        , __isFullUpdate(false)
        , __pItemProvider(null)
+       , __isUnloading(false)
        , __directDelete(false)
        , __forceScroll(false)
        , __isCreating(false)
@@ -582,7 +583,6 @@ _SlidableGroupedListImpl::_SlidableGroupedListImpl(Control* pList, _TableView* p
        , __groupItemHeight(0)
        , __itemCacheSize(0)
        , __pItemFormat(null)
-       , __isUnloading(false)
 {
 }
 
index 5164f56..9a0dea2 100644 (file)
@@ -24,6 +24,7 @@
 #include <FBaseString.h>
 #include <FBaseSysLog.h>
 #include <FGrp_BitmapImpl.h>
+#include <FGrp_CoordinateSystemUtils.h>
 #include "FUi_ResourceManager.h"
 #include "FUi_UiTouchEvent.h"
 #include "FUi_TouchTapGestureDetector.h"
@@ -31,7 +32,6 @@
 #include "FUi_AccessibilityElement.h"
 #include "FUiCtrl_SplitPanel.h"
 #include "FUiCtrl_SplitPanelPresenter.h"
-#include "FGrp_CoordinateSystemUtils.h"
 
 using namespace Tizen::Ui;
 using namespace Tizen::Graphics;
@@ -52,6 +52,7 @@ _SplitPanel::_SplitPanel()
        , __splitPanelDividerDirection(SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL)
        , __pSplitPanelEvent(null)
        , __dividerTapCount(0)
+       , __isFocusModeEnabled(false)
        , __pAccessibilityElement(null)
        , __pDividerVisualElement(null)
 {
@@ -403,18 +404,29 @@ _SplitPanel::OnTapGestureCanceled(_TouchTapGestureDetector& gesture)
 bool
 _SplitPanel::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
 {
+       if (__isFocusModeEnabled == false)
+       {
+               return false;
+       }
+
        return __pSplitPanelPresenter->OnKeyPressed(source, keyInfo);
 }
 
 bool
 _SplitPanel::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
 {
+       if (__isFocusModeEnabled == false)
+       {
+               return false;
+       }
+
        return __pSplitPanelPresenter->OnKeyReleased(source, keyInfo);
 }
 
 void
 _SplitPanel::OnDrawFocus(void)
 {
+       __isFocusModeEnabled = true;
        __pSplitPanelPresenter->DrawFocus();
        return;
 }
@@ -429,12 +441,21 @@ bool
 _SplitPanel::OnFocusLost(const _Control& source)
 {
        result r = __pSplitPanelPresenter->ReleaseFocus();
-       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r));
 
        _Control::OnFocusLost(source);
        return true;
 }
 
+void
+_SplitPanel::OnFocusModeStateChanged(void)
+{
+       __isFocusModeEnabled = false;
+       __pSplitPanelPresenter->ReleaseFocus();
+
+       return;
+}
+
 result
 _SplitPanel::SetPane(_Control* pControl, SplitPanelPaneOrder paneOrder)
 {
index b6329f3..048bb5a 100644 (file)
 #include <FUiCtrlSplitPanelTypes.h>
 #include <FBaseSysLog.h>
 #include <FGrp_BitmapImpl.h>
+#include <FGrp_CoordinateSystemUtils.h>
 #include "FUi_ResourceManager.h"
 #include "FUi_UiTouchEvent.h"
 #include "FUiCtrl_SplitPanelPresenter.h"
 #include "FUiCtrl_SplitPanel.h"
 #include "FUiCtrl_SplitPanelImpl.h"
-#include "FGrp_CoordinateSystemUtils.h"
 
 using namespace Tizen::Ui;
 using namespace Tizen::Graphics;
@@ -159,8 +159,6 @@ _SplitPanelPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& t
 {
        FloatPoint point(0.0f, 0.0f);
 
-       ReleaseFocus();
-
        point = touchinfo.GetCurrentPosition();
 
        if (CheckDividerTouchRegion(point.x, point.y) == true)
@@ -176,8 +174,6 @@ _SplitPanelPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& t
 bool
 _SplitPanelPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo)
 {
-       ReleaseFocus();
-
        if (__splitPanelDividerPressed == true)
        {
                PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP);
@@ -201,8 +197,6 @@ _SplitPanelPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& tou
        FloatPoint point(0.0f, 0.0f);
        Bitmap* pThumbBitmap = null;
 
-       ReleaseFocus();
-
        if (__pSplitPanel != &source || __splitPanelDividerPressed == false )
        {
                return false;
@@ -317,6 +311,10 @@ _SplitPanelPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyIn
                         DrawFocus(__currentFocusedPane);
                 }
         }
+        else if (keyCode == _KEY_TAB && !__pSplitPanel->IsFocused())
+        {
+                __pSplitPanel->SetFocused(true);
+        }
         else
         {
                 return false;
@@ -342,7 +340,7 @@ result
 _SplitPanelPresenter::DrawFocus(SplitPanelPaneOrder focusedPane)
 {
        result r = E_SUCCESS;
-       Canvas* pSplitPanelCanvas = null;
+       Canvas* pCanvas = null;
        FloatRectangle  currentFocusBounds(0.0f, 0.0f, 0.0f, 0.0f);
 
        _Control* pControl = null;
@@ -362,33 +360,48 @@ _SplitPanelPresenter::DrawFocus(SplitPanelPaneOrder focusedPane)
 
        if (pControl != null)
        {
-               pControl->SetFocused();
-               pControl->DrawFocus();
-       }
-       else
-       {
-               pSplitPanelCanvas = __pSplitPanel->GetCanvasN();
-               SysTryReturnResult(NID_UI_CTRL, (pSplitPanelCanvas != null), E_SYSTEM, "A system error has occurred. Failed to get the canvas of SplitPanel.");
-
-               //give focus
-               if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pFocusBitmap))
+               if (pControl->IsFocusable())
                {
-                       r = pSplitPanelCanvas->DrawNinePatchedBitmap(currentFocusBounds, *__pFocusBitmap);
-                       SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+                       pControl->SetFocused(true);
+                       pControl->DrawFocus();
+
+                       return r;
                }
                else
                {
-                       r = pSplitPanelCanvas->DrawBitmap(currentFocusBounds, *__pFocusBitmap);
-                       SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+                       __pSplitPanel->SetFocused(true);
+                       currentFocusBounds = pControl->GetBoundsF();
+
+                       pCanvas = pControl->GetCanvasN();
+                       SysTryReturnResult(NID_UI_CTRL, (pCanvas != null), E_SYSTEM, "A system error has occurred. Failed to get the canvas of Control.");
                }
+       }
+       else
+       {
+               __pSplitPanel->SetFocused(true);
+
+               pCanvas = __pSplitPanel->GetCanvasN();
+               SysTryReturnResult(NID_UI_CTRL, (pCanvas != null), E_SYSTEM, "A system error has occurred. Failed to get the canvas of SplitPanel.");
+       }
 
-               delete pSplitPanelCanvas;
+       //give focus
+       if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pFocusBitmap))
+       {
+               r = pCanvas->DrawNinePatchedBitmap(currentFocusBounds, *__pFocusBitmap);
+               SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
+       }
+       else
+       {
+               r = pCanvas->DrawBitmap(currentFocusBounds, *__pFocusBitmap);
+               SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
        }
 
+       delete pCanvas;
+
        return r;
 
 CATCH:
-       delete pSplitPanelCanvas;
+       delete pCanvas;
        return r;
 }
 
@@ -411,7 +424,30 @@ _SplitPanelPresenter::ReleaseFocus(void)
        }
        else
        {
-               return r;
+               _Control* pFocusedControl = __pSplitPanel->GetPane(__currentFocusedPane);
+               if (pFocusedControl != null)
+               {
+                       if (!pFocusedControl->IsFocusable())
+                       {
+                               Canvas* pPaneCanvas = pFocusedControl->GetCanvasN();
+                               SysTryReturnResult(NID_UI_CTRL, (pPaneCanvas != null), E_SYSTEM, "A system error has occurred. Failed to get the canvas of SplitPanel.");
+
+                               panebounds = pFocusedControl->GetBoundsF();
+
+                               pPaneCanvas->SetBackgroundColor(pFocusedControl->GetBackgroundColor());
+                               pPaneCanvas->Clear(panebounds);
+
+                               delete pPaneCanvas;
+                       }
+
+                       if(!__pSplitPanel->IsFocused())
+                       {
+                               pFocusedControl->SetFocused(false);
+                               __pSplitPanel->SetFocused(true);
+                       }
+
+                       return r;
+               }
        }
 
        pSplitPanelCanvas = __pSplitPanel->GetCanvasN();
index c4b80c5..f3705b1 100644 (file)
@@ -39,6 +39,7 @@ namespace Tizen { namespace Ui { namespace Controls {
 
 _Tab::_Tab(void)
        : __pTabPresenter(null)
+       , __isInFocusMode(false)
        , __style(_TAB_STYLE_TEXT)
        , __currentHighlightedItemIndex(-1)
        , __tabStatus(_TAB_STATUS_NORMAL)
@@ -728,7 +729,7 @@ _Tab::RemoveItemAt(int index)
        {
                __pTabPresenter->SetItemStatus(__currentHighlightedItemIndex, _TABITEM_STATUS_NORMAL);
        }
-       if(GetItemCount() > 0)
+       if (GetItemCount() > 0)
        {
                __currentHighlightedItemIndex = 0;
        }
@@ -1030,6 +1031,12 @@ _Tab::IsEditModeEnabled(void) const
        return __pTabPresenter->IsEditModeEnabled();
 }
 
+bool
+_Tab::IsInFocusMode(void) const
+{
+       return __isInFocusMode;
+}
+
 result
 _Tab::SetBackgroundBitmap(const Bitmap& bitmap)
 {
@@ -1297,13 +1304,6 @@ _Tab::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo)
        {
                return true;
        }
-
-       if (__pTabPresenter->GetItemStatus(__currentHighlightedItemIndex) == _TABITEM_STATUS_HIGHLIGHTED)
-       {
-               __pTabPresenter->SetItemStatus(__currentHighlightedItemIndex, _TABITEM_STATUS_NORMAL);
-       }
-       __currentHighlightedItemIndex = -1;
-
        return __pTabPresenter->OnTouchPressed(source, touchinfo);
 }
 
@@ -1427,7 +1427,7 @@ _Tab::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
        }
        _KeyCode keyCode = keyInfo.GetKeyCode();
        int itemCount = __pTabPresenter->GetItemCount();
-       if(itemCount == 0)
+       if (itemCount == 0 || __isInFocusMode == false)
        {
                return false;
        }
@@ -1493,15 +1493,10 @@ _Tab::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
        return false;
 }
 
-bool
-_Tab::OnFocusGained(const _Control & source)
+void
+_Tab::OnDrawFocus(void)
 {
-       if (this != &source)
-       {
-               return false;
-       }
-
-       if(__pTabPresenter->GetItemCount() > 0)
+       if (__pTabPresenter->GetItemCount() > 0)
        {
                __currentHighlightedItemIndex = 0;
        }
@@ -1509,35 +1504,25 @@ _Tab::OnFocusGained(const _Control & source)
        {
                __currentHighlightedItemIndex = -1;
        }
-       return true;
-}
-
-bool
-_Tab::OnFocusLost(const _Control & source)
-{
-       if (this != &source)
+       if (__pTabPresenter->GetItemStatus(__currentHighlightedItemIndex) != _TABITEM_STATUS_SELECTED)
        {
-               return false;
+               __pTabPresenter->SetItemStatus(__currentHighlightedItemIndex, _TABITEM_STATUS_HIGHLIGHTED);
        }
+       __pTabPresenter->ShiftToFocusedItem(__currentHighlightedItemIndex, _FOCUS_DIRECTION_MOVE_LEFT);
+       __isInFocusMode = true;
+       return;
+}
 
+void
+_Tab::OnFocusModeStateChanged(void)
+{
        if (__pTabPresenter->GetItemStatus(__currentHighlightedItemIndex) == _TABITEM_STATUS_HIGHLIGHTED)
        {
                __pTabPresenter->SetItemStatus(__currentHighlightedItemIndex, _TABITEM_STATUS_NORMAL);
        }
        __currentHighlightedItemIndex = -1;
+       __isInFocusMode = false;
        Invalidate();
-       return true;
-}
-
-void
-_Tab::OnDrawFocus()
-{
-       if (__pTabPresenter->GetItemStatus(__currentHighlightedItemIndex) != _TABITEM_STATUS_SELECTED)
-       {
-               __pTabPresenter->SetItemStatus(__currentHighlightedItemIndex, _TABITEM_STATUS_HIGHLIGHTED);
-       }
-       __pTabPresenter->ShiftToFocusedItem(__currentHighlightedItemIndex, _FOCUS_DIRECTION_MOVE_LEFT);
-       return;
 }
 
 void
index 1c46502..a64e66f 100644 (file)
@@ -525,7 +525,7 @@ _TabPresenter::Draw(void)
                DrawItem(pCanvas);
        }
 
-       if (__pTab->GetCurrentHighlightedItemIndex() > -1 && __pTab->IsFocused() && GetItemCount() > 0)
+       if (__pTab->GetCurrentHighlightedItemIndex() > -1 && __pTab->IsInFocusMode() == true && GetItemCount() > 0)
        {
                DrawResourceBitmap(*pCanvas, GetItemAt(__pTab->GetCurrentHighlightedItemIndex())->GetItemBounds(), __pFocusBitmap);
        }
index c7c60a5..7c3d05b 100644 (file)
@@ -40,9 +40,8 @@ _TokenEdit::_TokenEdit(void)
        , __pTokenEditPresenter(null)
        , __isSelectedTokenTextColorSet(false)
        , __pTokenFilter(null)
-       , __pDescriptionTextAccessibilityElement(null)
-       , __pHiddenTokenCountAccessibilityElement(null)
-       , __pExpandableButtonAccessibilityElement(null)
+       , __pTitleTextAccessibilityElement(null)
+       , __pCursorAccessibilityElement(null)
 {
        GET_COLOR_CONFIG(TOKENEDIT::BG_NORMAL, __tokenColor[EXPANDABLE_EDIT_AREA_TOKEN_STATUS_NORMAL]);
        GET_COLOR_CONFIG(TOKENEDIT::BG_SELECTED, __tokenColor[EXPANDABLE_EDIT_AREA_TOKEN_STATUS_SELECTED]);
@@ -111,7 +110,7 @@ _TokenEdit::SetTokenFilter(const _ITokenFilter* pFilter)
 {
        result r = E_SUCCESS;
 
-       __pTokenFilter = const_cast <_ITokenFilter*>(pFilter);
+       __pTokenFilter = const_cast< _ITokenFilter* >(pFilter);
 
        return r;
 }
@@ -215,15 +214,15 @@ _TokenEdit::GetTokenColor(ExpandableEditAreaTokenStatus status) const
 
        switch (status)
        {
-       case EXPANDABLE_EDIT_AREA_TOKEN_STATUS_NORMAL :
+       case EXPANDABLE_EDIT_AREA_TOKEN_STATUS_NORMAL:
                var = GetProperty("normalTokenColor");
                break;
 
-       case EXPANDABLE_EDIT_AREA_TOKEN_STATUS_SELECTED :
+       case EXPANDABLE_EDIT_AREA_TOKEN_STATUS_SELECTED:
                var = GetProperty("selectedTokenColor");
                break;
 
-       default :
+       default:
                break;
        }
 
@@ -246,15 +245,15 @@ _TokenEdit::SetTokenColor(ExpandableEditAreaTokenStatus status, const Color& col
 
        switch (status)
        {
-       case EXPANDABLE_EDIT_AREA_TOKEN_STATUS_NORMAL :
+       case EXPANDABLE_EDIT_AREA_TOKEN_STATUS_NORMAL:
                r = SetProperty("normalTokenColor", var);
                break;
 
-       case EXPANDABLE_EDIT_AREA_TOKEN_STATUS_SELECTED :
+       case EXPANDABLE_EDIT_AREA_TOKEN_STATUS_SELECTED:
                r = SetProperty("selectedTokenColor", var);
                break;
 
-       default :
+       default:
                break;
        }
 
@@ -294,13 +293,13 @@ _TokenEdit::SetTitleText(const String& title)
        __pTokenEditPresenter->SetDescriptionText(title);
 
        r = __pTokenEditPresenter->CalculateDescriptionTextRect(title);
-       SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS,  r, "Propagating.");
+       SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
 
        r = __pTokenEditPresenter->CalculateTokenPositionFromIndex(0);
-       SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS,  r, "Propagating.");
+       SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
 
        r = __pTokenEditPresenter->SetInitialBounds();
-       SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS,  r, "Propagating.");
+       SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
 
        Invalidate(true);
        return r;
@@ -426,8 +425,10 @@ _TokenEdit::SetPropertyTokenTextColor(const Variant& color)
        ClearLastResult();
 
        __tokenTextColor[EXPANDABLE_EDIT_AREA_TOKEN_STATUS_NORMAL] = color.ToColor();
-       if(!__isSelectedTokenTextColorSet)
+       if (!__isSelectedTokenTextColorSet)
+       {
                __tokenTextColor[EXPANDABLE_EDIT_AREA_TOKEN_STATUS_SELECTED] = color.ToColor();
+       }
 
        return E_SUCCESS;
 }
@@ -460,7 +461,6 @@ _TokenEdit::GetPropertySelectedTokenTextColor(void) const
        return Variant(__tokenTextColor[EXPANDABLE_EDIT_AREA_TOKEN_STATUS_SELECTED]);
 }
 
-
 result
 _TokenEdit::SetPropertyTokenEditModeEnabled(const Variant& enable)
 {
@@ -490,51 +490,272 @@ _TokenEdit::OnAttachedToMainTree(void)
        pContainer = GetAccessibilityContainer();
        if (pContainer)
        {
-               if (__pDescriptionTextAccessibilityElement)
+               if (__pTitleTextAccessibilityElement)
                {
                        return E_SUCCESS;
                }
+               pContainer->AddListener(*this);
+               UpdateAccessibilityElement(EDIT_ACCESSIBILITY_ELEMENT_TYPE_TEXT);
+       }
 
-               if (GetEditStyle() & EDIT_STYLE_TITLE_LEFT)
-               {
-                       __pDescriptionTextAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
-                       if (__pDescriptionTextAccessibilityElement)
-                       {
-                               __pDescriptionTextAccessibilityElement->SetTrait(L"Edit field");
-                               pContainer->AddElement(*__pDescriptionTextAccessibilityElement);
-                       }
-               }
+       return E_SUCCESS;
+}
+
+void
+_TokenEdit::OnBoundsChanged(void)
+{
+       SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null");
+
+       __pTokenEditPresenter->OnBoundsChanged();
+
+       return;
+}
+
+bool
+_TokenEdit::OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element)
+{
+       return false;
+}
+
+bool
+_TokenEdit::OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element)
+{
+       return false;
+}
+
+bool
+_TokenEdit::OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element)
+{
+       return false;
+}
+
+bool
+_TokenEdit::OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element)
+{
+       return false;
+}
+
+bool
+_TokenEdit::OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element)
+{
+       return __pTokenEditPresenter->OnAccessibilityFocusIn(control, element);
+}
+
+bool
+_TokenEdit::OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element)
+{
+       return __pTokenEditPresenter->OnAccessibilityFocusOut(control, element);
+}
 
-               if (IsAutoShrinkModeEnabled())
+bool
+_TokenEdit::OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element)
+{
+       return false;
+}
+
+bool
+_TokenEdit::OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element)
+{
+       return false;
+}
+
+bool
+_TokenEdit::OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element)
+{
+       return false;
+}
+
+void
+_TokenEdit::UpdateAccessibilityElement(EditAccessibilityElementType type)
+{
+       _AccessibilityElement* pTextAccessibilityElement = _Edit::GetTextAccessibilityElement();
+       String spaceString(L" ");
+       switch (type)
+       {
+       case EDIT_ACCESSIBILITY_ELEMENT_TYPE_TEXT:
+               if (pTextAccessibilityElement)
                {
-                       __pHiddenTokenCountAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
-                       if (__pHiddenTokenCountAccessibilityElement)
+                       pTextAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height));
+                       if (GetTokenCount())
                        {
-                               __pHiddenTokenCountAccessibilityElement->SetTrait(L"Edit field");
-                               pContainer->AddElement(*__pHiddenTokenCountAccessibilityElement);
+                               pTextAccessibilityElement->SetLabel(GetTitleText() + spaceString + __pTokenEditPresenter->GetTextAccessibilityElementText());
                        }
-
-                       __pExpandableButtonAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
-                       if (__pExpandableButtonAccessibilityElement)
+                       else
                        {
-                               __pExpandableButtonAccessibilityElement->SetTrait(L"EXPAND BUTTON");
-                               pContainer->AddElement(*__pExpandableButtonAccessibilityElement);
+                               pTextAccessibilityElement->SetLabel(GetTitleText() + spaceString + GetGuideText() + GetText());
                        }
+                       pTextAccessibilityElement->SetHint(L"double tap to edit");
                }
+               break;
+
+       default:
+               break;
+       }
+
+       return;
+}
+
+_AccessibilityElement*
+_TokenEdit::GetTitleTextAccessibilityElement(void) const
+{
+       return __pTitleTextAccessibilityElement;
+}
+
+_AccessibilityElement*
+_TokenEdit::GetCursorAccessibilityElement(void) const
+{
+       return __pCursorAccessibilityElement;
+}
+
+result
+_TokenEdit::AddTitleAccessibilityElement(void)
+{
+       result r = E_SUCCESS;
+
+       if (!(GetEditStyle() & EDIT_STYLE_TITLE_LEFT))
+       {
+               return r;
        }
 
+       if (__pTitleTextAccessibilityElement)
+       {
+               return r;
+       }
+
+       _AccessibilityContainer* pContainer = GetAccessibilityContainer();
+
+       if (pContainer)
+       {
+               _AccessibilityElement* pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
+               SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+               String labelText = GetTitleText();
+               pAccessibilityElement->SetBounds(__pTokenEditPresenter->GetDescriptionTextRect());
+               pAccessibilityElement->SetLabel(labelText);
+               pContainer->AddElement(*pAccessibilityElement);
+               __pTitleTextAccessibilityElement = pAccessibilityElement;
+       }
+
+       return r;
+}
+
+result
+_TokenEdit::AddCursorAccessibilityElement(void)
+{
+       result r = E_SUCCESS;
+
+       if (__pCursorAccessibilityElement)
+       {
+               return r;
+       }
+
+       _AccessibilityContainer* pContainer = GetAccessibilityContainer();
+
+       if (pContainer)
+       {
+               _AccessibilityElement* pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
+               SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+               if (GetTextLength())
+               {
+                       pAccessibilityElement->SetLabel(GetText());
+               }
+               else
+               {
+                       pAccessibilityElement->SetTrait(L"Edit field");
+               }
+
+               pContainer->AddElement(*pAccessibilityElement);
+
+               __pCursorAccessibilityElement = pAccessibilityElement;
+
+               SetCursorAccessibilityBounds(__pTokenEditPresenter->GetTextBoundsF());
+       }
+
+       return r;
+}
+
+result
+_TokenEdit::SetCursorAccessibilityBounds(const FloatRectangle& cursorBounds)
+{
+       if (!__pCursorAccessibilityElement)
+       {
+               return E_SUCCESS;
+       }
+
+       if (IsInternalFocused()) // Set cursor as global focus accessibility element only in focused mode.
+       {
+               _AccessibilityManager::GetInstance()->SetGlobalFocusedElement(*__pCursorAccessibilityElement);
+       }
+       __pCursorAccessibilityElement->SetBounds(cursorBounds);
+
        return E_SUCCESS;
 }
 
 void
-_TokenEdit::OnBoundsChanged(void)
+_TokenEdit::RemoveTitleAccessibilityElement(void)
 {
-       SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null");
+       _AccessibilityContainer* pContainer = GetAccessibilityContainer();
+       if (pContainer)
+       {
+               if (__pTitleTextAccessibilityElement)
+               {
+                       pContainer->RemoveElement(*__pTitleTextAccessibilityElement);
+                       __pTitleTextAccessibilityElement = null;
+               }
+       }
+}
 
-       __pTokenEditPresenter->OnBoundsChanged();
+void
+_TokenEdit::RemoveCursorAccessibilityElement(void)
+{
+       _AccessibilityContainer* pContainer = GetAccessibilityContainer();
+       if (pContainer)
+       {
+               if (__pCursorAccessibilityElement)
+               {
+                       pContainer->RemoveElement(*__pCursorAccessibilityElement);
+                       __pCursorAccessibilityElement = null;
+               }
+       }
+}
+
+void
+_TokenEdit::OnDrawFocus(void)
+{
+       //Exit Token editing/pressed mode
+       __pTokenEditPresenter->PrepareFocusUiMode();
+
+       __pTokenEditPresenter->SetDrawFocusState(true);
+
+       RefreshFocusUi();
 
        return;
 }
 
-}}} //Tizen::Ui::Controls
+void
+_TokenEdit::OnFocusModeStateChanged(void)
+{
+       //Reset focus index here
+       __pTokenEditPresenter->SetDrawFocusState(false);
+
+       return;
+}
+
+void
+_TokenEdit::RefreshFocusUi(void)
+{
+       int focusedTokenIndex = __pTokenEditPresenter->GetFocusedTokenIndex();
+
+       if (focusedTokenIndex == -1)
+       {
+               _Control::OnDrawFocus();
+       }
+       else
+       {
+               _Control::OnFocusLost(*this);
+       }
 
+       return;
+}
+}}} //Tizen::Ui::Controls
index 8cdfe6c..7a6c7e8 100644 (file)
@@ -29,6 +29,8 @@
 #include "FUiCtrl_Scroll.h"
 #include "FUi_Math.h"
 #include "FUi_CoordinateSystemUtils.h"
+#include "FUi_AccessibilityContainer.h"
+#include "FUi_AccessibilityElement.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Runtime;
@@ -45,8 +47,8 @@ SineTimingFunction::CalculateProgress(float timeProgress) const
 {
        const float segments[3][3] = {{0.0f, 0.01f, 0.37f}, {0.37f, 0.72f, 0.888f}, {0.888f, 0.9999f, 1.0f}};
        float timeProgressValue = timeProgress;
-       int segmentsLength = 3; //Length of the segments array
-       int index = (int)floor(segmentsLength * timeProgressValue);
+       int segmentsLength = 3; //Length of the segments array
+       int index = (int) floor(segmentsLength * timeProgressValue);
        if (index >= segmentsLength)
        {
                index = segmentsLength - 1;
@@ -54,7 +56,7 @@ SineTimingFunction::CalculateProgress(float timeProgress) const
 
        float progressValue = (timeProgressValue - index * (1.0 / segmentsLength)) * segmentsLength;
        float segmentAtIndex[3];
-       for(int i = 0; i < 3; i++)
+       for (int i = 0; i < 3; i++)
        {
                segmentAtIndex[i] = segments[index][i];
        }
@@ -90,7 +92,7 @@ private:
        float __textPixelWidth;
        float __textPixelHeight;
        _VisualElement* __pVisualElement;
-};     // _Token
+};  // _Token
 
 _Token::_Token(void)
        : pTextObject(null)
@@ -181,7 +183,7 @@ _Token::ResetToken(const String& text)
        }
 
        int length = text.GetLength();
-       wchar_t* pTempString = const_cast <wchar_t*>(text.GetPointer());
+       wchar_t* pTempString = const_cast< wchar_t* >(text.GetPointer());
        SysTryReturnResult(NID_UI_CTRL, pTempString != null, E_SYSTEM, "A system error has occurred. Token text string is null.");
 
        __pTextBuffer = new (std::nothrow) wchar_t[(length + 1) * (sizeof(wchar_t))];
@@ -195,7 +197,7 @@ _Token::ResetToken(const String& text)
 
        pTextObject->RemoveAll(true);
 
-       TextSimple* pSimpleText = new (std::nothrow)TextSimple(__pTextBuffer, length, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, pFont);
+       TextSimple* pSimpleText = new (std::nothrow) TextSimple(__pTextBuffer, length, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, pFont);
        SysTryCatch(NID_UI_CTRL, pSimpleText != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
 
        r = pTextObject->AppendElement(*pSimpleText);
@@ -275,9 +277,11 @@ _TokenEditPresenter::_TokenEditPresenter(void)
        , __pTokenBgBitmap(null)
        , __pTokenBgNormalEffectBitmap(null)
        , __pTokenBgPressedEffectBitmap(null)
+       , __pTokenBgReplacementFocusBitmap(null)
+       , __pTokenBgFocusEffectBitmap(null)
        , __pressedTokenIndex(-1)
        , __isEditingToken(false)
-       , __edittingTokenIndex(-1)
+       , __editingTokenIndex(-1)
        , __clientRect(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f))
        , __initTextRect(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f))
        , __isEditModeEnabled(true)
@@ -311,6 +315,10 @@ _TokenEditPresenter::_TokenEditPresenter(void)
        , __editContentFontSize(0.0f)
        , __trackTokenIndex(-1)
        , __isAnimationInProgress(false)
+       , __focusOutIndex(-1)
+       , __accessibilityElements()
+       , __focusedTokenIndex(-1)
+       , __drawFocusState(false)
 {
 }
 
@@ -319,7 +327,7 @@ _TokenEditPresenter::InitializeDescriptionText(void)
 {
        result r = E_SUCCESS;
        float descriptionTextSize = 0.0f;
-       Font *pFont = null;
+       FontpFont = null;
        float editFontSize = 0.0f;
 
        __pDescriptionTextTextObject = new (std::nothrow) TextObject();
@@ -398,6 +406,12 @@ _TokenEditPresenter::DisposeTokenEditPresenter(void)
        delete __pTokenBgPressedEffectBitmap;
        __pTokenBgPressedEffectBitmap = null;
 
+       delete __pTokenBgReplacementFocusBitmap;
+       __pTokenBgReplacementFocusBitmap = null;
+
+       delete __pTokenBgFocusEffectBitmap;
+       __pTokenBgFocusEffectBitmap = null;
+
        if (__pDescriptionTextVisualElement)
        {
                __pDescriptionTextVisualElement->Destroy();
@@ -413,6 +427,8 @@ _TokenEditPresenter::DisposeTokenEditPresenter(void)
                __pTimingFunction = null;
        }
 
+       RemoveChildAccessibilityElements();
+
        return E_SUCCESS;
 }
 
@@ -445,7 +461,7 @@ _TokenEditPresenter::Initialize(const _Control& control)
                pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_MIDDLE);
        }
 
-       __pTokenEdit = dynamic_cast <_TokenEdit*>(GetEditView());
+       __pTokenEdit = dynamic_cast< _TokenEdit* >(GetEditView());
        SysTryReturnResult(NID_UI_CTRL, __pTokenEdit != null, E_SYSTEM, "A system error has occurred. The _Token instance is null.");
 
        _TokenEditModel* pTokenEditModel = new (std::nothrow) _TokenEditModel();
@@ -461,12 +477,15 @@ _TokenEditPresenter::Initialize(const _Control& control)
        float tokenBottomMargin = 0.0f;
        float tokenHeight = 0.0f;
        _ControlOrientation orientation = __pTokenEdit->GetOrientation();
+       Color focusTokenColor;
+       Bitmap* pTokenBgFocusBitmap = null;
 
        GET_SHAPE_CONFIG(TOKENEDIT::LEFT_MARGIN, orientation, leftMargin);
        GET_SHAPE_CONFIG(TOKENEDIT::RIGHT_MARGIN, orientation, rightMargin);
        GET_SHAPE_CONFIG(TOKENEDIT::TOP_MARGIN, orientation, tokenTopMargin);
        GET_SHAPE_CONFIG(TOKENEDIT::BOTTOM_MARGIN, orientation, tokenBottomMargin);
        GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_HEIGHT, orientation, tokenHeight);
+       GET_COLOR_CONFIG(TOKENEDIT::BG_FOCUS, focusTokenColor);
 
        // For drawing token in specific area
        __clientRect.x = leftMargin;
@@ -500,6 +519,20 @@ _TokenEditPresenter::Initialize(const _Control& control)
        r = GET_BITMAP_CONFIG_N(TOKENEDIT::BG_PRESSED_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pTokenBgPressedEffectBitmap);
        SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
 
+       r = GET_BITMAP_CONFIG_N(TOKENEDIT::BG_FOCUS, BITMAP_PIXEL_FORMAT_ARGB8888, pTokenBgFocusBitmap);
+       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+       __pTokenBgReplacementFocusBitmap = _BitmapImpl::GetColorReplacedBitmapN(
+                   *pTokenBgFocusBitmap,Color::GetColor(COLOR_ID_MAGENTA), focusTokenColor);
+       SysTryCatch(NID_UI_CTRL, __pTokenBgReplacementFocusBitmap != null, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+       r = GET_BITMAP_CONFIG_N(TOKENEDIT::BG_FOCUS_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pTokenBgFocusEffectBitmap);
+       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+       delete pTokenBgFocusBitmap;
+       pTokenBgFocusBitmap = null;
+
+
        __isTokenEditPresenterInitialized = true;
 
        __previousCursorPosition = GetCursorPosition();
@@ -517,6 +550,15 @@ CATCH:
        delete __pTokenBgNormalEffectBitmap;
        __pTokenBgNormalEffectBitmap = null;
 
+       delete __pTokenBgPressedEffectBitmap;
+       __pTokenBgPressedEffectBitmap = null;
+
+       delete pTokenBgFocusBitmap;
+       pTokenBgFocusBitmap = null;
+
+       delete __pTokenBgReplacementFocusBitmap;
+       __pTokenBgReplacementFocusBitmap = null;
+
        return r;
 }
 
@@ -525,9 +567,9 @@ _TokenEditPresenter::DrawText(void)
 {
        bool isCustomBitmap = IS_CUSTOM_BITMAP(TOKENEDIT::BG_NORMAL);
        //Checking IsBlocked() is additional check for handler movement in token edit mode
-       if ((__isEditingToken) && (__edittingTokenIndex >= 0))
+       if ((__isEditingToken) && (__editingTokenIndex >= 0))
        {
-               _Token* pToken = static_cast <_Token*>(__pTokenList->GetAt(__edittingTokenIndex));
+               _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex));
                if (pToken)
                {
                        _VisualElement* pTokenVisualElement = pToken->GetVisualElement();
@@ -637,7 +679,7 @@ _TokenEditPresenter::Draw(Canvas& canvas)
        _VisualElement* pCursorVisualElement = GetCursorVisualElement();
        SysTryReturnResult(NID_UI_CTRL, pCursorVisualElement != null, E_SYSTEM, "A system error has occurred. Failed to get cursor visual element.");
 
-       _Token* pToken = static_cast <_Token*>(__pTokenList->GetAt(__edittingTokenIndex));
+       _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex));
 
        if (pToken)
        {
@@ -650,6 +692,7 @@ _TokenEditPresenter::Draw(Canvas& canvas)
                        SysTryReturnResult(NID_UI_CTRL, pTokenCanvas != null, E_SYSTEM, "A system error has occurred. Failed to get canvas of the token.");
 
                        _EditPresenter::DrawText(*pTokenCanvas);
+
                        InitializeCursor();
 
                        delete pTokenCanvas;
@@ -672,7 +715,7 @@ _TokenEditPresenter::Draw(Canvas& canvas)
        if (__isTokenEditingFinished)
        {
                __isEditingToken = false;
-               __edittingTokenIndex = -1;
+               __editingTokenIndex = -1;
                _EditPresenter::SetTextSize(__editContentFontSize);
 
                __isTokenEditingFinished = false;
@@ -689,6 +732,7 @@ _TokenEditPresenter::DrawToken(int count)
        float tokenTextLeftMargin = 0.0f;
        float tokenVerticalSpacing = 0.0f;
        bool isCustomBitmap = false;
+       bool isCustomFocusBitmap = false;
 
        SysTryReturn(NID_UI_CTRL, __pTokenEdit != null, false, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null.");
 
@@ -698,6 +742,13 @@ _TokenEditPresenter::DrawToken(int count)
        GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_VERTICAL_SPACING, orientation, tokenVerticalSpacing);
 
        isCustomBitmap = IS_CUSTOM_BITMAP(TOKENEDIT::BG_NORMAL);
+       isCustomFocusBitmap = IS_CUSTOM_BITMAP(TOKENEDIT::BG_FOCUS);
+
+
+       if (__drawFocusState)
+       {
+               __pTokenEdit->RefreshFocusUi();
+       }
 
        if (count == -1)
        {
@@ -715,7 +766,7 @@ _TokenEditPresenter::DrawToken(int count)
        {
                Bitmap* pReplacementColorBackgroundBitmap = null;
 
-               _Token* pToken = static_cast <_Token*>(__pTokenList->GetAt(i));
+               _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
                if (pToken == null || pToken->pTextObject == null)
                {
                        SysLog(NID_UI_CTRL, "[E_SYSTEM] The _Token instance is null");
@@ -812,6 +863,34 @@ _TokenEditPresenter::DrawToken(int count)
                        }
                }
 
+               if (__focusedTokenIndex == i && __drawFocusState && (!__isEditingToken))
+               {
+                       if (__pTokenBgReplacementFocusBitmap)
+                       {
+                               if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgReplacementFocusBitmap))
+                               {
+                                       pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pTokenBgReplacementFocusBitmap);
+                               }
+                               else
+                               {
+                                       pTokenCanvas->DrawBitmap(tokenRect, *__pTokenBgReplacementFocusBitmap);
+                               }
+                       }
+
+                       if (__pTokenBgFocusEffectBitmap && (!isCustomFocusBitmap))
+                       {
+                               if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgFocusEffectBitmap))
+                               {
+                                       pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pTokenBgFocusEffectBitmap);
+                               }
+                               else
+                               {
+                                       pTokenCanvas->DrawBitmap(tokenRect, *__pTokenBgFocusEffectBitmap);
+                               }
+                       }
+
+               }
+
                pTokenElement->SetAnimationProvider(null);
                if (pToken->isImplicitAnimation)
                {
@@ -928,7 +1007,7 @@ _TokenEditPresenter::MakeToken(const String& tokenString)
        r = pToken->Construct(inputTokenString, GetFont());
        SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct token.", GetErrorMessage(r));
 
-       r = __pTokenList->Add(static_cast <Object&>(*pToken));
+       r = __pTokenList->Add(static_cast< Object& >(*pToken));
        SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
 
        tokenCount = __pTokenList->GetCount();
@@ -955,6 +1034,9 @@ _TokenEditPresenter::MakeToken(const String& tokenString)
        r = CheckTokenScrolling();
        SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to process scroll.", GetErrorMessage(r));
 
+       AppendTokenAccessibilityElement();
+       UpdateTokenAccessibilityBounds();
+
        return r;
 
 CATCH:
@@ -985,9 +1067,9 @@ _TokenEditPresenter::AppendToken(const Tizen::Base::String& token)
        r = MakeToken(token);
        SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
 
-       if (__edittingTokenIndex >= 0)
+       if (__editingTokenIndex >= 0)
        {
-               SetEditingTokenTextBounds(__edittingTokenIndex);
+               SetEditingTokenTextBounds(__editingTokenIndex);
                _EditPresenter::SetCursorPosition(__previousCursorPosition);
        }
 
@@ -1033,30 +1115,36 @@ _TokenEditPresenter::InsertTokenAt(int index, const String& token, bool isUser)
 
        for (int i = 0; i < GetTokenCount(); i++)
        {
-               pToken = static_cast <_Token*>(__pTokenList->GetAt(i));
-               SysTryCatch(NID_UI_CTRL, pToken != null, ,r = E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null");
+               pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
+               SysTryCatch(NID_UI_CTRL, pToken != null, , r = E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null");
 
                r = pToken->SetBounds(pToken->displayRect);
                SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set bounds", GetErrorMessage(r));
        }
 
+       InsertTokenAccessibilityElementAt(index);
+
        if (isUser)
        {
-               if (__edittingTokenIndex >= 0)
+               if (__editingTokenIndex >= 0)
                {
-                       if (index <= __edittingTokenIndex)
+                       if (index <= __editingTokenIndex)
                        {
-                               __edittingTokenIndex++;
+                               __editingTokenIndex++;
                        }
-                       __pressedTokenIndex = __edittingTokenIndex;
+                       __pressedTokenIndex = __editingTokenIndex;
 
-                       SetEditingTokenTextBounds(__edittingTokenIndex);
+                       SetEditingTokenTextBounds(__editingTokenIndex);
                        _EditPresenter::SetCursorPosition(__previousCursorPosition);
                }
                else if (__pressedTokenIndex >= index)
                {
                        __pressedTokenIndex++;
                }
+               else if ((__focusedTokenIndex >= index) && __drawFocusState)
+               {
+                       __focusedTokenIndex++;
+               }
        }
 
        return r;
@@ -1077,7 +1165,7 @@ _TokenEditPresenter::GetTokenAt(int index) const
        SysTryReturn(NID_UI_CTRL, index >= 0 && index < __pTokenList->GetCount(), tempString, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] index (%d) is out of range.", index);
 
        _Token* pToken = null;
-       pToken = static_cast <_Token*>(__pTokenList->GetAt(index));
+       pToken = static_cast< _Token* >(__pTokenList->GetAt(index));
        if (pToken)
        {
                tempString = pToken->GetText();
@@ -1095,9 +1183,9 @@ _TokenEditPresenter::GetTokenCount(bool isInvokedByApp) const
        }
        else
        {
-               if(__isAnimationInProgress)
+               if (__isAnimationInProgress)
                {
-                       return __pTokenList->GetCount() -1;
+                       return __pTokenList->GetCount() - 1;
                }
                else
                {
@@ -1124,7 +1212,7 @@ _TokenEditPresenter::RemoveTokenAt(int index, bool isClearText)
        result r = E_SUCCESS;
        SysTryReturnResult(NID_UI_CTRL, index >= 0 && index < __pTokenList->GetCount(), E_OUT_OF_RANGE, "index (%d) is out of range.", index);
 
-       if (index == __edittingTokenIndex && isClearText)
+       if (index == __editingTokenIndex && isClearText)
        {
                _VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement();
                SysTryReturnResult(NID_UI_CTRL, pEditVisualElement, E_SYSTEM, "A system error has occurred. Failed to get root visual element.");
@@ -1138,7 +1226,7 @@ _TokenEditPresenter::RemoveTokenAt(int index, bool isClearText)
                r = pEditVisualElement->AttachChild(*pCursorVisualElement);
                SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
 
-               __edittingTokenIndex = -1;
+               __editingTokenIndex = -1;
                __isEditingToken = false;
                __pressedTokenIndex = -1;
                __isTokenEditingFinished = true;
@@ -1162,7 +1250,7 @@ _TokenEditPresenter::RemoveTokenAt(int index, bool isClearText)
 
        for (int i = 0; i < GetTokenCount(); i++)
        {
-               pToken = static_cast <_Token*>(__pTokenList->GetAt(i));
+               pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
                SysTryReturnResult(NID_UI_CTRL, pToken != null, E_SYSTEM, "A system error has occurred. The _Token instance is null");
 
                r = pToken->SetBounds(pToken->displayRect);
@@ -1175,21 +1263,24 @@ _TokenEditPresenter::RemoveTokenAt(int index, bool isClearText)
        r = CheckTokenScrolling();
        SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to process scroll.");
 
+       RemoveTokenAccessibilityElementAt(index);
+       UpdateTokenAccessibilityBounds();
+
        if (isClearText)
        {
-               if (index > __edittingTokenIndex)
+               if (index > __editingTokenIndex)
                {
-                       SetEditingTokenTextBounds(__edittingTokenIndex);
+                       SetEditingTokenTextBounds(__editingTokenIndex);
                        _EditPresenter::SetCursorPosition(__previousCursorPosition);
                }
-               if (index < __edittingTokenIndex)
+               if (index < __editingTokenIndex)
                {
-                       if (__edittingTokenIndex > 0)
+                       if (__editingTokenIndex > 0)
                        {
-                               __edittingTokenIndex--;
-                               __pressedTokenIndex = __edittingTokenIndex;
+                               __editingTokenIndex--;
+                               __pressedTokenIndex = __editingTokenIndex;
 
-                               SetEditingTokenTextBounds(__edittingTokenIndex);
+                               SetEditingTokenTextBounds(__editingTokenIndex);
                                _EditPresenter::SetCursorPosition(__previousCursorPosition);
                        }
                }
@@ -1204,6 +1295,21 @@ _TokenEditPresenter::RemoveTokenAt(int index, bool isClearText)
                {
                        __pressedTokenIndex--;
                }
+
+               if (__drawFocusState)
+               {
+                       if (index == __focusedTokenIndex)
+                       {
+                               __focusedTokenIndex = -1;
+                               StopCursorTimer();
+                               SetCursorDisabled(false);
+                               StartCursorTimer();
+                       }
+                       else if(index >= 0 && index < __focusedTokenIndex)
+                       {
+                               __focusedTokenIndex--;
+                       }
+               }
        }
        else if (index == __pressedTokenIndex)
        {
@@ -1212,6 +1318,13 @@ _TokenEditPresenter::RemoveTokenAt(int index, bool isClearText)
                SetCursorDisabled(false);
                StartCursorTimer();
        }
+       else if ((index == __focusedTokenIndex) && __drawFocusState)
+       {
+               __focusedTokenIndex = -1;
+               StopCursorTimer();
+               SetCursorDisabled(false);
+               StartCursorTimer();
+       }
 
        return r;
 }
@@ -1285,7 +1398,7 @@ _TokenEditPresenter::CalculateTokenPositionFromIndex(int startIndex, bool leftWa
        FloatRectangle tokenEditBounds = __pTokenEdit->GetBoundsF();
        String titleText = __pTokenEdit->GetTitleText();
 
-       if(!_FloatCompare(GetDescriptionTextRect().width, __previousTitleWidth))
+       if (!_FloatCompare(GetDescriptionTextRect().width, __previousTitleWidth))
        {
                __descriptionTextRectForScroll = GetDescriptionTextRect();
                __previousTitleWidth = GetDescriptionTextRect().width;
@@ -1294,7 +1407,7 @@ _TokenEditPresenter::CalculateTokenPositionFromIndex(int startIndex, bool leftWa
        bool findPrevTokenLoopFlag = true;
        for (; index < tokenCount; index++)
        {
-               pToken = static_cast <_Token*>(__pTokenList->GetAt(index));
+               pToken = static_cast< _Token* >(__pTokenList->GetAt(index));
                SysTryReturn(NID_UI_CTRL, pToken, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null.");
 
                if (index == 0)
@@ -1305,7 +1418,7 @@ _TokenEditPresenter::CalculateTokenPositionFromIndex(int startIndex, bool leftWa
                                pToken->displayRect.x = __descriptionTextRectForScroll.x + __descriptionTextRectForScroll.width + descriptionTextRightMargin;
                                pToken->displayRect.y = __descriptionTextRectForScroll.y + __scrollValue;
                        }
-                       else    // Set description text.
+                       else    // Set description text.
                        {
                                pToken->displayRect.x = leftMargin + __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN);
                                pToken->displayRect.y = tokenTopMargin + __scrollValue + __pTokenEdit->GetVerticalMarginF(EDIT_TEXT_TOP_MARGIN) + __lineSpacing;
@@ -1318,12 +1431,12 @@ _TokenEditPresenter::CalculateTokenPositionFromIndex(int startIndex, bool leftWa
                {
                        if (findPrevTokenLoopFlag)
                        {
-                               pPreviousToken = static_cast <_Token*>(__pTokenList->GetAt(index - 1));
+                               pPreviousToken = static_cast< _Token* >(__pTokenList->GetAt(index - 1));
                                findPrevTokenLoopFlag = false;
                        }
 
                        float tempTextWidth = tokenEditBounds.width - pPreviousToken->displayRect.x - pPreviousToken->displayRect.width - tokenHorizontalSpacing - rightMargin - __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_RIGHT_MARGIN);
-                       if (tokenTextLeftMargin + pToken->GetTextPixelWidth() + tokenTextRightMargin > tempTextWidth)           // Line change
+                       if (tokenTextLeftMargin + pToken->GetTextPixelWidth() + tokenTextRightMargin > tempTextWidth)       // Line change
                        {
                                pToken->displayRect.x = leftMargin + __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN);
                                pToken->displayRect.y = pPreviousToken->displayRect.y + tokenHeight + tokenVerticalSpacing + __lineSpacing;
@@ -1332,7 +1445,7 @@ _TokenEditPresenter::CalculateTokenPositionFromIndex(int startIndex, bool leftWa
                        else
                        {
                                pToken->displayRect.x = pPreviousToken->displayRect.x + pPreviousToken->displayRect.width +
-                                               tokenHorizontalSpacing;
+                                                                               tokenHorizontalSpacing;
                                pToken->displayRect.y = pPreviousToken->displayRect.y;
                        }
 
@@ -1358,7 +1471,7 @@ _TokenEditPresenter::InitializeTokenVisibilityAt(int ndex)
        result r = E_SUCCESS;
 
        _Token* pToken = null;
-       pToken = static_cast <_Token*>(__pTokenList->GetAt(ndex));
+       pToken = static_cast< _Token* >(__pTokenList->GetAt(ndex));
        SysTryReturn(NID_UI_CTRL, pToken, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null.");
 
        r = pToken->SetBounds(pToken->displayRect);
@@ -1381,7 +1494,7 @@ _TokenEditPresenter::InitializeTokenVisibilityAt(int ndex)
 float
 _TokenEditPresenter::GetMaxTextHeight(void)
 {
-       Font *pFont = null;
+       FontpFont = null;
        float maxHeight = __editContentFontSize;
 
        pFont = GetFont();
@@ -1459,12 +1572,14 @@ _TokenEditPresenter::SetInitialBounds(void)
                        tokenTextRect.height = textObjectMaxHeight;
 
                        SetTextBounds(tokenTextRect);
+                       //set cursor bounds with tokenTextRect
+                       __pTokenEdit->SetCursorAccessibilityBounds(tokenTextRect);
                        return r;
                }
 
                _Token* pToken = null;
                // SetTextBounds from last token
-               pToken = static_cast <_Token*>(__pTokenList->GetAt(tokenCount - 1));
+               pToken = static_cast< _Token* >(__pTokenList->GetAt(tokenCount - 1));
                SysTryReturn(NID_UI_CTRL, pToken, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null");
 
                float tempTextRectWidth = 0.0f;
@@ -1484,6 +1599,11 @@ _TokenEditPresenter::SetInitialBounds(void)
                tokenTextRect.height = textObjectMaxHeight;
 
                SetTextBounds(tokenTextRect);
+               if (__pressedTokenIndex < 0) // Set cursor as global focused element if no token is selected
+               {
+                       __pTokenEdit->SetCursorAccessibilityBounds(tokenTextRect);
+               }
+
        }
        else
        {
@@ -1514,7 +1634,7 @@ _TokenEditPresenter::GetTextBounds(void) const
 {
        if ((__isPopupVisible == true || __isLongPressed == true) && __pressedTokenIndex >= 0)
        {
-               _Token* pToken = static_cast <_Token*>(__pTokenList->GetAt(__pressedTokenIndex));
+               _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(__pressedTokenIndex));
                SysTryReturn(NID_UI_CTRL, pToken, Rectangle(), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Unable to get valid token.");
 
                _ControlOrientation orientation = __pTokenEdit->GetOrientation();
@@ -1523,7 +1643,7 @@ _TokenEditPresenter::GetTextBounds(void) const
                GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_LEFT_MARGIN, orientation, tokenTextLeftMargin);
                GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_VERTICAL_SPACING, orientation, tokenTextVerticalMargin);
 
-               FloatRectangle textBoundsF(pToken->displayRect.x + tokenTextLeftMargin, pToken->displayRect.y + (tokenTextVerticalMargin /2.0f), pToken->displayRect.width - (tokenTextLeftMargin * 2.0f), pToken->displayRect.height - tokenTextVerticalMargin);
+               FloatRectangle textBoundsF(pToken->displayRect.x + tokenTextLeftMargin, pToken->displayRect.y + (tokenTextVerticalMargin / 2.0f), pToken->displayRect.width - (tokenTextLeftMargin * 2.0f), pToken->displayRect.height - tokenTextVerticalMargin);
                Rectangle textBounds = _CoordinateSystemUtils::ConvertToInteger(textBoundsF);
 
                return textBounds;
@@ -1539,7 +1659,7 @@ _TokenEditPresenter::GetTextBoundsF(void) const
 {
        if ((__isPopupVisible == true || __isLongPressed == true) && __pressedTokenIndex >= 0)
        {
-               _Token* pToken = static_cast <_Token*>(__pTokenList->GetAt(__pressedTokenIndex));
+               _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(__pressedTokenIndex));
                SysTryReturn(NID_UI_CTRL, pToken, FloatRectangle(), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Unable to get valid token.");
 
                _ControlOrientation orientation = __pTokenEdit->GetOrientation();
@@ -1548,7 +1668,7 @@ _TokenEditPresenter::GetTextBoundsF(void) const
                GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_LEFT_MARGIN, orientation, tokenTextLeftMargin);
                GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_VERTICAL_SPACING, orientation, tokenTextVerticalMargin);
 
-               FloatRectangle textBounds(pToken->displayRect.x + tokenTextLeftMargin, pToken->displayRect.y + (tokenTextVerticalMargin /2.0f), pToken->displayRect.width - (tokenTextLeftMargin * 2.0f), pToken->displayRect.height - tokenTextVerticalMargin);
+               FloatRectangle textBounds(pToken->displayRect.x + tokenTextLeftMargin, pToken->displayRect.y + (tokenTextVerticalMargin / 2.0f), pToken->displayRect.width - (tokenTextLeftMargin * 2.0f), pToken->displayRect.height - tokenTextVerticalMargin);
 
                return textBounds;
        }
@@ -1563,7 +1683,7 @@ _TokenEditPresenter::CutText(void)
 {
        if (__isEditingToken)
        {
-               _Token* pToken = static_cast <_Token*>(__pTokenList->GetAt(__edittingTokenIndex));
+               _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex));
                SysTryReturnResult(NID_UI_CTRL, pToken != null, E_SYSTEM, "A system error has occurred. The _Token instance is null");
 
                pToken->isTextCut = true;
@@ -1695,12 +1815,12 @@ _TokenEditPresenter::CalculateDescriptionTextRect(const String& descriptionText)
        int length = descriptionText.GetLength();
        FloatDimension textSize;
 
-       wchar_t* pTempString = const_cast <wchar_t*>(descriptionText.GetPointer());
+       wchar_t* pTempString = const_cast< wchar_t* >(descriptionText.GetPointer());
 
        SysAssertf(__pDescriptionTextTextObject != null, "The TextObject instance is null.");
 
        __pDescriptionTextTextObject->RemoveAll(true);
-       pSimpleText = new (std::nothrow)TextSimple(pTempString, length, TEXT_ELEMENT_SOURCE_TYPE_INTERNAL);
+       pSimpleText = new (std::nothrow) TextSimple(pTempString, length, TEXT_ELEMENT_SOURCE_TYPE_INTERNAL);
        __pDescriptionTextTextObject->AppendElement(*pSimpleText);
 
        textSize = __pDescriptionTextTextObject->GetTextExtentF(0, length);
@@ -1751,6 +1871,7 @@ _TokenEditPresenter::DrawDescriptionText(void)
 {
        result r = E_SUCCESS;
        FloatRectangle tempDescriptionTextRect;
+       FloatRectangle descriptionTextRect(__descriptionTextRect);
        Canvas* pDescriptionTextCanvas = null;
 
        Font* pDescriptionFont = null;
@@ -1791,7 +1912,9 @@ _TokenEditPresenter::DrawDescriptionText(void)
                SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
        }
 
-       __pDescriptionTextVisualElement->SetBounds(FloatRectangle(__descriptionTextRect.x, (__descriptionTextRectForScroll.y + __scrollValue), __descriptionTextRect.width, __descriptionTextRect.height));
+       descriptionTextRect.y = __descriptionTextRectForScroll.y + __scrollValue;
+       __pDescriptionTextVisualElement->SetBounds(descriptionTextRect);
+       UpdateTitleAccessibilityBounds(descriptionTextRect); // Update title accessibility bounds to same as DescriptionTextVisualElement bounds
 
        pDescriptionTextCanvas = __pDescriptionTextVisualElement->GetCanvasN();
        if (pDescriptionTextCanvas == null)
@@ -1879,7 +2002,7 @@ _TokenEditPresenter::TrimTokenAndAdjustEllipsisAt(int index)
        GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_MIN_WIDTH, orientation, tokenMinimumSize);
 
        _Token* pToken = null;
-       pToken = static_cast <_Token*>(__pTokenList->GetAt(index));
+       pToken = static_cast< _Token* >(__pTokenList->GetAt(index));
        SysTryReturn(NID_UI_CTRL, pToken, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null");
 
        FloatRectangle tokenEditBounds = __pTokenEdit->GetBoundsF();
@@ -1920,7 +2043,7 @@ _TokenEditPresenter::GetTokenIndexFromCoordinate(const Point point) const
        int tokenCount = __pTokenList->GetCount();
        for (int i = 0; i < tokenCount; i++)
        {
-               _Token* pToken = static_cast <_Token*>(__pTokenList->GetAt(i));
+               _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
                if (pToken)
                {
                        FloatRectangle tokenRect = pToken->displayRect;
@@ -1950,7 +2073,7 @@ _TokenEditPresenter::SetEditingTokenTextBounds(int index, bool isSetText)
        GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_LEFT_MARGIN, orientation, tokenTextLeftMargin);
        GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_SIZE, orientation, tokenFontSize);
 
-       _Token* pToken = static_cast <_Token*>(__pTokenList->GetAt(index));
+       _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(index));
        SysTryReturnResult(NID_UI_CTRL, pToken != null, E_SYSTEM, "A system error has occurred. The _Token instance is null");
 
        FloatRectangle tempTextDspRect;
@@ -1988,7 +2111,7 @@ _TokenEditPresenter::RecalculateTokenBounds(float position)
        for (int i = 0; i < tokenCount; i++)
        {
                _Token* pToken = null;
-               pToken = static_cast <_Token*>(__pTokenList->GetAt(i));
+               pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
 
                if (pToken)
                {
@@ -2017,13 +2140,13 @@ _TokenEditPresenter::SetTokenBoundsByTouchInfo(const _TouchInfo& touchinfo)
        result r = E_SUCCESS;
        int currentYPosition = _CoordinateSystemUtils::ConvertToInteger(touchinfo.GetCurrentPosition()).y;
 
-       if(_FloatCompare(__prevScrollValue, 0.0f))
+       if (_FloatCompare(__prevScrollValue, 0.0f))
        {
                __prevScrollValue = currentYPosition;
        }
-       else    // Adjust moved y position to all tokens.
+       else    // Adjust moved y position to all tokens.
        {
-               if (__isNeedToScroll)           // Need to scroll
+               if (__isNeedToScroll)       // Need to scroll
                {
                        float tempDefference = __prevScrollValue - currentYPosition;
 
@@ -2049,7 +2172,7 @@ _TokenEditPresenter::SetTokenBoundsByTouchInfo(const _TouchInfo& touchinfo)
                        for (int i = 0; i < tokenCount; i++)
                        {
                                _Token* pToken = null;
-                               pToken = static_cast <_Token*>(__pTokenList->GetAt(i));
+                               pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
 
                                if (pToken)
                                {
@@ -2091,7 +2214,7 @@ _TokenEditPresenter::ProcessTokeningByTouchEvent(const _Control& source, const _
        }
 
        int prevPressedTokenIndex = __pressedTokenIndex;
-       int prevEditedTokenIndex = __edittingTokenIndex;
+       int prevEditedTokenIndex = __editingTokenIndex;
 
        result r = E_SUCCESS;
        if (IsFocused())
@@ -2099,12 +2222,12 @@ _TokenEditPresenter::ProcessTokeningByTouchEvent(const _Control& source, const _
                if (__isEditModeEnabled && __pressedTokenIndex != -1 && __pressedTokenIndex == tokenIndex)
                {
                        //Comment below to Block Copy & Paste functionality in Token Edit mode
-                       __edittingTokenIndex = __pressedTokenIndex;
+                       __editingTokenIndex = __pressedTokenIndex;
                        __isEditingToken = true;
                        __isTokenEditingFinished = false;
-                       if (prevEditedTokenIndex != __edittingTokenIndex)
+                       if (prevEditedTokenIndex != __editingTokenIndex)
                        {
-                               SetEditingTokenTextBounds(__edittingTokenIndex);
+                               SetEditingTokenTextBounds(__editingTokenIndex);
                        }
                        SetCursorDisabled(false);
                }
@@ -2126,7 +2249,7 @@ _TokenEditPresenter::ProcessTokeningByTouchEvent(const _Control& source, const _
                        _Token* pToken = null;
                        _VisualElement* pTokenVisualElement = null;
 
-                       pToken = static_cast <_Token*>(__pTokenList->GetAt(prevPressedTokenIndex));
+                       pToken = static_cast< _Token* >(__pTokenList->GetAt(prevPressedTokenIndex));
 
                        bool isParentChanged = false;
                        if (pToken)
@@ -2166,7 +2289,7 @@ _TokenEditPresenter::ProcessTokeningByTouchEvent(const _Control& source, const _
                                r = InsertTokenAt(prevPressedTokenIndex, inputTokenString);
                                SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
 
-                               pToken = static_cast <_Token*>(__pTokenList->GetAt(prevPressedTokenIndex));
+                               pToken = static_cast< _Token* >(__pTokenList->GetAt(prevPressedTokenIndex));
                                if (pToken)
                                {
                                        pToken->currTokenLength = inputTokenString.GetLength();
@@ -2176,7 +2299,7 @@ _TokenEditPresenter::ProcessTokeningByTouchEvent(const _Control& source, const _
                        ClearText();
                        //Flex height adjusted since token can move to another line
                        AdjustFlexibleHeight();
-                       __edittingTokenIndex = -1;
+                       __editingTokenIndex = -1;
                        __isTokenEditingFinished = true;
                        __isEditingToken = false;
                        _EditPresenter::SetTextSize(__editContentFontSize);
@@ -2194,34 +2317,8 @@ _TokenEditPresenter::ProcessTokeningByTouchEvent(const _Control& source, const _
 
                        if ((__isEditingToken == true) && (__pressedTokenIndex != -1))
                        {
-                               _VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement();
-                               SysTryReturnResult(NID_UI_CTRL, pEditVisualElement, E_SYSTEM, "A system error has occurred. Failed to get root visual element.");
-
-                               _VisualElement* pCursorVisualElement = GetCursorVisualElement();
-                               SysTryReturnResult(NID_UI_CTRL, pCursorVisualElement, E_SYSTEM, "A system error has occurred. Failed to get cursor visual element.");
-
-                               _Token* pToken = null;
-                               _VisualElement* pTokenVisualElement = null;
-
-                               pToken = static_cast <_Token*>(__pTokenList->GetAt(__pressedTokenIndex));
-
-                               bool isParentChanged = false;
-                               if (pToken)
-                               {
-                                       pTokenVisualElement = pToken->GetVisualElement();
-                                       SysTryReturnResult(NID_UI_CTRL, pTokenVisualElement, E_SYSTEM, "A system error has occurred. Failed to get token visual element.");
-
-                                       if (pCursorVisualElement->GetParent() != pTokenVisualElement)
-                                       {
-                                               isParentChanged = true;
-                                               result r = E_SUCCESS;
-                                               r = (pCursorVisualElement->GetParent())->DetachChild(*pCursorVisualElement);
-                                               SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
-
-                                               r = pTokenVisualElement->AttachChild(*pCursorVisualElement);
-                                               SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
-                                       }
-                               }
+                               r = AttachCursorToToken();
+                               SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
                        }
 
                        if (__isEditingToken == false)
@@ -2246,7 +2343,7 @@ _TokenEditPresenter::ProcessTokeningByTouchEvent(const _Control& source, const _
                        _Token* pToken = null;
                        _VisualElement* pTokenVisualElement = null;
 
-                       pToken = static_cast <_Token*>(__pTokenList->GetAt(__edittingTokenIndex));
+                       pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex));
 
                        bool isParentChanged = false;
                        if (pToken)
@@ -2277,11 +2374,11 @@ _TokenEditPresenter::ProcessTokeningByTouchEvent(const _Control& source, const _
                        }
                        __pressedTokenIndex = tokenIndex;
 
-                       RemoveTokenAt(__edittingTokenIndex);
+                       RemoveTokenAt(__editingTokenIndex);
 
                        if (inputTokenString.GetLength() > 0)
                        {
-                               InsertTokenAt(__edittingTokenIndex, inputTokenString);
+                               InsertTokenAt(__editingTokenIndex, inputTokenString);
 
                                if (isParentChanged)
                                {
@@ -2290,7 +2387,7 @@ _TokenEditPresenter::ProcessTokeningByTouchEvent(const _Control& source, const _
                        }
 
                        __isEditingToken = false;
-                       __edittingTokenIndex = -1;
+                       __editingTokenIndex = -1;
                        _EditPresenter::SetTextSize(__editContentFontSize);
                        __isTokenEditingFinished = false;
 
@@ -2342,7 +2439,7 @@ _TokenEditPresenter::CheckTokenScrolling(bool scrollToCursorPosition)
        GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_VERTICAL_SPACING, orientation, tokenVerticalSpacing);
 
        int tokenCount = GetTokenCount();
-       if (tokenCount == 0)            // There is no token to scroll
+       if (tokenCount == 0)        // There is no token to scroll
        {
                __isNeedToScroll = false;
                __maxScrollValue = 0.0f;
@@ -2351,7 +2448,7 @@ _TokenEditPresenter::CheckTokenScrolling(bool scrollToCursorPosition)
                return E_SUCCESS;
        }
 
-       _Token* pToken = static_cast<_Token*>(__pTokenList->GetAt(tokenCount - 1));
+       _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(tokenCount - 1));
        SysTryReturn(NID_UI_CTRL, pToken, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null.");
 
        float newScrollValue = 0.0f;
@@ -2359,7 +2456,7 @@ _TokenEditPresenter::CheckTokenScrolling(bool scrollToCursorPosition)
        if (scrollToCursorPosition)
        {
                FloatRectangle cursorBounds;
-               GetCursorBounds(false,  cursorBounds);
+               GetCursorBounds(false, cursorBounds);
                newScrollValue = cursorBounds.y + cursorBounds.height - __scrollValue + tokenBottomMargin - __pTokenEdit->GetBoundsF().height;
                __isScrollValueModified = true;
        }
@@ -2382,10 +2479,10 @@ _TokenEditPresenter::CheckTokenScrolling(bool scrollToCursorPosition)
        }
        else
        {
-               if(!_FloatCompare(__scrollValue, 0.0f))
+               if (!_FloatCompare(__scrollValue, 0.0f))
                {
                        __scrollValue = 0.0f;
-                       __maxScrollValue = 0.0f;                // To prevent unnecessary token scrolling.
+                       __maxScrollValue = 0.0f;        // To prevent unnecessary token scrolling.
                        RecalculateTokenBounds(__scrollValue);
                        __isTokenScrolling = false;
                }
@@ -2397,7 +2494,7 @@ _TokenEditPresenter::CheckTokenScrolling(bool scrollToCursorPosition)
 result
 _TokenEditPresenter::SetTokenVisualElementBounds(int index, const FloatRectangle& bounds)
 {
-       _Token* pToken = static_cast <_Token*>(__pTokenList->GetAt(index));
+       _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(index));
        SysTryReturnResult(NID_UI_CTRL, pToken != null, E_SYSTEM, "A system error has occurred. The _Token instance is null.");
 
        return pToken->SetBounds(pToken->displayRect);
@@ -2487,7 +2584,7 @@ _TokenEditPresenter::DrawScrollBar(void)
                }
        }
 
-       _Token* pToken = static_cast <_Token*>(__pTokenList->GetAt(GetTokenCount() - 1));
+       _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(GetTokenCount() - 1));
        if (pToken == null)
        {
                return E_SUCCESS;
@@ -2573,7 +2670,7 @@ _TokenEditPresenter::CalculateVisibleTokenCount(void)
        for (int i = 0; i < tokenCount; i++)
        {
                tempInitialBounds = intialBounds;
-               _Token* pToken = static_cast <_Token*>(__pTokenList->GetAt(i));
+               _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
                SysTryReturn(NID_UI_CTRL, pToken != null, -1, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null.");
 
                FloatRectangle displayBounds = pToken->displayRect;
@@ -2601,7 +2698,7 @@ _TokenEditPresenter::OnFocusGained(void)
 
                for (int i = 0; i < tokenCount; i++)
                {
-                       pToken = static_cast <_Token*>(__pTokenList->GetAt(i));
+                       pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
 
                        if (pToken)
                        {
@@ -2615,7 +2712,7 @@ _TokenEditPresenter::OnFocusGained(void)
 
                SetFlexBounds(tempRect);
 
-               SetEditingTokenTextBounds(__edittingTokenIndex, false);
+               SetEditingTokenTextBounds(__editingTokenIndex, false);
 
                if (!__isFocus)
                {
@@ -2649,6 +2746,8 @@ _TokenEditPresenter::OnFocusGained(void)
                StartCursorTimer();
        }
 
+       RefreshAccessibilityElements();
+
        return _EditPresenter::OnFocusGained();
 }
 
@@ -2656,19 +2755,18 @@ bool
 _TokenEditPresenter::OnFocusLost(void)
 {
        result r = E_SUCCESS;
+       __isFocus = false;
 
        //Remove pressed state on focus lost
        __pressedTokenIndex = -1;
 
-       __isFocus = false;
-
        _EditPresenter::StopTitleSlidingTimer();
        __isTitleSliding = false;
 
-       if (__edittingTokenIndex >= 0)
+       if (__editingTokenIndex >= 0)
        {
                _Token* pToken = null;
-               pToken = static_cast <_Token*>(__pTokenList->GetAt(__edittingTokenIndex));
+               pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex));
                if (pToken)
                {
                        if (GetText().GetLength() > 0)
@@ -2677,7 +2775,7 @@ _TokenEditPresenter::OnFocusLost(void)
                        }
                        else
                        {
-                               RemoveTokenAt(__edittingTokenIndex, true);
+                               RemoveTokenAt(__editingTokenIndex, true);
                        }
                }
        }
@@ -2702,7 +2800,7 @@ _TokenEditPresenter::OnFocusLost(void)
                _Token* pToken = null;
                for (int i = 0; i < tokenCount; i++)
                {
-                       pToken = static_cast <_Token*>(__pTokenList->GetAt(i));
+                       pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
                        if (pToken)
                        {
                                pToken->SetBounds(pToken->displayRect);
@@ -2712,6 +2810,8 @@ _TokenEditPresenter::OnFocusLost(void)
                r = SetInitialBounds();
                SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating", GetErrorMessage(r));
 
+               UpdateTokenAccessibilityBounds();
+
                __scrollValue = 0.0f;
                r = CalculateTokenPositionFromIndex(0);
                SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r));
@@ -2720,7 +2820,7 @@ _TokenEditPresenter::OnFocusLost(void)
 
                for (int i = visibleTokenCount; i < tokenCount; i++)
                {
-                       pToken = static_cast <_Token*>(__pTokenList->GetAt(i));
+                       pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
                        if (pToken)
                        {
                                _VisualElement* pTokenVisualElement = pToken->GetVisualElement();
@@ -2748,7 +2848,7 @@ _TokenEditPresenter::OnFocusLost(void)
                FloatRectangle intialWindowBounds = GetInitialBoundsF();
                SetFlexBounds(intialWindowBounds);
 
-               SetEditingTokenTextBounds(__edittingTokenIndex, false);
+               SetEditingTokenTextBounds(__editingTokenIndex, false);
 
                __descriptionTextRect.y = __descriptionTextRectForScroll.y + __scrollValue;
        }
@@ -2760,6 +2860,9 @@ _TokenEditPresenter::OnFocusLost(void)
                pTextObject->Compose();
        }
 
+       RemoveChildAccessibilityElements();
+       __pTokenEdit->UpdateAccessibilityElement(EDIT_ACCESSIBILITY_ELEMENT_TYPE_TEXT);
+
        return _EditPresenter::OnFocusLost();
 }
 
@@ -2811,19 +2914,22 @@ _TokenEditPresenter::SetTextSize(const float size)
 bool
 _TokenEditPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo)
 {
+       //Remove token focus on touch press
+       __focusedTokenIndex = -1;
+
        int tokenIndex = GetTokenIndexFromCoordinate(_CoordinateSystemUtils::ConvertToInteger(touchinfo.GetCurrentPosition()));
        __trackTokenIndex = tokenIndex;
 
        _TouchInfo TouchInfo(touchinfo);
        if (tokenIndex != -1)
        {
-               if (tokenIndex == __edittingTokenIndex)
+               if (tokenIndex == __editingTokenIndex)
                {
                        __touchPressInfo.x = touchinfo.GetCurrentPosition().x;
                        __touchPressInfo.y = touchinfo.GetCurrentPosition().y;
 
                        _Token* pToken = null;
-                       pToken = static_cast <_Token*>(__pTokenList->GetAt(__edittingTokenIndex));
+                       pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex));
                        if (pToken)
                        {
                                float tokenX = pToken->displayRect.x;
@@ -2846,7 +2952,7 @@ _TokenEditPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& t
        if (GetTokenCount())
        {
                //Set token bounds appropriately On Fast flick of scroll bar
-               if (!(__isEditingToken || __edittingTokenIndex >= 0))
+               if (!(__isEditingToken || __editingTokenIndex >= 0))
                {
                        SetTokenBoundsByTouchInfo(touchinfo);
                }
@@ -2866,9 +2972,9 @@ _TokenEditPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& t
 
        _TouchInfo TouchInfo(touchinfo);
        _Token* pToken = null;
-       if (__edittingTokenIndex >= 0)
+       if (__editingTokenIndex >= 0)
        {
-               pToken = static_cast <_Token*>(__pTokenList->GetAt(__edittingTokenIndex));
+               pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex));
                if (pToken)
                {
                        int tokenX = _CoordinateSystemUtils::ConvertToInteger(pToken->displayRect.x);
@@ -2899,95 +3005,27 @@ _TokenEditPresenter::OnInputConnectionTextCommitted(InputConnection& source, con
 void
 _TokenEditPresenter::OnTextCommitted(const String& commitText)
 {
-       result r = E_SUCCESS;
        char enterText[2] = {'\n', };
        String enterTextComma(",");
        String enterTextSemiColon(";");
+
+       //OnTextCommitted blocked for these cases
+       //1. Tab text not to be handled
+       //2. Token is focused
+       char tapText[2] = {'\t', };
+       if (commitText == tapText)
+       {
+               return;
+       }
+
        if ((commitText == enterText) || (commitText == enterTextComma) || (commitText == enterTextSemiColon))
        {
                CoreKeypadAction keypadaction = GetKeypadAction();
                __pTokenEdit->SendKeypadEvent(keypadaction, CORE_KEYPAD_EVENT_STATUS_ENTERACTION);
 
-               if (__edittingTokenIndex != -1)
+               if (__editingTokenIndex != -1)
                {
-                       _VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement();
-                       SysTryReturnVoidResult(NID_UI_CTRL, pEditVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get root visual element.");
-
-                       _VisualElement* pCursorVisualElement = GetCursorVisualElement();
-                       SysTryReturnVoidResult(NID_UI_CTRL, pCursorVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get cursor visual element.");
-
-                       _Token* pToken = null;
-                       _VisualElement* pTokenVisualElement = null;
-
-                       pToken = static_cast <_Token*>(__pTokenList->GetAt(__edittingTokenIndex));
-
-                       if (pToken)
-                       {
-                               pTokenVisualElement = pToken->GetVisualElement();
-                               SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get token visual element.");
-
-                               if (pCursorVisualElement->GetParent() != pEditVisualElement)
-                               {
-                                       r = pCursorVisualElement->GetParent()->DetachChild(*pCursorVisualElement);
-                                       SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r));
-
-                                       r = pEditVisualElement->AttachChild(*pCursorVisualElement);
-                                       SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r));
-                               }
-                       }
-
-                       String inputTokenString = GetText();
-                       String replacementString = inputTokenString;
-                       bool enable = false;
-
-                       __pTokenEdit->ProcessTokenFiltering(inputTokenString, replacementString, enable);
-                       if (enable)
-                       {
-                               inputTokenString = replacementString;
-                       }
-
-                       r = RemoveTokenAt(__edittingTokenIndex);
-                       _EditPresenter::SetTextSize(__editContentFontSize);
-                       SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
-
-                       if (inputTokenString.GetLength() > 0)
-                       {
-                               r = InsertTokenAt(__edittingTokenIndex, inputTokenString);
-                               SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
-
-                               pToken = static_cast <_Token*>(__pTokenList->GetAt(__edittingTokenIndex));
-                               SysTryReturnVoidResult(NID_UI_CTRL, pToken != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null.");
-
-                               pToken->currTokenLength = inputTokenString.GetLength();
-                       }
-
-                       CalculateTokenPositionFromIndex(0);
-                       int lastTokenIndex = GetTokenCount() - 1;
-                       for (int i = 0; i < lastTokenIndex + 1; i++)
-                       {
-                               _Token* pToken = null;
-                               pToken = static_cast <_Token*>(__pTokenList->GetAt(i));
-
-                               if (pToken)
-                               {
-                                       pToken->SetBounds(pToken->displayRect);
-                               }
-                       }
-
-                       AdjustFlexibleHeight();
-                       __pressedTokenIndex = -1;
-                       __isTokenEditingFinished = true;
-                       __edittingTokenIndex = -1;
-                       __isEditingToken = false;
-
-                       CheckTokenScrolling();
-                       SetCursorDisabled(false);
-
-                       if (inputTokenString.GetLength() <= 0)
-                       {
-                               SysLog(NID_UI_CTRL, "[E_INVALID_ARG] Invalid argument is used. Token length is (%d)", inputTokenString.GetLength());
-                       }
-
+                       ExitTokenEditingMode();
                }
 
                if (GetText().GetLength() > 0)
@@ -3016,13 +3054,13 @@ _TokenEditPresenter::OnTextCommitted(const String& commitText)
        __previousCursorPosition = GetCursorPosition();
 
        _Token* pToken = null;
-       if (__edittingTokenIndex >= 0)
+       if (__editingTokenIndex >= 0)
        {
-               pToken = static_cast <_Token*>(__pTokenList->GetAt(__edittingTokenIndex));
+               pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex));
                SysTryReturnVoidResult(NID_UI_CTRL, pToken, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null");
 
                pToken->ResetToken(GetText());
-               TrimTokenAndAdjustEllipsisAt(__edittingTokenIndex);
+               TrimTokenAndAdjustEllipsisAt(__editingTokenIndex);
 
                float tokenHeight = 0.0f;
                float tokenVerticalSpacing = 0.0f;
@@ -3055,6 +3093,7 @@ _TokenEditPresenter::OnTextCommitted(const String& commitText)
                if (__isEditingToken == false)
                {
                        __pressedTokenIndex = -1;
+                       __focusedTokenIndex = -1;
                        SetCursorDisabled(false);
                }
 
@@ -3067,7 +3106,7 @@ _TokenEditPresenter::OnTextCommitted(const String& commitText)
                SetTextBounds(textBounds);
        }
 
-       if (__edittingTokenIndex < 0)
+       if (__editingTokenIndex < 0)
        {
                CheckTokenScrolling();
        }
@@ -3105,7 +3144,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount)
                                _Token* pToken = null;
                                _VisualElement* pTokenVisualElement = null;
 
-                               pToken = static_cast <_Token*>(__pTokenList->GetAt(__edittingTokenIndex));
+                               pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex));
 
                                if (pToken)
                                {
@@ -3123,13 +3162,13 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount)
                                        }
                                }
 
-                               RemoveTokenAt(__edittingTokenIndex);
+                               RemoveTokenAt(__editingTokenIndex);
 
-                               CalculateTokenPositionFromIndex(__edittingTokenIndex);
-                               for (int i = __edittingTokenIndex; i < __lastTokenIndex + 1; i++)
+                               CalculateTokenPositionFromIndex(__editingTokenIndex);
+                               for (int i = __editingTokenIndex; i < __lastTokenIndex + 1; i++)
                                {
                                        _Token* pToken = null;
-                                       pToken = static_cast <_Token*>(__pTokenList->GetAt(i));
+                                       pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
                                        if (pToken)
                                        {
                                                pToken->SetBounds(pToken->displayRect);
@@ -3137,7 +3176,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount)
                                }
 
                                __pressedTokenIndex = -1;
-                               __edittingTokenIndex = -1;
+                               __editingTokenIndex = -1;
                                __isEditingToken = false;
                                _EditPresenter::SetTextSize(__editContentFontSize);
                                __isTokenEditingFinished = false;
@@ -3156,7 +3195,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount)
                                _Token* pToken = null;
                                _VisualElement* pTokenVisualElement = null;
 
-                               pToken = static_cast <_Token*>(__pTokenList->GetAt(__pressedTokenIndex));
+                               pToken = static_cast< _Token* >(__pTokenList->GetAt(__pressedTokenIndex));
 
                                if (pToken)
                                {
@@ -3180,13 +3219,18 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount)
                                for (int i = __pressedTokenIndex; i < __lastTokenIndex + 1; i++)
                                {
                                        _Token* pToken = null;
-                                       pToken = static_cast <_Token*>(__pTokenList->GetAt(i));
+                                       pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
 
                                        if (pToken)
                                        {
                                                pToken->SetBounds(pToken->displayRect);
                                        }
                                }
+
+                       }
+                       else if (__focusedTokenIndex != -1)
+                       {
+                               RemoveTokenAt(__focusedTokenIndex);
                        }
                        else
                        {
@@ -3200,7 +3244,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount)
                                _VisualElement* pTokenVisualElement = null;
                                if (__animatingIndex == (GetTokenCount() - 1))
                                {
-                                       pToken = static_cast <_Token*>(__pTokenList->GetAt(GetTokenCount() - 1));
+                                       pToken = static_cast< _Token* >(__pTokenList->GetAt(GetTokenCount() - 1));
                                        if (pToken)
                                        {
                                                pTokenVisualElement = pToken->GetVisualElement();
@@ -3208,7 +3252,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount)
                                                pTokenVisualElement->RemoveAnimation(L"TokenAnimation");
                                        }
                                }
-                               pToken = static_cast <_Token*>(__pTokenList->GetAt(GetTokenCount() - 1));
+                               pToken = static_cast< _Token* >(__pTokenList->GetAt(GetTokenCount() - 1));
                                if (pToken)
                                {
                                        pTokenVisualElement = pToken->GetVisualElement();
@@ -3236,18 +3280,26 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount)
                                }
                        }
 
+                       __pTokenEdit->UpdateAccessibilityElement(EDIT_ACCESSIBILITY_ELEMENT_TYPE_TEXT);
+
                        DrawText();
                        __pTokenEdit->Invalidate();
                        return;
                }
        }
 
-       if (__pressedTokenIndex >= 0 && __edittingTokenIndex < 0 && !__isEditingToken)
+       if (__pressedTokenIndex >= 0 && __editingTokenIndex < 0 && !__isEditingToken)
        {
                RemoveTokenAt(__pressedTokenIndex);
                __pTokenEdit->Invalidate();
                return;
        }
+       else if (__focusedTokenIndex >= 0 && __editingTokenIndex < 0 && !__isEditingToken)
+       {
+               RemoveTokenAt(__focusedTokenIndex);
+               __pTokenEdit->Invalidate();
+               return;
+       }
 
        //Backspace on Blocked text, delete full block
        if (IsBlocked() == true)
@@ -3311,9 +3363,9 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount)
 
        _Token* pToken = null;
 
-       if (__edittingTokenIndex >= 0 && __isEditingToken)
+       if (__editingTokenIndex >= 0 && __isEditingToken)
        {
-               pToken = static_cast <_Token*>(__pTokenList->GetAt(__edittingTokenIndex));
+               pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex));
 
                if (pToken)
                {
@@ -3338,7 +3390,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount)
                        _EditPresenter::SetCursorPosition(start);
 
                        pToken->ResetToken(GetText());
-                       TrimTokenAndAdjustEllipsisAt(__edittingTokenIndex);
+                       TrimTokenAndAdjustEllipsisAt(__editingTokenIndex);
                }
        }
 
@@ -3348,7 +3400,7 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount)
 bool
 _TokenEditPresenter::OnTapGestureDetected(void)
 {
-       if (__edittingTokenIndex >= 0)
+       if (__editingTokenIndex >= 0)
        {
                __isPopupVisible = true;
        }
@@ -3364,18 +3416,18 @@ _TokenEditPresenter::OnTapGestureDetected(void)
 bool
 _TokenEditPresenter::CheckCopyPastePopupShowStatus(void)
 {
-       if (__edittingTokenIndex < 0)
-       {
-               float controlHeight = __pTokenEdit->GetBoundsF().height;
-               FloatRectangle cursorBounds;
-               GetCursorBounds(false,  cursorBounds);
-               if (cursorBounds.y > controlHeight)
-               {
-                       return true;
-               }
-       }
+       if (__editingTokenIndex < 0)
+       {
+               float controlHeight = __pTokenEdit->GetBoundsF().height;
+               FloatRectangle cursorBounds;
+               GetCursorBounds(false, cursorBounds);
+               if (cursorBounds.y > controlHeight)
+               {
+                       return true;
+               }
+       }
 
-       return false;
+       return false;
 }
 
 bool
@@ -3406,7 +3458,7 @@ _TokenEditPresenter::OnLongPressGestureDetected(void)
 void
 _TokenEditPresenter::OnCursorTimerExpired(void)
 {
-       if (__edittingTokenIndex != -1)
+       if (__editingTokenIndex != -1)
        {
                if (!IsFocused())
                {
@@ -3416,7 +3468,7 @@ _TokenEditPresenter::OnCursorTimerExpired(void)
 
                FloatRectangle cursorRect;
 
-               _Token* pToken = static_cast <_Token*>(__pTokenList->GetAt(__edittingTokenIndex));
+               _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex));
                SysTryReturnVoidResult(NID_UI_CTRL, pToken != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null");
 
                //Set Editing token bounds for text scroll and cursor position calculation (SetTextBounds should have been done prior to this)
@@ -3463,7 +3515,7 @@ _TokenEditPresenter::OnCursorTimerExpired(void)
 bool
 _TokenEditPresenter::IsTextBlockedInTokenEdit(void) const
 {
-       if ((IsBlocked() == true) && (__isEditingToken) && (__edittingTokenIndex >= 0))
+       if ((IsBlocked() == true) && (__isEditingToken) && (__editingTokenIndex >= 0))
        {
                return true;
        }
@@ -3486,11 +3538,11 @@ _TokenEditPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touc
                //Allow touch move only in horizontal direction when editing token
                _TouchInfo TouchInfo(touchinfo);
                _Token* pToken = null;
-               if (__edittingTokenIndex >= 0)
+               if (__editingTokenIndex >= 0)
                {
                        if (__touchPressInfo.y > 0.0f)
                        {
-                               pToken = static_cast <_Token*>(__pTokenList->GetAt(__edittingTokenIndex));
+                               pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex));
                                if (pToken)
                                {
                                        float tokenX = pToken->displayRect.x;
@@ -3544,7 +3596,7 @@ _TokenEditPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touc
 }
 
 void
-_TokenEditPresenter::OnVisualElementAnimationFinished (const Tizen::Ui::Animations::VisualElementAnimation &animation, const Tizen::Base::String &keyName, Tizen::Ui::Animations::VisualElement &target, bool completedNormally)
+_TokenEditPresenter::OnVisualElementAnimationFinished(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, bool completedNormally)
 {
        __isAnimationInProgress = false;
        RemoveTokenAt(GetTokenCount() - 1);
@@ -3553,13 +3605,14 @@ _TokenEditPresenter::OnVisualElementAnimationFinished (const Tizen::Ui::Animatio
        for (int i = GetTokenCount() - 1; i < GetTokenCount() - 1 + 1; i++)
        {
                _Token* pToken = null;
-               pToken = static_cast <_Token*>(__pTokenList->GetAt(i));
+               pToken = static_cast< _Token* >(__pTokenList->GetAt(i));
 
                if (pToken)
                {
                        pToken->SetBounds(pToken->displayRect);
                }
        }
+
        if (__lastTokenIndex == __pressedTokenIndex)
        {
                __pressedTokenIndex--;
@@ -3574,6 +3627,8 @@ _TokenEditPresenter::OnVisualElementAnimationFinished (const Tizen::Ui::Animatio
 
        DrawToken();
 
+       __pTokenEdit->UpdateAccessibilityElement(EDIT_ACCESSIBILITY_ELEMENT_TYPE_TEXT);
+
        return;
 }
 
@@ -3639,7 +3694,7 @@ _TokenEditPresenter::ChangeInternalLayout(_ControlOrientation orientation)
 
        if (__isEditingToken)
        {
-               if (__edittingTokenIndex >= 0 && __edittingTokenIndex < GetTokenCount())
+               if (__editingTokenIndex >= 0 && __editingTokenIndex < GetTokenCount())
                {
                        String inputTokenString = GetText();
                        String replacementString = inputTokenString;
@@ -3653,8 +3708,8 @@ _TokenEditPresenter::ChangeInternalLayout(_ControlOrientation orientation)
 
                        if (inputTokenString.GetLength() > 0)
                        {
-                               int index = __edittingTokenIndex;
-                               RemoveTokenAt(__edittingTokenIndex, true);
+                               int index = __editingTokenIndex;
+                               RemoveTokenAt(__editingTokenIndex, true);
                                InsertTokenAt(index, inputTokenString);
                        }
                }
@@ -3721,30 +3776,699 @@ _TokenEditPresenter::OnBoundsChanged(void)
        return;
 }
 
-bool
-_TokenEditPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
+result
+_TokenEditPresenter::AttachCursorToToken(void)
 {
-       _KeyCode keyCode = keyInfo.GetKeyCode();
+       result r = E_SUCCESS;
 
-       if (IsUsbKeyboardConnected() && (keyInfo.GetKeyModifier() & _KEY_MODIFIER_CTRL))
+       if (__pressedTokenIndex != -1)
        {
-               switch (keyCode)
+               _VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement();
+               SysTryReturnResult(NID_UI_CTRL, pEditVisualElement, E_SYSTEM, "A system error has occurred. Failed to get root visual element.");
+
+               _VisualElement* pCursorVisualElement = GetCursorVisualElement();
+               SysTryReturnResult(NID_UI_CTRL, pCursorVisualElement, E_SYSTEM, "A system error has occurred. Failed to get cursor visual element.");
+
+               _Token* pToken = null;
+               _VisualElement* pTokenVisualElement = null;
+
+               pToken = static_cast <_Token*>(__pTokenList->GetAt(__pressedTokenIndex));
+               if (pToken)
                {
-               case _KEY_A:
-               case _KEY_C:
-               case _KEY_X:
-               case _KEY_V:
-                       if (__isEditingToken)
+                       pTokenVisualElement = pToken->GetVisualElement();
+                       SysTryReturnResult(NID_UI_CTRL, pTokenVisualElement, E_SYSTEM, "A system error has occurred. Failed to get token visual element.");
+
+                       if (pCursorVisualElement->GetParent() != pTokenVisualElement)
                        {
-                               return true;
-                       }
-                       break;
+                               r = (pCursorVisualElement->GetParent())->DetachChild(*pCursorVisualElement);
+                               SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
 
-               default:
-                       break;
+                               r = pTokenVisualElement->AttachChild(*pCursorVisualElement);
+                               SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
+                       }
                }
        }
 
-       return _EditPresenter::OnKeyPressed(source, keyInfo);
+       return r;
+}
+
+result
+_TokenEditPresenter::DetachCursorFromToken(void)
+{
+       result r = E_SUCCESS;
+
+       if (__pressedTokenIndex != -1)
+       {
+               _VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement();
+               SysTryReturnResult(NID_UI_CTRL, pEditVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get root visual element.");
+
+               _VisualElement* pCursorVisualElement = GetCursorVisualElement();
+               SysTryReturnResult(NID_UI_CTRL, pCursorVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get cursor visual element.");
+
+               _Token* pToken = null;
+               _VisualElement* pTokenVisualElement = null;
+
+               pToken = static_cast <_Token*>(__pTokenList->GetAt(__pressedTokenIndex));
+
+               if (pToken)
+               {
+                       pTokenVisualElement = pToken->GetVisualElement();
+                       SysTryReturnResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get token visual element.");
+
+                       if (pCursorVisualElement->GetParent() != pEditVisualElement)
+                       {
+                               r = pCursorVisualElement->GetParent()->DetachChild(*pCursorVisualElement);
+                               SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r));
+
+                               r = pEditVisualElement->AttachChild(*pCursorVisualElement);
+                               SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r));
+                       }
+               }
+       }
+       return r;
 }
+
+void
+_TokenEditPresenter::ExitTokenEditingMode(void)
+{
+       result r = E_SUCCESS;
+
+       _VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement();
+       SysTryReturnVoidResult(NID_UI_CTRL, pEditVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get root visual element.");
+
+       _VisualElement* pCursorVisualElement = GetCursorVisualElement();
+       SysTryReturnVoidResult(NID_UI_CTRL, pCursorVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get cursor visual element.");
+
+       _Token* pToken = null;
+       _VisualElement* pTokenVisualElement = null;
+
+       pToken = static_cast <_Token*>(__pTokenList->GetAt(__editingTokenIndex));
+
+       if (pToken)
+       {
+               pTokenVisualElement = pToken->GetVisualElement();
+               SysTryReturnVoidResult(NID_UI_CTRL, pTokenVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get token visual element.");
+
+               if (pCursorVisualElement->GetParent() != pEditVisualElement)
+               {
+                       r = pCursorVisualElement->GetParent()->DetachChild(*pCursorVisualElement);
+                       SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r));
+
+                       r = pEditVisualElement->AttachChild(*pCursorVisualElement);
+                       SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r));
+               }
+       }
+
+       String inputTokenString = GetText();
+       String replacementString = inputTokenString;
+       bool enable = false;
+
+       __pTokenEdit->ProcessTokenFiltering(inputTokenString, replacementString, enable);
+       if (enable)
+       {
+               inputTokenString = replacementString;
+       }
+
+       r = RemoveTokenAt(__editingTokenIndex);
+
+       _EditPresenter::SetTextSize(__editContentFontSize);
+       SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       if (inputTokenString.GetLength() > 0)
+       {
+               r = InsertTokenAt(__editingTokenIndex, inputTokenString);
+               SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
+               pToken = static_cast <_Token*>(__pTokenList->GetAt(__editingTokenIndex));
+               SysTryReturnVoidResult(NID_UI_CTRL, pToken != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null.");
+
+               pToken->currTokenLength = inputTokenString.GetLength();
+       }
+
+       CalculateTokenPositionFromIndex(0);
+       int lastTokenIndex = GetTokenCount() - 1;
+       for (int i = 0; i < lastTokenIndex + 1; i++)
+       {
+               _Token* pToken = null;
+               pToken = static_cast <_Token*>(__pTokenList->GetAt(i));
+
+               if (pToken)
+               {
+                       pToken->SetBounds(pToken->displayRect);
+               }
+       }
+
+       AdjustFlexibleHeight();
+       __pressedTokenIndex = -1;
+       __isTokenEditingFinished = true;
+       __editingTokenIndex = -1;
+       __isEditingToken = false;
+
+       CheckTokenScrolling();
+       SetCursorDisabled(false);
+
+       if (inputTokenString.GetLength() <= 0)
+       {
+               SysLog(NID_UI_CTRL, "[E_INVALID_ARG] Invalid argument is used. Token length is (%d)", inputTokenString.GetLength());
+       }
+
+       return;
+}
+
+bool
+_TokenEditPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
+{
+       _KeyCode keyCode = keyInfo.GetKeyCode();
+       bool focusChanged = false;
+       int tokenCount = GetTokenCount();
+       int lastTokenIndex = tokenCount - 1;
+
+       if (IsUsbKeyboardConnected() && (keyInfo.GetKeyModifier() & _KEY_MODIFIER_CTRL))
+       {
+               switch (keyCode)
+               {
+               case _KEY_A:
+               case _KEY_C:
+               case _KEY_X:
+               case _KEY_V:
+                       if (__isEditingToken)
+                       {
+                               return true;
+                       }
+                       break;
+
+               default:
+                       break;
+               }
+       }
+
+       if ((keyCode == _KEY_NUM_LEFT) || (keyCode == _KEY_LEFT))
+       {
+               if (__drawFocusState && (!__isEditingToken) && (tokenCount > 0))
+               {
+                       if (__focusedTokenIndex == -1)
+                       {
+                               if (GetCursorPosition() == 0)
+                               {
+                                       __focusedTokenIndex = lastTokenIndex;
+                                       if (GetTextLength() > 0)
+                                       {
+                                               MakeToken();
+                                               StopCursorTimer();
+                                               SetCursorDisabled(true);
+                                               __pTokenEdit->Invalidate();
+
+                                               StartCursorTimer();
+
+                                               return _EditPresenter::OnKeyPressed(source, keyInfo);
+                                       }
+                                       focusChanged = true;
+                               }
+                       }
+                       else
+                       {
+                               if (__focusedTokenIndex > 0)
+                               {
+                                       __focusedTokenIndex--;
+                                       focusChanged = true;
+                               }
+                       }
+               }
+       }
+
+       if ((keyCode == _KEY_NUM_RIGHT) || (keyCode == _KEY_RIGHT))
+       {
+               if (__drawFocusState && (!__isEditingToken) && (tokenCount > 0))
+               {
+                       if (__focusedTokenIndex != -1)
+                       {
+                               if (__focusedTokenIndex == lastTokenIndex)
+                               {
+                                       __focusedTokenIndex = -1;
+                                       focusChanged = true;
+                               }
+                               else
+                               {
+                                       __focusedTokenIndex++;
+                                       focusChanged = true;
+                               }
+                       }
+               }
+       }
+
+       if (focusChanged)
+       {
+               StopCursorTimer();
+               if (__focusedTokenIndex != -1)
+               {
+                       SetCursorDisabled(true);
+               }
+               else
+               {
+                       SetCursorDisabled(false);
+               }
+               StartCursorTimer();
+               ScrollToFocussedToken();
+       }
+
+       return _EditPresenter::OnKeyPressed(source, keyInfo);
+}
+
+String
+_TokenEditPresenter::GetTextAccessibilityElementText(void) const
+{
+       String tokenText;
+       String spaceText = " ";
+       _Token* pToken = null;
+       int tokenCount = GetTokenCount();
+       static const int readTokenCount = 2;
+       if (tokenCount > 0)
+       {
+               for (int index = 0; index < readTokenCount; index++)
+               {
+                       pToken = static_cast< _Token* >(__pTokenList->GetAt(index));
+                       SysTryReturn(NID_UI_CTRL, pToken, tokenText, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null.");
+
+                       if (index < (readTokenCount - 1))
+                       {
+                               tokenText += pToken->GetText() + spaceText;
+                       }
+                       else
+                       {
+                               String moreTokenText;
+                               int moreTokenCount = tokenCount - readTokenCount;
+                               if (moreTokenCount > 0)
+                               {
+                                       moreTokenText.Format(15, L"and %d more", moreTokenCount);
+                               }
+                               tokenText += pToken->GetText() + spaceText + moreTokenText;
+                       }
+               }
+       }
+       return tokenText;
+}
+
+void
+_TokenEditPresenter::RefreshAccessibilityElements(void)
+{
+       RemoveChildAccessibilityElements();
+       AddChildAccessibilityElements();
+
+       return;
+}
+
+result
+_TokenEditPresenter::AddChildAccessibilityElements(void)
+{
+       //Accessibility Elements added to the container upon focus gained
+       //1.Title
+       //2.Token(s)
+       //3. __accessibilityElements 0 - title 1 - token 0
+
+       result r = E_SUCCESS;
+       _AccessibilityContainer* pContainer = __pTokenEdit->GetAccessibilityContainer();
+
+       __pTokenEdit->AddTitleAccessibilityElement();
+       int tokenCount = GetTokenCount();
+
+       for (int index = 0; index < tokenCount; index++)
+       {
+               _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(index));
+               SysTryReturn(NID_UI_CTRL, pToken != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null.");
+
+               if (pContainer)
+               {
+                       _AccessibilityElement* pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
+                       SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+                       String labelText = pToken->GetText();
+                       pAccessibilityElement->SetBounds(pToken->displayRect);
+                       pAccessibilityElement->SetLabel(labelText);
+                       pContainer->AddElement(*pAccessibilityElement);
+                       __accessibilityElements.Add(pAccessibilityElement);
+               }
+       }
+
+       __pTokenEdit->AddCursorAccessibilityElement();
+
+       return r;
+}
+
+void
+_TokenEditPresenter::RemoveChildAccessibilityElements(void)
+{
+       _AccessibilityContainer* pContainer = __pTokenEdit->GetAccessibilityContainer();
+       _AccessibilityElement* pAccessibilityElement = null;
+
+       __pTokenEdit->RemoveTitleAccessibilityElement();
+
+       while (__accessibilityElements.GetCount() > 0)
+       {
+               if ((__accessibilityElements.GetAt(0, pAccessibilityElement)) == E_SUCCESS)
+               {
+                       __accessibilityElements.RemoveAt(0);
+                       pContainer->RemoveElement(*pAccessibilityElement);
+               }
+       }
+
+       __pTokenEdit->RemoveCursorAccessibilityElement();
+
+       return;
+}
+
+result
+_TokenEditPresenter::AppendTokenAccessibilityElement(void)
+{
+       result r = E_SUCCESS;
+       int tokenCount = GetTokenCount();
+
+       _AccessibilityContainer* pContainer = __pTokenEdit->GetAccessibilityContainer();
+
+       _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(tokenCount - 1));
+       SysTryReturn(NID_UI_CTRL, pToken != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null.");
+
+       if (pContainer)
+       {
+               _AccessibilityElement* pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
+               SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+               String labelText = pToken->GetText();
+               pAccessibilityElement->SetBounds(pToken->displayRect);
+               pAccessibilityElement->SetLabel(labelText);
+               pAccessibilityElement->SetHint(L"double tap to edit");
+               pContainer->AddElement(*pAccessibilityElement);
+               __accessibilityElements.Add(pAccessibilityElement);
+       }
+
+       return r;
+}
+
+result
+_TokenEditPresenter::InsertTokenAccessibilityElementAt(int index)
+{
+       result r = E_SUCCESS;
+
+       _AccessibilityContainer* pContainer = __pTokenEdit->GetAccessibilityContainer();
+       _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(index));
+       SysTryReturn(NID_UI_CTRL, pToken != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null.");
+
+       if (pContainer)
+       {
+               _AccessibilityElement* pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
+               SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+
+               String labelText = pToken->GetText();
+               pAccessibilityElement->SetBounds(pToken->displayRect);
+               pAccessibilityElement->SetLabel(labelText);
+               pContainer->AddElement(*pAccessibilityElement);
+               __accessibilityElements.InsertAt(pAccessibilityElement, index);
+       }
+
+       return r;
+}
+
+void
+_TokenEditPresenter::RemoveTokenAccessibilityElementAt(int index)
+{
+       _AccessibilityContainer* pContainer = __pTokenEdit->GetAccessibilityContainer();
+       _AccessibilityElement* pAccessibilityElement = null;
+
+       if (pContainer)
+       {
+               if (__accessibilityElements.GetCount() > 0)
+               {
+                       if ((__accessibilityElements.GetAt(index, pAccessibilityElement)) == E_SUCCESS)
+                       {
+                               __accessibilityElements.RemoveAt(index);
+                               pContainer->RemoveElement(*pAccessibilityElement);
+                       }
+               }
+       }
+       return;
+}
+
+result
+_TokenEditPresenter::UpdateTokenAccessibilityBounds(void)
+{
+       result r = E_SUCCESS;
+       int tokenCount = GetTokenCount();
+       _AccessibilityElement* pAccessibilityElement = null;
+
+       for (int index = 0; index < tokenCount; index++)
+       {
+               _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(index));
+               SysTryReturn(NID_UI_CTRL, pToken != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Token instance is null.");
+
+               if ((__accessibilityElements.GetAt(index, pAccessibilityElement)) == E_SUCCESS)
+               {
+                       pAccessibilityElement->SetBounds(pToken->displayRect);
+               }
+       }
+       return r;
+}
+
+result
+_TokenEditPresenter::UpdateTitleAccessibilityBounds(const FloatRectangle& titleBounds)
+{
+       _AccessibilityElement* pTitleAccessibilityElement = __pTokenEdit->GetTitleTextAccessibilityElement();
+
+       if (!pTitleAccessibilityElement)
+       {
+               return E_SUCCESS;
+       }
+
+       pTitleAccessibilityElement->SetBounds(titleBounds);
+
+       return E_SUCCESS;
+}
+
+result
+_TokenEditPresenter::ScrollToFocusedTokenAccessibilityElement(const _AccessibilityElement& element)
+{
+       result r = E_SUCCESS;
+       int focusedTokenIndex = -1;
+       int tokenCount = GetTokenCount();
+       FloatRectangle focusedTokenRectangle;
+       float newScrollValue = 0.0f;
+       float tokenTopMargin = 0.0f;
+       float tokenBottomMargin = 0.0f;
+       _ControlOrientation orientation = __pTokenEdit->GetOrientation();
+       _AccessibilityElement* pAccessibilityElement = null;
+
+       GET_SHAPE_CONFIG(TOKENEDIT::TOP_MARGIN, orientation, tokenTopMargin);
+       GET_SHAPE_CONFIG(TOKENEDIT::BOTTOM_MARGIN, orientation, tokenBottomMargin);
+
+       FloatRectangle tokenEditRect = __pTokenEdit->GetBoundsF();
+
+       pAccessibilityElement = const_cast< _AccessibilityElement* >(&element);
+       r = __accessibilityElements.IndexOf(pAccessibilityElement, focusedTokenIndex);
+       SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
+
+       if ((focusedTokenIndex > -1) && (focusedTokenIndex < tokenCount))
+       {
+               _Token* pToken = null;
+               pToken = static_cast< _Token* >(__pTokenList->GetAt(focusedTokenIndex));
+
+               focusedTokenRectangle = pToken->displayRect;
+
+               float focusedTokenPosition = focusedTokenRectangle.y + focusedTokenRectangle.height;
+
+               if ((focusedTokenRectangle.y > 0) && (focusedTokenPosition < tokenEditRect.height))
+               {
+                       DrawToken();
+               }
+               else
+               {
+                       if (focusedTokenRectangle.y < 0)
+                       {
+                               newScrollValue = focusedTokenRectangle.y - tokenTopMargin - __scrollValue;
+                       }
+                       else
+                       {
+                               newScrollValue = focusedTokenPosition - tokenEditRect.height + tokenBottomMargin - __scrollValue;
+                       }
+
+                       r = RecalculateTokenBounds(newScrollValue);
+                       SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
+               }
+
+               __accessibilityElements.GetAt(focusedTokenIndex, pAccessibilityElement);
+               _AccessibilityManager* pAccessibilityManager = _AccessibilityManager::GetInstance();
+               pAccessibilityManager->SetGlobalFocusedElement(*pAccessibilityElement);
+               pAccessibilityManager->RequestToDrawFocusUi();
+       }
+
+       return r;
+}
+
+bool
+_TokenEditPresenter::OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element)
+{
+       if (__focusOutIndex < 0) // Not a token accessibility element
+       {
+               return false;
+       }
+
+       _Token* pToken = null;
+       _AccessibilityElement* pCurrentElement = const_cast< _AccessibilityElement* >(&element);
+       _AccessibilityElement* pPreviousAccessibilityElement = null;
+       _AccessibilityElement* pNextAccessibilityElement = null;
+       __accessibilityElements.GetAt(__focusOutIndex, pPreviousAccessibilityElement);
+
+       if (pPreviousAccessibilityElement && pPreviousAccessibilityElement->GetAbsoluteBounds().y > element.GetAbsoluteBounds().y)  //Left flick
+       {
+               pToken = static_cast< _Token* >(__pTokenList->GetAt(__focusOutIndex - 1));
+               if (pToken)
+               {
+                       if (pToken->displayRect.y < 0.0f && __focusOutIndex > 0)
+                       {
+                               __accessibilityElements.GetAt(__focusOutIndex - 1, pNextAccessibilityElement);
+                               ScrollToFocusedTokenAccessibilityElement(*pNextAccessibilityElement);
+                       }
+               }
+       }
+
+       if (pPreviousAccessibilityElement && pPreviousAccessibilityElement->GetAbsoluteBounds().y < element.GetAbsoluteBounds().y)  //Right flick
+       {
+               pToken = static_cast< _Token* >(__pTokenList->GetAt(__focusOutIndex + 1));
+               if (pToken)
+               {
+                       if (pToken->displayRect.y + pToken->displayRect.height > __pTokenEdit->GetBoundsF().height)
+                       {
+                               __accessibilityElements.GetAt(__focusOutIndex + 1, pNextAccessibilityElement);
+                               ScrollToFocusedTokenAccessibilityElement(*pNextAccessibilityElement);
+                       }
+               }
+       }
+
+       if (pToken == null) //Draw Cursor Accessibility Element
+       {
+               _AccessibilityElement* pCursorAccessibilityElement = __pTokenEdit->GetCursorAccessibilityElement();
+               if (pCursorAccessibilityElement && pPreviousAccessibilityElement && pCursorAccessibilityElement != pPreviousAccessibilityElement)
+               {
+                       if (GetTextBoundsF().y - pPreviousAccessibilityElement->GetBounds().y > pPreviousAccessibilityElement->GetBounds().height)  //check for different lines
+                       {
+                               float height = GetTextBoundsF().height + pPreviousAccessibilityElement->GetBounds().y + pPreviousAccessibilityElement->GetBounds().height;
+                               if (pCurrentElement == pCursorAccessibilityElement && height > __pTokenEdit->GetBoundsF().height)
+                               {
+                                       float tokenBottomMargin = 0.0f;
+                                       GET_SHAPE_CONFIG(TOKENEDIT::BOTTOM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, tokenBottomMargin);
+                                       float newScrollValue = GetTextBoundsF().height + tokenBottomMargin - __scrollValue;
+                                       RecalculateTokenBounds(newScrollValue);
+                                       _AccessibilityManager::GetInstance()->SetGlobalFocusedElement(*(__pTokenEdit->GetCursorAccessibilityElement()));
+                                       _AccessibilityManager::GetInstance()->RequestToDrawFocusUi();
+                               }
+                       }
+               }
+       }
+
+       __focusOutIndex = -1;
+       UpdateTokenAccessibilityBounds();
+
+       return false;
+}
+
+bool
+_TokenEditPresenter::OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element)
+{
+       _AccessibilityElement* pAccessibilityElement = null;
+       pAccessibilityElement = const_cast< _AccessibilityElement* >(&element);
+       __accessibilityElements.IndexOf(pAccessibilityElement, __focusOutIndex);
+
+       return false;
+}
+
+result
+_TokenEditPresenter::ScrollToFocussedToken(void)
+{
+       result r = E_SUCCESS;
+       FloatRectangle focussedTokenRectangle;
+       float newScrollValue = 0.0f;
+       float tokenTopMargin = 0.0f;
+       float tokenBottomMargin = 0.0f;
+       _ControlOrientation orientation = __pTokenEdit->GetOrientation();
+
+
+       GET_SHAPE_CONFIG(TOKENEDIT::TOP_MARGIN, orientation, tokenTopMargin);
+       GET_SHAPE_CONFIG(TOKENEDIT::BOTTOM_MARGIN, orientation, tokenBottomMargin);
+
+       FloatRectangle tokenEditRect = __pTokenEdit->GetBoundsF();
+       if (__focusedTokenIndex == -1)
+       {
+               //Focus bitmap to be reset when no token is focused.
+               DrawToken();
+       }
+       else
+       {
+               _Token* pToken = null;
+               pToken = static_cast <_Token*>(__pTokenList->GetAt(__focusedTokenIndex));
+
+               focussedTokenRectangle = pToken->displayRect;
+
+               float focussedTokenPosition= focussedTokenRectangle.y + focussedTokenRectangle.height ;
+
+               if ((focussedTokenRectangle.y > 0) && (focussedTokenPosition < tokenEditRect.height))
+               {
+                       //Focused token is within the tokenEdit boundary
+                       DrawToken();
+               }
+               else
+               {
+                       if (focussedTokenRectangle.y < 0)
+                       {
+                               //Focused token is above the upper boundary
+                               newScrollValue = focussedTokenRectangle.y - tokenTopMargin - __scrollValue;
+                       }
+                       else
+                       {
+                               //Focused token is below the lower boundary
+                               newScrollValue = focussedTokenPosition - tokenEditRect.height + tokenBottomMargin - __scrollValue;
+                       }
+
+                       r = RecalculateTokenBounds(newScrollValue);
+                       SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
+               }
+       }
+
+       return r;
+}
+
+void
+_TokenEditPresenter::SetDrawFocusState(bool focusState)
+{
+       if (!focusState)
+       {
+               __focusedTokenIndex = -1;
+       }
+       __drawFocusState = focusState;
+
+       return;
+}
+
+int
+_TokenEditPresenter::GetFocusedTokenIndex(void) const
+{
+       return __focusedTokenIndex;
+}
+
+void
+_TokenEditPresenter::PrepareFocusUiMode(void)
+{
+       if (__editingTokenIndex != -1)
+       {
+               ExitTokenEditingMode();
+       }
+       else if (__pressedTokenIndex != -1)
+       {
+               __pressedTokenIndex = -1;
+               DetachCursorFromToken();
+               StopCursorTimer();
+               SetCursorDisabled(false);
+               __pTokenEdit->Invalidate();
+               StartCursorTimer();
+       }
+
+       return;
+}
+
 }}} //Tizen::Ui::Controls
index 5b29b2d..419f285 100644 (file)
@@ -157,6 +157,7 @@ private:
        Tizen::Graphics::FloatRectangle __parentWindowBounds;
        _Control* __pOwner;
        int __accessibilityFocusOutIndex;
+       bool __isAnimating;
 }; // _DateTimeBar
 
 }}} // Tizen::Ui::Controls
index 2813577..9b2729b 100644 (file)
@@ -312,7 +312,7 @@ public:
        result SetTextPredictionEnabled(bool enable);
        result SetLimitLength(int limitLength);
        result SetLineSpacing(int linePixelGap);
-       result SetLineSpacing(float  linePixelGap);
+       result SetLineSpacing(float linePixelGap);
        void SetLowerCaseModeEnabled(bool enable);
        void SetMaxLineCount(int maxLineCount);
        result SetKeypadCommandButton(CommandButtonPosition position, const Tizen::Base::String& text, int actionId);
@@ -335,9 +335,12 @@ public:
        Tizen::Graphics::Bitmap* GetBackgroundBitmap(EditStatus status) const;
        result LoadDefaultBackgroundBitmap(GroupStyle groupStyle);
        result ReplaceDefaultBackgroundBitmapForSearchBar(void);
+       void SetSearchFieldFocus(bool state);
+       bool IsSearchFieldFocused(void) const;
        Tizen::Graphics::Bitmap* GetDefaultBackgroundBitmap(EditStatus status) const;
        bool IsCustomDefaultBackgroundBitmap(EditStatus status) const;
        Tizen::Graphics::Bitmap* GetDefaultBackgroundEffectBitmap(void) const;
+       Tizen::Graphics::Bitmap* GetDefaultFocusBitmap(void) const;
        void GetBlockRange(int& start, int& end) const;
        Tizen::Graphics::Color GetBlockTextColor(void) const;
        Tizen::Graphics::Color GetColor(EditStatus status) const;
@@ -392,8 +395,8 @@ public:
        result AppendCharacter(const Tizen::Base::Character& character);
        result AppendText(const Tizen::Base::String& text);
        result BeginTextBlock(void);
-       bool CalculateAbsoluteCursorBounds(int index ,Tizen::Graphics::Rectangle& absCursorRect);
-       bool CalculateAbsoluteCursorBounds(int index ,Tizen::Graphics::FloatRectangle& absCursorRect);
+       bool CalculateAbsoluteCursorBounds(int indexTizen::Graphics::Rectangle& absCursorRect);
+       bool CalculateAbsoluteCursorBounds(int indexTizen::Graphics::FloatRectangle& absCursorRect);
        result ClearText(void);
        result CopyText(void);
        result CutText(void);
@@ -417,7 +420,7 @@ public:
        bool IsViewModeEnabled(void) const;
        bool IsKeypadEnabled(void) const;
        bool IsTextPredictionEnabled(void) const;
-       void UpdateAccessibilityElement(EditAccessibilityElementType type);
+       virtual void UpdateAccessibilityElement(EditAccessibilityElementType type);
        void SetFullScreenKeypadEdit(bool enabled);
        bool IsFullScreenKeypadEdit(void);
        bool IsBorderRoundStyleEnabled(void) const;
@@ -497,7 +500,8 @@ public:
        bool IsInternalFocused(void) const;
        bool ValidatePastedText(const Tizen::Base::String& pastedText, Tizen::Base::String& replacedText);
        void SetEditTextFilter(IEditTextFilter* pFilter);
-       void SendOpaqueCommand (const Tizen::Base::String& command);
+       void SendOpaqueCommand(const Tizen::Base::String& command);
+       _AccessibilityElement* GetTextAccessibilityElement(void) const;
 
 protected:
        result SetPresenter(const _EditPresenter& pPresenter);
@@ -533,6 +537,7 @@ private:
 //Default Bitmap
        Tizen::Graphics::Bitmap* __pDefaultBackgroundBitmap[EDIT_COLOR_MAX];
        Tizen::Graphics::Bitmap* __pDefaultBackgroundEffectBitmap;
+       Tizen::Graphics::Bitmap* __pDefaultFocusBitmap;
 
        Tizen::Ui::_TouchFlickGestureDetector* __pGestureFlick;
        Tizen::Ui::_TouchLongPressGestureDetector* __pGestureLongPress;
@@ -556,6 +561,7 @@ private:
        IEditTextFilter* __pTextFilter;
        Tizen::Graphics::FloatRectangle __previousBounds;
        bool __isTouchMoving;
+       bool __isSearchFieldFocused;
 }; // _Edit
 
 }}} // Tizen::Ui::Controls
index 56c3015..5761771 100644 (file)
@@ -72,6 +72,7 @@ class _SearchBar
        , virtual public Tizen::Base::Runtime::IEventListener
        , virtual public Tizen::Ui::_IUiEventListener
        , virtual public Tizen::Ui::_IUiEventPreviewer
+       , virtual public Tizen::System::ISettingEventListener
 {
        DECLARE_CLASS_BEGIN(_SearchBar, _Control);
        DECLARE_PROPERTY("buttonActionId", GetPropertyButtonActionId, SetPropertyButtonActionId);
@@ -230,6 +231,8 @@ public:
        SearchFieldStatus GetCurrentStatus(void);
        void  SetEditTextFilter(IEditTextFilter* pFilter);
        void SendOpaqueCommand (const Tizen::Base::String& command);
+       void SetFocusCallBackParameter(bool state);
+       bool IsFocusCallBackToBeFired(void) const;
 
        virtual _UiTouchEventDelivery OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo);
 
@@ -255,7 +258,8 @@ public:
        virtual bool OnFocusLost(const _Control& source);
 
        virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo);
-       virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo);
+
+       virtual void OnSettingChanged(Tizen::Base::String& key);
 
 protected:
        virtual void OnDraw(void);
@@ -273,7 +277,7 @@ private:
        result CreateContentsArea(void);
        result CreateClippedGroupControl(void);
        void CreateAccessibilityElement(void);
-       //Tizen::Graphics::Font* CreateEditFontN(const Tizen::Graphics::Font* pFont);
+       virtual void OnDrawFocus(void);
 
        Tizen::Ui::_Control* GetParentForm(void) const;
 
@@ -295,6 +299,10 @@ private:
        bool __isUserGuideTextColor;
        bool __isKeypadOpening;
        bool __isupdateContentBounds;
+       bool __isKeyPressed;
+       bool __isFocusCallbackToBeFired;
+       bool __isButtonTextChangedByApp;
+
        CoreKeypadAction __keypadAction;
 
        Tizen::Graphics::Bitmap* __pBackgroundBitmap;
index 4dd4ef6..6c79ac1 100644 (file)
@@ -44,6 +44,9 @@ namespace Tizen { namespace Ui { namespace Controls
 class _PublicActionEvent;
 class _PublicTextEvent;
 class _PublicTextBlockEvent;
+class EditField;
+class _EditFieldImpl;
+class _ButtonImpl;
 
 class _SearchBarImpl
        : public _ControlImpl
@@ -53,7 +56,8 @@ class _SearchBarImpl
        , public _ITextBlockEventListener
        , public _ITextEventListener
        , public _ISearchBarEventListener
-       , virtual public Tizen::Base::Runtime::IEventListener
+       , public IKeyEventListener
+       , public IFocusEventListener
 {
 public:
        static _SearchBarImpl* CreateSearchBarImplN(SearchBar* pCore, const Tizen::Graphics::Rectangle& bounds, bool enableSearchBarButton = true, KeypadAction keypadAction = KEYPAD_ACTION_SEARCH);
@@ -170,9 +174,24 @@ public:
 
        virtual void OnLanguageChanged(Tizen::Locales::LanguageCode oldLanguage, Tizen::Locales::LanguageCode newLanguage);
 
+       void OnFocusEventListenerAdded(IFocusEventListener& listener);
+       void OnFocusEventListenerRemoved(IFocusEventListener& listener);
+
+       //Focus Callbacks
+       virtual void OnFocusGained(const Tizen::Ui::Control& source);
+       virtual void OnFocusLost(const Tizen::Ui::Control& source);
+
+       //Key event Callbacks
+       virtual void OnKeyPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode);
+       virtual void OnKeyReleased(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode);
+       virtual void OnKeyLongPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode);
+
        static _SearchBarImpl* GetInstance(SearchBar& searchBar);
        static const _SearchBarImpl* GetInstance(const SearchBar& searchBar);
 
+       _EditFieldImpl* GetEditFieldImpl(void) const;
+       _ButtonImpl* GetButtonImpl(void) const;
+
 private:
        _SearchBarImpl(const _SearchBarImpl&);
        _SearchBarImpl& operator =(const _SearchBarImpl&);
@@ -183,6 +202,11 @@ private:
 
        _SearchBar* __pSearchBar;
 
+       EditField* __pEditField;
+       Button* __pButton;
+       _EditFieldImpl* __pEditFieldImpl;
+       _ButtonImpl* __pButtonImpl;
+
        Control* __pContentControl;
 
        _PublicActionEvent* __pPublicActionEvent;
@@ -192,6 +216,8 @@ private:
        _PublicSearchBarEvent* __pPublicSearchBarEvent;
        _PublicLanguageEvent* __pPublicLanguageEvent;
 
+       PublicEventListenerList* __pPublicFocusEventListeners;
+
 }; // _SearchBarImpl
 
 }}} // Tizen::Ui::Controls
index 24285f9..32bb59f 100644 (file)
@@ -111,6 +111,7 @@ public:
        virtual void OnDrawFocus(void);
        bool OnFocusGained(const _Control& source);
        bool OnFocusLost(const _Control& source);
+       void OnFocusModeStateChanged(void);
 
 public:
        result AddSplitPanelEventListener(const _ISplitPanelEventListener& listener);
@@ -180,6 +181,7 @@ private:
        _SplitPanelEvent* __pSplitPanelEvent;
 
        int __dividerTapCount;
+       bool __isFocusModeEnabled;
 
        Tizen::Ui::_AccessibilityElement* __pAccessibilityElement;
 
index b9183e8..6d818e7 100644 (file)
@@ -137,6 +137,8 @@ public:
        void SetEditModeEnabled(bool isEnabled);
        bool IsEditModeEnabled(void) const;
 
+       bool IsInFocusMode(void) const;
+
        result SetBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap);
        Tizen::Graphics::Bitmap* GetBackgroundBitmap(void) const;
        Tizen::Graphics::Bitmap* GetDisabledBackgroundBitmap(void) const;
@@ -223,9 +225,8 @@ public:
 
        virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo);
        virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo);
-       bool OnFocusGained(const _Control& source);
-       bool OnFocusLost(const _Control& source);
        virtual void OnDrawFocus(void);
+       virtual void OnFocusModeStateChanged(void);
 
 private:
        int GetItemIndex(int actionId);
@@ -235,6 +236,7 @@ private:
 private:
        _TabPresenter* __pTabPresenter;
 
+       bool __isInFocusMode;
        int __style;
        int __currentHighlightedItemIndex;
        _TabStatus __tabStatus;
index 0a2b61d..6865c33 100644 (file)
@@ -26,6 +26,7 @@
 #include <FUiCtrlExpandableEditArea.h>
 #include "FUiCtrl_Edit.h"
 #include "FUiCtrl_ITokenFilter.h"
+#include "FUi_IAccessibilityListener.h"
 
 namespace Tizen { namespace Ui
 {
@@ -44,6 +45,7 @@ class _TokenEdit
        , virtual public Tizen::Ui::_IUiEventPreviewer
        , virtual public Tizen::Ui::_ITouchGestureEventListener
        , public Tizen::Ui::Controls::_Edit
+       , public Tizen::Ui::_IAccessibilityListener
 {
 
 public:
@@ -103,6 +105,30 @@ public:
        virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo);
 
        virtual result OnAttachedToMainTree(void);
+       virtual void OnDrawFocus(void);
+       virtual void OnFocusModeStateChanged(void);
+       void RefreshFocusUi(void);
+
+
+       virtual void UpdateAccessibilityElement(EditAccessibilityElementType type);
+       _AccessibilityElement* GetTitleTextAccessibilityElement(void) const;
+       _AccessibilityElement* GetCursorAccessibilityElement(void) const;
+       result AddTitleAccessibilityElement(void);
+       result AddCursorAccessibilityElement(void);
+       result SetCursorAccessibilityBounds(const FloatRectangle& cursorBounds);
+       void RemoveTitleAccessibilityElement(void);
+       void RemoveCursorAccessibilityElement(void);
+
+       //_IAccessibilityListener callbacks
+       virtual bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element);
+       virtual bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element);
+       virtual bool OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element);
+       virtual bool OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element);
+       virtual bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element);
+       virtual bool OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element);
+       virtual bool OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element);
+       virtual bool OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element);
+       virtual bool OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element);
 
 private:
        _TokenEdit(const _TokenEdit& rhs);
@@ -121,10 +147,9 @@ private:
 
        _ITokenFilter* __pTokenFilter;
 
-       Tizen::Ui::_AccessibilityElement* __pDescriptionTextAccessibilityElement;
-       Tizen::Ui::_AccessibilityElement* __pHiddenTokenCountAccessibilityElement;
-       Tizen::Ui::_AccessibilityElement* __pExpandableButtonAccessibilityElement;
-};     // _TokenEdit
+       Tizen::Ui::_AccessibilityElement* __pTitleTextAccessibilityElement;
+       Tizen::Ui::_AccessibilityElement* __pCursorAccessibilityElement;
+};  // _TokenEdit
 
 }}} // Tizen::Ui::Controls
 
index 6c7a815..989f2c7 100644 (file)
@@ -85,7 +85,7 @@ public:
 
        virtual result SetInitialBounds(void);
 
-       result CalculateDescriptionTextRect(const Tizen::Base::String& descriptionText);
+       result CalculateDescriptionTextRect(const Tizen::Base::String& titleText);
 
        virtual void OnCursorTimerExpired(void);
 
@@ -143,9 +143,9 @@ public:
        virtual bool OnTapGestureDetected(void);
        virtual bool OnLongPressGestureDetected(void);
 
-       virtual void OnVisualElementAnimationFinished (const Tizen::Ui::Animations::VisualElementAnimation &animation, const Tizen::Base::String &keyName, Tizen::Ui::Animations::VisualElement &target, bool completedNormally);
-       virtual void OnVisualElementAnimationRepeated (const Tizen::Ui::Animations::VisualElementAnimation &animation, const Tizen::Base::String &keyName, Tizen::Ui::Animations::VisualElement &target, long currentRepeatCount){}
-       virtual void OnVisualElementAnimationStarted (const Tizen::Ui::Animations::VisualElementAnimation &animation, const Tizen::Base::String &keyName, Tizen::Ui::Animations::VisualElement &target){}
+       virtual void OnVisualElementAnimationFinished(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, bool completedNormally);
+       virtual void OnVisualElementAnimationRepeated(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, long currentRepeatCount){}
+       virtual void OnVisualElementAnimationStarted(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target){}
        void OnBoundsChanged(void);
 
        virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
@@ -153,6 +153,30 @@ public:
        virtual void ResetTextBounds(void);
        virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo);
 
+       Tizen::Graphics::FloatRectangle GetDescriptionTextRect(void) const;
+       String GetTextAccessibilityElementText(void) const;
+       void RefreshAccessibilityElements(void);
+       result AddChildAccessibilityElements(void);
+       void RemoveChildAccessibilityElements(void);
+       result AppendTokenAccessibilityElement(void);
+       result InsertTokenAccessibilityElementAt(int index);
+       void RemoveTokenAccessibilityElementAt(int index);
+       result UpdateTokenAccessibilityBounds(void);
+       result UpdateTitleAccessibilityBounds(const FloatRectangle& titleBounds);
+       result ScrollToFocusedTokenAccessibilityElement(const _AccessibilityElement& element);
+
+       //Accessibility callbacks
+       bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element);
+       bool OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element);
+
+       result ScrollToFocussedToken(void);
+       result AttachCursorToToken(void);
+       result DetachCursorFromToken(void);
+       void ExitTokenEditingMode(void);
+       void SetDrawFocusState(bool focusState);
+       int GetFocusedTokenIndex(void) const;
+       void PrepareFocusUiMode(void);
+
 private:
        bool DrawToken(int count = -1);
        Tizen::Graphics::Color GetTokenEditColor(const ExpandableEditAreaTokenStatus status) const;
@@ -160,7 +184,6 @@ private:
        result InitializeTokenVisibilityAt(int index);
        bool DrawDescriptionText(void);
        result SetDescriptionTextRect(const Tizen::Graphics::FloatRectangle& rect);
-       Tizen::Graphics::FloatRectangle GetDescriptionTextRect(void) const;
        result TrimTokenAndAdjustEllipsisAt(int index);
        int GetTokenIndexFromCoordinate(const Tizen::Graphics::Point point) const;
        result SetEditingTokenTextBounds(int index, bool isSetText = true);
@@ -185,12 +208,14 @@ private:
        Tizen::Graphics::Bitmap* __pTokenBgBitmap;
        Tizen::Graphics::Bitmap* __pTokenBgNormalEffectBitmap;
        Tizen::Graphics::Bitmap* __pTokenBgPressedEffectBitmap;
+       Tizen::Graphics::Bitmap* __pTokenBgReplacementFocusBitmap;
+       Tizen::Graphics::Bitmap* __pTokenBgFocusEffectBitmap;
 
        int __pressedTokenIndex;
 
        bool __isEditingToken;
 
-       int __edittingTokenIndex;
+       int __editingTokenIndex;
 
        Tizen::Graphics::FloatRectangle __clientRect;
        Tizen::Graphics::FloatRectangle __initTextRect;
@@ -263,8 +288,15 @@ private:
 
        static const int ANIMATION_DURATION_OPACITY = 83;
 
+       int __focusOutIndex;
+
+       Tizen::Base::Collection::LinkedListT< _AccessibilityElement* > __accessibilityElements;
+
+       int __focusedTokenIndex;
+
+       bool __drawFocusState;
 
-};     // _TokenEditPresenter
+};  // _TokenEditPresenter
 
 }}} // Tizen::Ui::Controls
 
index c4aa614..a61bd7f 100644 (file)
@@ -121,6 +121,7 @@ public:
 
        // [ToDo] Rename API: These APIs return collection.
        Tizen::Base::Collection::LinkedListT <Tizen::Base::Runtime::IEventListener*>* GetTouchEventListener(void) const;
+       Tizen::Base::Collection::LinkedListT <Tizen::Base::Runtime::IEventListener*>* GetKeyEventListener(void) const;
        Tizen::Base::Collection::LinkedListT <Tizen::Base::Runtime::IEventListener*>* GetDragDropEventListener(void) const;
 
 // Queries
index e76b5a9..0591c92 100644 (file)
@@ -44,14 +44,18 @@ DECLARE_UI_CONFIG(SEARCHBAR);
        DECLARE_COLOR_CONFIG(EDIT_TEXT_NORMAL, 17);
        DECLARE_COLOR_CONFIG(EDIT_TEXT_DISABLED, 18);
        DECLARE_COLOR_CONFIG(EDIT_TEXT_HIGHLIGHTED, 19);
+       DECLARE_COLOR_CONFIG(EDIT_BG_FOCUS, 20);
+       DECLARE_COLOR_CONFIG(EDIT_BG_PRESSED, 21);
+       DECLARE_COLOR_CONFIG(EDIT_BG_HIGHLIGHTED, 22);
        DECLARE_IMAGE_CONFIG(EDIT_BG_NORMAL, 1);
        DECLARE_IMAGE_CONFIG(EDIT_BG_DISABLED, 2);
        DECLARE_IMAGE_CONFIG(EDIT_BG_HIGHLIGHTED, 3);
        DECLARE_IMAGE_CONFIG(EDIT_BG_PRESSED, 4);
-       DECLARE_IMAGE_CONFIG(EDIT_BG_EFFECT, 5);
-       DECLARE_IMAGE_CONFIG(ICON_NORMAL, 6);
-       DECLARE_IMAGE_CONFIG(ICON_EFFECT_NORMAL, 7);
-       DECLARE_IMAGE_CONFIG(ICON_DISABLED, 8);
+       DECLARE_IMAGE_CONFIG(EDIT_BG_FOCUS, 5);
+       DECLARE_IMAGE_CONFIG(EDIT_BG_EFFECT, 6);
+       DECLARE_IMAGE_CONFIG(ICON_NORMAL, 7);
+       DECLARE_IMAGE_CONFIG(ICON_EFFECT_NORMAL, 8);
+       DECLARE_IMAGE_CONFIG(ICON_DISABLED, 9);
        DECLARE_SHAPE_CONFIG(HORIZONTAL_MARGIN, 1);
        DECLARE_SHAPE_CONFIG(VERTICAL_MARGIN, 2);
        DECLARE_SHAPE_CONFIG(TEXT_HORIZONTAL_MARGIN, 3);
index f0737bf..994c799 100644 (file)
@@ -29,9 +29,12 @@ DECLARE_UI_CONFIG(TOKENEDIT);
        DECLARE_COLOR_CONFIG(BG_SELECTED, 2);
        DECLARE_COLOR_CONFIG(TEXT_NORMAL, 3);
        DECLARE_COLOR_CONFIG(TEXT_SELECTED, 4);
+       DECLARE_COLOR_CONFIG(BG_FOCUS, 5);
        DECLARE_IMAGE_CONFIG(BG_NORMAL, 1);
        DECLARE_IMAGE_CONFIG(BG_NORMAL_EFFECT, 2);
        DECLARE_IMAGE_CONFIG(BG_PRESSED_EFFECT, 3);
+       DECLARE_IMAGE_CONFIG(BG_FOCUS, 4);
+       DECLARE_IMAGE_CONFIG(BG_FOCUS_EFFECT, 5);
        DECLARE_SHAPE_CONFIG(LEFT_MARGIN, 1);
        DECLARE_SHAPE_CONFIG(RIGHT_MARGIN, 2);
        DECLARE_SHAPE_CONFIG(TOP_MARGIN, 3);
@@ -51,5 +54,4 @@ DECLARE_UI_CONFIG(TOKENEDIT);
        DECLARE_SHAPE_CONFIG(HIDDEN_TOKEN_COUNT_DISPLAY_HEIGHT, 17);
        DECLARE_SHAPE_CONFIG(TOKEN_TITLE_RECT_WIDTH, 18);
 DECLARE_END_UI_CONFIG(TOKENEDIT);
-
-#endif //_FUI_RESOURCE_TOKEN_EDIT_CONFIG_H_
\ No newline at end of file
+#endif //_FUI_RESOURCE_TOKEN_EDIT_CONFIG_H_
index 05089ca..3b6c256 100644 (file)
@@ -1872,6 +1872,10 @@ ConfigParser::GetImageKeyTable(void)
                        __pImageKeyTable->Add(ResourceKey(key), _SEARCHBAR::EDIT_BG_PRESSED_IMAGE);
                }
                {
+                       const char* key ="SEARCHBAR::EDIT_BG_FOCUS";
+                       __pImageKeyTable->Add(ResourceKey(key), _SEARCHBAR::EDIT_BG_FOCUS_IMAGE);
+               }
+               {
                        const char* key ="SEARCHBAR::ICON_NORMAL";
                        __pImageKeyTable->Add(ResourceKey(key), _SEARCHBAR::ICON_NORMAL_IMAGE);
                }
index eeb8362..c1ea7fb 100644 (file)
@@ -39,7 +39,7 @@ START_UI_CONFIG(DATETIMEPICKER);
 
        ADD_COLOR_CONFIG(AMPM_TEXT_NORMAL, $F031L1);
        ADD_COLOR_CONFIG(AMPM_TEXT_PRESSED, $F031L1P);
-       ADD_COLOR_CONFIG(AMPM_TEXT_HIGHLIGHTED, $F031L1P);
+       ADD_COLOR_CONFIG(AMPM_TEXT_HIGHLIGHTED, $F031L1);
        ADD_COLOR_CONFIG(AMPM_TEXT_DISABLED, $F031L1D);
 
        ADD_COLOR_CONFIG(DIVIDER_LEFT_HALF, $B0224);
index 7b62121..1954166 100644 (file)
@@ -34,7 +34,10 @@ START_UI_CONFIG(SEARCHBAR);
        ADD_COLOR_CONFIG(BUTTON_TEXT_HIGHLIGHTED, $B052L4);
 
        ADD_COLOR_CONFIG(EDIT_BG_NORMAL, $W031);
+       ADD_COLOR_CONFIG(EDIT_BG_PRESSED, $B0217);
+       ADD_COLOR_CONFIG(EDIT_BG_HIGHLIGHTED, $W031);
        ADD_COLOR_CONFIG(EDIT_BG_DISABLED, $W031D);
+       ADD_COLOR_CONFIG(EDIT_BG_FOCUS, $W161);
        ADD_COLOR_CONFIG(GUIDE_TEXT_NORMAL, $W032);
        ADD_COLOR_CONFIG(GUIDE_TEXT_DISABLED, $W032D);
        ADD_COLOR_CONFIG(GUIDE_TEXT_HIGHLIGHTED, $W032);
@@ -50,6 +53,7 @@ START_UI_CONFIG(SEARCHBAR);
        ADD_IMAGE_CONFIG(EDIT_BG_HIGHLIGHTED, #00_search_edit_field_bg.#.png);
        ADD_IMAGE_CONFIG(EDIT_BG_PRESSED, #00_search_edit_field_bg.#.png);
        ADD_IMAGE_CONFIG(EDIT_BG_EFFECT, #00_search_edit_field_bg_ef.#.png);
+       ADD_IMAGE_CONFIG(EDIT_BG_FOCUS, #00_search_edit_field_focus.#.png);
 
        ADD_IMAGE_CONFIG(ICON_NORMAL, #00_search_icon.png);
        ADD_IMAGE_CONFIG(ICON_DISABLED, #00_search_icon.png);
index 744af8d..f6170c0 100644 (file)
@@ -28,10 +28,13 @@ START_UI_CONFIG(TOKENEDIT);
        ADD_COLOR_CONFIG(BG_SELECTED, $W0713);
        ADD_COLOR_CONFIG(TEXT_NORMAL, $F011L10);
        ADD_COLOR_CONFIG(TEXT_SELECTED, $F011L10);
+       ADD_COLOR_CONFIG(BG_FOCUS, $W0715);
 
        ADD_IMAGE_CONFIG(BG_NORMAL, #00_contacts_button_bg.#.png);
        ADD_IMAGE_CONFIG(BG_NORMAL_EFFECT, #00_contacts_button_bg_ef.#.png);
        ADD_IMAGE_CONFIG(BG_PRESSED_EFFECT, #00_contacts_button_bg_press_ef.#.png);
+       ADD_IMAGE_CONFIG(BG_FOCUS, #00_contacts_button_focus.#.png);
+       ADD_IMAGE_CONFIG(BG_FOCUS_EFFECT, #00_contacts_button_focus_ef.#.png);
 
        START_UI_CONFIG_MODE(720x1280);
        {