/* LICENSE:
  =========================================================================
    CMPack'04 Source Code Release for OPEN-R SDK 1.1.5-r2 for ERS7
    Copyright (C) 2004 Multirobot Lab [Project Head: Manuela Veloso]
    School of Computer Science, Carnegie Mellon University
    All rights reserved.
  ========================================================================= */

#ifndef INCLUDED_ImageViewer_h
#define INCLUDED_ImageViewer_h

#include <Fl/Fl_Box.H>

#include "image.h"

class ImageViewer : public Fl_Box {
public:
  const SImage *curImg;
  int zoomX,zoomY;

  virtual void resize(int x,int y,int w,int h);
  virtual void draw();
  virtual int handle(int event);
public:
  ImageViewer(int x,int y,int w,int h);

  void setImage(const SImage *_cur_img);
  void setZoom(int _zoom_x,int _zoom_y);

  void translatePoint(int &_x,int &_y,int event_x,int event_y);
};

#endif
