*
* @since 3.0
*
- * @return error code
+ * @return A pointer to list of VisualElement. It's made by Tizen::Base::Collection::ArrayList to add intersected VE's pointers
* @param[in] point The hit position in the coordinate space of this instance
- * @param[out] list Tizen::Base::Collection::ArrayListT<VisualElement*> list to add intersected VE's pointers
+
* @see GetChildAt()
* @see OnHitTest()
*/
- result GetChildListAt(const Tizen::Graphics::FloatPoint& point, Tizen::Base::Collection::IList* list);
+ Tizen::Base::Collection::IList* GetChildListAtN(const Tizen::Graphics::FloatPoint& point);
/**
* Build list of selected VisualElements in the selection region
*
* @since 3.0
*
- * @return error code
+ * @return A pointer to list of VisualElement. It's made by Tizen::Base::Collection::ArrayList to add intersected VE's pointers
* @param[in] selection The hit position in the coordinate space of this instance
* @param[in] mode selection mode
- * @param[out] list Tizen::Base::Collection::ArrayListT<VisualElement*> list to add intersected VE's pointers
- * @see VisualElementSelectionMode
+ * @see SelectionMode
*/
- result GetChildListAt(const Tizen::Graphics::FloatRectangle& selection, SelectionMode mode, Tizen::Base::Collection::IList* list);
+ Tizen::Base::Collection::IList* GetChildListAtN(const Tizen::Graphics::FloatRectangle& selection, SelectionMode mode);
return _pVisualElementImpl->GetBoundingVolume();
}
-result
-VisualElement::GetChildListAt(const Tizen::Graphics::FloatPoint& point, Tizen::Base::Collection::IList* list)
+Tizen::Base::Collection::IList*
+VisualElement::GetChildListAtN(const Tizen::Graphics::FloatPoint& point)
{
CHECK_CONSTRUCTED;
- return _pVisualElementImpl->GetChildListAt(point, list);
+ return _pVisualElementImpl->GetChildListAtN(point);
}
-result
-VisualElement::GetChildListAt(const Tizen::Graphics::FloatRectangle& selection, SelectionMode mode, Tizen::Base::Collection::IList* list)
+Tizen::Base::Collection::IList*
+VisualElement::GetChildListAtN(const Tizen::Graphics::FloatRectangle& selection, SelectionMode mode)
{
CHECK_CONSTRUCTED;
- list->RemoveAll();
-
- SysTryReturnResult(NID_UI_ANIM, selection.height > 0.0f && selection.width > 0.0f, E_INVALID_ARG, "Selection width and height must be greater than 0");
-
- return _pVisualElementImpl->GetChildListAt(selection, mode, list);
+ return _pVisualElementImpl->GetChildListAtN(selection, mode);
}
return !(obj1 == obj2);
}
-result
-_VisualElementImpl::GetChildListAt(const Tizen::Graphics::FloatPoint& point, Tizen::Base::Collection::IList* list)
+Tizen::Base::Collection::IList*
+_VisualElementImpl::GetChildListAtN(const Tizen::Graphics::FloatPoint& point)
{
Tizen::Base::Collection::ArrayListT < Tizen::Base::Collection::MapEntryT < float, VisualElement* > > pairList;
GetChildListAtI(point, pairList);
- list->RemoveAll();
-
//sort by float
Tizen::Base::Collection::IComparerT< Tizen::Base::Collection::MapEntryT< float, VisualElement* > >* pPairComparer = new IntersectedPairComparer();
//copy to list in right order
int count = pairList.GetCount();
- Tizen::Base::Collection::MapEntryT < float, VisualElement* > intersectedPair;
- for (int i = 0; i < count; i++)
+ if(count > 0)
{
- pairList.GetAt(i,intersectedPair);
- list->Add(intersectedPair.GetValue());
+ Tizen::Base::Collection::ArrayList* list = new (std::nothrow) Tizen::Base::Collection::ArrayList();
+ SysTryReturn(NID_UI_ANIM, list != null, null, E_OUT_OF_MEMORY, "Memory allocation failed, cannot create ArrayList" );
+ list->Construct();
+
+ Tizen::Base::Collection::MapEntryT < float, VisualElement* > intersectedPair;
+ for (int i = 0; i < count; i++)
+ {
+ pairList.GetAt(i,intersectedPair);
+ list->Add(intersectedPair.GetValue());
+ }
+ return list;
}
- return E_SUCCESS;
+ return null;
}
result
return E_SUCCESS;
}
-result
-_VisualElementImpl::GetChildListAt(const Tizen::Graphics::FloatRectangle& selection, VisualElement::SelectionMode mode, Tizen::Base::Collection::IList* list)
+Tizen::Base::Collection::IList*
+_VisualElementImpl::GetChildListAtN(const Tizen::Graphics::FloatRectangle& selection, VisualElement::SelectionMode mode)
{
- list->RemoveAll();
+
int j;
//make global selection
//test if VE BV is included with selection
if (!localSelection.FindIncludedPoints(GetBoundingVolume()))
{
- return E_SUCCESS;
+
+ return null;
}
}
_VisualElementImpl* pChild = null;
int count = __children.GetCount();
- //test all children to have intersected and included elements
- for (int i = 0; i < count; i++)
+ if (count > 0)
{
- __children.GetAt(i, pChild);
- if (pChild != null)
+ Tizen::Base::Collection::ArrayList* list = new (std::nothrow) Tizen::Base::Collection::ArrayList();
+ SysTryReturn(NID_UI_ANIM, list != null, null, E_OUT_OF_MEMORY, "Memory allocation failed, cannot create ArrayList" );
+ list->Construct();
+
+ //test all children to have intersected and included elements
+ for (int i = 0; i < count; i++)
{
- pChild->GetSelectedI(globalSelection, mode, list);
+ __children.GetAt(i, pChild);
+
+ if (pChild != null)
+ {
+ pChild->GetSelectedI(globalSelection, mode, *list);
+ }
}
}
- return E_SUCCESS;
+ return null;
+
}
result
-_VisualElementImpl::GetSelectedI(const Tizen::Ui::Animations::_Selection& globalSelection, VisualElement::SelectionMode mode, Tizen::Base::Collection::IList* list)
+_VisualElementImpl::GetSelectedI(const Tizen::Ui::Animations::_Selection& globalSelection, VisualElement::SelectionMode mode, Tizen::Base::Collection::IList& list)
{
_Selection localSelection = globalSelection;
localSelection.Transform(GetMatrixFromTop());
//test this mesh to be included by selection
if (!localSelection.FindExcludedPoints(pMesh))
{
- list->Add(GetPublic());
+ list.Add(GetPublic());
}
}
else
//test this mesh to have points included in selection
if (localSelection.FindIncludedPoints(pMesh))
{
- list->Add(GetPublic());
+ list.Add(GetPublic());
}
else
{
//test this mesh to have edges intersected with selection
if (localSelection.FindIncludedMeshIntersections(pMesh))
{
- list->Add(GetPublic());
+ list.Add(GetPublic());
}
}
}
BoundingVolume& GetBoundingVolume(void);
//Picking instruments
- result GetChildListAt(const Tizen::Graphics::FloatPoint& point, Tizen::Base::Collection::IList* list);
+ Tizen::Base::Collection::IList* GetChildListAtN(const Tizen::Graphics::FloatPoint& point);
result GetChildListAtI(const Tizen::Graphics::FloatPoint point, Tizen::Base::Collection::ArrayListT<Tizen::Base::Collection::MapEntryT < float, VisualElement* > >& pairList);
- result GetChildListAt(const Tizen::Graphics::FloatRectangle& selection, VisualElement::SelectionMode mode, Tizen::Base::Collection::IList* list);
- result GetSelectedI(const Tizen::Ui::Animations::_Selection& selection, VisualElement::SelectionMode mode, Tizen::Base::Collection::IList* list);
+ Tizen::Base::Collection::IList* GetChildListAtN(const Tizen::Graphics::FloatRectangle& selection, VisualElement::SelectionMode mode);
+ result GetSelectedI(const Tizen::Ui::Animations::_Selection& selection, VisualElement::SelectionMode mode, Tizen::Base::Collection::IList& list);
public:
enum