Ejemplo n.º 1
0
/* ActionSpecialTreeView::showSpecial
 * Finds the item for [special], selects it and ensures it is shown
 *******************************************************************/
void ActionSpecialTreeView::showSpecial(int special, bool focus)
{
	if (special == 0)
	{
		EnsureVisible(item_none);
		Select(item_none);
		if (focus)
			SetFocus();
		return;
	}

	// Go through item groups
	for (unsigned a = 0; a < groups.size(); a++)
	{
		// Go through group items
		for (int b = 0; b < GetChildCount(groups[a].item); b++)
		{
			wxDataViewItem item = GetNthChild(groups[a].item, b);

			// Select+show if match
			if (specialNumber(item) == special)
			{
				EnsureVisible(item);
				Select(item);
				if (focus)
					SetFocus();
				return;
			}
		}
	}
}
Ejemplo n.º 2
0
void ThingTypeTreeView::showType(int type)
{
	// Go through item groups
	for (unsigned a = 0; a < groups.size(); a++)
	{
		// Go through group items
		for (int b = 0; b < GetChildCount(groups[a].item); b++)
		{
			wxDataViewItem item = GetNthChild(groups[a].item, b);

			// Select+show if match
			if (typeNumber(item) == type)
			{
				Select(item);
				EnsureVisible(item);
				return;
			}
		}
	}
}
Ejemplo n.º 3
0
IGISPoint *				WED_GISBoundingBox::GetMax(void) const
{
	IGISPoint * p = SAFE_CAST(IGISPoint, GetNthChild(1));
	DebugAssert(p != NULL);
	return p;
}