Add unreleased controls logs for debugging
[platform/framework/native/uifw.git] / src / ui / FUi_Control.cpp
index a8f38ef..24a9a53 100644 (file)
@@ -693,6 +693,11 @@ _Control::OnMouseWheeled(const _Control& source, const _MouseInfo& mouseinfo)
 bool
 _Control::OnFocusGained(const _Control& source)
 {
+       bool isfocusMode = _FocusManagerImpl::GetInstance()->IsFocusModeStateEnabled();
+       if (isfocusMode)
+       {
+               DrawFocus();
+       }
        return false;
 }
 
@@ -936,7 +941,7 @@ void
 _Control::OnAncestorVisibleStateChanged(const _Control& control)
 {
        _TouchManager* pTouchManager = _TouchManager::GetInstance();
-       if (pTouchManager && IsVisible() == false)
+       if (pTouchManager && IsVisible() == false && IsAttachedToMainTree() == true)
        {
                if(pTouchManager->GetTouchControlSource() == this)
                {
@@ -1615,7 +1620,7 @@ _Control::CallOnDetachingFromMainTree(_Control& control)
                _Control* pFocusTraversalControl = pTop->GetFocusTraversalControl(this);
                if ((&control) == pFocusTraversalControl)
                {
-                       pTop->SetFocusTraversalControl(this);
+                       pTop->SetFocusTraversalControl(&control, false);
                }
        }
 
@@ -4807,10 +4812,15 @@ _Control::GetTouchInfoList(void)
        return __pDelayedTouchInfoList;
 }
 
+void
+_Control::SetVisualElement(_ControlVisualElement* pVisualElement)
+{
+       __pVisualElement = pVisualElement;
+}
+
 _VisualElement*
 _Control::GetVisualElement(void) const
 {
-       SysAssert(__pVisualElement);
        return __pVisualElement;
 }
 
@@ -4819,7 +4829,7 @@ _Control::PrintDescription(bool printChildren, int level)
 {
        int count = PrintDescription(printChildren, 0, level);
 
-       SysLog(NID_UI, "%d controls were printed.", count);
+       SysSecureLog(NID_UI, "%d controls were printed.", count);
 }
 
 int
@@ -4842,13 +4852,13 @@ _Control::PrintDescription(bool printChildren, int depth, int level)
        indent.Append(format);
 
        String delimiter(L"-------------------------------------------------------------------------------------------");
-       SysLog(NID_UI, "%ls", delimiter.GetPointer());
+       SysSecureLog(NID_UI, "%ls", delimiter.GetPointer());
 
        // Public
        String publicDescription = GetControlDelegate().GetDescription();
        if (!publicDescription.IsEmpty())
        {
-               SysLog(NID_UI, "%ls %ls", indent.GetPointer(), publicDescription.GetPointer());
+               SysSecureLog(NID_UI, "%ls %ls", indent.GetPointer(), publicDescription.GetPointer());
        }
 
        _ControlManager* pControlManager = _ControlManager::GetInstance();
@@ -4862,7 +4872,7 @@ _Control::PrintDescription(bool printChildren, int depth, int level)
        }
 
        // Core
-       SysLog(NID_UI, "%ls 0x%x(%d %ls) enable(%d) enableState(%d) visible(%d) visibleState(%d) focusable(%d) focused(%d) clip(%d) movable(%d) resizable(%d) inputEnableState(%d)",
+       SysSecureLog(NID_UI, "%ls 0x%x(%d %ls) enable(%d) enableState(%d) visible(%d) visibleState(%d) focusable(%d) focused(%d) clip(%d) movable(%d) resizable(%d) inputEnableState(%d)",
                indent.GetPointer(), this, __controlHandle.ToInt(), GetName().GetPointer(), IsEnabled(), GetEnableState(), IsVisible(), GetVisibleState(),
                IsFocusable(), focused, IsClipToParent(), IsMovable(), IsResizable(), GetInputEnableState());
 
@@ -4872,14 +4882,14 @@ _Control::PrintDescription(bool printChildren, int depth, int level)
        Rectangle clientBounds = GetClientBounds();
        Rectangle absoluteBounds = GetAbsoluteBounds();
 
-       SysLog(NID_UI, "%ls bounds(%d %d %d %d) min(%d %d) max(%d %d) scrollPos(%.2f %.2f) cbounds(%d %d %d %d) abounds(%d %d %d %d)",
+       SysSecureLog(NID_UI, "%ls bounds(%d %d %d %d) min(%d %d) max(%d %d) scrollPos(%.2f %.2f) cbounds(%d %d %d %d) abounds(%d %d %d %d)",
                indent.GetPointer(), bounds.x, bounds.y, bounds.width, bounds.height,
                min.width, min.height, max.width, max.height,
                GetVerticalScrollPosition(), GetHorizontalScrollPosition(),
                clientBounds.x, clientBounds.y, clientBounds.width, clientBounds.height,
                absoluteBounds.x, absoluteBounds.y, absoluteBounds.width, absoluteBounds.height);
 
-       SysLog(NID_UI, "%ls bgColor(0x%x) layoutable(%d) orientation(%d) drag(%d) drop(%d) area(%d) layer(%d)",
+       SysSecureLog(NID_UI, "%ls bgColor(0x%x) layoutable(%d) orientation(%d) drag(%d) drop(%d) area(%d) layer(%d)",
                indent.GetPointer(), __backgroundColor.GetRGB32(), IsLayoutable(), GetOrientation(), IsDragEnabled(), IsDropEnabled(), GetArea(), GetLayer());
 
        Canvas* pCanvas = GetCanvasN();
@@ -4889,13 +4899,13 @@ _Control::PrintDescription(bool printChildren, int depth, int level)
                Color canvasBackgroundColor = pCanvas->GetBackgroundColor();
                Color canvasForegroundColor = pCanvas->GetForegroundColor();
 
-               SysLog(NID_UI, "%ls canvas.bounds(%d %d %d %d) canvas.bgColor(0x%x) canvas.fgColor(0x%x)",
+               SysSecureLog(NID_UI, "%ls canvas.bounds(%d %d %d %d) canvas.bgColor(0x%x) canvas.fgColor(0x%x)",
                        indent.GetPointer(), canvasBounds.x, canvasBounds.y, canvasBounds.width, canvasBounds.height, canvasBackgroundColor.GetRGB32(), canvasForegroundColor.GetRGB32());
 
                delete pCanvas;
        }
 
-       SysLog(NID_UI, "%ls DataBindingContext(0x%x) ControlDelegate(0x%x) UserData(0x%x) destroying(%d)",
+       SysSecureLog(NID_UI, "%ls DataBindingContext(0x%x) ControlDelegate(0x%x) UserData(0x%x) destroying(%d)",
                indent.GetPointer(), __pDataBindingContext, __pControlDelegate, __pUserData, __destroying);
 
        // Ownees
@@ -4914,23 +4924,23 @@ _Control::PrintDescription(bool printChildren, int depth, int level)
 
        if (!ownees.IsEmpty())
        {
-               SysLog(NID_UI, "%ls Ownees(%ls)", indent.GetPointer(), ownees.GetPointer());
+               SysSecureLog(NID_UI, "%ls Ownees(%ls)", indent.GetPointer(), ownees.GetPointer());
        }
 
        _VisualElementImpl* pVisualElementImpl = _VisualElementImpl::GetInstance(*__pVisualElement);
 
-       SysLog(NID_UI, "%ls _VisualElement(0x%x) _VisualElementImpl(0x%x) VisualElementContentProvider(0x%x) VisualElementEventListener(0x%x)",
+       SysSecureLog(NID_UI, "%ls _VisualElement(0x%x) _VisualElementImpl(0x%x) VisualElementContentProvider(0x%x) VisualElementEventListener(0x%x)",
                indent.GetPointer(), __pVisualElement, pVisualElementImpl, __pVisualElementContentProvider, __pVisualElementEventListener);
 
        // Layout
-       SysLog(NID_UI, "%ls LayoutItemHandler(0x%x) PortraitLayout(0x%x) LandscapeLayout(0x%x) LayoutContainer(0x%x)",
+       SysSecureLog(NID_UI, "%ls LayoutItemHandler(0x%x) PortraitLayout(0x%x) LandscapeLayout(0x%x) LayoutContainer(0x%x)",
                indent.GetPointer(), __pLayoutItemHandler, __pPortraitLayout, __pLandscapeLayout, __pLayoutContainer);
 
        // Derived class
        String description = GetDescription();
        if (!description.IsEmpty())
        {
-               SysLog(NID_UI, "%ls %ls", indent.GetPointer(), description.GetPointer());
+               SysSecureLog(NID_UI, "%ls %ls", indent.GetPointer(), description.GetPointer());
        }
 
        // Print Gesture List
@@ -4946,7 +4956,7 @@ _Control::PrintDescription(bool printChildren, int depth, int level)
                pEnumerator->GetCurrent(pGestureDetector);
                if (pGestureDetector)
                {
-                       SysLog(NID_UI, "%ls AddedGesture : %ls", indent.GetPointer(), pGestureDetector->GetDescription().GetPointer());
+                       SysSecureLog(NID_UI, "%ls AddedGesture : %ls", indent.GetPointer(), pGestureDetector->GetDescription().GetPointer());
                }
        }
 
@@ -4962,7 +4972,7 @@ _Control::PrintDescription(bool printChildren, int depth, int level)
                pStartedGestureEnumerator->GetKey(pStartedGestureDetector);
                if (pStartedGestureDetector)
                {
-                       SysLog(NID_UI, "%ls StartedGesture : %ls", indent.GetPointer(), pStartedGestureDetector->GetDescription().GetPointer());
+                       SysSecureLog(NID_UI, "%ls StartedGesture : %ls", indent.GetPointer(), pStartedGestureDetector->GetDescription().GetPointer());
                }
        }