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
*
#include "util/FGrp_UtilTemplate.h"
//#define USE_FONTCONFIG
+//#define APPLY_BOLD_SPACE
#define SYNCHRONIZATION_2_0
#define __pNativeFont __sharedFont.get()
_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;
}
}
+#ifdef APPLY_BOLD_SPACE
_IFont::Property property;
GET_FONT_PROPERTY(property, false);
pThis->GetAttrib(attr);
boldSpace = static_cast<int>(attr.boldWeight.ToFloat() + 0.5f);
}
+#endif
const wchar_t* pText = text.pStart;
int length = text.length;
}
#endif
+#ifdef APPLY_BOLD_SPACE
_IFont::Property property;
GET_FONT_PROPERTY(property, false);
boldSpace = static_cast<int>(attr.boldWeight.ToFloat() + 0.5f);
}
}
+#endif
int curX = 0;
int curY = 0;
}
}
+#ifdef APPLY_BOLD_SPACE
_IFont::Property property;
GET_FONT_PROPERTY(property, false);
this->GetAttrib(attr);
boldSpace = static_cast<int>(attr.boldWeight.ToFloat() + 0.5f);
}
+#endif
const wchar_t* pText = text.pStart;
int length = text.length;
_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);
__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;
}
}
if ((__frontSpaceHideMode == TEXT_OBJECT_SPACE_HIDE_TYPE_ONE) &&
- (GetCharacter(textIndex+textCount) == ' '))
+ (textIndex+textCount < __length) && (GetCharacter(textIndex+textCount) == ' '))
{
textCount++;
}
return E_SUCCESS;
}
-
+/*
KeyboardMapType
GetKeyboardMapType(void)
{
-/*
KeyboardMapType type = KEYBOARD_MAP_NONE;
// get keyboard type
CATCH:
return KEYBOARD_MAP_NONE;
-*/
- return KEYBOARD_MAP_NONE;
}
+*/
result
LoadKeyboardMap(void)
_Control::SetVisibleState(bool visibleState)
{
ClearLastResult();
+ UpdateFocusList();
const bool changed = (__visibleState != visibleState) || !__initVisibleState;
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);
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)
{
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)
{
}} // 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
-
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
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
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"))
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();
__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)
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;
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;
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);
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();
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);
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;
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);
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);
result ChangeCurrentForm(Tizen::Ui::Controls::Form* pCurrentForm, Tizen::Ui::Controls::Form& nextForm);
+ float CalculateChangedAngle(void);
result SetAnimations(void);
result PrepareCapture(void);
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
}
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());
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)
{
__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();
}
if (__isEnterKeyPressed)
{
__isEnterKeyPressed = false;
- __isFocused = true;
+
+ if (__pEditDate->IsFocusModeStateEnabled())
+ {
+ __isFocused = true;
+ }
}
int localeDateFormat = dateTimeUtils.GetLocaleDateFormat();
if (__focusId == DATETIME_ID_NONE)
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;
_EditPresenter::OnTextCommitted(const String& commitText)
{
bool isTextComposingFinished = false;
+ bool isDeletedBlockTextByEnter = false;
char enterText1[2] = {'\n', };
char enterText2[2] = {'\r', };
int end = 0;
GetBlockRange(start, end);
__isFlexibleHeightFrozen = true;
- DeleteText(start, end);
+ if (DeleteText(start, end) == E_SUCCESS)
+ {
+ isDeletedBlockTextByEnter = true;
+ }
__isFlexibleHeightFrozen = false;
ReleaseTextBlock();
}
if(__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE)
{
DrawText();
+ if (isDeletedBlockTextByEnter)
+ {
+ __pEdit->SendTextEvent(CORE_TEXT_EVENT_CHANGED);
+ }
return;
}
}
if (__isEnterKeyPressed)
{
__isEnterKeyPressed = false;
- __isFocused = true;
+
+ if (__pEditTime->IsFocusModeStateEnabled())
+ {
+ __isFocused = true;
+ }
}
if (__focusId == DATETIME_ID_NONE || __focusId == DATETIME_ID_AMPM)
{
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();
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
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))
_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;
+ }
}
}
}
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;
}
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)
{
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);
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))
_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
, __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))
GetOwner()->UnlockInputEvent();
}
+ if (__isAnimating && GetVisualElement())
+ {
+ GetVisualElement()->RemoveAllAnimations();
+ }
+
__pCurrentFrame = null;
if (__pScrollPanel != null)
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);
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;
pBoundsAnimation->SetVisualElementAnimationStatusEventListener(this);
- pVisualElement->AddAnimation(L"OpeningBoundsAnimation", *pBoundsAnimation);
-
if (__pOpacityTimingFunction != null)
{
delete __pOpacityTimingFunction;
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;
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);
pVisualElement->AddAnimation(L"ClosingBoundsAnimation", *pBoundsAnimation);
pVisualElement->AddAnimation(L"ClosingOpacityAnimation", *pOpacityAnimation);
- delete pBoundsAnimation;
- pBoundsAnimation = null;
+ __isAnimating = true;
+ delete pBoundsAnimation;
delete pOpacityAnimation;
- pOpacityAnimation = null;
return;
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
#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"
_ScrollPanelPresenter::OnBoundsChanged(void)
{
AdjustModel();
+ ScrollToFocusedControl();
}
void
__previousScrollAreaBounds = GetScrollAreaBounds();
}
AdjustModel();
+ ScrollToFocusedControl();
}
}
}
}
}
+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
{
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
{
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;
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);
}
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);
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);
return __pTableViewPresenter->SetAnnexFocused(isAnnexFocused);
}
+bool
+_TableView::IsAnnexFocused(void)
+{
+ return __pTableViewPresenter->IsAnnexFocused();
+}
+
void
_TableView::SetTableViewFocused(bool focusStatus)
{
}
result
+_TableView::GetFocusedItemIndex(int& groupIndex, int& itemIndex) const
+{
+ return __pTableViewPresenter->GetFocusedItemIndex(groupIndex, itemIndex);
+}
+
+result
_TableView::SetItemChecked(int groupIndex, int itemIndex, bool check)
{
if (IsOnProcessing())
return __pTableViewPresenter->RefreshAllItems();
}
+void
+_TableView::RestoreEditCopyPasteManager(void)
+{
+ __pTableViewPresenter->RestoreEditCopyPasteManager();
+}
result
_TableView::UpdateTableView(bool isRestoreAnnexFocusValue)
{
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")
{
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;
if (pChildControl && pChildControl->GetEnableState() && pChildControl->GetVisibleState()
&& pChildControl->IsFocusable())
{
+ if (IsFocused() && __drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED)
+ {
+ ResetItemState();
+ }
+
if (pParent != null)
{
pParent->SetAnnexFocused(true);
#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;
RefreshItemLayout(topDrawnItemPos, refreshItemPos, type, animation);
}
+ RestoreEditCopyPasteManager();
+
return E_SUCCESS;
}
__isAnnexFocused = isAnnexFocused;
}
+bool
+_TableViewPresenter::IsAnnexFocused(void)
+{
+ return __isAnnexFocused;
+}
+
void
_TableViewPresenter::SetTableViewFocused(bool focusStatus)
{
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)
{
}
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")
__scrollToItemTag.startedAnimation = false;
ScrollToItem(__scrollToItemTag.groupIndex, __scrollToItemTag.itemIndex, __scrollToItemTag.itemAlignment, __scrollToItemTag.shiftingDistance);
}
+ RestoreEditCopyPasteManager();
return;
}
else if (keyName == L"COLLAPSE_GROUP_ANIMATION")
__scrollToItemTag.startedAnimation = false;
ScrollToItem(__scrollToItemTag.groupIndex, __scrollToItemTag.itemIndex, __scrollToItemTag.itemAlignment, __scrollToItemTag.shiftingDistance);
}
+ RestoreEditCopyPasteManager();
return;
}
SetLoadedItemsVisibleFromPosition(currentPosition, true);
MoveLoadedItemsFromPosition(currentPosition);
+ RestoreEditCopyPasteManager();
return;
}
else if (keyName == L"COLLAPSE_GROUP_ANIMATION")
SetLoadedItemsVisibleFromPosition(currentPosition, false);
MoveLoadedItemsFromPosition(currentPosition);
+ RestoreEditCopyPasteManager();
return;
}
else if (keyName == L"SWEEP_ITEM_ANIMATION")
{
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())
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)
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
{
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;
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;
/**
{
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
{
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
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;
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
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
// scroll to ...
bool IsControlOutOfView(const _Control& control) const;
void ScrollToControlWhenOutOfView(const _Control& control);
+ void ScrollToFocusedControl(void);
// scroll bar load effect
void DoScrollBarLoadEffect(void);
//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);
result SetTableViewStatusChanged(bool changed);
void SetFocusDuringOrientationChange(void);
-
+ void RestoreEditCopyPasteManager(void);
// VE Value Animation
Tizen::Ui::Animations::VisualElementValueAnimation* GetVisualElementValueAnimation(const Tizen::Base::String& keyName) const;
//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);
bool OnTraversalControlFocusLost(void);
void SetFocusItemOnPressedState(int groupIndex, int itemIndex);
void SetItemFocus(_TableViewItem* pItem, TableViewItemTag itemPos);
+ void RestoreEditCopyPasteManager(void);
protected:
virtual float ScrollToInternal(float targetPosition);
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;
#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;