private void PrepareState(int controlID, IReorderableListAdaptor adaptor)
{
_controlID = controlID;
_visibleRect = GUIHelper.VisibleRect();
if ((Flags & ReorderableListFlags.ShowIndices) != 0)
_indexLabelWidth = CountDigits(adaptor.Count) * 8 + 8;
else
_indexLabelWidth = 0;
_tracking = IsTrackingControl(controlID);
_allowReordering = (Flags & ReorderableListFlags.DisableReordering) == 0;
// The value of this field is reset each time the control is drawn and may
// be invalidated when list items are drawn.
_allowDropInsertion = true;
}