#ifndef _DMBOOLEANSWITCH_H
#define _DMBOOLEANSWITCH_H

#include "DmGuiObject.h"

/*
CLASS 
DmBooleanSwitch

DESCRIPTION
Display and set a Boolean DataManager item value using a 
Motif "toggle" widget

AUTHOR
Tom O'Reilly
*/

class DmBooleanSwitch : public DmGuiObject {

public:

  DmBooleanSwitch(const char *name, Widget parent, DmBooleanObject *dmObject,
		  int period = AperiodicGuaranteed);

  ~DmBooleanSwitch();


  virtual const char *className() {
    return "DmBooleanSwitch";
  }

  virtual void updateGui(DM_Item dmItem = 0);

protected:

  Widget _toggle;

  DmBooleanObject *_dmObject;

  virtual void displayValue(MBool value);

private:

  static void toggleCallback(Widget w, 
			     XtPointer clientData,
			     XtPointer callData);

};


#endif
