Revert "Merge master into tizen_2.1 for Slider and EEA"
authorAyush Srivastava <ayush.sriv@tizendev.org>
Thu, 23 May 2013 13:31:53 +0000 (22:31 +0900)
committerGerrit Code Review <gerrit2@kim11>
Thu, 23 May 2013 13:40:38 +0000 (22:40 +0900)
This reverts commit 5617ed7f7a846a8fd27110e3c7a69595eeadb9c0

20 files changed:
res/common/usr/share/osp/bitmaps/480x800/00_contacts_button_focus.#.png [deleted file]
res/common/usr/share/osp/bitmaps/480x800/00_slider_handle_focus.png [deleted file]
res/common/usr/share/osp/bitmaps/480x800/black/00_contacts_button_focus_ef.#.png [deleted file]
res/common/usr/share/osp/bitmaps/480x800/default/00_contacts_button_focus_ef.#.png [deleted file]
res/common/usr/share/osp/bitmaps/480x800/white/00_contacts_button_focus_ef.#.png [deleted file]
res/common/usr/share/osp/bitmaps/720x1280/00_contacts_button_focus.#.png [deleted file]
res/common/usr/share/osp/bitmaps/720x1280/black/00_contacts_button_focus_ef.#.png [deleted file]
res/common/usr/share/osp/bitmaps/720x1280/default/00_contacts_button_focus_ef.#.png [deleted file]
res/common/usr/share/osp/bitmaps/720x1280/white/00_contacts_button_focus_ef.#.png [deleted file]
src/ui/controls/FUiCtrl_SearchBar.cpp
src/ui/controls/FUiCtrl_Slider.cpp
src/ui/controls/FUiCtrl_SliderPresenter.cpp
src/ui/controls/FUiCtrl_TokenEditPresenter.cpp
src/ui/inc/FUiCtrl_Slider.h
src/ui/inc/FUiCtrl_SliderPresenter.h
src/ui/inc/FUiCtrl_TokenEditPresenter.h
src/ui/inc/FUi_ResourceSliderConfig.h
src/ui/inc/FUi_ResourceTokenEditConfig.h
src/ui/resource/FUi_ResourceSliderConfig.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
deleted file mode 100644 (file)
index 4563178..0000000
Binary files a/res/common/usr/share/osp/bitmaps/480x800/00_contacts_button_focus.#.png and /dev/null differ
diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_slider_handle_focus.png b/res/common/usr/share/osp/bitmaps/480x800/00_slider_handle_focus.png
deleted file mode 100644 (file)
index 95bd5fd..0000000
Binary files a/res/common/usr/share/osp/bitmaps/480x800/00_slider_handle_focus.png and /dev/null 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
deleted file mode 100644 (file)
index b3daa2b..0000000
Binary files a/res/common/usr/share/osp/bitmaps/480x800/black/00_contacts_button_focus_ef.#.png and /dev/null 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
deleted file mode 100644 (file)
index b3daa2b..0000000
Binary files a/res/common/usr/share/osp/bitmaps/480x800/default/00_contacts_button_focus_ef.#.png and /dev/null 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
deleted file mode 100644 (file)
index b3daa2b..0000000
Binary files a/res/common/usr/share/osp/bitmaps/480x800/white/00_contacts_button_focus_ef.#.png and /dev/null 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
deleted file mode 100644 (file)
index 8d6cd8a..0000000
Binary files a/res/common/usr/share/osp/bitmaps/720x1280/00_contacts_button_focus.#.png and /dev/null 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
deleted file mode 100644 (file)
index a9b0f7c..0000000
Binary files a/res/common/usr/share/osp/bitmaps/720x1280/black/00_contacts_button_focus_ef.#.png and /dev/null 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
deleted file mode 100644 (file)
index a9b0f7c..0000000
Binary files a/res/common/usr/share/osp/bitmaps/720x1280/default/00_contacts_button_focus_ef.#.png and /dev/null 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
deleted file mode 100644 (file)
index a9b0f7c..0000000
Binary files a/res/common/usr/share/osp/bitmaps/720x1280/white/00_contacts_button_focus_ef.#.png and /dev/null differ
index ae45a68..d1b74a8 100644 (file)
@@ -580,16 +580,6 @@ _SearchBar::SetMode(SearchBarMode mode)
 result
 _SearchBar::SetModeLocked(bool modeLocked)
 {
-       if (modeLocked == true && GetMode() == SEARCH_BAR_MODE_NORMAL)
-       {
-               __pEdit->SetViewModeEnabled(true);
-       }
-
-       if (modeLocked == false && __pEdit->IsViewModeEnabled())
-       {
-               __pEdit->SetViewModeEnabled(false);
-       }
-
        return __pSearchBarPresenter->SetModeLocked(modeLocked);
 }
 
index 90c5dcf..6174e24 100644 (file)
@@ -306,68 +306,6 @@ _Slider::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo)
 }
 
 void
-_Slider::OnDrawFocus(void)
-{
-       __pSliderPresenter->SetFocusMode(true);
-       Invalidate();
-       return;
-}
-
-bool
-_Slider::OnFocusGained(const _Control& source)
-{
-       __pSliderPresenter->SetFocusMode(true);
-       Invalidate();
-
-       return true;
-}
-
-
-bool
-_Slider::OnFocusLost(const _Control& source)
-{
-       __pSliderPresenter->SetFocusMode(false);
-       Invalidate();
-
-       return true;
-}
-
-void
-_Slider::OnFocusModeStateChanged()
-{
-       __pSliderPresenter->SetFocusMode(false);
-       Invalidate();
-}
-
-bool
-_Slider::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
-{
-
-       if(__pSliderPresenter->GetFocusMode() == false)
-       {
-               return false;
-       }
-
-       _KeyCode keyCode = keyInfo.GetKeyCode();
-
-       if (keyCode == _KEY_RIGHT)
-       {
-               SetValue(GetValue() + 1);
-               Invalidate();
-               return true;
-       }
-
-       if (keyCode == _KEY_LEFT)
-       {
-               SetValue(GetValue() - 1);
-               Invalidate();
-               return true;
-       }
-
-       return false;
-}
-
-void
 _Slider::OnBoundsChanged(void)
 {
        __pSliderPresenter->OnBoundsChanged();
index 63d7f12..5cc11be 100644 (file)
@@ -86,7 +86,6 @@ _SliderPresenter::_SliderPresenter(void)
        , __handleX(0)
        , __prevSliderValue(0)
        , __isSliderPressed(false)
-       , __isFocusModeStateChanged(false)
        , __isNeedToBeUpdated(true)
        , __isResourceLoaded(false)
        , __isCustomHandle(false)
@@ -251,6 +250,7 @@ _SliderPresenter::Resize(void)
        float offset = 0.0f;
        float minimumHeight = 0.0f;
        float minimumWidth = 0.0f;
+       float topMargin = 0.0f;
        float iconRightMargin = 0.0f;
        float titleHeight = 0.0f;
        FloatRectangle titleTextBounds;
@@ -303,6 +303,9 @@ _SliderPresenter::Resize(void)
        }
        __rect = FloatRectangle(0.0f, 0.0f, __pSlider->GetBoundsF().width, __pSlider->GetBoundsF().height);
 
+       r = GET_SHAPE_CONFIG(SLIDER::BAR_TOP_MARGIN, orientation, topMargin);
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
        r = GET_SHAPE_CONFIG(SLIDER::ICON_RIGHT_MARGIN, orientation, iconRightMargin);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
@@ -341,7 +344,7 @@ _SliderPresenter::Resize(void)
                minimumHeight = minimumHeight + titleHeight;
        }
 
-       if (__rect.height < minimumHeight)
+       if (__rect.height < minimumHeight )
        {
                __rect.height = minimumHeight;
        }
@@ -1055,12 +1058,18 @@ _SliderPresenter::DrawSliderBar(Canvas& canvas)
                        }
                }
        }
-       else if (__isSliderPressed == true)     // pressed
+       else if (__isSliderPressed == true)   // pressed
        {
                pHandleBitmap = __pHandlePressedBitmap;
                pHandleEffectBitmap = __pHandlePressedEffectBitmap;
                isCustomHandleBitmap = IS_CUSTOM_BITMAP(SLIDER::HANDLE_BG_PRESSED);
        }
+       else if (__pSlider->IsFocused() == true)
+       {
+               pHandleBitmap = __pHandleHighlightedBitmap;
+               pHandleEffectBitmap = __pHandleHighlightedEffectBitmap;
+               isCustomHandleBitmap = IS_CUSTOM_BITMAP(SLIDER::HANDLE_BG_HIGHLIGHTED);
+       }
        else //(__isSliderPressed == false)     // normal state
        {
                pHandleBitmap = __pHandleNormalBitmap;
@@ -1125,14 +1134,14 @@ _SliderPresenter::DrawSliderBar(Canvas& canvas)
        DrawBitmap(canvas, __barBgRect, __pBarBgColorReplacementBitmap);
        if (isCustomBarBitmap == false)
        {
-               DrawBitmap(canvas, __barBgRect, __pBarBgResourceEffectBitmap);
+           DrawBitmap(canvas, __barBgRect, __pBarBgResourceEffectBitmap);
        }
 
        isCustomBarBitmap = IS_CUSTOM_BITMAP(SLIDER::BAR_NORMAL);
        DrawBitmap(canvas, FloatRectangle(__barRect.x, __barRect.y, (__barRect.width + __handleRect.width / 2), __barRect.height), __pBarColorReplacementBitmap);
        if (isCustomBarBitmap == false)
        {
-               DrawBitmap(canvas, FloatRectangle(__barRect.x, __barRect.y, (__barRect.width + __handleRect.width / 2), __barRect.height), __pBarResourceEffectBitmap);
+           DrawBitmap(canvas, FloatRectangle(__barRect.x, __barRect.y, (__barRect.width + __handleRect.width / 2), __barRect.height), __pBarResourceEffectBitmap);
        }
 
        __handleRect.x = __touchRect.x + __handleX;
@@ -1161,8 +1170,8 @@ _SliderPresenter::DrawSliderBar(Canvas& canvas)
                SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
                if (isCustomHandleBitmap == false)
                {
-                       r = DrawBitmap(*pHandleCanvas, FloatRectangle(0.0f, 0.0f, __handleRect.width, __handleRect.height), pHandleEffectBitmap);
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+                   r = DrawBitmap(*pHandleCanvas, FloatRectangle(0.0f, 0.0f, __handleRect.width, __handleRect.height), pHandleEffectBitmap);
+                   SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
                }
        }
        else
@@ -1194,22 +1203,6 @@ _SliderPresenter::DrawSliderBar(Canvas& canvas)
                SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
        }
 
-       if ((__pSlider->IsFocused()) &&  (__isFocusModeStateChanged == true))
-       {
-               if (__pHandleHighlightedBitmap)
-               {
-                       if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pHandleHighlightedBitmap))
-                       {
-                               r = pHandleCanvas->DrawNinePatchedBitmap(FloatRectangle(0.0f, 0.0f, __handleRect.width, __handleRect.height), *__pHandleHighlightedBitmap);
-                       }
-                       else
-                       {
-                               r = pHandleCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, __handleRect.width, __handleRect.height), *__pHandleHighlightedBitmap);
-                       }
-                       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
-               }
-       }
-
        r = __pSlider->UpdateHandle(__handleRect);
        if (r != E_SUCCESS)
        {
@@ -1326,7 +1319,7 @@ _SliderPresenter::DrawTitleText(Canvas& canvas)
        if (__pTitleTextObject == null)
        {
                __pTitleTextObject = new (std::nothrow) TextObject();
-               SysTryReturn(NID_UI_CTRL, __pTitleTextObject != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+                SysTryReturn(NID_UI_CTRL, __pTitleTextObject != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
                __pTitleTextObject->Construct();
        }
 
@@ -1415,7 +1408,7 @@ _SliderPresenter::GetTitleTextBounds(void) const
        r = GET_SHAPE_CONFIG(SLIDER::TITLE_TEXT_POSITION_X, orientation, titleTextBounds.x);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, FloatRectangle(), r, "[%s] Propagating.", GetErrorMessage(r));
 
-       r = GET_SHAPE_CONFIG(SLIDER::TITLE_TEXT_POSITION_Y, orientation, topMargin);
+       r = GET_SHAPE_CONFIG(SLIDER::BAR_TOP_MARGIN, orientation, topMargin);
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, FloatRectangle(), r, "[%s] Propagating.", GetErrorMessage(r));
 
        titleTextBounds.y = topMargin;
@@ -1785,18 +1778,6 @@ _SliderPresenter::SetGroupStyle(GroupStyle groupStyle)
        return;
 }
 
-void
-_SliderPresenter::SetFocusMode(bool focusmode)
-{
-       __isFocusModeStateChanged = focusmode;
-}
-
-bool
-_SliderPresenter::GetFocusMode(void)
-{
-       return __isFocusModeStateChanged;
-}
-
 result
 _SliderPresenter::SetThumbBitmap(SliderThumbStatus status, const Bitmap& bitmap)
 {
index 6a36e8b..8cdfe6c 100644 (file)
@@ -275,8 +275,6 @@ _TokenEditPresenter::_TokenEditPresenter(void)
        , __pTokenBgBitmap(null)
        , __pTokenBgNormalEffectBitmap(null)
        , __pTokenBgPressedEffectBitmap(null)
-       , __pTokenBgReplacementFocusBitmap(null)
-       , __pTokenBgFocusEffectBitmap(null)
        , __pressedTokenIndex(-1)
        , __isEditingToken(false)
        , __edittingTokenIndex(-1)
@@ -312,8 +310,6 @@ _TokenEditPresenter::_TokenEditPresenter(void)
        , __touchPressInfo(FloatPoint(-1.0f, -1.0f))
        , __editContentFontSize(0.0f)
        , __trackTokenIndex(-1)
-       , __focusedTokenIndex(-1)
-       , __focusedEditingTokenIndex(-1)
        , __isAnimationInProgress(false)
 {
 }
@@ -402,12 +398,6 @@ _TokenEditPresenter::DisposeTokenEditPresenter(void)
        delete __pTokenBgPressedEffectBitmap;
        __pTokenBgPressedEffectBitmap = null;
 
-       delete __pTokenBgReplacementFocusBitmap;
-       __pTokenBgReplacementFocusBitmap = null;
-
-       delete __pTokenBgFocusEffectBitmap;
-       __pTokenBgFocusEffectBitmap = null;
-
        if (__pDescriptionTextVisualElement)
        {
                __pDescriptionTextVisualElement->Destroy();
@@ -471,15 +461,12 @@ _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;
@@ -513,20 +500,6 @@ _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();
@@ -544,15 +517,6 @@ CATCH:
        delete __pTokenBgNormalEffectBitmap;
        __pTokenBgNormalEffectBitmap = null;
 
-       delete __pTokenBgPressedEffectBitmap;
-       __pTokenBgPressedEffectBitmap = null;
-
-       delete pTokenBgFocusBitmap;
-       pTokenBgFocusBitmap = null;
-
-       delete __pTokenBgReplacementFocusBitmap;
-       __pTokenBgReplacementFocusBitmap = null;
-
        return r;
 }
 
@@ -848,34 +812,6 @@ _TokenEditPresenter::DrawToken(int count)
                        }
                }
 
-               if (__focusedTokenIndex == i && IsFocused() && (!__isEditingToken))
-               {
-                       if (__pTokenBgReplacementFocusBitmap)
-                       {
-                               if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgReplacementFocusBitmap))
-                               {
-                                       pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pTokenBgReplacementFocusBitmap);
-                               }
-                               else
-                               {
-                                       pTokenCanvas->DrawBitmap(tokenRect, *__pTokenBgReplacementFocusBitmap);
-                               }
-                       }
-
-                       if (__pTokenBgFocusEffectBitmap)
-                       {
-                               if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgFocusEffectBitmap))
-                               {
-                                       pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pTokenBgFocusEffectBitmap);
-                               }
-                               else
-                               {
-                                       pTokenCanvas->DrawBitmap(tokenRect, *__pTokenBgFocusEffectBitmap);
-                               }
-                       }
-
-               }
-
                pTokenElement->SetAnimationProvider(null);
                if (pToken->isImplicitAnimation)
                {
@@ -1121,10 +1057,6 @@ _TokenEditPresenter::InsertTokenAt(int index, const String& token, bool isUser)
                {
                        __pressedTokenIndex++;
                }
-               else if (__focusedTokenIndex >= index)
-               {
-                       __focusedTokenIndex++;
-               }
        }
 
        return r;
@@ -1272,15 +1204,6 @@ _TokenEditPresenter::RemoveTokenAt(int index, bool isClearText)
                {
                        __pressedTokenIndex--;
                }
-
-               if (index == __focusedTokenIndex)
-               {
-                       __focusedTokenIndex = -1;
-               }
-               else if(index >= 0 && index < __focusedTokenIndex)
-               {
-                       __focusedTokenIndex--;
-               }
        }
        else if (index == __pressedTokenIndex)
        {
@@ -1289,10 +1212,6 @@ _TokenEditPresenter::RemoveTokenAt(int index, bool isClearText)
                SetCursorDisabled(false);
                StartCursorTimer();
        }
-       else if (index == __focusedTokenIndex)
-       {
-               __focusedTokenIndex = -1;
-       }
 
        return r;
 }
@@ -2275,8 +2194,34 @@ _TokenEditPresenter::ProcessTokeningByTouchEvent(const _Control& source, const _
 
                        if ((__isEditingToken == true) && (__pressedTokenIndex != -1))
                        {
-                               r = AttachCursorToPressedToken();
-                               SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.");
+                               _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.");
+                                       }
+                               }
                        }
 
                        if (__isEditingToken == false)
@@ -2711,12 +2656,11 @@ bool
 _TokenEditPresenter::OnFocusLost(void)
 {
        result r = E_SUCCESS;
-       __isFocus = false;
 
        //Remove pressed state on focus lost
        __pressedTokenIndex = -1;
-       __focusedTokenIndex = -1;
-       __focusedEditingTokenIndex = -1;
+
+       __isFocus = false;
 
        _EditPresenter::StopTitleSlidingTimer();
        __isTitleSliding = false;
@@ -2867,9 +2811,6 @@ _TokenEditPresenter::SetTextSize(const float size)
 bool
 _TokenEditPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo)
 {
-       //Remove token focus on touch press
-       __focusedTokenIndex = -1;
-       __focusedEditingTokenIndex = -1;
        int tokenIndex = GetTokenIndexFromCoordinate(_CoordinateSystemUtils::ConvertToInteger(touchinfo.GetCurrentPosition()));
        __trackTokenIndex = tokenIndex;
 
@@ -3039,18 +2980,7 @@ _TokenEditPresenter::OnTextCommitted(const String& commitText)
                        __edittingTokenIndex = -1;
                        __isEditingToken = false;
 
-                       if ((__focusedTokenIndex == -1) && (__focusedEditingTokenIndex != -1)
-                               && (inputTokenString.GetLength() > 0))
-                       {
-                               //1. Tokenedit is focussed
-                               //2. The valid Editing token is focussed
-                               __focusedTokenIndex = __focusedEditingTokenIndex;
-                               ScrollToFocussedToken();
-                       }
-                       else
-                       {
-                               CheckTokenScrolling();
-                       }
+                       CheckTokenScrolling();
                        SetCursorDisabled(false);
 
                        if (inputTokenString.GetLength() <= 0)
@@ -3064,28 +2994,6 @@ _TokenEditPresenter::OnTextCommitted(const String& commitText)
                {
                        MakeToken();
                }
-               else if ((__focusedEditingTokenIndex == -1) && (__focusedTokenIndex != -1) && (!__isEditingToken))
-               {
-                       if (__isEditModeEnabled)
-                       {
-                               __edittingTokenIndex = __focusedTokenIndex;
-                               __pressedTokenIndex = __edittingTokenIndex;
-                               __isEditingToken = true;
-                               __focusedEditingTokenIndex = __focusedTokenIndex;
-                               __focusedTokenIndex = -1;
-                               __isTokenEditingFinished = false;
-
-                               SetEditingTokenTextBounds(__edittingTokenIndex);
-
-                               r = AttachCursorToPressedToken();
-                               SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
-                       }
-               }
-               else
-               {
-                       //Focussed token is ready to be edited again.
-                       __focusedEditingTokenIndex = -1;
-               }
 
                for (int i = 0; i < __pTokenList->GetCount(); i++)
                {
@@ -3093,7 +3001,7 @@ _TokenEditPresenter::OnTextCommitted(const String& commitText)
                        InitializeTokenVisibilityAt(i);
                }
 
-               if ((__pressedTokenIndex < 0) || (__focusedEditingTokenIndex > -1))
+               if (__pressedTokenIndex < 0)
                {
                        SetCursorDisabled(true);
                        __pTokenEdit->Draw();
@@ -3340,13 +3248,6 @@ _TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount)
                __pTokenEdit->Invalidate();
                return;
        }
-       else if (__focusedTokenIndex >= 0 && __edittingTokenIndex < 0 && !__isEditingToken)
-       {
-               RemoveTokenAt(__focusedTokenIndex);
-               __pTokenEdit->Invalidate();
-               return;
-       }
-
 
        //Backspace on Blocked text, delete full block
        if (IsBlocked() == true)
@@ -3820,45 +3721,10 @@ _TokenEditPresenter::OnBoundsChanged(void)
        return;
 }
 
-result
-_TokenEditPresenter::AttachCursorToPressedToken(void)
-{
-       result r = E_SUCCESS;
-
-       _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)
-       {
-               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)
-               {
-                       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.");
-               }
-       }
-
-       return r;
-}
-
 bool
 _TokenEditPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
 {
        _KeyCode keyCode = keyInfo.GetKeyCode();
-       bool focusChanged = false;
-       int tokenCount = GetTokenCount();
 
        if (IsUsbKeyboardConnected() && (keyInfo.GetKeyModifier() & _KEY_MODIFIER_CTRL))
        {
@@ -3879,95 +3745,6 @@ _TokenEditPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInf
                }
        }
 
-       if ((keyCode == _KEY_NUM_LEFT) || (keyCode == _KEY_LEFT))
-       {
-               if (!__isEditingToken)
-               {
-                       if ((__focusedTokenIndex > 0) && (__focusedTokenIndex < tokenCount))
-                       {
-                               __focusedTokenIndex--;
-                               focusChanged = true;
-                       }
-               }
-       }
-
-       if ((keyCode == _KEY_NUM_RIGHT) || (keyCode == _KEY_RIGHT))
-       {
-               int lastTokenIndex = tokenCount - 1;
-               if (!__isEditingToken)
-               {
-                       if (__pressedTokenIndex != -1)
-                       {
-                               __pressedTokenIndex = -1;
-                               __focusedTokenIndex = 0;
-                               focusChanged = true;
-                       }
-                       else if (__focusedTokenIndex < lastTokenIndex)
-                       {
-                               __focusedTokenIndex++;
-                               focusChanged = true;
-                       }
-               }
-       }
-
-       if (focusChanged)
-       {
-               ScrollToFocussedToken();
-       }
-
        return _EditPresenter::OnKeyPressed(source, keyInfo);
 }
-
-result
-_TokenEditPresenter::ScrollToFocussedToken(void)
-{
-       result r = E_SUCCESS;
-       int tokenCount = GetTokenCount();
-       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) && (__focusedTokenIndex < tokenCount))
-       {
-               _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;
-}
-
 }}} //Tizen::Ui::Controls
index 793e806..8a406c4 100644 (file)
@@ -128,15 +128,10 @@ public:
        virtual bool OnTouchReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
        virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
        virtual bool OnTouchCanceled(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
-       virtual void OnDrawFocus(void);
-       virtual bool OnFocusGained(const _Control& source);
-       virtual bool OnFocusLost(const _Control &source);
-       virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo);
        virtual void OnBoundsChanged(void);
        virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation);
        virtual void OnDraw(void);
        virtual result OnAttachedToMainTree(void);
-       virtual void OnFocusModeStateChanged(void);
 
        virtual void OnFontChanged(Tizen::Graphics::Font* pFont);
        virtual void OnFontInfoRequested(unsigned long& style, float& size);
index 0143d2e..9518758 100644 (file)
@@ -70,8 +70,7 @@ public:
        static _SliderPresenter* CreateInstanceN(const _Slider& slider);
        result SetThumbBitmap(SliderThumbStatus status, const Tizen::Graphics::Bitmap& bitmap);
        void SetThumbTextColor(SliderThumbStatus status, const Tizen::Graphics::Color& color);
-       void SetFocusMode(bool focusmode);
-       bool GetFocusMode(void);
+
        virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
 
 private:
@@ -158,7 +157,6 @@ private:
        int __handleX;
        int __prevSliderValue;
        bool __isSliderPressed;
-       bool __isFocusModeStateChanged;
 
        bool __isNeedToBeUpdated;
        bool __isResourceLoaded;
index 8f1f76c..6c7a815 100644 (file)
@@ -152,8 +152,7 @@ public:
        virtual result ChangeLayout(_ControlOrientation orientation);
        virtual void ResetTextBounds(void);
        virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo);
-       result ScrollToFocussedToken(void);
-       result AttachCursorToPressedToken(void);
+
 private:
        bool DrawToken(int count = -1);
        Tizen::Graphics::Color GetTokenEditColor(const ExpandableEditAreaTokenStatus status) const;
@@ -186,8 +185,6 @@ private:
        Tizen::Graphics::Bitmap* __pTokenBgBitmap;
        Tizen::Graphics::Bitmap* __pTokenBgNormalEffectBitmap;
        Tizen::Graphics::Bitmap* __pTokenBgPressedEffectBitmap;
-       Tizen::Graphics::Bitmap* __pTokenBgReplacementFocusBitmap;
-       Tizen::Graphics::Bitmap* __pTokenBgFocusEffectBitmap;
 
        int __pressedTokenIndex;
 
@@ -260,10 +257,6 @@ private:
 
        int __trackTokenIndex;
 
-       int __focusedTokenIndex;
-
-       int __focusedEditingTokenIndex;
-
        bool __isAnimationInProgress;
 
        static const int ANIMATION_DURATION_BOUNDS = 167;
index 7616397..319ab5e 100644 (file)
@@ -67,7 +67,7 @@ DECLARE_UI_CONFIG(SLIDER);
        DECLARE_SHAPE_CONFIG(HANDLE_THREE_DIGIT_TEXT_SIZE, 6);
        DECLARE_SHAPE_CONFIG(BAR_HEIGHT, 7);
        DECLARE_SHAPE_CONFIG(BAR_LEFT_MARGIN, 8);
-       DECLARE_SHAPE_CONFIG(TITLE_TEXT_POSITION_Y, 9);
+       DECLARE_SHAPE_CONFIG(BAR_TOP_MARGIN, 9);
        DECLARE_SHAPE_CONFIG(BAR_OFFSET, 10);
        DECLARE_SHAPE_CONFIG(ICON_WIDTH, 11);
        DECLARE_SHAPE_CONFIG(ICON_HEIGHT, 12);
index e99ba4c..f0737bf 100644 (file)
@@ -29,12 +29,9 @@ 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);
index ecc2dfb..f46fb61 100644 (file)
@@ -34,7 +34,7 @@ START_UI_CONFIG(SLIDER);
        ADD_COLOR_CONFIG(HANDLE_BG_NORMAL, $W0641);
        ADD_COLOR_CONFIG(HANDLE_BG_PRESSED, $W0641P);
        ADD_COLOR_CONFIG(HANDLE_BG_DISABLED, $W0641D);
-       ADD_COLOR_CONFIG(HANDLE_BG_HIGHLIGHTED, $W161);
+       ADD_COLOR_CONFIG(HANDLE_BG_HIGHLIGHTED, $W0641);
        ADD_COLOR_CONFIG(HANDLE_NUMBER_TEXT_DISABLED, $W0611D);
        ADD_COLOR_CONFIG(HANDLE_NUMBER_TEXT_NORMAL, $W0611);
 
@@ -50,7 +50,7 @@ START_UI_CONFIG(SLIDER);
        ADD_IMAGE_CONFIG(HANDLE_BG_NORMAL, #00_slider_handle.png);
        ADD_IMAGE_CONFIG(HANDLE_BG_PRESSED, #00_slider_handle.png);
        ADD_IMAGE_CONFIG(HANDLE_BG_DISABLED, #00_slider_handle.png);
-       ADD_IMAGE_CONFIG(HANDLE_BG_HIGHLIGHTED, #00_slider_handle_focus.png);
+       ADD_IMAGE_CONFIG(HANDLE_BG_HIGHLIGHTED, #00_slider_handle.png);
 
        ADD_IMAGE_CONFIG(HANDLE_BG_EFFECT_NORMAL, #00_slider_handle_ef.png);
        ADD_IMAGE_CONFIG(HANDLE_BG_EFFECT_PRESSED, #00_slider_handle_ef_press.png);
@@ -82,6 +82,7 @@ START_UI_CONFIG(SLIDER);
                ADD_SHAPE_CONFIG(BAR_HEIGHT, 36);
                ADD_SHAPE_CONFIG(BAR_LEFT_MARGIN_WITH_ICON, 26);
                ADD_SHAPE_CONFIG(BAR_LEFT_MARGIN, 36);
+               ADD_SHAPE_CONFIG(BAR_TOP_MARGIN, 16);
                ADD_SHAPE_CONFIG(BAR_OFFSET, 9);
 
                ADD_SHAPE_CONFIG(ICON_WIDTH, 72);
@@ -90,7 +91,6 @@ START_UI_CONFIG(SLIDER);
                ADD_SHAPE_CONFIG(ICON_RIGHT_MARGIN, 16);
 
                ADD_SHAPE_CONFIG(TITLE_TEXT_POSITION_X, 12);
-               ADD_SHAPE_CONFIG(TITLE_TEXT_POSITION_Y, 16);
                ADD_SHAPE_CONFIG(TITLE_TEXT_SIZE, 32);
                ADD_SHAPE_CONFIG(TITLE_TEXT_HEIGHT, 49);
 
index f6170c0..744af8d 100644 (file)
@@ -28,13 +28,10 @@ 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);
        {