Beispiel #1
0
wxPoint
Group::GetTopLeft(List<Shape *> *shapes) const
{
	int min_x = 0, min_y = 0;
	List<Shape *>::Iterator i = shapes == NULL ? ChildIterator() : shapes->Iterate();
	if (!i)
	{
		wxPoint pos = (*i)->GetPosition();
		min_x = pos.x, min_y = pos.y;
		for (i++; !i; i++)
		{
			wxPoint pos = (*i)->GetPosition();
			if (pos.x < min_x)
			{
				min_x = pos.x;
			}
			if (pos.y < min_y)
			{
				min_y = pos.y;
			}
		}
	}
	return wxPoint(min_x, min_y);
}
 //---------------------------------------------------------------------
 OverlayContainer::ChildIterator OverlayContainer::getChildIterator(void)
 {
     return ChildIterator(mChildren.begin(), mChildren.end());
 }
Beispiel #3
0
 ChildIterator childEnd(Node* n) {
     assert(getIndexOf(n) < max_nodes);
     return ChildIterator(*this, *n, n->num_children);
 }
Beispiel #4
0
 ChildIterator childBegin(Node* n) {
     assert(getIndexOf(n) < max_nodes);
     return ChildIterator(*this, *n, 0);
 }
Beispiel #5
0
Bone::ChildIterator Bone::getChildIterator()
{
	return ChildIterator(mChildrenById);
}
 static ChildIteratorType child_end(NodeType *T) {
   return ChildIterator(T->getEdges().end(), true);
 }
 static ChildIteratorType child_begin(NodeType *T) {
   return ChildIterator(T->getEdges().begin(), false);
 }