// This may look like C code, but it is really -*- C++ -*-
// Module PI : Peida Interactive     PICMapView
// Visualisation de table de couleur     R. Ansari  07/98
// LAL (Orsay) / IN2P3-CNRS  DAPNIA/SPP (Saclay) / CEA

#ifndef PICMAPVIEW_H_SEEN
#define PICMAPVIEW_H_SEEN

#include "pisysdep.h"

#include PIBWDG_H
#include PICMAP_H

class PICMapView : public PIBaseWdg
{
public:
  enum {ClassId = 5150};

                  PICMapView(PIContainerGen *par, char *nom,
                             int sx=256, int sy=10, int px=0, int py=0);
  virtual         ~PICMapView();

  virtual long	  kind() {return ClassId; }

  void            SetColMap(PIColorMap* cmp=NULL, float min=1., float max=-1., bool refr=true);
  void            SetColMapId(CMapId cmapid, float min=1., float max=-1., bool refr=true);

// Traitement des evenements   

  virtual void   Draw(PIGraphic* g, int x0, int y0, int dx, int dy);


protected:
  PIColorMap* cmap;
  float vmin, vmax;
};


#endif 
