Merge "modify Klockwork bug" into tizen_2.2
authorMinkyu Kim <imetjade.kim@samsung.com>
Wed, 2 Oct 2013 08:27:55 +0000 (08:27 +0000)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Wed, 2 Oct 2013 08:27:55 +0000 (08:27 +0000)
42 files changed:
inc/FUiCtrlListTypes.h
src/graphics/FGrp_Font.cpp
src/graphics/opengl/FGrpEgl.cpp
src/graphics/text/FGrp_TextTextComposite.cpp
src/ui/FUiKeyboardMap.cpp
src/ui/FUi_Control.cpp
src/ui/FUi_EcoreEvas.cpp
src/ui/animations/FUiAnim_Debug.cpp
src/ui/animations/FUiAnim_FrameAnimatorImpl.cpp
src/ui/animations/FUiAnim_FrameAnimatorImpl.h
src/ui/controls/FUiCtrl_ContextMenuListPresenter.cpp
src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp
src/ui/controls/FUiCtrl_EditDatePresenter.cpp
src/ui/controls/FUiCtrl_EditPresenter.cpp
src/ui/controls/FUiCtrl_EditTimePresenter.cpp
src/ui/controls/FUiCtrl_Frame.cpp
src/ui/controls/FUiCtrl_GalleryPresenter.cpp
src/ui/controls/FUiCtrl_GroupedListViewImpl.cpp
src/ui/controls/FUiCtrl_Indicator.cpp
src/ui/controls/FUiCtrl_Keypad.cpp
src/ui/controls/FUiCtrl_ListViewImpl.cpp
src/ui/controls/FUiCtrl_OptionMenu.cpp
src/ui/controls/FUiCtrl_OptionMenuPresenter.cpp
src/ui/controls/FUiCtrl_ScrollPanelPresenter.cpp
src/ui/controls/FUiCtrl_ScrollPresenter.cpp
src/ui/controls/FUiCtrl_Slider.cpp
src/ui/controls/FUiCtrl_TableView.cpp
src/ui/controls/FUiCtrl_TableViewItem.cpp
src/ui/controls/FUiCtrl_TableViewPresenter.cpp
src/ui/effects/runtime/lua-cpp-binding/tolua.cpp
src/ui/inc/FUiCtrl_ContextMenu.h
src/ui/inc/FUiCtrl_Edit.h
src/ui/inc/FUiCtrl_EditPresenter.h
src/ui/inc/FUiCtrl_FlickAnimation.h
src/ui/inc/FUiCtrl_FooterImpl.h
src/ui/inc/FUiCtrl_HeaderImpl.h
src/ui/inc/FUiCtrl_OptionMenu.h
src/ui/inc/FUiCtrl_ScrollPanelPresenter.h
src/ui/inc/FUiCtrl_TableView.h
src/ui/inc/FUiCtrl_TableViewPresenter.h
src/ui/inc/FUiCtrl_Toolbar.h
src/ui/inc/FUi_UiBuilderConfig.h

index 5b3e275..62a97b6 100644 (file)
 namespace Tizen { namespace Ui { namespace Controls
 {
 
-//
-//This integer is for internal use only. Using this integer can cause behavioral, security-related,
-//and consistency-related issues in the application.
-//
-static const int LIST_ITEM_NOTFOUND = 0;
-
 /**
  * The integer value that represents the unspecified item ID
  *
index 8400cf1..dfe04d0 100644 (file)
@@ -57,6 +57,7 @@
 #include "util/FGrp_UtilTemplate.h"
 
 //#define USE_FONTCONFIG
+//#define APPLY_BOLD_SPACE
 #define SYNCHRONIZATION_2_0
 #define __pNativeFont __sharedFont.get()
 
@@ -1010,12 +1011,14 @@ _Font::__GetTextExtentEx(int width, const _Util::String& text, bool outline, int
        _IFont::Property property;
        GET_FONT_PROPERTY(property, false);
 
+#ifdef APPLY_BOLD_SPACE
        if (__fontAttrib.style & FONT_STYLE_BOLD && property.weightClass < _MEDIUM_FONT_BOLD_WEIGHT)
        {
                _IFont::Attrib attr;
                pThis->GetAttrib(attr);
                boldSpace = static_cast<int>(attr.boldWeight.ToFloat() + 0.5f);
        }
+#endif
 
        const wchar_t* pText = text.pStart;
        int length = text.length;
@@ -1183,6 +1186,7 @@ _Font::__GetTextExtent(int width, const _Util::String& text, bool outline, int&
                }
        }
 
+#ifdef APPLY_BOLD_SPACE
        _IFont::Property property;
        GET_FONT_PROPERTY(property, false);
 
@@ -1192,6 +1196,7 @@ _Font::__GetTextExtent(int width, const _Util::String& text, bool outline, int&
                pThis->GetAttrib(attr);
                boldSpace = static_cast<int>(attr.boldWeight.ToFloat() + 0.5f);
        }
+#endif
 
        const wchar_t* pText = text.pStart;
        int length = text.length;
@@ -1355,6 +1360,7 @@ _Font::__GetTextExtentList(const _Util::String& text, _Util::AccumList<_Util::Pa
        }
 #endif
 
+#ifdef APPLY_BOLD_SPACE
        _IFont::Property property;
        GET_FONT_PROPERTY(property, false);
 
@@ -1367,6 +1373,7 @@ _Font::__GetTextExtentList(const _Util::String& text, _Util::AccumList<_Util::Pa
                        boldSpace = static_cast<int>(attr.boldWeight.ToFloat() + 0.5f);
                }
        }
+#endif
 
        int curX = 0;
        int curY = 0;
@@ -1733,6 +1740,7 @@ _Font::__DrawText(_Canvas& canvas, const Point& point, const _Util::String& text
                }
        }
 
+#ifdef APPLY_BOLD_SPACE
        _IFont::Property property;
        GET_FONT_PROPERTY(property, false);
 
@@ -1742,6 +1750,7 @@ _Font::__DrawText(_Canvas& canvas, const Point& point, const _Util::String& text
                this->GetAttrib(attr);
                boldSpace = static_cast<int>(attr.boldWeight.ToFloat() + 0.5f);
        }
+#endif
 
        const wchar_t* pText = text.pStart;
        int length = text.length;
index e9bc2a6..f829183 100644 (file)
@@ -456,6 +456,16 @@ _OnBoundsChanged(void* pData)
                _EvasObjectImageChange(pSglInfoSecond);
        }
 
+       if (pSglInfo->isCopyNeeded)
+       {
+               delete pSglInfo->pBitmapCopyNeeded;
+               std::auto_ptr <Bitmap> bitmap(new (std::nothrow) Bitmap);
+               SysTryReturnVoidResult(NID_GRP, bitmap.get() != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
+               result r = bitmap.get()->Construct(Rectangle(0, 0, width, height));
+               SysTryReturnVoidResult(NID_GRP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+               pSglInfo->pBitmapCopyNeeded = bitmap.release();
+       }
+
        pSglInfo->pBitmap = bitmap.release();
        _EvasObjectImageChange(pSglInfo);
 
@@ -476,16 +486,6 @@ _OnBoundsChanged(void* pData)
        __needRestoreContext = false;
 #endif
 
-       if (pSglInfo->isCopyNeeded)
-       {
-               delete pSglInfo->pBitmapCopyNeeded;
-               std::auto_ptr <Bitmap> bitmap(new (std::nothrow) Bitmap);
-               SysTryReturnVoidResult(NID_GRP, bitmap.get() != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
-               result r = bitmap.get()->Construct(Rectangle(0, 0, width, height));
-               SysTryReturnVoidResult(NID_GRP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
-               pSglInfo->pBitmapCopyNeeded = bitmap.release();
-       }
-
        return;
 }
 
index 0a37e5a..7fbfcc3 100644 (file)
@@ -4667,7 +4667,7 @@ TextComposite::ComposeInWrapInSweepMode(FloatRectangle& rect)
                        }
 
                        if ((__frontSpaceHideMode == TEXT_OBJECT_SPACE_HIDE_TYPE_ONE) &&
-                               (GetCharacter(textIndex+textCount) == ' '))
+                               (textIndex+textCount < __length) && (GetCharacter(textIndex+textCount) == ' '))
                        {
                                textCount++;
                        }
index ebf54f4..18993f6 100644 (file)
@@ -1871,11 +1871,10 @@ KeyboardMap::LoadKeyboarMapFromFile(void)
        return E_SUCCESS;
 }
 
-
+/*
 KeyboardMapType
 GetKeyboardMapType(void)
 {
-/*
     KeyboardMapType type = KEYBOARD_MAP_NONE;
 
     // get keyboard type
@@ -2015,9 +2014,8 @@ GetKeyboardMapType(void)
 
 CATCH:
     return KEYBOARD_MAP_NONE;
-*/
-       return KEYBOARD_MAP_NONE;
 }
+*/
 
 result
 LoadKeyboardMap(void)
index 001be26..b973e8e 100644 (file)
@@ -2919,6 +2919,7 @@ void
 _Control::SetVisibleState(bool visibleState)
 {
        ClearLastResult();
+       UpdateFocusList();
 
        const bool changed = (__visibleState != visibleState) || !__initVisibleState;
 
index 5d949a8..4f1424c 100644 (file)
@@ -1293,7 +1293,6 @@ Eina_Bool ConvertClipIntoHtml(char* pTarget, void* pData, int size, void** outDa
 Eina_Bool ConvertClipIntoEdje(char* pTarget, void* pData, int size, void** outData, int* outSize, Ecore_X_Atom* pType, int* pTypeSize);
 Eina_Bool ConvertClipIntoUri(char* pTarget, void* pData, int size, void** outData, int* outSize, Ecore_X_Atom* pType, int* pTypeSize);
 Eina_Bool ConvertClipIntoImage(char* pTarget, void* pData, int size, void** outData, int* outSize, Ecore_X_Atom* pType, int* pTypeSize);
-Eina_Bool ConvertClipIntoVCard(char* pTarget, void* pData, int size, void** outData, int* outSize, Ecore_X_Atom* pType, int* pTypeSize);
 
 int NotifyTarget(_Clip* pClip, Ecore_X_Event_Selection_Notify* pNotify);
 int NotifyText(_Clip* pClip, Ecore_X_Event_Selection_Notify* pNotify);
@@ -1440,12 +1439,6 @@ ConvertClipIntoImage(char* pTarget __UNUSED__, void* pData, int size __UNUSED__,
        return EINA_TRUE;
 }
 
-Eina_Bool
-ConvertClipIntoVCard(char* pTarget __UNUSED__, void* pData, int size __UNUSED__, void** outData __UNUSED__, int* outSize __UNUSED__, Ecore_X_Atom* pType __UNUSED__, int* pTypeSize __UNUSED__)
-{
-       return EINA_TRUE;
-}
-
 int
 RequestClip(_Clip* pClip, Ecore_X_Event_Selection_Notify* pNotify)
 {
@@ -3666,40 +3659,6 @@ _EcoreEvas::GetDragAndDropTargetHandle(void) const
        return __dragAndDropTargetHandle;
 }
 
-void* _GetEcoreEvasHandle(void)
-{
-       _EcoreEvasMgr* pEcoreEvasMgr = GetEcoreEvasMgr();
-       if (pEcoreEvasMgr == null)
-       {
-               return null;
-       }
-
-       _EcoreEvas* pUiEcoreEvas = pEcoreEvasMgr->GetEcoreEvas();
-       if (pUiEcoreEvas == null)
-       {
-               return null;
-       }
-
-       return (void*)pUiEcoreEvas->GetEcoreEvas();
-}
-
-void* _GetEvasHandle(void)
-{
-       _EcoreEvasMgr* pEcoreEvasMgr = GetEcoreEvasMgr();
-       if (pEcoreEvasMgr == null)
-       {
-               return null;
-       }
-
-       _EcoreEvas* pUiEcoreEvas = pEcoreEvasMgr->GetEcoreEvas();
-       if (pUiEcoreEvas == null)
-       {
-               return null;
-       }
-
-       return (void*)pUiEcoreEvas->GetEvas();
-}
-
 result
 _EcoreEvas::InitializeAtomList(void)
 {
@@ -4184,26 +4143,3 @@ _EcoreEvas::GetCbhmItem(int index, Ecore_X_Atom* pDataType, char** pBuffer) cons
 
 }} // Tizen::Ui
 
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-// [ToDo] Remove API
-_OSP_EXPORT_ unsigned int
-_GetActiveWindow(void)
-{
-       return GetEcoreEvasMgr()->GetEcoreEvas()->GetActiveWindow();
-}
-
-// [ToDo] Remove API
-_OSP_EXPORT_ int
-_GetProcessId(unsigned int window)
-{
-       return GetEcoreEvasMgr()->GetEcoreEvas()->GetProcessId(window);
-}
-
-#ifdef __cplusplus
-}
-#endif
-
index f041a40..1eef537 100644 (file)
@@ -305,11 +305,11 @@ _VeDebug::DumpVisualElementLayout(_VisualElementImpl* pElement, FILE* pFile)
 
                                        if (name.GetLength() > 0)
                                        {
-                                               sprintf(filename, "VE_%d_%ls_%08x.png", count, pElement->GetName().GetPointer(), (unsigned int)pElement->GetPresentation());
+                                               snprintf(filename, sizeof(filename), "VE_%d_%ls_%08x.png", count, pElement->GetName().GetPointer(), (unsigned int)pElement->GetPresentation());
                                        }
                                        else
                                        {
-                                               sprintf(filename, "VE_%d_%08x.png", count, (unsigned int)pElement->GetPresentation());
+                                               snprintf(filename, sizeof(filename), "VE_%d_%08x.png", count, (unsigned int)pElement->GetPresentation());
                                        }
 
                                        // save the image file
@@ -410,11 +410,11 @@ _VeDebug::DumpVisualElementLayout(_VisualElementImpl* pElement, FILE* pFile)
 
                                        if (name.GetLength() > 0)
                                        {
-                                               sprintf(filename, "VE_%d_%ls_%08x.png", count, pElement->GetName().GetPointer(), (unsigned int)pElement->GetPresentation());
+                                               snprintf(filename, sizeof(filename), "VE_%d_%ls_%08x.png", count, pElement->GetName().GetPointer(), (unsigned int)pElement->GetPresentation());
                                        }
                                        else
                                        {
-                                               sprintf(filename, "VE_%d_%08x.png", count, (unsigned int)pElement->GetPresentation());
+                                               snprintf(filename, sizeof(filename), "VE_%d_%08x.png", count, (unsigned int)pElement->GetPresentation());
                                        }
 
                                        // save the image file
@@ -1390,7 +1390,7 @@ _VeDebug::DumpAllEvasImages(Evas *pEvas)
 
                                if (pEvasObject)
                                {
-                                       sprintf(filename, "%sEVAS_%d_%08x.png", pathPrefix, count++, (unsigned int)pEvasObject);
+                                       snprintf(filename, sizeof(filename), "%sEVAS_%d_%08x.png", pathPrefix, count++, (unsigned int)pEvasObject);
 
                                        VeLog(NID_UI_ANIM, "--------------------------[VE DUMP IMAGE START %#08x]---------------------------", (unsigned int)pEvasObject);
                                        if (evas_object_image_save(pEvasObject, filename, NULL, "quality=100 compress=9"))
@@ -1550,11 +1550,11 @@ _VeDebug::DumpVeImage(_VisualElementImpl* pElement, const char* pathPrefix)
        Tizen::Base::String name = pElement->GetName();
        if (name.GetLength() > 0)
        {
-               sprintf(filename, "%sVE_%d_%ls_%08x.png", pathPrefix, count++, pElement->GetName().GetPointer(), (unsigned int)pElement->GetPresentation());
+               snprintf(filename, sizeof(filename), "%sVE_%d_%ls_%08x.png", pathPrefix, count++, pElement->GetName().GetPointer(), (unsigned int)pElement->GetPresentation());
        }
        else
        {
-               sprintf(filename, "%sVE_%d_%08x.png", pathPrefix, count++, (unsigned int)pElement->GetPresentation());
+               snprintf(filename, sizeof(filename), "%sVE_%d_%08x.png", pathPrefix, count++, (unsigned int)pElement->GetPresentation());
        }
 
        VisualElementSurface* pSurface = pElement->__pSharedData->pNativeNode->GetSurface();
index c3ab54b..86c9bf7 100644 (file)
@@ -354,6 +354,40 @@ _FrameAnimatorImpl::ChangeCurrentForm(Form* pCurrentForm, Form& nextForm)
        __frameAnimatorStatus = ANIMATOR_STATUS_PLAYING;
        return E_SUCCESS;
 }
+float
+_FrameAnimatorImpl::CalculateChangedAngle()
+{
+       float angle = 0.0f;
+       int diff = __pNextForm->GetOrientationStatus() - __pCurrentForm->GetOrientationStatus() ;
+
+       switch(diff)
+       {
+               case 1:
+               case -1:
+               {
+                       angle = 90.0f;
+                       break;
+               }
+               case 2:
+               case -2:
+               {
+                       angle = 180.0f;
+                       break;
+               }
+               case 3:
+               case -3:
+               {
+                       angle = 270.0f;
+                       break;
+               }
+       }
+
+       if(diff > 0)
+       {
+               angle *= -1;
+       }
+       return angle;
+}
 
 result
 _FrameAnimatorImpl::SetAnimations(void)
@@ -363,106 +397,196 @@ _FrameAnimatorImpl::SetAnimations(void)
        String transId = "";
        transId.Append(__transactionId);
 
+       float angle = 0.0f;
+
        switch (__animationEffectType)
        {
        case FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_TRANSLATE_LEFT:
        {
+               angle = CalculateChangedAngle();
+
                Dimension currentSize = __pCurrentForm->GetSize();
                Dimension nextSize = __pNextForm->GetSize();
 
                Point currFormStartPoint = Point(0, 0);
-               Point currFormEndPoint = Point((-1 * (currentSize.width)), 0);
+               Point currFormEndPoint = Point((-1 * (nextSize.width)), 0);
 
-               Point nextFormStartPoint = Point((currentSize.width), 0);
+               Point nextFormStartPoint = Point((nextSize.width), 0);
                Point nextFormEndPoint = Point(0, 0);
 
-               if (currentSize.width > nextSize.width)
+               if (unlikely(angle != 0.0f))
                {
-                       currFormStartPoint = Point((-1 * (currentSize.width - nextSize.width)), 0);
-                       nextFormStartPoint = Point((nextSize.width), 0);
+                       if(unlikely(currentSize.width < nextSize.width)) // to goward.
+                       {
+                               currFormStartPoint = Point((currentSize.height - currentSize.width)/2,-(currentSize.height - currentSize.width)/2);
+                               currFormEndPoint = Point((currentSize.height - currentSize.width)/2 -nextSize.width, -(currentSize.height - currentSize.width)/2);
+                       }
+                       else if(unlikely(currentSize.width > nextSize.width)) // to backward.
+                       {
+                               currFormStartPoint = Point(-(currentSize.width - currentSize.height)/2, (currentSize.width - currentSize.height)/2);
+                               currFormEndPoint = Point(-(currentSize.width - currentSize.height)/2 -nextSize.width, (currentSize.width - currentSize.height)/2);
+                       }
                }
 
-               r = StartLayerAnimation(__pCurrentFormVisualElement, ANIMATION_TARGET_POSITION, Variant(currFormStartPoint), Variant(currFormEndPoint), transId + (L"CurrentFormLeftTranslatePosition"));
+               r = StartLayerAnimation(__pCurrentFormVisualElement, ANIMATION_TARGET_POSITION, Variant(currFormStartPoint), Variant(currFormEndPoint), transId + (L"CurrentFormLeftTranslatePosition"), angle);
         SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
 
-               r = StartLayerAnimation(__pNextFormVisualElement, ANIMATION_TARGET_POSITION, Variant(nextFormStartPoint), Variant(nextFormEndPoint), transId + (L"NextFormLeftTranslatePosition"));
+               r = StartLayerAnimation(__pNextFormVisualElement, ANIMATION_TARGET_POSITION, Variant(nextFormStartPoint), Variant(nextFormEndPoint), transId + (L"NextFormLeftTranslatePosition"), 0.0f);
                SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
        }
        break;
 
        case FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_TRANSLATE_RIGHT:
        {
+               angle = CalculateChangedAngle();
+
                Dimension currentSize = __pCurrentForm->GetSize();
                Dimension nextSize = __pNextForm->GetSize();
 
                Point currFormStartPoint = Point(0, 0);
-               Point currFormEndPoint = Point((nextSize.width), 0);
+               Point currFormEndPoint = Point(nextSize.width, 0);
 
-               Point nextFormStartPoint = Point((-1 * (nextSize.width)), 0);
+               Point nextFormStartPoint = Point(-1 * (nextSize.width), 0);
                Point nextFormEndPoint = Point(0, 0);
 
-               if (currentSize.width < nextSize.width)
+               if (unlikely(angle != 0.0f))
                {
-                       currFormStartPoint = Point((nextSize.width - currentSize.width), 0);
-                       nextFormStartPoint = Point((-1 * (currentSize.width)), 0);
+                       if(unlikely(currentSize.width < nextSize.width)) // to goward.
+                       {
+                               currFormStartPoint = Point((currentSize.height - currentSize.width)/2, -(currentSize.height - currentSize.width)/2);
+                               currFormEndPoint = Point((currentSize.height - currentSize.width)/2 + nextSize.width, -(currentSize.height - currentSize.width)/2);
+                       }
+                       else if(unlikely(currentSize.width > nextSize.width)) // to backward.
+                       {
+                               currFormStartPoint = Point(-(currentSize.width - currentSize.height)/2, (currentSize.width - currentSize.height)/2);//
+                               currFormEndPoint = Point(-(currentSize.width - currentSize.height)/2 + nextSize.width, (currentSize.width - currentSize.height)/2);
+                       }
                }
 
-               r = StartLayerAnimation(__pCurrentFormVisualElement, ANIMATION_TARGET_POSITION, Variant(currFormStartPoint), Variant(currFormEndPoint), transId + (L"CurrentFormRightTranslatePosition"));
+               r = StartLayerAnimation(__pCurrentFormVisualElement, ANIMATION_TARGET_POSITION, Variant(currFormStartPoint), Variant(currFormEndPoint), transId + (L"CurrentFormRightTranslatePosition"), angle);
                SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list");
 
-               r = StartLayerAnimation(__pNextFormVisualElement, ANIMATION_TARGET_POSITION, Variant(nextFormStartPoint), Variant(nextFormEndPoint), transId + (L"NextFormRightTranslatePosition"));
+               r = StartLayerAnimation(__pNextFormVisualElement, ANIMATION_TARGET_POSITION, Variant(nextFormStartPoint), Variant(nextFormEndPoint), transId + (L"NextFormRightTranslatePosition"), 0.0f);
                SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list");
        }
        break;
 
        case FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_FADE_IN_OUT:
        {
+               angle = CalculateChangedAngle();
+
                r = PrepareCapture();
                SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to capture.");
 
-//             r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(1.0f), Variant(0.0f), transId + (L"CurrentFormFadeOutAlpha"));
-//             SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation to play list.");
+               Dimension currentSize = __pCurrentForm->GetSize();
+               Dimension nextSize = __pNextForm->GetSize();
+
+               FloatRectangle tempBounds = __pCurrentFormVisualElement->GetBounds();
+
+               if (unlikely(angle != 0.0f))
+               {
+                       if(unlikely(currentSize.width < nextSize.width)) // to goward.
+                       {
+                               tempBounds = FloatRectangle((currentSize.height - currentSize.width)/2, -(currentSize.height - currentSize.width)/2, currentSize.width, currentSize.height);
+                       }
+                       else if(unlikely(currentSize.width > nextSize.width)) // to backward.
+                       {
+                               tempBounds = FloatRectangle(-(currentSize.width - currentSize.height)/2, (currentSize.width - currentSize.height)/2, currentSize.width, currentSize.height);//
+                       }
+                       __pCurrentCaptureVisualElement->SetBounds(tempBounds);
+
+                       VisualElementPropertyAnimation* pAnimation = new (std::nothrow) VisualElementPropertyAnimation();
+                       pAnimation->SetPropertyName(L"transform.rotation.z");
+                       pAnimation->SetStartValue(Variant(angle));
+                       pAnimation->SetEndValue(Variant(angle));
+                       pAnimation->SetDuration(__duration);
+                       pAnimation->SetEndValueApplied(false);
+                       __pCurrentCaptureVisualElement->AddAnimation(L"transform", *pAnimation);
+                       delete pAnimation;
+               }
+
+//             r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(1.0f), Variant(0.0f), transId + (L"CurrentFormFadeOutAlpha"), angle);
+//             SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
 
-               r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(0.0f), Variant(1.0f), transId + (L"NextFormFadeInAlpha"));
+               r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(0.0f), Variant(1.0f), transId + (L"NextFormFadeInAlpha"), 0.0f);
                SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
        }
        break;
 
        case FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_ZOOM_IN:
        {
+               angle = CalculateChangedAngle();
+
+               r = PrepareCapture();
+               SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to capture.");
+
                Dimension currentSize = __pCurrentForm->GetSize();
+               Dimension nextSize = __pNextForm->GetSize();
+
+               FloatRectangle tempBounds = __pCurrentFormVisualElement->GetBounds();
 
                Dimension startSize = Dimension((currentSize.width * 80) / 100, (currentSize.height * 80) / 100);
                Dimension endSize = currentSize;
 
-               r = StartLayerAnimation(__pCurrentFormVisualElement, ANIMATION_TARGET_ALPHA, Variant(1.0f), Variant(0.0f), transId + (L"CurrentFormZoomInAlpha"));
+               if (unlikely(angle != 0.0f))
+               {
+                       if(unlikely(currentSize.width < nextSize.width)) // to goward.
+                       {
+                               tempBounds = FloatRectangle((currentSize.height - currentSize.width)/2, -(currentSize.height - currentSize.width)/2, currentSize.width, currentSize.height);
+                       }
+                       else if(unlikely(currentSize.width > nextSize.width)) // to backward.
+                       {
+                               tempBounds = FloatRectangle(-(currentSize.width - currentSize.height)/2, (currentSize.width - currentSize.height)/2, currentSize.width, currentSize.height);//
+                       }
+                       __pCurrentCaptureVisualElement->SetBounds(tempBounds);
+               }
+
+               r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(1.0f), Variant(0.0f), transId + (L"CurrentFormZoomInAlpha"), angle);
                SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
 
-               r = StartLayerAnimation(__pNextFormVisualElement, ANIMATION_TARGET_ALPHA, Variant(0.0f), Variant(1.0f), transId + (L"NextFormZoomInAlpha"));
+               r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(0.0f), Variant(1.0f), transId + (L"NextFormZoomInAlpha"), 0.0f);
                SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
 
-               r = StartLayerAnimation(__pNextFormVisualElement, ANIMATION_TARGET_SIZE, Variant(startSize), Variant(endSize), transId + (L"NextFormZoomInSize"));
+               r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_SIZE, Variant(startSize), Variant(endSize), transId + (L"NextFormZoomInSize"), 0.0f);
                SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
        }
        break;
 
        case FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_ZOOM_OUT:
        {
+               angle = CalculateChangedAngle();
+
                r = PrepareCapture();
                SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to capture.");
 
                Dimension currentSize = __pCurrentForm->GetSize();
+               Dimension nextSize = __pNextForm->GetSize();
+
+               FloatRectangle tempBounds = __pCurrentFormVisualElement->GetBounds();
 
                Dimension startSize = currentSize;
                Dimension endSize = Dimension((currentSize.width * 80) / 100, (currentSize.height * 80) / 100);
 
-               r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_SIZE, Variant(startSize), Variant(endSize), transId + (L"CurrentFormZoomOutSize"));
+               if (unlikely(angle != 0.0f))
+               {
+                       if(unlikely(currentSize.width < nextSize.width)) // to goward.
+                       {
+                               tempBounds = FloatRectangle((currentSize.height - currentSize.width)/2, -(currentSize.height - currentSize.width)/2, currentSize.width, currentSize.height);
+                       }
+                       else if(unlikely(currentSize.width > nextSize.width)) // to backward.
+                       {
+                               tempBounds = FloatRectangle(-(currentSize.width - currentSize.height)/2, (currentSize.width - currentSize.height)/2, currentSize.width, currentSize.height);//
+                       }
+                       __pCurrentCaptureVisualElement->SetBounds(tempBounds);
+               }
+
+               r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_SIZE, Variant(startSize), Variant(endSize), transId + (L"CurrentFormZoomOutSize"), angle);
                SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
 
-               r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(1.0f), Variant(0.0f), transId + (L"CurrentFormZoomOutAlpha"));
+               r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(1.0f), Variant(0.0f), transId + (L"CurrentFormZoomOutAlpha"), 0.0f);
                SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
 
-               r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(0.0f), Variant(1.0f), transId + (L"NextFormZoomOutAlpha"));
+               r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(0.0f), Variant(1.0f), transId + (L"NextFormZoomOutAlpha"), 0.0f);
                SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
        }
        break;
@@ -470,49 +594,88 @@ _FrameAnimatorImpl::SetAnimations(void)
 
        case FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_DEPTH_IN:
        {
+               angle = CalculateChangedAngle();
+
                r = PrepareCapture();
                SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to capture.");
 
                Dimension currentSize = __pCurrentForm->GetSize();
+               Dimension nextSize = __pNextForm->GetSize();
+
+               FloatRectangle tempBounds = __pCurrentFormVisualElement->GetBounds();
 
                Dimension currFormStartSize = currentSize;
                Dimension currFormEndSize = Dimension((currentSize.width * 80) / 100, (currentSize.height * 80) / 100);
                Dimension nextFormStartSize = Dimension((currentSize.width * 120) / 100, (currentSize.height * 120) / 100);
                Dimension nextFormEndSize = currentSize;
 
-               r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(1.0f), Variant(0.0f), transId + (L"CurrentFormDepthInAplha"));
+               if (unlikely(angle != 0.0f))
+               {
+                       if(unlikely(currentSize.width < nextSize.width)) // to goward.
+                       {
+                               tempBounds = FloatRectangle((currentSize.height - currentSize.width)/2, -(currentSize.height - currentSize.width)/2, currentSize.width, currentSize.height);
+                       }
+                       else if(unlikely(currentSize.width > nextSize.width)) // to backward.
+                       {
+                               tempBounds = FloatRectangle(-(currentSize.width - currentSize.height)/2, (currentSize.width - currentSize.height)/2, currentSize.width, currentSize.height);//
+                       }
+                       __pCurrentCaptureVisualElement->SetBounds(tempBounds);
+               }
+
+               r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(1.0f), Variant(0.0f), transId + (L"CurrentFormDepthInAplha"), 0.0f);
                SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
 
-               r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_SIZE, Variant(currFormStartSize), Variant(currFormEndSize), transId + (L"CurrentFormDepthInSize"));
+               r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_SIZE, Variant(currFormStartSize), Variant(currFormEndSize), transId + (L"CurrentFormDepthInSize"), angle);
                SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
 
-               r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(0.0f), Variant(1.0f), transId + (L"NextFormDepthInAplha"));
+               r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(0.0f), Variant(1.0f), transId + (L"NextFormDepthInAplha"), 0.0f);
                SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
 
-               r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_SIZE, Variant(nextFormStartSize), Variant(nextFormEndSize), transId + (L"NextFormDepthInSize"));
+               r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_SIZE, Variant(nextFormStartSize), Variant(nextFormEndSize), transId + (L"NextFormDepthInSize"), 0.0f);
                SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
        }
        break;
 
        case FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_DEPTH_OUT:
        {
+               angle = CalculateChangedAngle();
+
+               r = PrepareCapture();
+               SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to capture.");
+
                Dimension currentSize = __pCurrentForm->GetSize();
+               Dimension nextSize = __pNextForm->GetSize();
+
+               FloatRectangle tempBounds = __pCurrentFormVisualElement->GetBounds();
 
                Dimension currFormStartSize = currentSize;
                Dimension currFormEndSize = Dimension((currentSize.width * 120) / 100, (currentSize.height * 120) / 100);
                Dimension nextFormStartSize = Dimension((currentSize.width * 80) / 100, (currentSize.height * 80) / 100);
                Dimension nextFormEndSize = currentSize;
 
-               r = StartLayerAnimation(__pCurrentFormVisualElement, ANIMATION_TARGET_ALPHA, Variant(1.0f), Variant(0.0f), transId + (L"CurrentFormDepthOutAlpha"));
+               if (unlikely(angle != 0.0f))
+               {
+                       if(unlikely(currentSize.width < nextSize.width)) // to goward.
+                       {
+                               tempBounds = FloatRectangle((currentSize.height - currentSize.width)/2, -(currentSize.height - currentSize.width)/2, currentSize.width, currentSize.height);
+                       }
+                       else if(unlikely(currentSize.width > nextSize.width)) // to backward.
+                       {
+                               tempBounds = FloatRectangle(-(currentSize.width - currentSize.height)/2, (currentSize.width - currentSize.height)/2, currentSize.width, currentSize.height);//
+                       }
+                       __pCurrentCaptureVisualElement->SetBounds(tempBounds);
+               }
+
+               r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(1.0f), Variant(0.0f), transId + (L"CurrentFormDepthOutAlpha"), 0.0f);
                SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
 
-               r = StartLayerAnimation(__pNextFormVisualElement, ANIMATION_TARGET_ALPHA, Variant(0.0f), Variant(1.0f), transId + (L"NextFormDepthOutAlpha"));
+               r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_ALPHA, Variant(0.0f), Variant(1.0f), transId + (L"NextFormDepthOutAlpha"), 0.0f);
                SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
 
-               r = StartLayerAnimation(__pCurrentFormVisualElement, ANIMATION_TARGET_SIZE, Variant(currFormStartSize), Variant(currFormEndSize), transId + (L"CurrentFormDepthOutSize"));
+               r = StartLayerAnimation(__pCurrentCaptureVisualElement, ANIMATION_TARGET_SIZE, Variant(currFormStartSize), Variant(currFormEndSize), transId + (L"CurrentFormDepthOutSize"), angle);
                SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
 
-               r = StartLayerAnimation(__pNextFormVisualElement, ANIMATION_TARGET_SIZE, Variant(nextFormStartSize), Variant(nextFormEndSize), transId + (L"NextFormDepthOutSize"));
+               r = StartLayerAnimation(__pNextCaptureVisualElement, ANIMATION_TARGET_SIZE, Variant(nextFormStartSize), Variant(nextFormEndSize), transId + (L"NextFormDepthOutSize"), 0.0f);
                SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add animation to play list.");
        }
        break;
@@ -528,10 +691,20 @@ _FrameAnimatorImpl::SetAnimations(void)
 result
 _FrameAnimatorImpl::PrepareCapture(void)
 {
+       float bgsize = 0.0f;
        VisualElement* pParentVisualElement = __pNextFormVisualElement->GetParent();
        SysTryReturnResult(NID_UI_ANIM, (pParentVisualElement), E_SYSTEM, "A system error has been occurred. Failed to get visual element's parent.");
 
        pParentVisualElement->InsertChild(*__pBgElement, __pNextFormVisualElement, true);
+       if(__pCurrentFormVisualElement->GetBounds().width > __pCurrentFormVisualElement->GetBounds().height)
+       {
+               bgsize = __pCurrentFormVisualElement->GetBounds().width;
+       }
+       else
+       {
+               bgsize = __pCurrentFormVisualElement->GetBounds().height;
+       }
+       __pBgElement->SetBounds(FloatRectangle(0.0f, 0.0f, bgsize, bgsize));
 
        // remove dummy surface
        __pCurrentCaptureVisualElement->SetSurface(null);
@@ -576,14 +749,14 @@ _FrameAnimatorImpl::PrepareCapture(void)
        return E_SUCCESS;
 }
 
-
 result
-_FrameAnimatorImpl::StartLayerAnimation(VisualElement* pLayer, AnimationTargetType animTarget, Variant startValue, Variant endValue, String animName)
+_FrameAnimatorImpl::StartLayerAnimation(VisualElement* pLayer, AnimationTargetType animTarget, Variant startValue, Variant endValue, String animName, float angle)
 {
        result r = E_SUCCESS;
 
        Dimension startSize, endSize;
        Point startPoint, endPoint;
+       FloatRectangle tempBounds;
 
        VisualElementPropertyAnimation* propAnimation = null;
        propAnimation = new (std::nothrow) VisualElementPropertyAnimation();
@@ -668,15 +841,20 @@ _FrameAnimatorImpl::StartLayerAnimation(VisualElement* pLayer, AnimationTargetTy
                        scaleY = (float) startSize.height / (float) rect.height;
 
                        Tizen::Graphics::FloatMatrix4 startMatrix = Tizen::Graphics::FloatMatrix4();
-                       //startMatrix.SetAsIdentity(); // default value is identity matrix
+                       Tizen::Graphics::FloatMatrix4 endMatrix = Tizen::Graphics::FloatMatrix4();
+
+                       if(unlikely(angle != 0.0f))             // There is a defferece between currentform and nextform.
+                       {
+                               _MatrixUtilRotate(startMatrix, angle, 0.0f, 0.0f, 1.0f);
+                               _MatrixUtilRotate(endMatrix, angle, 0.0f, 0.0f, 1.0f);
+                       }
+
                        _MatrixUtilScale(startMatrix, scaleX, scaleY, scaleZ);
                        _MatrixUtilAtAnchor(startMatrix, anchorX, anchorY, anchorZ);
 
                        scaleX = (float) endSize.width / (float) rect.width;
                        scaleY = (float) endSize.height / (float) rect.height;
 
-                       Tizen::Graphics::FloatMatrix4 endMatrix = Tizen::Graphics::FloatMatrix4();
-                       //endMatrix.SetAsIdentity(); // default value is identity matrix
                        _MatrixUtilScale(endMatrix, scaleX, scaleY, scaleZ);
                        _MatrixUtilAtAnchor(endMatrix, anchorX, anchorY, anchorZ);
 
@@ -687,6 +865,18 @@ _FrameAnimatorImpl::StartLayerAnimation(VisualElement* pLayer, AnimationTargetTy
 
                case ANIMATION_TARGET_POSITION:
                {
+                       if(angle != 0.0f)
+                       {
+                               VisualElementPropertyAnimation* pAnimation = new (std::nothrow) VisualElementPropertyAnimation();
+                               pAnimation->SetPropertyName(L"transform.rotation.z");
+                               pAnimation->SetStartValue(Variant(angle));
+                               pAnimation->SetEndValue(Variant(angle));
+                               pAnimation->SetDuration(__duration);
+                               pAnimation->SetEndValueApplied(false);
+                               pLayer->AddAnimation(L"transform", *pAnimation);
+                               delete pAnimation;
+                       }
+
                        pVePropType = VePropBounds;
 
                        FloatRectangle rect;
@@ -704,6 +894,17 @@ _FrameAnimatorImpl::StartLayerAnimation(VisualElement* pLayer, AnimationTargetTy
 
                case ANIMATION_TARGET_ALPHA:
                {
+                       if(angle != 0.0f)
+                       {
+                                       VisualElementPropertyAnimation* pAnimation = new (std::nothrow) VisualElementPropertyAnimation();
+                                       pAnimation->SetPropertyName(L"transform.rotation.z");
+                                       pAnimation->SetStartValue(Variant(angle));
+                                       pAnimation->SetEndValue(Variant(angle));
+                                       pAnimation->SetDuration(__duration);
+                                       pAnimation->SetEndValueApplied(false);
+                                       pLayer->AddAnimation(L"transform", *pAnimation);
+                                       delete pAnimation;
+                       }
                        pVePropType = VePropOpacity;
                        propAnimation->SetStartValue(startValue);
                        propAnimation->SetEndValue(endValue);
index 43f156f..5909cbd 100644 (file)
@@ -132,7 +132,7 @@ private:
 
        result Dispose(void);
 
-       result StartLayerAnimation(VisualElement* pLayer, AnimationTargetType animTarget, Variant startValue, Variant endValue, Tizen::Base::String animName);
+       result StartLayerAnimation(VisualElement* pLayer, AnimationTargetType animTarget, Variant startValue, Variant endValue, Tizen::Base::String animName, float angle);
        result AddFrameActiveAnimation(VisualElement* _pVisualElement, FrameAnimatorFormTransitionAnimation _formAnimation,
                        VisualElementPropertyAnimation* _pPropertyAnimation, IVisualElementAnimationTimingFunction* _pTimingFunction, Tizen::Base::String _animName);
 
@@ -144,6 +144,7 @@ private:
 
        result ChangeCurrentForm(Tizen::Ui::Controls::Form* pCurrentForm, Tizen::Ui::Controls::Form& nextForm);
 
+       float CalculateChangedAngle(void);
        result SetAnimations(void);
 
        result PrepareCapture(void);
index 59b2013..a31d7d3 100644 (file)
@@ -42,8 +42,6 @@ using namespace Tizen::Graphics::_Text;
 
 namespace {
 static const float TOUCH_PRESS_THRESHOLD_INSENSITIVE = 0.16f;
-static const int CONTEXT_MENU_LIST_ELEMENT_TEXT = 0;
-static const int CONTEXT_MENU_LIST_ELEMENT_BITMAP = 1;
 }
 
 namespace Tizen { namespace Ui { namespace Controls
index b0906d9..6c20bbe 100644 (file)
@@ -883,7 +883,9 @@ _EditCopyPasteHandler::AdjustBounds(void)
                }
                rect.x = cursorRect.x - __pHandlerBitmap->GetWidthF()/2.0f;
                rect.y = cursorRect.y + cursorRect.height;
-               checkPoint = FloatPoint(cursorRect.x , cursorRect.y + cursorRect.height);
+
+               FloatRectangle alignedCursorRect = CoordinateSystem::AlignToDevice(cursorRect);
+               checkPoint = FloatPoint(cursorRect.x, alignedCursorRect.y + alignedCursorRect.height);
                if (__handlerDirection == HANDLER_DIRECTION_REVERSE_2)
                {
                        rect.y -= (cursorRect.height + __pHandlerBitmap->GetHeightF());
@@ -903,7 +905,8 @@ _EditCopyPasteHandler::AdjustBounds(void)
                rect.x = cursorRect.x;
                rect.y = cursorRect.y + cursorRect.height;
 
-               checkPoint = FloatPoint(cursorRect.x, cursorRect.y + cursorRect.height);
+               FloatRectangle alignedCursorRect = CoordinateSystem::AlignToDevice(cursorRect);
+               checkPoint = FloatPoint(cursorRect.x, alignedCursorRect.y + alignedCursorRect.height);
 
                if (__leftHandler)
                {
@@ -2332,6 +2335,8 @@ _EditCopyPasteManager::Show(void)
                __pHandle[HANDLER_TYPE_RIGHT]->CheckReverseStatus();
                __pHandle[HANDLER_TYPE_LEFT]->Invalidate();
                __pHandle[HANDLER_TYPE_RIGHT]->Invalidate();
+               __pHandle[HANDLER_TYPE_LEFT]->MoveCopyPasteMagnifier();
+               __pHandle[HANDLER_TYPE_RIGHT]->MoveCopyPasteMagnifier();
                __pEditPresenter->DrawText();
        }
 
index b87a0bb..fc4e805 100644 (file)
@@ -945,7 +945,11 @@ _EditDatePresenter::SetFocusedElement(void)
        if (__isEnterKeyPressed)
        {
                __isEnterKeyPressed = false;
-               __isFocused = true;
+
+               if (__pEditDate->IsFocusModeStateEnabled())
+               {
+                       __isFocused = true;
+               }
        }
        int localeDateFormat =  dateTimeUtils.GetLocaleDateFormat();
        if (__focusId == DATETIME_ID_NONE)
index d442f02..55adb37 100755 (executable)
@@ -90,18 +90,12 @@ namespace Tizen { namespace Ui { namespace Controls
 const int EDIT_PASSWORD_TIMER_PERIOD = 1000;
 const int EDIT_CURSOR_TIMER_PERIOD = 600;
 const int MAX_LINE_NUMBER = 100;
-const int MAX_FLEXIBLE_HEIGHT_VERTICAL_MODE = 4000;
-const int MAX_FLEXIBLE_HEIGHT_HORIZONTAL_MODE = 2500;
 const int EDIT_FLICK_SCROLL_TIMER_INTERVAL = 10;
 const int EDIT_FLICK_SCROLL_MOVE_AMOUNT_MULTIPLIER = 2;
 const float DIRECTION_DECISION_RATIO = 1.3f;
-const float HORIZONTAL_DECISION_RATIO = 1.5f;
 const float MOVE_SKIP_DECISION_RANGE = 5.0f;
 const int TITLE_SLIDING_TIME = 800;
 
-const int LANGUAGE_CODE_START = 0;
-const int LANGUAGE_CODE_MAX = 2;
-
 bool _EditPresenter::__isKeypadExist = false;
 bool _EditPresenter::__isClipboardExist = false;
 float _EditPresenter::__initialParentHeight = 0.0f;
@@ -560,6 +554,7 @@ void
 _EditPresenter::OnTextCommitted(const String& commitText)
 {
        bool isTextComposingFinished = false;
+       bool isDeletedBlockTextByEnter = false;
        char enterText1[2] = {'\n', };
        char enterText2[2] = {'\r', };
 
@@ -577,7 +572,10 @@ _EditPresenter::OnTextCommitted(const String& commitText)
                        int end = 0;
                        GetBlockRange(start, end);
                        __isFlexibleHeightFrozen = true;
-                       DeleteText(start, end);
+                       if (DeleteText(start, end) == E_SUCCESS)
+                       {
+                               isDeletedBlockTextByEnter = true;
+                       }
                        __isFlexibleHeightFrozen = false;
                        ReleaseTextBlock();
                }
@@ -627,6 +625,10 @@ _EditPresenter::OnTextCommitted(const String& commitText)
                if(__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE)
                {
                        DrawText();
+                       if (isDeletedBlockTextByEnter)
+                       {
+                               __pEdit->SendTextEvent(CORE_TEXT_EVENT_CHANGED);
+                       }
                        return;
                }
        }
index 273bfed..46a2e7c 100644 (file)
@@ -1115,7 +1115,11 @@ _EditTimePresenter::SetFocusedElement()
        if (__isEnterKeyPressed)
        {
                __isEnterKeyPressed = false;
-               __isFocused = true;
+
+               if (__pEditTime->IsFocusModeStateEnabled())
+               {
+                       __isFocused = true;
+               }
        }
        if (__focusId == DATETIME_ID_NONE || __focusId == DATETIME_ID_AMPM)
        {
index 25cc92f..a5e0924 100644 (file)
@@ -809,6 +809,11 @@ _Frame::OnBoundsChanging(const FloatRectangle& bounds)
                return E_SUCCESS;
        }
 
+       if (__restore == true)
+       {
+               return E_SUCCESS;
+       }
+
        _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
        SysTryReturn(NID_UI, pEcoreEvas, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
        bool changePosition = IsChangedPositionByUser();
index b7b9d2c..17ff36f 100644 (file)
@@ -51,7 +51,6 @@ const int MIN_ANIMATION_DURATION = 300;
 const int MAX_ANIMATION_DURATION = 20000;
 const int DEFAULT_VIEW_DURATION = 10;
 const int MIN_VIEW_DURATION = 10;
-const int FIRST_SLIDE_SHOW_DURATION = 1;
 
 const int PARTIAL_CANVAS = 0;
 } // unnamed namespace
index b849d14..1033848 100644 (file)
@@ -1160,16 +1160,26 @@ _GroupedListViewImpl::RefreshList(int groupIndex, int itemIndex, ListRefreshType
                        memset(&itemStatus, 0, sizeof(_ListViewItemStatus));
                        bool needChangeEventTarget = false;
                        bool itemFocused = false;
+                       bool annexFocused = false;
+                       int focusedGroupedIndex = -1;
+                       int focusedItemIndex = -1;
 
                        if (pListViewItem != null && pListViewItem->IsItemSelected())
                        {
                                needChangeEventTarget = true;
                        }
 
-                       if (pListViewItem != null && pListViewItem->GetRootWindow() && pListViewItem->IsFocusModeStateEnabled()
-                                       && pListViewItem->IsFocused() && pListViewItem->GetRootWindow()->IsActivated())
+                       GetCore().GetFocusedItemIndex(focusedGroupedIndex, focusedItemIndex);
+                       if (focusedGroupedIndex == groupIndex && focusedItemIndex == itemIndex)
                        {
-                               itemFocused = true;
+                               if (GetCore().IsAnnexFocused())
+                               {
+                                       annexFocused = true;
+                               }
+                               else
+                               {
+                                       itemFocused = true;
+                               }
                        }
 
                        if (needChangeEventTarget && (pListViewItem != null))
@@ -1202,11 +1212,21 @@ _GroupedListViewImpl::RefreshList(int groupIndex, int itemIndex, ListRefreshType
                                _TouchManager::GetInstance()->SetChangedTouchableTarget(pTarget);
                        }
 
-                       if (itemFocused && pListViewItem && pListViewItem->IsFocusable()
-                                       && pListViewItem->GetEnableState() && pListViewItem->GetVisibleState())
+                       if (pListViewItem && pListViewItem->IsFocusable()
+                                       && pListViewItem->GetEnableState() && pListViewItem->GetVisibleState()
+                                       && pListViewItem->GetRootWindow() && pListViewItem->GetRootWindow()->IsActivated())
                        {
-                               pListViewItem->SetFocused(true);
-                               pListViewItem->DrawFocus();
+                               if (itemFocused)
+                               {
+                                       pListViewItem->SetFocused(true);
+                                       pListViewItem->DrawFocus();
+                                       itemFocused = false;
+                               }
+                               else if (annexFocused)
+                               {
+                                       pListViewItem->DrawAnnexFocus();
+                                       annexFocused = false;
+                               }
                        }
                }
        }
index d6d2148..738a354 100644 (file)
@@ -57,9 +57,6 @@ const int ANIMATION_DURATION = 200;
 
 const int MSG_DOMAIN_CONTROL_INDICATOR = 0x10001;
 const int MSG_ID_INDICATOR_REPEAT_EVENT = 0x10002;
-const int MSG_ID_INDICATOR_ROTATION = 0x10003;
-const int MSG_ID_INDICATOR_OPACITY = 0X1004;
-const int MSG_ID_INDICATOR_TYPE = 0X1005;
 const int MSG_ID_INDICATOR_START_ANIMATION = 0X10006;
 }
 
@@ -72,13 +69,6 @@ struct _IndicatorDataAnimation
    double duration;
 };
 
-enum
-{
-   _INDICATOR_TYPE_UNKNOWN, /**< Unknown indicator type mode */
-   _INDICATOR_TYPE_1, /**< Type 0 the the indicator */
-   _INDICATOR_TYPE_2, /**< Type 1 the indicator */
-} _IndicatorType;
-
 _Indicator*
 _Indicator::CreateIndicator(void)
 {
index c04b57a..45d3df7 100644 (file)
@@ -54,8 +54,7 @@ using namespace Tizen::System;
 namespace Tizen { namespace Ui { namespace Controls
 {
 const int COMMAND_DONE_BUTTON_ID = 100;
-const int COMMAND_CANCEL_BUTTON_ID = 101;
-const int FOOTER_BACK_BUTTON_ID = 102;
+const int FOOTER_BACK_BUTTON_ID = 101;
 
 IMPLEMENT_PROPERTY(_Keypad);
 
index 9962e4c..432a381 100644 (file)
@@ -1127,16 +1127,26 @@ _ListViewImpl::RefreshList(int index, ListRefreshType type)
                        memset(&itemStatus, 0, sizeof(_ListViewItemStatus));
                        bool needChangeEventTarget = false;
                        bool itemFocused = false;
+                       bool annexFocused = false;
+                       int focusedGroupedIndex = -1;
+                       int focusedItemIndex = -1;
 
                        if (pListViewItem != null && pListViewItem->IsItemSelected())
                        {
                                needChangeEventTarget = true;
                        }
 
-                       if (pListViewItem != null && pListViewItem->IsFocusModeStateEnabled()
-                                       && pListViewItem->IsFocused() && pListViewItem->GetRootWindow() && pListViewItem->GetRootWindow()->IsActivated())
+                       GetCore().GetFocusedItemIndex(focusedGroupedIndex, focusedItemIndex);
+                       if (focusedGroupedIndex == 0 && focusedItemIndex == index)
                        {
-                               itemFocused = true;
+                               if (GetCore().IsAnnexFocused())
+                               {
+                                       annexFocused = true;
+                               }
+                               else
+                               {
+                                       itemFocused = true;
+                               }
                        }
 
                        if (needChangeEventTarget && (pListViewItem != null))
@@ -1169,11 +1179,21 @@ _ListViewImpl::RefreshList(int index, ListRefreshType type)
                                _TouchManager::GetInstance()->SetChangedTouchableTarget(pTarget);
                        }
 
-                       if (itemFocused && pListViewItem && pListViewItem->IsFocusable()
-                                       && pListViewItem->GetEnableState() && pListViewItem->GetVisibleState())
+                       if (pListViewItem && pListViewItem->IsFocusable()
+                                       && pListViewItem->GetEnableState() && pListViewItem->GetVisibleState()
+                                       && pListViewItem->GetRootWindow() && pListViewItem->GetRootWindow()->IsActivated())
                        {
-                               pListViewItem->SetFocused(true);
-                               pListViewItem->DrawFocus();
+                               if (itemFocused)
+                               {
+                                       pListViewItem->SetFocused(true);
+                                       pListViewItem->DrawFocus();
+                                       itemFocused = false;
+                               }
+                               else if (annexFocused)
+                               {
+                                       pListViewItem->DrawAnnexFocus();
+                                       annexFocused = false;
+                               }
                        }
                }
                else
index b10f1a3..0a55511 100644 (file)
@@ -67,6 +67,7 @@ _OptionMenu::_OptionMenu(void)
        , __selectedActionID(-1)
        , __pBoundsTimingFunction(null)
        , __pOpacityTimingFunction(null)
+       , __isAnimating(false)
        , __windowRect(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f))
        , __bodyRect(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f))
        , __itemRect(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f))
@@ -98,6 +99,11 @@ _OptionMenu::~_OptionMenu(void)
                GetOwner()->UnlockInputEvent();
        }
 
+       if (__isAnimating && GetVisualElement())
+       {
+               GetVisualElement()->RemoveAllAnimations();
+       }
+
        __pCurrentFrame = null;
 
        if (__pScrollPanel != null)
@@ -358,6 +364,11 @@ _OptionMenu::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
 void
 _OptionMenu::OnVisualElementAnimationFinished(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, bool completedNormally)
 {
+       if (keyName == L"ClosingOpacityAnimation" || keyName == L"OpeningOpacityAnimation")
+       {
+               __isAnimating = false;
+       }
+
        if (keyName == L"ClosingOpacityAnimation")
        {
                SetVisibleState(false);
@@ -1369,12 +1380,12 @@ _OptionMenu::OnPreviewTouchPressed(const _Control& source, const _TouchInfo& tou
 void
 _OptionMenu::OpenAnimation()
 {
-       result r = E_SUCCESS;
-
        VisualElementPropertyAnimation* pBoundsAnimation;
        VisualElementPropertyAnimation* pOpacityAnimation;
 
        _VisualElement* pVisualElement = GetVisualElement();
+       SysTryReturnVoidResult(NID_UI_CTRL, pVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get visual element.");
+
        FloatRectangle pEndBounds = pVisualElement->GetBounds();
        FloatRectangle pStartBounds(0.0f, 0.0f, 0.0f, 0.0f);
        pStartBounds = pEndBounds;
@@ -1408,8 +1419,6 @@ _OptionMenu::OpenAnimation()
 
        pBoundsAnimation->SetVisualElementAnimationStatusEventListener(this);
 
-       pVisualElement->AddAnimation(L"OpeningBoundsAnimation", *pBoundsAnimation);
-
        if (__pOpacityTimingFunction != null)
        {
                delete __pOpacityTimingFunction;
@@ -1427,19 +1436,19 @@ _OptionMenu::OpenAnimation()
 
        pOpacityAnimation->SetVisualElementAnimationStatusEventListener(this);
 
+       pVisualElement->AddAnimation(L"OpeningBoundsAnimation", *pBoundsAnimation);
        pVisualElement->AddAnimation(L"OpeningOpacityAnimation", *pOpacityAnimation);
 
+       __isAnimating = true;
+
        delete pBoundsAnimation;
-       pBoundsAnimation = null;
 
        delete pOpacityAnimation;
-       pOpacityAnimation = null;
 
        return;
 
 CATCH:
        delete pBoundsAnimation;
-
        delete pOpacityAnimation;
 
        delete __pBoundsTimingFunction;
@@ -1454,13 +1463,13 @@ CATCH:
 void
 _OptionMenu::CloseAnimation(int actionId)
 {
-       result r = E_SUCCESS;
        __selectedActionID = actionId;
 
        VisualElementPropertyAnimation* pBoundsAnimation ;
        VisualElementPropertyAnimation* pOpacityAnimation;
 
        _VisualElement* pVisualElement = GetVisualElement();
+       SysTryReturnVoidResult(NID_UI_CTRL, pVisualElement != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get visual element.");
 
        FloatRectangle pStartBounds = pVisualElement->GetBounds();
        FloatRectangle pEndBounds(0.0f, 0.0f, 0.0f, 0.0f);
@@ -1517,11 +1526,10 @@ _OptionMenu::CloseAnimation(int actionId)
        pVisualElement->AddAnimation(L"ClosingBoundsAnimation", *pBoundsAnimation);
        pVisualElement->AddAnimation(L"ClosingOpacityAnimation", *pOpacityAnimation);
 
-       delete pBoundsAnimation;
-       pBoundsAnimation = null;
+       __isAnimating = true;
 
+       delete pBoundsAnimation;
        delete pOpacityAnimation;
-       pOpacityAnimation = null;
 
        return;
 
index b7e2430..7c282db 100755 (executable)
@@ -45,8 +45,6 @@ using namespace Tizen::Ui::Animations;
 
 namespace {
 static const float TOUCH_PRESS_THRESHOLD_INSENSITIVE = 0.16f;
-static const int OPTION_MENU_LIST_ELEMENT_TEXT = 0;
-static const int OPTION_MENU_LIST_ELEMENT_BITMAP = 1;
 }
 
 namespace Tizen { namespace Ui { namespace Controls
index d87d07c..e686abe 100644 (file)
@@ -33,6 +33,8 @@
 #include "FUi_IAccessibilityListener.h"
 #include "FUi_AccessibilityContainer.h"
 #include "FUi_AccessibilityElement.h"
+#include "FUi_WindowImpl.h"
+#include "FUi_FocusManagerImpl.h"
 #include "FUiAnim_VisualElement.h"
 #include "FUiCtrl_Scroll.h"
 #include "FUiCtrl_ScrollPanelImpl.h"
@@ -169,6 +171,7 @@ void
 _ScrollPanelPresenter::OnBoundsChanged(void)
 {
        AdjustModel();
+       ScrollToFocusedControl();
 }
 
 void
@@ -233,6 +236,7 @@ _ScrollPanelPresenter::OnChildBoundsChanged(const _Control& child)
                                __previousScrollAreaBounds = GetScrollAreaBounds();
                        }
                        AdjustModel();
+                       ScrollToFocusedControl();
                }
        }
 }
@@ -1102,6 +1106,30 @@ _ScrollPanelPresenter::ScrollToControlWhenOutOfView(const _Control& control)
        }
 }
 
+void
+_ScrollPanelPresenter::ScrollToFocusedControl(void)
+{
+       if (_FocusManagerImpl::GetInstance()->IsFocusModeStateEnabled())
+       {
+               _WindowImpl* pWindowImpl = _FocusManagerImpl::GetInstance()->GetCurrentFocusedWindow();
+
+               if (pWindowImpl != null)
+               {
+                       _Window* pWindow = &pWindowImpl->GetCore();
+
+                       if (pWindow != null)
+                       {
+                               _Control* pControl = pWindow->GetCurrentFocusControl();
+
+                               if (pControl != null)
+                               {
+                                       ScrollToControlWhenOutOfView(*pControl);
+                               }
+                       }
+               }
+       }
+}
+
 float
 _ScrollPanelPresenter::CalculatePagingScrollPosition(float position) const
 {
index 60490f2..43abb5d 100644 (file)
@@ -49,8 +49,6 @@ const float SCROLL_OPACITY_ON = 1.0f;
 const float SCROLL_OPACITY_DARK_DIM =0.6f;
 const float SCROLL_OPACITY_LIGHT_DIM = 0.3f;
 const float SCROLL_OPACITY_OFF = 0.0f;
-const float SCROLLING_EFFECT_MAX_POSITION = 100.0f;
-const float SCROLLING_EFFECT_MIN_SCALE_RATE = 0.95f;
 }
 
 namespace Tizen { namespace Ui { namespace Controls
@@ -259,6 +257,15 @@ _ScrollPresenter::SetScrollRange(float viewRange, float scrollRange)
 {
        SysTryReturn(NID_UI_CTRL, ((scrollRange >= viewRange) && (scrollRange != 0)), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid arguments");
 
+       if (viewRange == scrollRange)
+       {
+               SetScrollVisibility(false);
+       }
+       else
+       {
+               SetScrollVisibility(true);
+       }
+
        if (__viewRange == viewRange && __scrollRange == scrollRange)
        {
                return E_SUCCESS;
index f7d9185..7fc3b30 100644 (file)
@@ -611,10 +611,10 @@ _Slider::SetAccessibilityElementValue()
                String string;
                GET_STRING_CONFIG(IDS_TPLATFORM_BODY_POSITION_P1SD_OF_P2SD_T_TTS, string);
                char buffer[10] = {0,};
-               sprintf(buffer, "%d", GetValue());
+               snprintf(buffer, sizeof(buffer), "%d", GetValue());
                string.Replace(L"%1$d", buffer);
                memset(buffer, 0, 10);
-               sprintf(buffer, "%d", __pSliderPresenter->GetMaxValue());
+               snprintf(buffer, sizeof(buffer), "%d", __pSliderPresenter->GetMaxValue());
                string.Replace(L"%2$d", buffer);
                __pAccessibilityElement->SetValue(string);
        }
@@ -1025,10 +1025,10 @@ _Slider::OnAccessibilityValueIncreased(const _AccessibilityContainer& control, c
        String string;
        GET_STRING_CONFIG(IDS_TPLATFORM_BODY_POSITION_P1SD_OF_P2SD_T_TTS, string);
        char buffer[10] = {0,};
-       sprintf(buffer, "%d", GetValue());
+       snprintf(buffer, sizeof(buffer), "%d", GetValue());
        string.Replace(L"%1$d", buffer);
        memset(buffer, 0, 10);
-       sprintf(buffer, "%d", __pSliderPresenter->GetMaxValue());
+       snprintf(buffer, sizeof(buffer), "%d", __pSliderPresenter->GetMaxValue());
        string.Replace(L"%2$d", buffer);
        _AccessibilityManager::GetInstance()->ReadContent(string);
 
@@ -1050,10 +1050,10 @@ _Slider::OnAccessibilityValueDecreased(const _AccessibilityContainer& control, c
        String string;
        GET_STRING_CONFIG(IDS_TPLATFORM_BODY_POSITION_P1SD_OF_P2SD_T_TTS, string);
        char buffer[10] = {0,};
-       sprintf(buffer, "%d", GetValue());
+       snprintf(buffer, sizeof(buffer), "%d", GetValue());
        string.Replace(L"%1$d", buffer);
        memset(buffer, 0, 10);
-       sprintf(buffer, "%d", __pSliderPresenter->GetMaxValue());
+       snprintf(buffer, sizeof(buffer), "%d", __pSliderPresenter->GetMaxValue());
        string.Replace(L"%2$d", buffer);
        _AccessibilityManager::GetInstance()->ReadContent(string);
 
index 7e0eeb0..9d4d9f8 100644 (file)
@@ -319,6 +319,12 @@ _TableView::SetAnnexFocused(bool isAnnexFocused)
        return __pTableViewPresenter->SetAnnexFocused(isAnnexFocused);
 }
 
+bool
+_TableView::IsAnnexFocused(void)
+{
+       return __pTableViewPresenter->IsAnnexFocused();
+}
+
 void
 _TableView::SetTableViewFocused(bool focusStatus)
 {
@@ -332,6 +338,12 @@ _TableView::IsTableViewFocused(void)
 }
 
 result
+_TableView::GetFocusedItemIndex(int& groupIndex, int& itemIndex) const
+{
+       return __pTableViewPresenter->GetFocusedItemIndex(groupIndex, itemIndex);
+}
+
+result
 _TableView::SetItemChecked(int groupIndex, int itemIndex, bool check)
 {
        if (IsOnProcessing())
@@ -771,6 +783,11 @@ _TableView::RefreshAllItems(void)
        return __pTableViewPresenter->RefreshAllItems();
 }
 
+void
+_TableView::RestoreEditCopyPasteManager(void)
+{
+       __pTableViewPresenter->RestoreEditCopyPasteManager();
+}
 
 result
 _TableView::UpdateTableView(bool isRestoreAnnexFocusValue)
index a434ac3..486ca71 100644 (file)
@@ -4460,6 +4460,15 @@ _TableViewItem::OnTickOccurred(const Tizen::Ui::Animations::VisualElementAnimati
        {
                FloatPoint position = currentValue.ToFloatPoint();
                SetPosition(position);
+               if (GetParent())
+               {
+                       _TableView* pTableView = dynamic_cast<_TableView*>(GetParent());
+                       if (pTableView)
+                       {
+                               //Move handler position while animation in progress
+                               pTableView->RestoreEditCopyPasteManager();
+                       }
+               }
        }
        else if (keyName == L"FADE_IN_OUT_ITEM")
        {
@@ -4556,6 +4565,18 @@ _TableViewItem::OnVisualElementAnimationFinished(const Tizen::Ui::Animations::Vi
        if (tableViewItemAnimation)
        {
                __animationCount--;
+               if (__animationCount == 0)
+               {
+                       if (GetParent())
+                       {
+                               _TableView* pTableView = dynamic_cast<_TableView*>(GetParent());
+                               if (pTableView)
+                               {
+                                       //Move handler position at end of Move animation
+                                       pTableView->RestoreEditCopyPasteManager();
+                               }
+                       }
+               }
        }
 
        return;
@@ -5066,6 +5087,11 @@ _TableViewItem::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
                if (pChildControl && pChildControl->GetEnableState() && pChildControl->GetVisibleState()
                                && pChildControl->IsFocusable())
                {
+                       if (IsFocused() && __drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED)
+                       {
+                               ResetItemState();
+                       }
+
                        if (pParent != null)
                        {
                                pParent->SetAnnexFocused(true);
index 05199f6..786c9f0 100644 (file)
@@ -38,6 +38,7 @@
 #include "FUi_FocusManagerImpl.h"
 #include "FUi_Math.h"
 #include "FUi_Window.h"
+#include "FUiCtrl_Edit.h"
 
 using namespace Tizen::Ui::Animations;
 using namespace Tizen::Graphics;
@@ -616,6 +617,8 @@ _TableViewPresenter::RefreshTableView(int groupIndex, int itemIndex, TableViewRe
                RefreshItemLayout(topDrawnItemPos, refreshItemPos, type, animation);
        }
 
+       RestoreEditCopyPasteManager();
+
        return E_SUCCESS;
 }
 
@@ -1433,6 +1436,12 @@ _TableViewPresenter::SetAnnexFocused(bool isAnnexFocused)
        __isAnnexFocused = isAnnexFocused;
 }
 
+bool
+_TableViewPresenter::IsAnnexFocused(void)
+{
+       return __isAnnexFocused;
+}
+
 void
 _TableViewPresenter::SetTableViewFocused(bool focusStatus)
 {
@@ -1452,6 +1461,17 @@ _TableViewPresenter::IsTableViewFocused(void)
        return __isTableViewFocused;
 }
 
+result
+_TableViewPresenter::GetFocusedItemIndex(int& groupIndex, int& itemIndex) const
+{
+       result r = E_SUCCESS;
+
+       groupIndex = __focusItemTag.groupIndex;
+       itemIndex = __focusItemTag.itemIndex;
+
+       return r;
+}
+
 void
 _TableViewPresenter::SetItemType(_TableViewItem* pItem, TableViewItemTag itemPosition)
 {
@@ -5529,6 +5549,34 @@ _TableViewPresenter::CollapseGroupAnimationFinished(bool completedNormally)
 }
 
 void
+_TableViewPresenter::RestoreEditCopyPasteManager(void)
+{
+       _ControlManager* pControlManager = _ControlManager::GetInstance();
+       SysTryReturnVoidResult(NID_UI_CTRL, pControlManager != null, E_SYSTEM, "Failed to get Control Manager.");
+
+       _Control* pFocusControl = pControlManager->GetFocusControl();
+       SysTryReturnVoidResult(NID_UI_CTRL, pFocusControl != null, E_SYSTEM, "Failed to get Focussed Control.");
+
+       _Edit* pEdit = dynamic_cast<_Edit*>(pFocusControl);
+       if (pEdit == null)
+       {
+               return;
+       }
+
+       _Control* pControl = pEdit;
+       while (pControl)
+       {
+               pControl = pControl->GetParent();
+               _TableViewItem* pItem = dynamic_cast<_TableViewItem*>(pControl);
+               if (pItem)
+               {
+                       pEdit->Invalidate();
+                       break;
+               }
+       }
+}
+
+void
 _TableViewPresenter::OnVisualElementAnimationStarted(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target)
 {
        if (keyName == L"REMOVE_ITEM_ANIMATION")
@@ -5585,6 +5633,7 @@ _TableViewPresenter::OnVisualElementAnimationFinished(const Tizen::Ui::Animation
                        __scrollToItemTag.startedAnimation = false;
                        ScrollToItem(__scrollToItemTag.groupIndex, __scrollToItemTag.itemIndex, __scrollToItemTag.itemAlignment, __scrollToItemTag.shiftingDistance);
                }
+               RestoreEditCopyPasteManager();
                return;
        }
        else if (keyName == L"COLLAPSE_GROUP_ANIMATION")
@@ -5600,6 +5649,7 @@ _TableViewPresenter::OnVisualElementAnimationFinished(const Tizen::Ui::Animation
                        __scrollToItemTag.startedAnimation = false;
                        ScrollToItem(__scrollToItemTag.groupIndex, __scrollToItemTag.itemIndex, __scrollToItemTag.itemAlignment, __scrollToItemTag.shiftingDistance);
                }
+               RestoreEditCopyPasteManager();
                return;
        }
 
@@ -5635,6 +5685,7 @@ _TableViewPresenter::OnTickOccurred(const Tizen::Ui::Animations::VisualElementAn
                SetLoadedItemsVisibleFromPosition(currentPosition, true);
                MoveLoadedItemsFromPosition(currentPosition);
 
+               RestoreEditCopyPasteManager();
                return;
        }
        else if (keyName == L"COLLAPSE_GROUP_ANIMATION")
@@ -5643,6 +5694,7 @@ _TableViewPresenter::OnTickOccurred(const Tizen::Ui::Animations::VisualElementAn
                SetLoadedItemsVisibleFromPosition(currentPosition, false);
                MoveLoadedItemsFromPosition(currentPosition);
 
+               RestoreEditCopyPasteManager();
                return;
        }
        else if (keyName == L"SWEEP_ITEM_ANIMATION")
@@ -5784,6 +5836,10 @@ _TableViewPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInf
                                        {
                                                ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP);
                                        }
+                                       else if (pItem->GetBoundsF().y + pItem->GetBoundsF().height > GetScrollPosition() + __pTableView->GetBoundsF().height)
+                                       {
+                                               ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_BOTTOM);
+                                       }
 
                                        if (pItem->GetEnableState() && pItem->GetVisibleState()
                                                        && pItem->IsFocusable())
index f058e9d..bf66849 100644 (file)
@@ -46,7 +46,7 @@ using namespace std;
  static int SetMetatable(lua_State* tolua_S, const char* type, const char* operation, lua_CFunction func)
 {
        char ctype[128] = "const ";
-       strcat(ctype,type);
+       strncat(ctype, type, sizeof(ctype)-1);
        const char* types[2] = {type, ctype};
 
        for (short i = 0; i < 2; ++i)
index d46c3d1..eda3447 100644 (file)
@@ -44,7 +44,6 @@ namespace Tizen { namespace Ui { namespace Controls
 
 const int CONTEXT_MENU_ITEM_STATUS_COUNT = 3;
 const int MAX_CONTEXTMENU_LIST_SHOW_ITEM = 4;
-const int MAX_CONTEXTMENU_ICON_SHOW_ITEM = 5;
 
 enum ContextMenuCoreStyle
 {
index abdbd31..a94c1d3 100755 (executable)
@@ -133,15 +133,12 @@ enum EditAccessibilityElementType
 
 const int EDIT_STYLE_SINGLE_LINE = 0x00000001;
 const int EDIT_STYLE_NORMAL = 0x00000002;
-const int EDIT_STYLE_BORDER = 0x00000004;
 const int EDIT_STYLE_TITLE_LEFT = 0x00000010;
 const int EDIT_STYLE_TITLE_TOP = 0x00000020;
 const int EDIT_STYLE_PASSWORD = 0x00000100;
 const int EDIT_STYLE_VIEWER = 0x00000200;
 const int EDIT_STYLE_NOSCROLL = 0x00000400;
 const int EDIT_STYLE_CLEAR = 0x00001000;
-const int EDIT_STYLE_ICON_EMBEDDED = 0x00010000;
-const int EDIT_STYLE_DASHBOARD_EMBEDDED = 0x00100000;
 const int EDIT_STYLE_FLEXIBLE = 0x01000000;
 const int EDIT_STYLE_TOKEN = 0x02000000;
 const int EDIT_COLOR_OPACITY = 100;
@@ -149,8 +146,6 @@ const int EDIT_AREA_DEFAULT_LIMIT_LENGTH = 1000;
 const int EDIT_FIELD_DEFAULT_LIMIT_LENGTH = 100;
 
 const int EDIT_COLOR_MAX = 4;
-const int EDIT_TEXT_COLOR_MAX = 4;
-const int EDIT_MARGIN_COUNT_MAX = 2;
 const float DEFAULT_LINE_SPACE = 1.0f;
 
 /**
index 9f10a73..90fa0f1 100755 (executable)
@@ -45,8 +45,6 @@ namespace Tizen { namespace Ui { namespace Controls
 {
 const int EDIT_SCROLLFRAME_MAX = 5;
 const int EDIT_PASSWORD_BUFFER_MAX = 1024;
-const int SCROLL_STYLE_VERTICAL = 2;
-const int ANIMATION_DURATION = 333;
 
 enum _EditFooterVisibleStatus
 {
index 079e5d9..43c59dc 100644 (file)
 
 const int DEVICE_SIZE_HORIZONTAL = 56;                         // LCD Width (mm)
 const int DEVICE_SIZE_VERTICAL = 93;                           // LCD Hight (mm)
-const int FLICK_ANIMATION_FPS_LIST = 300;                      // List FPS
-const int FLICK_ANIMATION_SENSITIVITY_LIST = 150;      // List Animation Sensitivity
-const int FLICK_ANIMATION_FPS_ICONLIST = 60;           // IconList FPS
-const int FLICK_ANIMATION_SENSITIVITY_ICONLIST = 30;// IconList Animation Sensitivity
 const int FLICK_ANIMATION_FPS_PANEL = 30;                      // Panel FPS
 const int FLICK_ANIMATION_SENSITIVITY_PANEL = 30;      // Panel Animation Sensitivity
 
index bf5df65..5a3d712 100644 (file)
@@ -37,10 +37,7 @@ namespace Tizen { namespace Ui { namespace Controls
 class _PublicActionEvent;
 
 const int FOOTER_MAX_STATE_COUNT = 7;
-const int FOOTER_BUTTON_MAX_STATE_COUNT = 4;
 const int FOOTER_MAX_ITEM_COUNT_WITH_BUTTON = 3;
-const int FOOTER_BUTTON_MAX_COUNT = 3;
-const int FOOTER_ITEM_MAX_COUNT = 15;
 const int FOOTER_ACTION_ID_MIN = 0;
 const int FOOTER_NUMBERD_BADGE_ICON_NUMBER_MAX = 99999;
 
index 0c9ee00..54f1cb1 100644 (file)
@@ -36,14 +36,11 @@ namespace Tizen { namespace Ui { namespace Controls
 class _PublicActionEvent;
 
 const int HEADER_MAX_ITEM_COUNT_WITH_BUTTON = 3;
-const int HEADER_BUTTON_MAX_COUNT = 2;
 const int HEADER_ITEM_MAX_COUNT = 4;
-const int HEADER_MAX_WAITING_ANIMATION_POSITION = 3;
 const int HEADER_TITLE_BUTTON_STYLE_MAX_ITEM_COUNT = 1;
 const int HEADER_TAB_STYLE_MAX_ITEM_COUNT = 15;
 const int HEADER_ACTION_ID_MIN = 0;
 const int HEADER_NUMBERD_BADGE_ICON_NUMBER_MAX = 99999;
-const int HEADER_MORE_BUTTON_ACTION_ID = 500;
 
 class _HeaderImpl
        : public _ControlImpl
index 0cd85e0..bc0b88f 100644 (file)
@@ -247,6 +247,7 @@ private:
 
        Tizen::Ui::Animations::IVisualElementAnimationTimingFunction* __pBoundsTimingFunction;
        Tizen::Ui::Animations::IVisualElementAnimationTimingFunction* __pOpacityTimingFunction;
+       bool __isAnimating;
 
        // attribute for position fo the window
        Tizen::Graphics::FloatRectangle __windowRect;   // OptionMenu window in the whole screen area
index 1ab7bf3..0421d98 100644 (file)
@@ -214,6 +214,7 @@ private:
        // scroll to ...
        bool IsControlOutOfView(const _Control& control) const;
        void ScrollToControlWhenOutOfView(const _Control& control);
+       void ScrollToFocusedControl(void);
 
        // scroll bar load effect
        void DoScrollBarLoadEffect(void);
index f90f95b..cbebef4 100644 (file)
@@ -120,8 +120,10 @@ public:
 
        //Restore list Focus
        void SetAnnexFocused(bool isAnnexFocused);
+       bool IsAnnexFocused(void);
        void SetTableViewFocused(bool focusStatus);
        bool IsTableViewFocused(void);
+       result GetFocusedItemIndex(int& groupIndex, int& itemIndex) const;
 
        _FastScroll* GetFastScrollBar(void) const;
        result SetFastScrollIndex(const Tizen::Base::String& text, bool useSearchIcon);
@@ -241,7 +243,7 @@ public:
 
        result SetTableViewStatusChanged(bool changed);
        void SetFocusDuringOrientationChange(void);
-
+       void RestoreEditCopyPasteManager(void);
        // VE Value Animation
        Tizen::Ui::Animations::VisualElementValueAnimation* GetVisualElementValueAnimation(const Tizen::Base::String& keyName) const;
 
index 58cf24d..822b565 100644 (file)
@@ -253,8 +253,10 @@ public:
 
        //Restore Focus
        void SetAnnexFocused(bool isAnnexFocused);
+       bool IsAnnexFocused(void);
        void SetTableViewFocused(bool focusStatus);
        bool IsTableViewFocused(void);
+       result GetFocusedItemIndex(int& groupIndex, int& itemIndex) const;
 
        bool IsItemChecked(int groupIndex, int itemIndex) const;
        result SetItemChecked(int groupIndex, int itemIndex, bool checked);
@@ -309,6 +311,7 @@ public:
        bool OnTraversalControlFocusLost(void);
        void SetFocusItemOnPressedState(int groupIndex, int itemIndex);
        void SetItemFocus(_TableViewItem* pItem, TableViewItemTag itemPos);
+       void RestoreEditCopyPasteManager(void);
 
 protected:
        virtual float ScrollToInternal(float targetPosition);
index edb74bf..e2b723b 100644 (file)
@@ -55,7 +55,6 @@ class _ActionEvent;
 const int TOOLBAR_BUTTON_MAX_STATE_COUNT = 4;
 const int TOOLBAR_ITEM_MAX_STATE_COUNT = 5;
 const int TOOLBAR_ACTION_ID_MIN = 0;
-const int TOOLBAR_MORE_BUTTON_ID = -2;
 const int TAB_ITEM_MAX = 15;
 const int SEGMENTED_ITEM_MAX = 4;
 
index ae5dddd..0e602f0 100644 (file)
@@ -24,7 +24,6 @@
 #ifndef _FUI_INTERNAL_UI_BUILDER_CONFIG_H_
 #define _FUI_INTERNAL_UI_BUILDER_CONFIG_H_
 
-const int UIBUILDER_CONTROL_TEXT_MAX_LENGTH = 1000;
 const int UIBUILDER_CONTROL_ELEMENT_NUMBER = 100;
 const int UIBUILDER_CONTROL_MAX_COUNT = 100;