// This may look like C code, but it is really -*- C++ -*-
// Outils de manipulation des PIContDrawer  O. Perdereau 11/2001
// Relatif a un SEUL contourdrawer 
// LAL (Orsay) / IN2P3-CNRS  DAPNIA/SPP (Saclay) / CEA

#ifndef PICNTOOLS_H_SEEN
#define PICNTOOLS_H_SEEN

#include "pisysdep.h"
#include PISTDWDG_H
#include PIOPTMENU_H
#include PIWIN_H
#include PIAPP_H
#include "picmapview.h"

// --------- fenetre de dialogue pour modifs  options de trace des contours  ----------
// --------------------------------------------------------------------------------

class PIContourDrawer;
class PIBaseWdgGen;

class PICnTools : public PIWindow 
{
public :
  PICnTools(PIApplication* par);
  ~PICnTools();
  virtual void  Show();

  static PICnTools* curlutw;
  static void ShowPICnTools();
  static void HidePICnTools();
  static void SetCurrentBaseWdg(PIBaseWdgGen* cbw);
  static void SetCurrentCnDrw(PIContourDrawer* drw);
  static PIBaseWdgGen* GetCurrentBaseWdg();
  static PIContourDrawer* GetCurrentCnDrw();
  inline PICMapView* CMapVW() { return cmapv; }
protected:
  virtual void  UpdateAttFromDrawer();
  virtual void  SetGraphicAtt(bool );
  virtual void  SetCalcParm();
  virtual void  Process(PIMessage msg, PIMsgHandler* sender, void* data=NULL);

private:
// Pour couleur, fontes, etc 

  PICMapView* cmapv;
  PICheckBox*  mCkb[3];
  PILabel* mLab[5];
  PIOptMenu* mOpt[10];
  PIMenu* mCasc[5];
  PILabel* mNlb;
  PIText* mTxt[2];
  PIButton* mButdr[2];
  PIButton* mButcf[5];
  int mNDr;
  int mtyp, msz;
//
  static PIBaseWdgGen* mCurBW;
  static PIContourDrawer* mCurCDrw;
  static PICnTools* cwdrwt;
};

#endif
