add code to check FrameShowMode.
authorChulheon <ch.jeong47@samsung.com>
Tue, 10 Sep 2013 02:47:54 +0000 (11:47 +0900)
committerChulheon <ch.jeong47@samsung.com>
Tue, 10 Sep 2013 02:59:18 +0000 (11:59 +0900)
Change-Id: I426d1066610dfb73def045258ce30e55e2256201

src/ui/controls/FUiCtrl_EditPresenter.cpp

index 151d80b..200537d 100644 (file)
@@ -7987,6 +7987,21 @@ _EditPresenter::ChangeLayoutInternal(_ControlOrientation orientation, bool defla
 
        _ControlManager* pControlManager = _ControlManager::GetInstance();
        SysTryReturnResult(NID_UI_CTRL, pControlManager, E_SYSTEM, "Failed to get root.");
+
+       _Frame* pCurrentFrame = dynamic_cast<_Frame*>(pControlManager->GetCurrentFrame());
+       if (!pCurrentFrame || (pCurrentFrame && pCurrentFrame->GetShowMode() != FRAME_SHOW_MODE_FULL_SCREEN))
+       {
+               if (pCurrentFrame)
+               {
+                       SysLog(NID_UI_CTRL, "FrameShowMode[%d]", pCurrentFrame->GetShowMode());
+               }
+               else
+               {
+                       SysLog(NID_UI_CTRL, "Frame is null");
+               }
+               return r;
+       }
+
        FloatDimension screenSize;
        FloatRectangle commandButtonBounds(0.0f, 0.0f, 0.0f, 0.0f);
 
@@ -8101,6 +8116,23 @@ _EditPresenter::AdjustParentPanelHeight(bool restore)
                return;
        }
 
+       _ControlManager* pControlManager = _ControlManager::GetInstance();
+       SysTryReturnVoidResult(NID_UI_CTRL, pControlManager, E_SYSTEM, "[E_SYSTEM] Failed to get root.");
+
+       _Frame* pCurrentFrame = dynamic_cast<_Frame*>(pControlManager->GetCurrentFrame());
+       if (!pCurrentFrame || (pCurrentFrame && pCurrentFrame->GetShowMode() != FRAME_SHOW_MODE_FULL_SCREEN))
+       {
+               if (pCurrentFrame)
+               {
+                       SysLog(NID_UI_CTRL, "FrameShowMode[%d]", pCurrentFrame->GetShowMode());
+               }
+               else
+               {
+                       SysLog(NID_UI_CTRL, "Frame is null");
+               }
+               return;
+       }
+
        float initialParentHeight = __initialParentHeight;
        if (__pResizedPanel != __pParentPanel)
        {
@@ -8123,7 +8155,6 @@ _EditPresenter::AdjustParentPanelHeight(bool restore)
        FloatRectangle scrollPanelBounds = __pParentPanel->GetBoundsF();
        float gapY = 0.0f;
 
-       _ControlManager* pControlManager = _ControlManager::GetInstance();
        float displayedPanelHeight = 0.0f;
        FloatDimension screenSize;
 
@@ -10874,7 +10905,7 @@ _EditPresenter::ScrollPanelToCursorPosition(bool show)
                return;
        }
 
-       SysLog(NID_UI_CTRL, "------------------------ScrollPosition recalculation starts~!!!!--------------------------.");
+       //SysLog(NID_UI_CTRL, "------------------------ScrollPosition recalculation starts~!!!!--------------------------.");
 
        FloatRectangle absPanelRect = __pParentPanel->GetAbsoluteBoundsF(true);
        FloatRectangle absEditRect = __pEdit->GetAbsoluteBoundsF(true);
@@ -10895,15 +10926,15 @@ _EditPresenter::ScrollPanelToCursorPosition(bool show)
                if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE)
                {
                        newScrollPosition = scrollPosition -(absPanelRect.y -absEditRect.y);
-                       SysLog(NID_UI_CTRL, "[single line edit] Move up till top boundary of edit.");
+                       //SysLog(NID_UI_CTRL, "[single line edit] Move up till top boundary of edit.");
                }
                else
                {
                        newScrollPosition = scrollPosition -(absPanelRect.y -absCursorBounds.y);
-                       SysLog(NID_UI_CTRL, "[multi-line edit] Move up till up position of cursor.");
+                       //SysLog(NID_UI_CTRL, "[multi-line edit] Move up till up position of cursor.");
                }
 
-               SysLog(NID_UI_CTRL, "move up scroll position from %f to %f", scrollPosition, newScrollPosition);
+               //SysLog(NID_UI_CTRL, "move up scroll position from %f to %f", scrollPosition, newScrollPosition);
        }
        else
        {
@@ -10911,7 +10942,7 @@ _EditPresenter::ScrollPanelToCursorPosition(bool show)
                {
                        if ((absPanelRect.y + absPanelRect.height) > (absEditRect.y + absEditRect.height))
                        {
-                               SysLog(NID_UI_CTRL, "[single line edit] already exists in exposed region.");
+                               //SysLog(NID_UI_CTRL, "[single line edit] already exists in exposed region.");
 
                                return;
                        }
@@ -10923,22 +10954,22 @@ _EditPresenter::ScrollPanelToCursorPosition(bool show)
                {
                        if ((absCursorBounds.y + absCursorBounds.height) < (absPanelRect.y + absPanelRect.height))
                        {
-                               SysLog(NID_UI_CTRL, "[multi-line edit]Cursor already exist in exposed region.");
+                               //SysLog(NID_UI_CTRL, "[multi-line edit]Cursor already exist in exposed region.");
 
                                return;
                        }
 
                        newScrollPosition = scrollPosition + ((absCursorBounds.y + absCursorBounds.height) -(absPanelRect.y + absPanelRect.height));
-                       SysLog(NID_UI_CTRL, "Move down till down position of cursor.");
+                       //SysLog(NID_UI_CTRL, "Move down till down position of cursor.");
                }
 
-               SysLog(NID_UI_CTRL, "move down scroll position from %f to %f", scrollPosition, newScrollPosition);
+               //SysLog(NID_UI_CTRL, "move down scroll position from %f to %f", scrollPosition, newScrollPosition);
        }
 
        __pParentPanel->SetScrollPosition(newScrollPosition);
        __pParentPanel->Invalidate();
 
-       SysLog(NID_UI_CTRL, "------------------------ScrollPosition recalculation Ends!!!!--------------------------.");
+       //SysLog(NID_UI_CTRL, "------------------------ScrollPosition recalculation Ends!!!!--------------------------.");
        return;
 }