/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
using namespace Dali::Accessibility;
-bool Component::Contains( Point p, CoordType ctype )
+bool Component::IsAccessibleContainingPoint(Point point, Dali::Accessibility::CoordinateType type)
{
- auto extents = GetExtents( ctype );
- return p.x >= extents.x && p.y >= extents.y && p.x <= extents.x + extents.width && p.y <= extents.y + extents.height;
+ auto extents = GetExtents(type);
+ return point.x >= extents.x && point.y >= extents.y && point.x <= extents.x + extents.width && point.y <= extents.y + extents.height;
}
-Accessible* Component::GetAccessibleAtPoint( Point p, CoordType ctype )
+Accessible* Component::GetAccessibleAtPoint(Point point, Dali::Accessibility::CoordinateType type)
{
auto children = GetChildren();
- for( auto childIt = children.rbegin(); childIt != children.rend(); childIt++ )
+ for(auto childIt = children.rbegin(); childIt != children.rend(); childIt++)
{
- auto component = dynamic_cast< Component* >( *childIt );
- if( component && component->Contains( p, ctype ) )
+ auto component = dynamic_cast<Component*>(*childIt);
+ if(component && component->IsAccessibleContainingPoint(point, type))
{
return component;
}