Пример #1
0
BOOL CEnHeaderCtrl::SetTrackedItems(const CIntArray& aTracked)
{
	int nItem = GetItemCount();
	ASSERT(nItem == aTracked.GetSize());
	
	if (nItem != aTracked.GetSize())
		return FALSE;
	
	while (nItem--)
		SetTrackedItem(nItem, aTracked[nItem]);
	
	return TRUE;
}
Пример #2
0
BOOL CEnHeaderCtrl::SetItemWidths(const CIntArray& aWidths)
{
	int nItem = GetItemCount();
	ASSERT(nItem == aWidths.GetSize());

	if (nItem != aWidths.GetSize())
		return FALSE;

	while (nItem--)
	{
		if (!SetItemWidth(nItem, aWidths[nItem], FALSE))
			return FALSE;
	}

	RecalcItemTooltipRects();
	return TRUE;
}
Пример #3
0
int CEnHeaderCtrl::GetTrackedItems(CIntArray& aTracked) const
{
	int nItem = GetItemCount();
	aTracked.SetSize(nItem);
	
	while (nItem--)
		aTracked[nItem] = IsItemTracked(nItem);
	
	return aTracked.GetSize();
}
Пример #4
0
int CEnHeaderCtrl::GetItemWidths(CIntArray& aWidths) const
{
	int nItem = GetItemCount();
	aWidths.SetSize(nItem);

	while (nItem--)
		aWidths[nItem] = GetItemWidth(nItem);

	return aWidths.GetSize();
}
Пример #5
0
int CEnHeaderCtrl::GetItemPosition(int nItem, const CIntArray& aOrder)
{
	int i = aOrder.GetSize();

	while (i--)
	{
		if (aOrder[i] == nItem)
			return i;
	}

	// not found ?
	ASSERT(0);
	return -1;
}
Пример #6
0
BOOL CEnHeaderCtrl::SetItemOrder(const CIntArray& aOrder)
{
	return SetOrderArray(aOrder.GetSize(), (LPINT)aOrder.GetData());
}