# include "Ximage.h"
# define PAD_X 10
# define PAD_Y 10
# define NPLANES 1
# define NPIXELS 255

/******** Here we test the Buttons specific to this program  *******/
Button *
CheckButtons (event, layout)
XButtonEvent  event[];
Layout        layout[];
{

  int i;
  Button *button;
  button = (Button *) NULL;

  if (InButton (event, &layout[0].recenter_button)) 
    button = &layout[0].recenter_button;

  if (InButton (event, &layout[0].grey_button)) 
    button = &layout[0].grey_button;

  if (InButton (event, &layout[0].rainbow_button)) 
    button = &layout[0].rainbow_button;

  if (InButton (event, &layout[0].puns_button)) 
    button = &layout[0].puns_button;

  if (InButton (event, &layout[0].PS_button)) 
    button = &layout[0].PS_button;

  if (InButton (event, &layout[0].hms_button)) 
    button = &layout[0].hms_button;

  for (i = 0; i < NOVERLAYS; i++) {
    if (InButton (event, &layout[0].overlay_button[i])) 
      button = &layout[0].overlay_button[i];
  }

  return (button);

}


/* To define a button, you must:

   0) add the button to the Layout structure in structures.h
   1) place the info about the button in PositionPicture.c
   2) (make any bitmaps needed and put them in buttons.h
   3) place an entry in CheckButtons.c
   4) Add the button to Refresh.c
   5) create the button's function
   6) add it to the Makefile
   7) add it to the prototypes

*/
