/************************************************************************/
/* Copyright 1998 MBARI							*/
/************************************************************************/
#ifndef _ALARMPOPUP
#define _ALARMPOPUP
static char AlarmPopup_h_id[] = "$Header: /u/oreilly/rov/tmacs/RCS/AlarmPopup.h,v 1.3 1998/12/18 21:07:21 oreilly Exp $";

/*
$Log: AlarmPopup.h,v $
Revision 1.3  1998/12/18 21:07:21  oreilly
Added documentation

Revision 1.2  1997/04/30 19:27:15  oreilly
*** empty log message ***

 * Revision 1.1  96/10/28  09:13:16  09:13:16  oreilly (Thomas C. O'Reilly)
 * Initial revision
 * 
*/

#include <Vk/VkSimpleWindow.h>
#include "AlarmList.h"

/*
CLASS 
AlarmPopup

DESCRIPTION
AlarmPopup displays AlarmList in a popup window

AUTHOR
Tom O'Reilly
*/
class AlarmPopup : public VkSimpleWindow
{
  public:
  AlarmPopup(const char *name, Priority priority);
  ~AlarmPopup()
  {
  }
  
  const char *className()
  {
    return "AlarmPopup";
  }
  
  ///////////////////////////////////////////////////////////////////
  // Return priority 
  Priority priority()
  {
    return _priority;
  }

  AlarmList *list;

  ///////////////////////////////////////////////////////////////////
  // Specify callback for "OK" button
  void setOkCallback(XtCallbackProc callback, XtPointer clientData)
  {
    XtAddCallback(_ok, XmNactivateCallback, callback, clientData);
  }

  ///////////////////////////////////////////////////////////////////
  // Return "OK" button Widget
  Widget okButton()
  {
    return _ok;
  }
  
  protected:
  Priority _priority;
  Widget _ok;

  virtual void handleWmDeleteMessage();
  
  private:
  static void clearCallback(Widget w, XtPointer clientData, 
			    XtPointer callData);

  static void okCallback(Widget w, XtPointer clientData, XtPointer callData);
  
}; 

#endif
