Modified the control logics to avoid patent
authorBongjoo Seo <bongjoo.seo@samsung.com>
Thu, 11 Apr 2013 12:01:34 +0000 (21:01 +0900)
committerBongjoo Seo <bongjoo.seo@samsung.com>
Thu, 11 Apr 2013 12:01:34 +0000 (21:01 +0900)
Change-Id: I03937a16e5f5cbeb2c0ab83047c7d896797ab9ee
Signed-off-by: Bongjoo Seo <bongjoo.seo@samsung.com>
13 files changed:
src/ui/FUi_EcoreEvas.cpp
src/ui/controls/FUiCtrl_IconListPresenter.cpp
src/ui/controls/FUiCtrl_MessageBox.cpp
src/ui/controls/FUiCtrl_MessageBoxPresenter.cpp
src/ui/controls/FUiCtrl_Popup.cpp
src/ui/controls/FUiCtrl_ProgressPopup.cpp
src/ui/controls/FUiCtrl_ProgressPopupPresenter.cpp
src/ui/controls/FUiCtrl_ScrollPresenter.cpp
src/ui/controls/FUiCtrl_ToolbarPresenter.cpp
src/ui/inc/FUiCtrl_MessageBoxPresenter.h
src/ui/inc/FUiCtrl_Popup.h
src/ui/inc/FUiCtrl_ProgressPopupPresenter.h
src/ui/inc/FUiCtrl_ToolbarPresenter.h

index 55950a7..7dd41d9 100644 (file)
 #include "FUiAnim_RootVisualElement.h"
 #include "FUiAnim_DisplayManager.h"
 #include "FUiCtrl_Frame.h"
-#include "FUiCtrl_FrameImpl.h"
-#include "FUiCtrl_FormImpl.h"
 #include "FUi_Clipboard.h"
 #include "FUi_TouchManager.h"
 #include "FUi_ControlManager.h"
 #include "FUi_ActiveWindowEvent.h"
 #include "FUi_ControlImplManager.h"
+#include "FUiCtrl_Popup.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Runtime;
@@ -155,7 +154,7 @@ OnWindowPropertyChanged(void* pData, int type, void* pEvent)
                        int w = 0;
                        int h = 0;
                        ecore_x_e_illume_clipboard_geometry_get(zone, &x, &y, &w, &h);
-                       
+
                        Dimension clipboardDim = _CoordinateSystemUtils::InverseTransform(Dimension(w, h));
 
                        if (__clipboardHeight == 0)
@@ -189,7 +188,7 @@ OnWindowPropertyChanged(void* pData, int type, void* pEvent)
                        int w = 0;
                        int h = 0;
                        ecore_x_e_illume_clipboard_geometry_get(zone, &x, &y, &w, &h);
-                       
+
                        Dimension clipboardDim = _CoordinateSystemUtils::InverseTransform(Dimension(w, h));
 
                        if (clipboardDim.height != 0)
@@ -403,7 +402,7 @@ OnClientMessageReceived(void* pData, int type, void* pEvent)
 {
        Ecore_X_Event_Client_Message* pClientEvent = static_cast<Ecore_X_Event_Client_Message*>(pEvent);
        SysTryReturn(NID_UI, pClientEvent, ECORE_CALLBACK_RENEW, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
-       
+
        _ControlManager* pControlManager = _ControlManager::GetInstance();
        if (pClientEvent->message_type == __atomRotateRootAngle)
        {
@@ -440,7 +439,7 @@ OnClientMessageReceived(void* pData, int type, void* pEvent)
                        return ECORE_CALLBACK_RENEW;
                }
 
-               
+
                int x = 0;
                int y = 0;
                if ((unsigned int)pClientEvent->data.l[1] == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_NEXT)
@@ -475,11 +474,11 @@ OnClientMessageReceived(void* pData, int type, void* pEvent)
                        SysLog(NID_UI, "Accessibility action : Read");
                        _AccessibilityGesture::ProcessGesture(_ACCESSIBILITY_GESTURE_TYPE_ONE_FINGER_ONE_TAP, x, y);
                }
-               else if ((unsigned int)pClientEvent->data.l[1] == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_UP)
+               else if ((unsigned int)pClientEvent->data.l[1] == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_UP)
                {
                        SysLog(NID_UI, "Accessibility action : value increased");
                        _AccessibilityGesture::ProcessGesture(_ACCESSIBILITY_GESTURE_TYPE_VALUE_INCREASED);
-               }
+               }
                else if ((unsigned int)pClientEvent->data.l[1] == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_DOWN)
                {
                        SysLog(NID_UI, "Accessibility action : value decreased");
@@ -487,43 +486,6 @@ OnClientMessageReceived(void* pData, int type, void* pEvent)
                }
        }
 
-       if (pClientEvent->message_type == ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_REQUEST)
-       {
-               SysLog(NID_UI, "[Ime Rotation]");
-
-               _Window* pWindow = pControlManager->GetCurrentFrame();
-               if (pWindow)
-               {
-                       NativeWindowHandle handle = pWindow->GetNativeHandle();
-
-                       if (pClientEvent->win == handle)
-                       {
-                               int angle = pClientEvent->data.l[1];
-                               SysLog(NID_UI, "[Ime Rotation] Receive the client message(xid = 0x%x, angle = %d)", handle, angle);
-
-                               _Frame* pFrame = dynamic_cast<_Frame*>(pWindow);
-                               
-                               if (pFrame)
-                               {
-                                       _FrameImpl* pFrameImpl = static_cast<Controls::_FrameImpl*>(pFrame->GetUserData());
-                                       if (pFrameImpl)
-                                       {
-                                               _FormImpl* pCurrentFormImpl = pFrameImpl->GetCurrentForm();
-
-                                               if (pCurrentFormImpl)
-                                               {
-                                                       pCurrentFormImpl->UpdateOrientation(angle);
-                                               }
-                                               else
-                                               {
-                                                       pFrameImpl->UpdateOrientation(angle);
-                                               }
-                                       }
-                               }
-                       }
-               }
-       }
-
        return ECORE_CALLBACK_RENEW;
 }
 
@@ -1224,12 +1186,6 @@ _EcoreEvas::RotateWindow(const _Window& window, int orientation)
                }
        }
 
-       _Window* pWindow = const_cast<_Window*>(&window);
-       if (pWindow->IsLayoutChangable() == true)
-       {
-               rotatePartial = false;
-       }
-
        Evas_Object* pWinObj = pLayer->GetElmWin();
        Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pEcoreEvas);
 
@@ -1261,6 +1217,30 @@ _EcoreEvas::RotateWindow(const _Window& window, int orientation)
                Rectangle winBounds = _CoordinateSystemUtils::Transform(window.GetBounds());
                int rotate = ecore_evas_rotation_get(pEcoreEvas);
 
+               _Window* pWindow = const_cast<_Window*>(&window);
+               if (pWindow->IsLayoutChangable() == true)
+               {
+                       _Popup* pPopup = dynamic_cast<_Popup*>(pWindow);
+                       if (pPopup)
+                       {
+                               Rectangle nativeBounds(0, 0, 0, 0);
+
+                               if ((rotate == 0) || (rotate == 180))
+                               {
+                                       nativeBounds = pPopup->GetNativeBounds(true);
+                               }
+                               else
+                               {
+                                       nativeBounds = pPopup->GetNativeBounds(false);
+                               }
+
+                               winBounds.x = nativeBounds.x;
+                               winBounds.y = nativeBounds.y;
+                               winBounds.width = nativeBounds.width;
+                               winBounds.height = nativeBounds.height;
+                       }
+               }
+
                int winX = winBounds.x;
                int winY = winBounds.y;
 
@@ -1317,7 +1297,7 @@ _EcoreEvas::SetWindowOrientationEnabled(const _Window& window, bool enable)
        {
                return;
        }
-       
+
        Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pEcoreEvas);
        if (win == 0)
        {
@@ -1414,7 +1394,7 @@ _EcoreEvas::GetActiveWindow(void)
 
                if (ret < 0)
                {
-                       return 0;                       
+                       return 0;
                }
        }
 
@@ -2126,7 +2106,7 @@ _EcoreEvas::IsQuickPanelScrollEnabled(const _Window& window)
                return true;
        }
        */
-       
+
        return true;
 }
 
@@ -2217,6 +2197,32 @@ _EcoreEvas::SetWindowBounds(const _Window& window, const Rectangle& bounds)
 
        Rectangle winBounds = _CoordinateSystemUtils::Transform(bounds);
 
+       int rotate = ecore_evas_rotation_get(pEcoreEvas);
+
+       _Window* pWindow = const_cast<_Window*>(&window);
+       if (pWindow->IsLayoutChangable() == true)
+       {
+               _Popup* pPopup = dynamic_cast<_Popup*>(pWindow);
+               if (pPopup)
+               {
+                       Rectangle nativeBounds(0, 0, 0, 0);
+
+                       if ((rotate == 0) || (rotate == 180))
+                       {
+                               nativeBounds = pPopup->GetNativeBounds(true);
+                       }
+                       else
+                       {
+                               nativeBounds = pPopup->GetNativeBounds(false);
+                       }
+
+                       winBounds.x = nativeBounds.x;
+                       winBounds.y = nativeBounds.y;
+                       winBounds.width = nativeBounds.width;
+                       winBounds.height = nativeBounds.height;
+               }
+       }
+
        int winX = winBounds.x;
        int winY = winBounds.y;
 
@@ -2224,7 +2230,6 @@ _EcoreEvas::SetWindowBounds(const _Window& window, const Rectangle& bounds)
        int rootH = 0;
        ecore_x_window_size_get(ecore_x_window_root_get(win), &rootW, &rootH);
 
-       int rotate = ecore_evas_rotation_get(pEcoreEvas);
        switch (rotate)
        {
        case 270:
@@ -2250,7 +2255,7 @@ _EcoreEvas::SetWindowBounds(const _Window& window, const Rectangle& bounds)
        Eina_Bool ret = ecore_x_e_window_rotation_geometry_get(win, rotate, &x, &y, &w, &h);
 
        evas_object_move(pWinObject, winX, winY);
-       
+
        if (ret == EINA_FALSE)
        {
                evas_object_resize(pWinObject, winBounds.width, winBounds.height);
@@ -2284,6 +2289,32 @@ _EcoreEvas::SetWindowBounds(const _Window& window, const FloatRectangle& bounds)
        FloatRectangle winBoundsF = _CoordinateSystemUtils::Transform(bounds);
        Rectangle winBounds = _CoordinateSystemUtils::ConvertToInteger(winBoundsF);
 
+       int rotate = ecore_evas_rotation_get(pEcoreEvas);
+
+       _Window* pWindow = const_cast<_Window*>(&window);
+       if (pWindow->IsLayoutChangable() == true)
+       {
+               _Popup* pPopup = dynamic_cast<_Popup*>(pWindow);
+               if (pPopup)
+               {
+                       Rectangle nativeBounds(0, 0, 0, 0);
+
+                       if ((rotate == 0) || (rotate == 180))
+                       {
+                               nativeBounds = pPopup->GetNativeBounds(true);
+                       }
+                       else
+                       {
+                               nativeBounds = pPopup->GetNativeBounds(false);
+                       }
+
+                       winBounds.x = nativeBounds.x;
+                       winBounds.y = nativeBounds.y;
+                       winBounds.width = nativeBounds.width;
+                       winBounds.height = nativeBounds.height;
+               }
+       }
+
        int winX = winBounds.x;
        int winY = winBounds.y;
 
@@ -2291,7 +2322,6 @@ _EcoreEvas::SetWindowBounds(const _Window& window, const FloatRectangle& bounds)
        int rootH = 0;
        ecore_x_window_size_get(ecore_x_window_root_get(win), &rootW, &rootH);
 
-       int rotate = ecore_evas_rotation_get(pEcoreEvas);
        switch (rotate)
        {
        case 270:
@@ -2317,7 +2347,7 @@ _EcoreEvas::SetWindowBounds(const _Window& window, const FloatRectangle& bounds)
        Eina_Bool ret = ecore_x_e_window_rotation_geometry_get(win, rotate, &x, &y, &w, &h);
 
        evas_object_move(pWinObject, winX, winY);
-       
+
        if (ret == EINA_FALSE)
        {
                evas_object_resize(pWinObject, winBounds.width, winBounds.height);
@@ -2412,7 +2442,7 @@ _EcoreEvas::SetOwner(const _Window& ownee, const _Control& owner)
                int* rotations = null;
                unsigned int count = 0;
                Eina_Bool ret = ecore_evas_wm_rotation_available_rotations_get(pOwnerLayer->GetEcoreEvas(), &rotations, &count);
-               
+
                if (ret)
                {
                        if (rotations)
@@ -2421,7 +2451,7 @@ _EcoreEvas::SetOwner(const _Window& ownee, const _Control& owner)
                                free(rotations);
                        }
                }
-               
+
                bool preferredRoation = pOwnerWindow->GetPreferredRotation();
                if (preferredRoation == true)
                {
index 28ca5e9..dec381d 100644 (file)
@@ -56,6 +56,10 @@ using namespace Tizen::Graphics;
 using namespace Tizen::Graphics::_Text;
 using namespace Tizen::Ui::Animations;
 
+namespace {
+const int SCROLL_PANEL_FIXED_FLICK_AMOUNT = 1000;
+}
+
 namespace Tizen { namespace Ui { namespace Controls
 {
 
@@ -2374,7 +2378,18 @@ _IconListPresenter::GetItemBounds(int index) const
 int
 _IconListPresenter::CalculateFlickAmount(int distance, int duration)
 {
-       return ((((distance * SCROLL_FLICK_IN_PIXEL_UNIT) / duration) * SCROLL_FLICK_WEIGHT_VELOCITY) + (distance * SCROLL_FLICK_WEIGHT_DISTANCE)) / SCROLL_FLICK_ALPHA_PER_PIXEL;
+       if (_FloatCompare(distance, 0.0f))
+       {
+               return 0.0f;
+       }
+       else if (distance < 0.0)
+       {
+               return -SCROLL_PANEL_FIXED_FLICK_AMOUNT;
+       }
+       else
+       {
+               return SCROLL_PANEL_FIXED_FLICK_AMOUNT;
+       }
 }
 
 void
@@ -3140,25 +3155,6 @@ _IconListPresenter::OnFlickGestureDetected(bool isFlicked, const Point& flickPos
                        targetPosition -= CalculateFlickAmount(flickPosition.x, flickTime);
                }
 
-               // 3-flicking move to top or bottom
-               if (__flickCount >= (NEEDED_FLICK_COUNT_FOR_FINGER_FASTSCROLL - 1))
-               {
-                       if (!_FloatCompareGE(__scrollPosition, targetPosition) && __isFlickDown)
-                       {
-                               __flickCount = 0;
-
-                               StartScrollToAnimation(__scrollLength + OVERSCROLLING_MAX_DISTANCE);
-                               return true;
-                       }
-                       else if (!_FloatCompareLE(__scrollPosition, targetPosition) && !__isFlickDown)
-                       {
-                               __flickCount = 0;
-
-                               StartScrollToAnimation((OVERSCROLLING_MAX_DISTANCE * -1));
-                               return true;
-                       }
-               }
-
                if (_FloatCompareLE(targetPosition, OVERSCROLLING_MAX_DISTANCE * -1))
                {
                        targetPosition = (OVERSCROLLING_MAX_DISTANCE * -1);
@@ -3172,20 +3168,6 @@ _IconListPresenter::OnFlickGestureDetected(bool isFlicked, const Point& flickPos
                        targetPosition = GetMagneticScrollPosition(targetPosition);
                }
 
-               if (_FloatCompareLE(__scrollPosition,targetPosition) && __isFlickDown)
-               {
-                       __flickCount++;
-               }
-               else if (_FloatCompareGE(__scrollPosition, targetPosition)  && !__isFlickDown)
-               {
-                       __flickCount++;
-               }
-               else
-               {
-                       __isFlickDown = !__isFlickDown;
-                       __flickCount = 1;
-               }
-
                StartScrollToAnimation(targetPosition);
        }
        return true;
index 5945442..8b115c4 100644 (file)
@@ -74,9 +74,34 @@ _MessageBox::CreateMessageBoxN(void)
        _MessageBox* pMsgbox = new (std::nothrow) _MessageBox();
        SysTryReturn(NID_UI, pMsgbox != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
 
+       Dimension screenSize = _ControlManager::GetInstance()->GetScreenSize();
+
+       _Frame* pFrame = dynamic_cast<_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame());
+       SysTryReturn(NID_UI_CTRL, pFrame != null, null, E_SYSTEM, "[E_SYSTEM] This instance is not constructed.");
+
+       _Form* pForm = pFrame->GetCurrentForm();
+       int portIndiHeight = 0;
+       int landIndiHeight = 0;
+
+       if (pForm && pForm->IsIndicatorVisible())
+       {
+               GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, portIndiHeight);
+               GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, _CONTROL_ORIENTATION_LANDSCAPE, landIndiHeight);
+       }
+
+       Rectangle portBounds(0, 0, screenSize.width, screenSize.height - portIndiHeight);
+       Rectangle landBounds(0, 0, screenSize.width - landIndiHeight, screenSize.height);
+
+       _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
+
        result r = pMsgbox->CreateRootVisualElement(_WINDOW_TYPE_SUB);
        SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
 
+       pEcoreEvas->SetWindowRotationBounds(*pMsgbox, 0, portBounds);
+       pEcoreEvas->SetWindowRotationBounds(*pMsgbox, 180, portBounds);
+       pEcoreEvas->SetWindowRotationBounds(*pMsgbox, 90, landBounds);
+       pEcoreEvas->SetWindowRotationBounds(*pMsgbox, 270, landBounds);
+
        // for taking touch event
        pMsgbox->AcquireHandle();
 
@@ -195,16 +220,8 @@ _MessageBox::OnDeactivated(void)
 result
 _MessageBox::OnAttachedToMainTree(void)
 {
-       result r = E_SUCCESS;
-
-       SysTryReturn(NID_UI_CTRL, GetVisibleState() != false, E_INVALID_OPERATION,
-                               E_INVALID_OPERATION, "[E_INVALID_OPERATION] This control is not 'displayable'");
-
-       _Control* pOwner = GetOwner();
-       if (pOwner)
-       {
-               GetEcoreEvasMgr()->GetEcoreEvas()->SetOwner(*this, *pOwner);
-       }
+       result r = _Popup::OnAttachedToMainTree();
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
        r = __pMsgboxPresenter->OnAttachedToMainTree();
        SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
@@ -289,7 +306,7 @@ _MessageBox::GetTotalHeight(void) const
        float totalH = titleHeight
                        + transTopMargin
                        + transBottomMargin
-                       + __pMsgboxPresenter->GetBodyTextHeight();
+                       + __pMsgboxPresenter->GetBodyTextObjHeight();
 
        switch (__msgboxStyle)
        {
index 860e782..203181c 100644 (file)
@@ -142,9 +142,6 @@ _MessageBoxPresenter::OnChangeLayout(_ControlOrientation orientation)
        float transLeftMargin = 0.0f;
        float transRightMargin = 0.0f;
 
-       float totalHeightExceptTextObj = 0.0f;
-       float tempHeight = 0.0f;
-
        GET_SHAPE_CONFIG(MESSAGEBOX::DEFAULT_WIDTH, orientation, defaultWidth);
        GET_SHAPE_CONFIG(MESSAGEBOX::BOTTOM_HEIGHT, orientation, bottomHeight);
        GET_SHAPE_CONFIG(MESSAGEBOX::MAX_HEIGHT, orientation, maxHeight);
@@ -182,19 +179,7 @@ _MessageBoxPresenter::OnChangeLayout(_ControlOrientation orientation)
        __pBodyTextObject->SetBounds(__textBounds);
        __pBodyTextObject->Compose();
 
-       __textObjHeight = __pBodyTextObject->GetTotalHeightF();
-
        // Text bounds
-       totalHeightExceptTextObj = titleHeight + (textTopMargin * 2.0f) + bottomHeight + (transTopMargin + transBottomMargin);
-       tempHeight = maxHeight - (totalHeightExceptTextObj + __textObjHeight);
-
-       if (tempHeight < 0.0f)
-       {
-               __textObjHeight += tempHeight;
-       }
-
-       __textBounds.height = __textObjHeight;
-
        __pBodyTextObject->SetBounds(__textBounds);
 
        // Scroll in Text
@@ -263,9 +248,6 @@ _MessageBoxPresenter::Initialize(_MessageBox& msgbox)
        float transLeftMargin = 0.0f;
        float transRightMargin = 0.0f;
 
-       float totalHeightExceptTextObj = 0.0f;
-       float tempHeight = 0.0f;
-
        _ControlOrientation orientation;
 
        __pMessageBox = &msgbox;
@@ -352,21 +334,16 @@ _MessageBoxPresenter::Initialize(_MessageBox& msgbox)
        __pBodyTextObject->SetForegroundColor(__pMessageBox->GetTextColor(), 0, __pBodyTextObject->GetTextLength());
        __pBodyTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD);
        __pBodyTextObject->SetFont(_pFont, 0, __pBodyTextObject->GetTextLength());
-       __pBodyTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT);
+       __pBodyTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT|TEXT_OBJECT_ALIGNMENT_MIDDLE);
        __pBodyTextObject->SetBounds(FloatRectangle(textLeftMargin + transLeftMargin,
                                                                                        titleHeight + textTopMargin + transTopMargin,
                                                                                        defaultWidth - (textLeftMargin + textRightMargin + transLeftMargin + transRightMargin),
                                                                                        maxHeight - titleHeight));
        __pBodyTextObject->Compose();
 
-       __textObjHeight = __pBodyTextObject->GetTotalHeightF();
+       __textObjHeight = TEXT_OBJ_HEIGHT;
 
        // Text bounds
-       totalHeightExceptTextObj = titleHeight + (textTopMargin * 2.0f) + bottomHeight + (transTopMargin + transBottomMargin);
-       tempHeight = maxHeight - (totalHeightExceptTextObj + __textObjHeight);
-
-       __textObjHeight = (tempHeight > 0.0f) ? __textObjHeight : __textObjHeight + tempHeight;
-
        __textBounds.SetBounds(textLeftMargin + transLeftMargin,
                                                        titleHeight + textTopMargin + transTopMargin,
                                                        defaultWidth - (textLeftMargin + textRightMargin + transLeftMargin + transRightMargin),
@@ -945,6 +922,11 @@ _MessageBoxPresenter::CalculateButtonAreaHeight(void)
 }
 
 float
+_MessageBoxPresenter::GetBodyTextObjHeight(void) const
+{
+       return __textObjHeight;
+}
+float
 _MessageBoxPresenter::GetBodyTextHeight(void) const
 {
        return (__pBodyTextObject == null) ? 0.0f : __pBodyTextObject->GetTotalHeightF();
index 3f4e038..bd581aa 100644 (file)
@@ -60,8 +60,24 @@ _Popup::_Popup(void)
        , __pPopupPresenter(null)
        , __bounds(0.0f, 0.0f, 0.0f, 0.0f)
        , __popupResult(POPUP_RESULT_NONE)
+       , __portBounds(0, 0, 0, 0)
+       , __landBounds(0, 0, 0, 0)
 {
-       // empty statement
+       Dimension screenSize = _ControlManager::GetInstance()->GetScreenSize();
+
+       _Frame* pFrame = dynamic_cast<_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame());
+       SysTryReturnVoidResult(NID_UI_CTRL, pFrame != null, E_SYSTEM, "[E_SYSTEM] This instance is not constructed.");
+
+       _Form* pForm = pFrame->GetCurrentForm();
+       int portIndiHeight = 0;
+       int landIndiHeight = 0;
+       if (pForm && pForm->IsIndicatorVisible())
+       {
+               GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, portIndiHeight);
+               GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, _CONTROL_ORIENTATION_LANDSCAPE, landIndiHeight);
+       }
+       __portBounds = Rectangle(0, portIndiHeight, screenSize.width, screenSize.height - portIndiHeight);
+       __landBounds = Rectangle(0, landIndiHeight, screenSize.height, screenSize.width - landIndiHeight);
 }
 
 _Popup::~_Popup(void)
@@ -99,9 +115,34 @@ _Popup::CreatePopupN(void)
        _Popup* pPopup = new (std::nothrow) _Popup();
        SysTryReturn(NID_UI_CTRL, pPopup != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
 
+       Dimension screenSize = _ControlManager::GetInstance()->GetScreenSize();
+
+       _Frame* pFrame = dynamic_cast<_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame());
+       SysTryReturn(NID_UI_CTRL, pFrame != null, null, E_SYSTEM, "[E_SYSTEM] This instance is not constructed.");
+
+       _Form* pForm = pFrame->GetCurrentForm();
+       int portIndiHeight = 0;
+       int landIndiHeight = 0;
+
+       if (pForm && pForm->IsIndicatorVisible())
+       {
+               GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, portIndiHeight);
+               GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, _CONTROL_ORIENTATION_LANDSCAPE, landIndiHeight);
+       }
+
+       Rectangle portBounds(0, 0, screenSize.width, screenSize.height - portIndiHeight);
+       Rectangle landBounds(0, 0, screenSize.width - landIndiHeight, screenSize.height);
+
+       _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
+
        result r = pPopup->CreateRootVisualElement(_WINDOW_TYPE_SUB);
        SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
 
+       pEcoreEvas->SetWindowRotationBounds(*pPopup, 0, portBounds);
+       pEcoreEvas->SetWindowRotationBounds(*pPopup, 180, portBounds);
+       pEcoreEvas->SetWindowRotationBounds(*pPopup, 90, landBounds);
+       pEcoreEvas->SetWindowRotationBounds(*pPopup, 270, landBounds);
+
        // for taking touch event
        pPopup->AcquireHandle();
        
@@ -458,6 +499,34 @@ _Popup::OnAttachedToMainTree(void)
 
        GetEcoreEvasMgr()->GetEcoreEvas()->SetOwner(*this, *GetOwner());
 
+       Dimension screenSize = _ControlManager::GetInstance()->GetScreenSize();
+
+       _Frame* pFrame = dynamic_cast<_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame());
+       SysTryReturnResult(NID_UI_CTRL, pFrame != null, E_SYSTEM, "[E_SYSTEM] This instance is not constructed.");
+
+       _Form* pForm = pFrame->GetCurrentForm();
+
+       int portIndiHeight = 0;
+       int landIndiHeight = 0;
+       if (pForm && pForm->IsIndicatorVisible())
+       {
+               GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, portIndiHeight);
+               GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, _CONTROL_ORIENTATION_LANDSCAPE, landIndiHeight);
+       }
+
+       Rectangle portBounds(0, 0, screenSize.width, screenSize.height - portIndiHeight);
+       Rectangle landBounds(0, 0, screenSize.width - landIndiHeight, screenSize.height);
+
+       _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
+
+       pEcoreEvas->SetWindowRotationBounds(*this, 0, portBounds);
+       pEcoreEvas->SetWindowRotationBounds(*this, 180, portBounds);
+       pEcoreEvas->SetWindowRotationBounds(*this, 90, landBounds);
+       pEcoreEvas->SetWindowRotationBounds(*this, 270, landBounds);
+
+       __portBounds = Rectangle(0, portIndiHeight, screenSize.width, screenSize.height - portIndiHeight);
+       __landBounds = Rectangle(0, landIndiHeight, screenSize.height, screenSize.width - landIndiHeight);
+
        return E_SUCCESS;
 }
 
@@ -488,12 +557,6 @@ _Popup::OnDetachingFromMainTree(void)
        return _Window::OnDetachingFromMainTree();
 }
 
-result
-_Popup::OnBoundsChanging(const FloatRectangle& bounds)
-{
-       return E_SUCCESS;
-}
-
 void
 _Popup::OnBoundsChanged(void)
 {
@@ -577,5 +640,18 @@ _Popup::IsRotationSynchronized(void) const
        return true;
 }
 
+Rectangle
+_Popup::GetNativeBounds(bool isPortrait) const
+{
+       if (isPortrait)
+       {
+               return __portBounds;
+       }
+       else
+       {
+               return __landBounds;
+       }
+}
+
 }}} // Tizen::Ui::Controls
 
index 5ab7e9e..78e3f55 100755 (executable)
@@ -30,7 +30,6 @@
 #include "FUi_EcoreEvas.h"
 #include "FUi_EcoreEvasMgr.h"
 #include "FUi_ResourceManager.h"
-#include "FUi_DataBindingContext.h"
 #include "FUiCtrl_ButtonImpl.h"
 #include "FUiCtrl_Button.h"
 #include "FUiCtrl_Form.h"
@@ -100,9 +99,34 @@ _ProgressPopup::CreateProgressPopupN(void)
        _ProgressPopup* pProgressPopup = new (std::nothrow) _ProgressPopup();
        SysTryReturn(NID_UI_CTRL, pProgressPopup != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
 
+       Dimension screenSize = _ControlManager::GetInstance()->GetScreenSize();
+
+       _Frame* pFrame = dynamic_cast<_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame());
+       SysTryReturn(NID_UI_CTRL, pFrame != null, null, E_SYSTEM, "[E_SYSTEM] This instance is not constructed.");
+
+       _Form* pForm = pFrame->GetCurrentForm();
+       int portIndiHeight = 0;
+       int landIndiHeight = 0;
+
+       if (pForm && pForm->IsIndicatorVisible())
+       {
+               GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, portIndiHeight);
+               GET_SHAPE_CONFIG(FORM::INDICATOR_MINIMIZE_HEIGHT, _CONTROL_ORIENTATION_LANDSCAPE, landIndiHeight);
+       }
+
+       Rectangle portBounds(0, 0, screenSize.width, screenSize.height - portIndiHeight);
+       Rectangle landBounds(0, 0, screenSize.width - landIndiHeight, screenSize.height);
+
+       _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
+
        result r = pProgressPopup->CreateRootVisualElement();
        SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
 
+       pEcoreEvas->SetWindowRotationBounds(*pProgressPopup, 0, portBounds);
+       pEcoreEvas->SetWindowRotationBounds(*pProgressPopup, 180, portBounds);
+       pEcoreEvas->SetWindowRotationBounds(*pProgressPopup, 90, landBounds);
+       pEcoreEvas->SetWindowRotationBounds(*pProgressPopup, 270, landBounds);
+
        // for taking touch event
        pProgressPopup->AcquireHandle();
        return pProgressPopup;
@@ -378,7 +402,7 @@ _ProgressPopup::GetTotalHeight(void) const
                        + textTopGap
                        + textBottomGap
                        + bottomHeight
-                       + __pProgressPopupPresenter->GetBodyTextHeight();
+                       + __pProgressPopupPresenter->GetBodyTextObjHeight();
 
        return totalH;
 }
@@ -522,10 +546,8 @@ _ProgressPopup::OnVisibleStateChanged(void)
 result
 _ProgressPopup::OnAttachedToMainTree(void)
 {
-       SysTryReturn(NID_UI_CTRL, GetVisibleState() != false, E_INVALID_OPERATION,
-                               E_INVALID_OPERATION, "[E_INVALID_OPERATION] This control is not 'displayable'");
-
-       GetEcoreEvasMgr()->GetEcoreEvas()->SetOwner(*this, *GetOwner());
+       result r = _Popup::OnAttachedToMainTree();
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
        return E_SUCCESS;
 }
index a37ca71..a435dc8 100755 (executable)
@@ -102,6 +102,8 @@ _ProgressPopupPresenter::Initialize(_ProgressPopup& ProgressPopup, bool cancelBu
        __cancelButton = cancelButton;
        __transparent = transparent;
        __pProgressPopup = &ProgressPopup;
+       __textObjectHeight = TEXT_OBJ_HEIGHT;
+
 
        return r;
 }
@@ -255,7 +257,7 @@ _ProgressPopupPresenter::SetTextObject(void)
                        __pBodyTextObject->SetForegroundColor(__pProgressPopup->GetTextColor(), 0, __pBodyTextObject->GetTextLength());
                        __pBodyTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD);
                        __pBodyTextObject->SetFont(_pFont, 0, __pBodyTextObject->GetTextLength());
-                       __pBodyTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT);
+                       __pBodyTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT|TEXT_OBJECT_ALIGNMENT_MIDDLE);
                }
 
                if (__pProgressPopup->HasButton())
@@ -270,13 +272,6 @@ _ProgressPopupPresenter::SetTextObject(void)
                __pBodyTextObject->Compose();
 
                // Calculate Text bounds
-               __textObjectHeight = __pBodyTextObject->GetTotalHeight();
-
-               float totalHeightExceptTextObj = titleHeight + animationWidth + textTopMargin + textBottomMargin + bottomHeight + (transTopMargin + transBottomMargin);
-               float tmpH = maxHeight - (totalHeightExceptTextObj + __textObjectHeight);
-
-               __textObjectHeight = (tmpH > 0.0f) ? __textObjectHeight : __textObjectHeight + tmpH;
-
                __textBounds.SetBounds(textLeftMargin + transLeftMargin,
                                                                titleHeight + textTopMargin + transTopMargin + animationWidth + noTitleHeight,
                                                                defaultWidth - (textLeftMargin + textRightMargin + transLeftMargin + transRightMargin),
@@ -531,6 +526,11 @@ _ProgressPopupPresenter::DoModal(int& modalResult)
 }
 
 float
+_ProgressPopupPresenter::GetBodyTextObjHeight(void) const
+{
+       return __textObjectHeight;
+}
+float
 _ProgressPopupPresenter::GetBodyTextHeight(void) const
 {
        return (__pBodyTextObject == null) ? 0.0f : __pBodyTextObject->GetTotalHeightF();
@@ -614,7 +614,7 @@ _ProgressPopupPresenter::GetButtonBounds(void) const
                + textTopMargin
                + textBottomMargin
                + btnTopMargin
-               + GetBodyTextHeight();
+               + GetBodyTextObjHeight();
 
        return FloatRectangle(x, y, width, height);
 }
index 0851e53..f47c8ab 100755 (executable)
@@ -440,7 +440,7 @@ _ScrollPresenter::IsOnFadeEffect(void) const
 void
 _ScrollPresenter::EnableScrollingEffect(bool enable)
 {
-       __enableScrollingEffect = enable;
+       __enableScrollingEffect = false;
 }
 
 bool
index c7dfe43..29be623 100644 (file)
@@ -56,7 +56,6 @@ _ToolbarPresenter::_ToolbarPresenter(void)
        , __initialPressesItemStatus(_BUTTON_STATUS_NORMAL)
        , __pEditItem(null)
        , __pTitleBackgroundBitmap(null)
-       , __pBouncingEffectBitmap(null)
        , __pTitleSlideTimer(null)
        , __pFlickAnimationTimer(null)
        , __titleRect(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f))
@@ -66,7 +65,6 @@ _ToolbarPresenter::_ToolbarPresenter(void)
        , __pTextFont(null)
        , __pDescriptionTextObject(null)
        , __pTitleTextObject(null)
-       , __pBouncingEffectVe(null)
        , __flickAnimation()
        , __moveDistance(0.0f)
        , __flickMove(0.0f)
@@ -81,9 +79,6 @@ _ToolbarPresenter::_ToolbarPresenter(void)
        , __fontStyle(0)
        , __fontSize(0.0f)
        , __tabMoved(false)
-       , __isBouncingEffectStarted(false)
-       , __bouncingEffectWidth(0.0f)
-       , __bouncingEffectHeight(0.0f)
        , __titlePressed(false)
        , __titleSliding(false)
 {
@@ -111,12 +106,6 @@ _ToolbarPresenter::~_ToolbarPresenter(void)
                __pTitleBackgroundBitmap = null;
        }
 
-       if (__pBouncingEffectBitmap)
-       {
-               delete __pBouncingEffectBitmap;
-               __pBouncingEffectBitmap = null;
-       }
-
        if (__pTitleSlideTimer)
        {
                delete __pTitleSlideTimer;
@@ -140,13 +129,6 @@ _ToolbarPresenter::~_ToolbarPresenter(void)
                delete __pTitleTextObject;
                __pTitleTextObject = null;
        }
-
-       if (__pBouncingEffectVe)
-       {
-               __pBouncingEffectVe->RemoveAllAnimations();
-               __pBouncingEffectVe->Destroy();
-               __pBouncingEffectVe = null;
-       }
 }
 
 result
@@ -596,99 +578,6 @@ _ToolbarPresenter::DrawDivider(const FloatPoint& point, Canvas* pCanvas)
 }
 
 void
-_ToolbarPresenter::LoadBouncingEffectBitmap(ToolbarStyle style, bool isHeader, bool moveRight)
-{
-       if (__pBouncingEffectBitmap != null)
-       {
-               delete __pBouncingEffectBitmap;
-               __pBouncingEffectBitmap = null;
-       }
-
-       if (style == TOOLBAR_TAB)
-       {
-               if (isHeader)
-               {
-                       if (moveRight)
-                       {
-                               if (__pToolbar->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
-                               {
-                                       GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_BOUNCING_EFFECT_LEFT_VERTICAL,
-                                                       BITMAP_PIXEL_FORMAT_ARGB8888, __pBouncingEffectBitmap);
-                               }
-                               else
-                               {
-                                       GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_BOUNCING_EFFECT_LEFT_HORIZONTAL,
-                                                       BITMAP_PIXEL_FORMAT_ARGB8888, __pBouncingEffectBitmap);
-                               }
-                       }
-                       else
-                       {
-                               if (__pToolbar->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
-                               {
-                                       GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_BOUNCING_EFFECT_RIGHT_VERTICAL,
-                                                       BITMAP_PIXEL_FORMAT_ARGB8888, __pBouncingEffectBitmap);
-                               }
-                               else
-                               {
-                                       GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_BOUNCING_EFFECT_RIGHT_HORIZONTAL,
-                                                       BITMAP_PIXEL_FORMAT_ARGB8888, __pBouncingEffectBitmap);
-                               }
-                       }
-               }
-               else // FOOTER_TAB
-               {
-                       if (moveRight)
-                       {
-                               if (__pToolbar->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
-                               {
-                                       GET_BITMAP_CONFIG_N(FOOTER::TAB_ITEM_BOUNCING_EFFECT_LEFT_VERTICAL,
-                                                       BITMAP_PIXEL_FORMAT_ARGB8888, __pBouncingEffectBitmap);
-                               }
-                               else
-                               {
-                                       GET_BITMAP_CONFIG_N(FOOTER::TAB_ITEM_BOUNCING_EFFECT_LEFT_HORIZONTAL,
-                                                       BITMAP_PIXEL_FORMAT_ARGB8888, __pBouncingEffectBitmap);
-                               }
-                       }
-                       else
-                       {
-                               if (__pToolbar->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
-                               {
-                                       GET_BITMAP_CONFIG_N(FOOTER::TAB_ITEM_BOUNCING_EFFECT_RIGHT_VERTICAL,
-                                                       BITMAP_PIXEL_FORMAT_ARGB8888, __pBouncingEffectBitmap);
-                               }
-                               else
-                               {
-                                       GET_BITMAP_CONFIG_N(FOOTER::TAB_ITEM_BOUNCING_EFFECT_RIGHT_HORIZONTAL,
-                                                       BITMAP_PIXEL_FORMAT_ARGB8888, __pBouncingEffectBitmap);
-                               }
-                       }
-               }
-       }
-       else if (style == TOOLBAR_TAB_WITH_TITLE)
-       {
-               if (moveRight)
-               {
-                       GET_BITMAP_CONFIG_N(HEADER::TITLE_TAB_ITEM_BOUNCING_EFFECT_LEFT,
-                                       BITMAP_PIXEL_FORMAT_ARGB8888, __pBouncingEffectBitmap);
-               }
-               else
-               {
-                       GET_BITMAP_CONFIG_N(HEADER::TITLE_TAB_ITEM_BOUNCING_EFFECT_RIGHT,
-                                       BITMAP_PIXEL_FORMAT_ARGB8888, __pBouncingEffectBitmap);
-               }
-       }
-
-       if (__pBouncingEffectBitmap != null)
-       {
-               __bouncingEffectWidth = __pBouncingEffectBitmap->GetWidthF();
-               __bouncingEffectHeight = __pBouncingEffectBitmap->GetHeightF();
-       }
-
-       return;
-}
-
-void
 _ToolbarPresenter::DrawItems(void)
 {
        result r = E_SUCCESS;
@@ -1232,14 +1121,6 @@ _ToolbarPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& tou
 
        __touchInitiatedInToolbar = false;
 
-       if (__pBouncingEffectVe)
-       {
-               __pBouncingEffectVe->RemoveAllAnimations();
-               __pToolbar->GetVisualElement()->DetachChild(*__pBouncingEffectVe);
-               __pBouncingEffectVe->Destroy();
-               __pBouncingEffectVe = null;
-       }
-
        int releasedItemIndex = __pToolbar->GetItemIndexFromPosition(touchPoint);
        float tabLeftMargin = 0.0f;
 
@@ -1322,8 +1203,6 @@ _ToolbarPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& tou
 
        __tabMoved = false;
 
-       __isBouncingEffectStarted = false;
-
        // Restore status of other buttons to _BUTTON_STATUS_NORMAL             // this can be removed
        int itemCount = __pToolbar->GetItemCount();
 
@@ -1411,8 +1290,6 @@ _ToolbarPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchi
        {
                float distance = (touchinfo.GetCurrentPosition()).x - __currentTouchPosition.x;
                float sideMargin = 0.0f;
-               float startX = 0.0f;
-               float startY = 0.0f;
 
                GET_SHAPE_CONFIG(HEADER::TAB_LEFT_MARGIN, __pToolbar->GetOrientation(), sideMargin);
 
@@ -1455,34 +1332,6 @@ _ToolbarPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchi
                        if (itemBounds.x + distance >= sideMargin && !__beingEdited)
                        {
                                distance = sideMargin - itemBounds.x;
-
-                               if (!__isBouncingEffectStarted)
-                               {
-                                       LoadBouncingEffectBitmap(style, __pToolbar->IsHeader(), true);
-
-                                       if (style == TOOLBAR_TAB_WITH_TITLE)
-                                       {
-                                               GET_SHAPE_CONFIG(HEADER::TITLE_HEIGHT_WITH_SEGMENTED_ITEM, __pToolbar->GetOrientation(), startY);
-                                       }
-
-                                       SetBouncingVisualElement(startX, startY);
-
-                                       StartBouncingEffect();
-
-                                       __isBouncingEffectStarted = true;
-                               }
-                       }
-                       else
-                       {
-                               if (__pBouncingEffectVe)
-                               {
-                                       __pBouncingEffectVe->RemoveAllAnimations();
-                                       __pToolbar->GetVisualElement()->DetachChild(*__pBouncingEffectVe);
-                                       __pBouncingEffectVe->Destroy();
-                                       __pBouncingEffectVe = null;
-                               }
-
-                               __isBouncingEffectStarted = false;
                        }
                }
                else if (distance < 0)
@@ -1499,39 +1348,8 @@ _ToolbarPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchi
                        if (itemBounds.x + itemBounds.width + distance <= clientBounds.width - sideMargin && !__beingEdited)
                        {
                                distance = (clientBounds.width - sideMargin) - (itemBounds.x + itemBounds.width);
-
-                               if (!__isBouncingEffectStarted)
-                               {
-                                       LoadBouncingEffectBitmap(style, __pToolbar->IsHeader(), false);
-
-                                       startX = clientBounds.width - __bouncingEffectWidth;
-
-                                       if (style == TOOLBAR_TAB_WITH_TITLE)
-                                       {
-                                               GET_SHAPE_CONFIG(HEADER::TITLE_HEIGHT_WITH_SEGMENTED_ITEM, __pToolbar->GetOrientation(), startY);
-                                       }
-
-                                       SetBouncingVisualElement(startX, startY);
-
-                                       StartBouncingEffect();
-
-                                       __isBouncingEffectStarted = true;
-                               }
-                       }
-                       else
-                       {
-                               if (__pBouncingEffectVe)
-                               {
-                                       __pBouncingEffectVe->RemoveAllAnimations();
-                                       __pToolbar->GetVisualElement()->DetachChild(*__pBouncingEffectVe);
-                                       __pBouncingEffectVe->Destroy();
-                                       __pBouncingEffectVe = null;
-                               }
-
-                               __isBouncingEffectStarted = false;
                        }
                }
-
                if (__beingEdited)
                {
                        float tabLeftMargin = 0.0f;
@@ -1963,87 +1781,6 @@ _ToolbarPresenter::SetFontInfo(unsigned long style, float size)
 }
 
 void
-_ToolbarPresenter::SetBouncingVisualElement(float startX, float startY)
-{
-       Canvas * pCanvas = null;
-       int Z_ORDER_GROUP_CONTROL = 2001;
-
-       if (__pBouncingEffectVe == null)
-       {
-               __pBouncingEffectVe = new (std::nothrow) VisualElement();
-               SysTryReturnVoidResult(NID_UI_CTRL, __pBouncingEffectVe, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
-
-               __pBouncingEffectVe->Construct();
-               __pBouncingEffectVe->SetName(L"BouncingEffect");
-       }
-
-       __pBouncingEffectVe->SetBounds(FloatRectangle(startX, startY, __bouncingEffectWidth, __bouncingEffectHeight));
-       __pBouncingEffectVe->SetShowState(true);
-       __pBouncingEffectVe->SetImplicitAnimationEnabled(true);
-
-       _VisualElementImpl::GetInstance(*__pBouncingEffectVe)->SetZOrderGroup(Z_ORDER_GROUP_CONTROL + 1);
-       __pToolbar->GetVisualElement()->AttachChild(*__pBouncingEffectVe);
-
-       pCanvas = __pBouncingEffectVe->GetCanvasN();
-
-       if (!pCanvas)
-       {
-               __pBouncingEffectVe->Destroy();
-               __pBouncingEffectVe = null;
-
-               SysLog(NID_UI_CTRL, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
-
-               return;
-       }
-
-       Color backgroundColor(0, 0, 0, 0);
-       pCanvas->SetBackgroundColor(backgroundColor);
-       pCanvas->Clear();
-
-       FloatRectangle rect(0.0f, 0.0f, __bouncingEffectWidth, __bouncingEffectHeight);
-
-       if (__pBouncingEffectBitmap)
-       {
-               if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pBouncingEffectBitmap))
-               {
-                       pCanvas->DrawNinePatchedBitmap(rect, *__pBouncingEffectBitmap);
-
-               }
-               else
-               {
-                       pCanvas->DrawBitmap(rect, *__pBouncingEffectBitmap);
-               }
-       }
-
-       delete pCanvas;
-
-       return;
-}
-
-void
-_ToolbarPresenter::StartBouncingEffect(void)
-{
-       float startOpacity = 0.0f;
-       float endOpacity = 1.0f;
-
-       VisualElementPropertyAnimation* pAnimation = new (std::nothrow) VisualElementPropertyAnimation();
-       SysTryReturnVoidResult(NID_UI_CTRL, pAnimation, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
-
-       pAnimation->SetPropertyName(L"BouncingEffect");
-       pAnimation->SetStartValue(Variant(startOpacity));
-       pAnimation->SetEndValue(Variant(endOpacity));
-       pAnimation->SetDuration(500);
-       pAnimation->SetVisualElementAnimationStatusEventListener(this);
-
-       String bouncing(L"BouncingEffect");
-       __pBouncingEffectVe->AddAnimation(bouncing, *pAnimation);
-
-       delete pAnimation;
-
-       return;
-}
-
-void
 _ToolbarPresenter::StartFlickAnimation(void)
 {
        float distance = CalculateProgress(__flickMove);
index 17d28d1..bd9016c 100644 (file)
@@ -80,6 +80,7 @@ public:
 //Accessor
 public:
        float GetBodyTextHeight(void) const;
+       float GetBodyTextObjHeight(void) const;
 
        Tizen::Graphics::FloatRectangle GetTitleBounds(void) const;
        Tizen::Graphics::FloatRectangle GetTextBounds(void) const;
@@ -171,6 +172,7 @@ private:
        int __buttonNum;
        float __prevPositionY;
        float __textObjHeight;
+       static const float TEXT_OBJ_HEIGHT = 210.0f;
 
        bool __touchPressFlag;
        bool __scrollStart;
index de5d550..b5259f4 100644 (file)
@@ -99,13 +99,14 @@ public:
        virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo);
        virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo);
 
-       virtual result OnBoundsChanging(const Tizen::Graphics::FloatRectangle& bounds);
        virtual void OnBoundsChanged(void);
        virtual bool IsLayoutChangable(void) const;
        virtual void OnOwnerChanged(_Control* pOldOwner);
        virtual void UpdateClientBounds(const Tizen::Graphics::FloatDimension& size, Tizen::Graphics::FloatRectangle& clientBounds);
        virtual bool IsRotationSynchronized(void) const;
 
+       Tizen::Graphics::Rectangle GetNativeBounds(bool isPortrait) const;
+
 // Accessor
 public:
        void SetColor(const Tizen::Graphics::Color& color);
@@ -160,6 +161,8 @@ private:
 
        PopupModalResult __popupResult;
 
+       Tizen::Graphics::Rectangle __portBounds;
+       Tizen::Graphics::Rectangle __landBounds;
 };  // _Popup
 
 
index 814d5b9..d872127 100644 (file)
@@ -67,6 +67,7 @@ public:
        virtual result DoModal(int& modalResult);
 
        float GetBodyTextHeight(void) const;
+       float GetBodyTextObjHeight(void) const;
 
        Tizen::Graphics::FloatRectangle GetButtonBounds(void) const;
        Tizen::Graphics::FloatRectangle GetTitleBounds(void) const;
@@ -118,6 +119,7 @@ private:
        bool __transparent;
 
        static const int ANIMATION_REPEAT_COUNT = 100;
+       static const float TEXT_OBJ_HEIGHT = 160.0f;
 
 };  // _ProgressPopupPresenter
 
index e6ecfec..9b3f9ec 100644 (file)
@@ -133,9 +133,7 @@ protected:
        result _SetModel(const _ToolbarModel& toolbarModel);
 
 private:
-       void LoadBouncingEffectBitmap(ToolbarStyle style, bool isHeader, bool moveRight);
        void SetBouncingVisualElement(float startX, float startY);
-       void StartBouncingEffect(void);
 
        void StartFlickAnimation(void);
        result StartFlickAnimationTimer(void);
@@ -175,8 +173,6 @@ private:
 
        Tizen::Graphics::Bitmap* __pTitleBackgroundBitmap;
 
-       Tizen::Graphics::Bitmap* __pBouncingEffectBitmap;
-
        Tizen::Base::Runtime::Timer* __pTitleSlideTimer;
 
        Tizen::Base::Runtime::Timer* __pFlickAnimationTimer;
@@ -199,8 +195,6 @@ private:
 
        Tizen::Graphics::_Text::TextObject* __pTitleTextObject;
 
-       Tizen::Ui::Animations::VisualElement* __pBouncingEffectVe;
-
        _FlickAnimation __flickAnimation;
 
        static const int FLICK_ANIMATION_TIMER_PERIOD = 3;
@@ -225,10 +219,6 @@ private:
        float __fontSize;
        bool __tabMoved;
 
-       bool __isBouncingEffectStarted;
-       float __bouncingEffectWidth;
-       float __bouncingEffectHeight;
-
        bool __titlePressed;
        bool __titleSliding;