/* Copyright (C) 1996,1997,1998,1999 by Salvador E. Tropea (SET),
   see copyrigh file for details */
#define Uses_TSCheckBoxes
#include <easydia1.h>
#include <tv.h>
#include <easydiag.h>

TSCheckBoxes::TSCheckBoxes(TSItem *aStrings, int wForced)
{
 TSItem *itemAux=aStrings;
 int items=0;

 if (wForced>=0)
   {
    w=wForced;
    while (itemAux)
      {
       items++;
       itemAux=itemAux->next;
      }
   }
 else
   {
    int wAux=0,l;

    while (itemAux)
      {
       items++;
       l=cstrlen(itemAux->value)+6;
       if (l>wAux)
          wAux=l;
       itemAux=itemAux->next;
      }
    w=wAux;
   }
 h=items;
 view=new TCheckBoxes(TRect(0,0,w,h),aStrings);
}
