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; }
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; }
int CEnHeaderCtrl::GetTrackedItems(CIntArray& aTracked) const { int nItem = GetItemCount(); aTracked.SetSize(nItem); while (nItem--) aTracked[nItem] = IsItemTracked(nItem); return aTracked.GetSize(); }
int CEnHeaderCtrl::GetItemWidths(CIntArray& aWidths) const { int nItem = GetItemCount(); aWidths.SetSize(nItem); while (nItem--) aWidths[nItem] = GetItemWidth(nItem); return aWidths.GetSize(); }
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; }
BOOL CEnHeaderCtrl::SetItemOrder(const CIntArray& aOrder) { return SetOrderArray(aOrder.GetSize(), (LPINT)aOrder.GetData()); }