Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

group.h

Go to the documentation of this file.
00001 /*************************************************************************
00002  *
00003  *  AUTHOR: Wilson T
00004  *
00005  *  TITLE:  group.h
00006  *
00007  *  DATE: April 28, 1993
00008  *
00009  *  PURPOSE:  Declaration of group class for checkboxes.
00010  *
00011  *************************************************************************/
00012 
00013 #include <stdlib.h>
00014 #include "typedefs.h"
00015 #include "scrnobj.h"
00016 #include "viewport.h"
00017 #include "display.h"
00018 #include "messages.h"
00019 #include "checkbox.h"
00020 #include "nodes.h"
00021 
00022 class Group:public ScrnObj{
00023   CheckBox **Boxes;
00024 protected:
00025   int NumObj, CurrentObj, CurrentId, IdNum, Default;
00026 public:
00027   Group     ()
00028     {};
00029   Group     (int, int);
00030   ~Group      ();
00031   void Add      (CheckBox *, int, int);
00032   Message Dispatch  (Message &);
00033   void Init     (Display *d, int x, int y)
00034     {Disp=d, X=x, Y=y;}
00035   void Draw     ();
00036   void Erase    ();
00037   void DisableBox   (int);
00038   void EnableBox    (int);
00039 protected:
00040   void off_last   ();
00041   int  id_to_int    (int);
00042 private:
00043   void disable_proc ();
00044   void enable_proc  ();
00045 };
00046 
00047 typedef CheckBox * CheckBoxP;
00048 
00049 inline Group::Group(int numobj, int idnum)
00050   {NumObj=numobj; CurrentObj=0; Default=0; CurrentId=0; IdNum=idnum;
00051    Boxes = (CheckBox **) calloc (NumObj, sizeof (CheckBox*));}
00052 
00053 inline void Group::off_last()
00054   {Boxes[CurrentId]->ChangeStatus(Off);}
00055 

Generated on Sun Jul 6 23:07:15 2003 for Scotland Yard by doxygen1.2.15