/************************************************************************/
/* Copyright 1998 MBARI							*/
/************************************************************************/
#ifndef _ALARMPANEL_H
#define _ALARMPANEL_H

#include <Vk/VkComponent.h>
#include "ErrorHandler.h"
#include "AlarmLight.h"
#include "DynamicLabel.h"

/*
CLASS 
AlarmPanel

DESCRIPTION
Contains AlarmLight object, displays total alarm counts

AUTHOR
Tom O'Reilly
*/
class AlarmPanel : public VkComponent, public ErrorHandler
{
  public:

  AlarmPanel(const char *name, Widget parent);
  ~AlarmPanel();

  const char *className()
  {
    return "AlarmPanel";
  }
  
  ///////////////////////////////////////////////////////////////////
  // Call flash() method of contained AlarmLight
  void flash();

  ///////////////////////////////////////////////////////////////////
  // Call shine() method of contained AlarmLight
  void shine();

  ///////////////////////////////////////////////////////////////////
  // Call darken() method of contained AlarmLight
  void darken();

  ///////////////////////////////////////////////////////////////////
  // Display active alarm count for specified priority
  void setCount(Priority priority, int count);

  ///////////////////////////////////////////////////////////////////
  // Call setLabel() method of contained AlarmLight
  void setLightLabel(char *txt);

  ///////////////////////////////////////////////////////////////////
  // Call priority() method of contained AlarmLight
  Priority lightPriority();

  ///////////////////////////////////////////////////////////////////
  // Call setPriority() method of contained AlarmLight
  void setLightPriority(Priority priority);

  ///////////////////////////////////////////////////////////////////
  // Call setButtonCallback() method of contained AlarmLight
  void setButtonCallback(XtCallbackProc, XtPointer clientData);

  protected:

  AlarmLight *_alarmLight;
  DynamicLabel *_counts[NPriorityLevels];
};


#endif
