#ifndef _LAPBOXGUI_H
#define _LAPBOXGUI_H
#include "DmGuiObject.h"
#include "LapBoxUiDm.h"
#include "ZoomFocusIris.h"
#include "Joystick.h"


class LapBoxGui : public DmGuiObject
{
  public:
  
  LapBoxGui(const char *name, Widget parent, const char *lapBoxName);
  ~LapBoxGui();
  
  virtual const char *className()
  {
    return "LapBoxGui";
  }
  
  virtual void updateGui(DM_Item handle = 0);
  
  protected:
  
  // Camera select buttons
  Widget _portCamButton;
  Widget _stbdCamButton;
  ZoomFocusIris *_camera;
  Joystick *_panTilt;
  Widget _panoramicButton;
  Widget _enableButton;
  
  LapBoxUiEvents *_events;
  LapBoxUiData *_data;
  LapBoxUiSettings *_settings;

  static struct timezone _tz;
  static DM_Time _t;
  
  Pixel _offForeground, _offBackground;
  Pixel _onForeground, _onBackground;
  Pixel _errorForeground, _errorBackground;
  
  void setButtonState(Widget button,
		      LapBoxButtonState state,
		      MBool flash);
  
  private:
  
  static void cameraSelectCallback(Widget w, XtPointer clientData,
				   XtPointer callData); 

  static void enableCallback(Widget w, XtPointer clientData,
			     XtPointer callData); 

  static void panoramicCallback(Widget w, XtPointer clientData,
				XtPointer callData); 
};


#endif
