Index: trunk/SophyaPI/PIext/pihisto2d.cc
===================================================================
--- trunk/SophyaPI/PIext/pihisto2d.cc	(revision 1091)
+++ trunk/SophyaPI/PIext/pihisto2d.cc	(revision 1297)
@@ -611,5 +611,5 @@
 SetSize(wszx, wszy);
 
-// menus bar
+// menu du style de display des bins
   int cpx = 2*spx, cpy = 2*spy;
 mOPop[0] = new PIOptMenu(this, "optmen-h2d-1" ,2*bsx,bsy,cpx,cpy);
@@ -621,4 +621,5 @@
 mOPop[0]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
 
+// Menu du choix de la dynamique
   cpy += bsy+spy;
 mOPop[1] = new PIOptMenu(this, "optmen-h2d-2",2*bsx,bsy,cpx,cpy);
@@ -628,21 +629,25 @@
 mOPop[1]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
 
+// Menu du choix des couleurs
   cpy += bsy+spy;
 mOPop[2] = new PIOptMenu(this, "optmen-h2d-3",2*bsx,bsy,cpx,cpy);
-mOPop[2]->AppendItem("Black&White", 6301);
-mOPop[2]->AppendItem("Grey32"    , 6302);
-mOPop[2]->AppendItem("GreyInv32" , 6303);
-mOPop[2]->AppendItem("ColRJ32"   , 6304);
-mOPop[2]->AppendItem("ColBR32"   , 6305);
-mOPop[2]->AppendItem("ColRV32"   , 6306);
-mOPop[2]->AppendItem("Grey128"   , 6307);
-mOPop[2]->AppendItem("GreyInv128", 6308);
-mOPop[2]->AppendItem("ColRJ128"  , 6309);
-mOPop[2]->AppendItem("ColBR128"  , 6310);
-mOPop[2]->AppendItem("Col16"     , 6311);
-sdum = "Black&White"; mOPop[2]->SetValueStr(sdum);
+mOPop[2]->AppendItem("Black&White",7000);
+mCasc[0] = new PIMenu(mOPop[2]->Menu(), "PIStd-128Col");
+mCasc[1] = new PIMenu(mOPop[2]->Menu(), "MIDAS-CMap");
+int kcc,nsct1=5,nsct2=9,nsct3=PIColorMap::NumberStandardColorMaps()-1;
+for(kcc=0; kcc<nsct1; kcc++) 
+  mOPop[2]->AppendItem(PIColorMap::GetStandardColorMapName(kcc).c_str(),7001+kcc);
+for(kcc=nsct1; kcc<nsct2; kcc++) 
+  mCasc[0]->AppendItem(PIColorMap::GetStandardColorMapName(kcc).c_str(),7001+kcc);
+mOPop[2]->AppendPDMenu(mCasc[0]);
+for(kcc=nsct2; kcc<nsct3; kcc++) 
+  mCasc[1]->AppendItem(PIColorMap::GetStandardColorMapName(kcc).c_str(),7001+kcc);
+mOPop[2]->AppendPDMenu(mCasc[1]);
+for(kcc=nsct3; kcc<PIColorMap::NumberStandardColorMaps(); kcc++) 
+mOPop[2]->AppendItem(PIColorMap::GetStandardColorMapName(kcc).c_str(),7001+kcc);
+mOPop[2]->SetValue(7000);
 mOPop[2]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
 
-// Labels et zone de saisie texte
+// Labels et zones de saisie texte
   cpy += 2*(bsy+spy);
 mLab[0] = new PILabel(this, "     Dyn: ",bsx,bsy,cpx,cpy); 
@@ -696,4 +701,5 @@
 int i;
 if(dbg) printf("H2WinArg::~H2WinArg %lx\n",(long)this);
+for(i=0;i<2;i++) delete mCasc[i];
 for(i=0;i<3;i++) delete mOPop[i];
 for(i=0;i<4;i++) delete mBut[i];
@@ -706,5 +712,5 @@
 void H2WinArg::SetText()
 //
-//	Gestion des fenetres de saisie de texte.
+//	Gestion des fenetres de saisie de texte et des pop-menus.
 //--
 {
@@ -726,16 +732,9 @@
 else if(mTypScal==1) { sdum="Log10";    mOPop[1]->SetValueStr(sdum);}
 
-if(!mFgCol)                       { sdum="Black&White";mOPop[2]->SetValueStr(sdum);}
+if(!mFgCol) {mOPop[2]->SetValue(7000);}
 else {
-  if(mCmap==CMAP_GREY32)          { sdum="Grey32";     mOPop[2]->SetValueStr(sdum);}
-  else if(mCmap==CMAP_GREYINV32)  { sdum="GreyInv32";  mOPop[2]->SetValueStr(sdum);}
-  else if(mCmap==CMAP_COLRJ32)    { sdum="ColRJ32";    mOPop[2]->SetValueStr(sdum);}
-  else if(mCmap==CMAP_COLBR32)    { sdum="ColBR32";    mOPop[2]->SetValueStr(sdum);}
-  else if(mCmap==CMAP_COLRV32)    { sdum="ColRV32";    mOPop[2]->SetValueStr(sdum);}
-  else if(mCmap==CMAP_GREY128)    { sdum="Grey128";    mOPop[2]->SetValueStr(sdum);}
-  else if(mCmap==CMAP_GREYINV128) { sdum="GreyInv128"; mOPop[2]->SetValueStr(sdum);}
-  else if(mCmap==CMAP_COLRJ128)   { sdum="ColRJ128";   mOPop[2]->SetValueStr(sdum);}
-  else if(mCmap==CMAP_COLBR128)   { sdum="ColBR128";   mOPop[2]->SetValueStr(sdum);}
-  else if(mCmap==CMAP_COL16)      { sdum="Col16";      mOPop[2]->SetValueStr(sdum);}
+  for(int kk=0;kk<PIColorMap::NumberStandardColorMaps();kk++)
+    if(mCmap == PIColorMap::GetStandardColorMapId(kk))
+      {mOPop[2]->SetValue(7001+kk); break;}
 }
 
@@ -788,15 +787,11 @@
 else if (opt == 6202) { mTypScal = 1; }
 
-else if (opt == 6301) { mFgCol = false; }
-else if (opt == 6302) { mFgCol = true;  mCmap = CMAP_GREY32; }
-else if (opt == 6303) { mFgCol = true;  mCmap = CMAP_GREYINV32; }
-else if (opt == 6304) { mFgCol = true;  mCmap = CMAP_COLRJ32; }
-else if (opt == 6305) { mFgCol = true;  mCmap = CMAP_COLBR32; }
-else if (opt == 6306) { mFgCol = true;  mCmap = CMAP_COLRV32; }
-else if (opt == 6307) { mFgCol = true;  mCmap = CMAP_GREY128; }
-else if (opt == 6308) { mFgCol = true;  mCmap = CMAP_GREYINV128; }
-else if (opt == 6309) { mFgCol = true;  mCmap = CMAP_COLRJ128; }
-else if (opt == 6310) { mFgCol = true;  mCmap = CMAP_COLBR128; }
-else if (opt == 6311) { mFgCol = true;  mCmap = CMAP_COL16; }
+else if (opt == 7000) { mFgCol = false; }
+
+else if (opt >= 7001 && opt <8000) {
+  int k  = opt-7001;
+  mFgCol = true;
+  mCmap  = PIColorMap::GetStandardColorMapId(k);
+}
 
 else if (opt == 6401) mFPoints = mPScal->GetValue()/100.;
