bool
_Control::OnFocusGained(const _Control& source)
{
+ bool isfocusMode = _FocusManagerImpl::GetInstance()->IsFocusModeStateEnabled();
+ if (isfocusMode)
+ {
+ DrawFocus();
+ }
return false;
}
_Control::OnAncestorVisibleStateChanged(const _Control& control)
{
_TouchManager* pTouchManager = _TouchManager::GetInstance();
- if (pTouchManager && IsVisible() == false)
+ if (pTouchManager && IsVisible() == false && IsAttachedToMainTree() == true)
{
if(pTouchManager->GetTouchControlSource() == this)
{
_Control* pFocusTraversalControl = pTop->GetFocusTraversalControl(this);
if ((&control) == pFocusTraversalControl)
{
- pTop->SetFocusTraversalControl(this);
+ pTop->SetFocusTraversalControl(&control, false);
}
}
return __pDelayedTouchInfoList;
}
+void
+_Control::SetVisualElement(_ControlVisualElement* pVisualElement)
+{
+ __pVisualElement = pVisualElement;
+}
+
_VisualElement*
_Control::GetVisualElement(void) const
{
- SysAssert(__pVisualElement);
return __pVisualElement;
}
{
int count = PrintDescription(printChildren, 0, level);
- SysLog(NID_UI, "%d controls were printed.", count);
+ SysSecureLog(NID_UI, "%d controls were printed.", count);
}
int
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();
}
// 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());
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();
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
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
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());
}
}
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());
}
}