Index: trunk/SophyaPI/PIext/cxxexecutor.cc
===================================================================
--- trunk/SophyaPI/PIext/cxxexecutor.cc	(revision 1291)
+++ trunk/SophyaPI/PIext/cxxexecutor.cc	(revision 1297)
@@ -19,4 +19,13 @@
 mIncList.resize(0);
 mCallArgs.resize(0);
+
+mIncImportList.resize(0);
+mModuleImportList.resize(0);
+
+// La liste de tous les modules que l'on peut ajouter
+mModuleImportDefaultList.resize(0);
+mModuleImportDefaultList.push_back("Samba");
+mModuleImportDefaultList.push_back("SkyMap");
+mModuleImportDefaultList.push_back("PMixer");
 
 // Gestion des fichiers par default dans TmpDir 
@@ -74,35 +83,44 @@
 
 kw = "c++include";
-usage = "c++include: give personnal includes to be used\n";
+usage = "c++include: add personnal includes to be used by executor\n";
 usage+= "Usage: c++include myinc1.h myinc2.h ...\n";
-usage+= "       c++include -? : give current include files\n";
-usage+= "       c++include    : reset current include files\n";
-usage+= "Warning: to be used before c++create... c++exec...";
+usage+= "       c++include -? : list current additionnal include files\n";
+usage+= "       c++include    : reset to no additionnal include files\n";
+usage+= "Warning: to be used before c++create c++compile c++exec...";
 mpiac->RegisterCommand(kw, usage, this, hgrp);
 
 kw = "c++compileopt";
-usage = "c++compileopt: give additionnal compile options\n";
+usage = "c++compileopt: add personnal compile options\n";
 usage+= "Usage: c++compileopt -g -O5 -IMy_Inc_Dir ...\n";
-usage+= "       c++compileopt -? : give current compile options\n";
-usage+= "       c++compileopt    : reset current compile options\n";
-usage+= "Warning: to be used before c++compile";
+usage+= "       c++compileopt -? : list current additionnal compile options\n";
+usage+= "       c++compileopt    : reset to no additionnal compile options\n";
+usage+= "Warning: to be used before c++create c++compile c++exec ...";
 mpiac->RegisterCommand(kw, usage, this, hgrp);
 
 kw = "c++linkopt";
-usage = "c++linkopt: give additionnal link options\n";
+usage = "c++linkopt: add personnal link options\n";
 usage+= "Usage: c++linkopt -g -O5 ...\n";
-usage+= "       c++linkopt -? : give current link options\n";
-usage+= "       c++linkopt    : reset current link options\n";
-usage+= "Warning: to be used before c++compile";
+usage+= "       c++linkopt -? : list current additionnal link options\n";
+usage+= "       c++linkopt    : reset to no additionnal link options\n";
+usage+= "Warning: to be used before c++create c++compile c++exec ...";
 mpiac->RegisterCommand(kw, usage, this, hgrp);
 
 kw = "c++mylibs";
-usage = "c++mylibs: give additionnal libraries\n";
+usage = "c++mylibs: add personnal libraries\n";
 usage+= "Usage: c++mylibs -LMy_Lib_Dir -lmylib1 -lmylib2 ...\n";
-usage+= "       c++mylibs -? : give current additionnal libraries\n";
-usage+= "       c++mylibs    : reset current additionnal libraries\n";
-usage+= "Warning: to be used before c++compile";
-mpiac->RegisterCommand(kw, usage, this, hgrp);
-
+usage+= "       c++mylibs -? : list current additionnal libraries\n";
+usage+= "       c++mylibs    : reset to no additionnal libraries\n";
+usage+= "Warning: to be used before c++create c++compile c++exec ...";
+mpiac->RegisterCommand(kw, usage, this, hgrp);
+
+kw = "c++import";
+usage = "c++import: Sophya additionnal modules to be use in C++ executor\n";
+usage+= "Usage: c++import module1 ... : set list of modules to be used by executor\n";
+usage+= "       c++import all : set all modules known by executor\n";
+usage+= "       c++import     : reset to no additionnal module\n";
+usage+= "       c++import -?  : list modules currently used in executor\n";
+usage+= "       c++import -?? : list of available modules for executor\n";
+usage+= "Warning: to be used before c++create c++compile c++exec ...";
+mpiac->RegisterCommand(kw, usage, this, hgrp);
 
 kw = "c++prtlevel";
@@ -202,4 +220,20 @@
   FillLinkLibs(tokens);
 
+} else if(kw == "c++import") {
+  if(tokens.size()==1) {
+    if(tokens[0]=="-?")
+      {cout<<"c++import "<<GetModuleImport()<<endl; return(0);}
+    if(tokens[0]=="-??") {
+      cout<<"c++import possibilities :"<<endl;
+      if(mModuleImportDefaultList.size()>0) {
+        for(uint_4 i=0;i<mModuleImportDefaultList.size();i++)
+          cout<<" "<<mModuleImportDefaultList[i];
+        cout<<endl;
+      }
+      return(0);
+    }
+  }
+  FillModuleImport(tokens);
+
 } else if(kw == "c++prtlevel") {
   if(tokens.size()==1) if(tokens[0]=="-?")
@@ -291,8 +325,7 @@
 void CxxExecutor::PutInclude(ofstream& os)
 {
-os<<"#include \"machdefs.h\""<<endl
-  <<endl
-
-  <<"//---- System et stdc++ include files"<<endl
+os<<"#include \"machdefs.h\""<<endl<<endl;
+
+os<<"//---- System et stdc++ include files"<<endl
   <<"#include <stdio.h>"<<endl
   <<"#include <stdlib.h>"<<endl
@@ -323,6 +356,13 @@
   <<"#include \"nobjmgr.h\""<<endl
   <<"#include \"servnobjm.h\""<<endl
-  <<endl
-
+  <<endl;
+
+os<<"//---- Include files from additionnal modules"<<endl;
+if(mIncImportList.size()>0)
+  for(uint_4 i=0;i<mIncImportList.size();i++)
+    os<<"#include \""<<mIncImportList[i]<<"\""<<endl;
+os<<endl;
+
+os<<"//---- Objects and variables saving"<<endl
   <<"#define KeepObj(obj) ___nomobj = #obj; omg.AddObj(obj,___nomobj);"<<endl
   <<"#define KeepVar(var) ___nomobj = #var; omg.GetVarList().Get(___nomobj) = var ;"<<endl
@@ -708,2 +748,42 @@
 return mMyLibs;
 }
+
+/* --Methode-- */
+void CxxExecutor::FillModuleImport(vector<string>& import)
+{
+mModuleImportList.resize(0);
+mIncImportList.resize(0);
+if(import.size()<1) return;
+
+if(import[0]=="all" || import[0]=="All" || import[0]=="ALL") {
+  mModuleImportList = mModuleImportDefaultList;
+} else {
+  for(uint_4 i=0;i<import.size();i++) mModuleImportList.push_back(import[i]);
+}
+
+// Set additionnal Includes
+if(mModuleImportList.size()>0)
+  for(uint_4 i=0;i<mModuleImportList.size();i++) {
+    if(     mModuleImportList[i]=="Samba")  mIncImportList.push_back("samba.h");
+    else if(mModuleImportList[i]=="SkyMap") mIncImportList.push_back("skymap.h");
+    else if(mModuleImportList[i]=="PMixer") mIncImportList.push_back("pmixer.h");
+}
+
+return;
+}
+
+void CxxExecutor::FillModuleImport(string& import)
+{
+mModuleImportList.resize(0);
+vector<string> vsimport;
+FillVStringFrString(import,vsimport,' ');
+FillModuleImport(vsimport);
+}
+
+string CxxExecutor::GetModuleImport(void)
+{
+string dum = "";
+if(mModuleImportList.size()<1) return dum;
+for(uint_4 i=0;i<mModuleImportList.size();i++) dum += mModuleImportList[i] + " ";
+return dum;
+}
Index: trunk/SophyaPI/PIext/cxxexecutor.h
===================================================================
--- trunk/SophyaPI/PIext/cxxexecutor.h	(revision 1291)
+++ trunk/SophyaPI/PIext/cxxexecutor.h	(revision 1297)
@@ -67,4 +67,8 @@
   string GetLinkLibs(void);
 
+  void FillModuleImport(vector<string>& import);
+  void FillModuleImport(string& import);
+  string GetModuleImport(void);
+
 private:
   string mUserCodeFn;
@@ -76,4 +80,10 @@
   vector<string> mCallArgs;
 
+  // Import des modules
+  vector<string> mIncImportList;
+  vector<string> mModuleImportList;
+  vector<string> mModuleImportDefaultList;
+
+
   string mDefTmp;
   string mDefRoot;
Index: trunk/SophyaPI/PIext/cxxexecwin.cc
===================================================================
--- trunk/SophyaPI/PIext/cxxexecwin.cc	(revision 1291)
+++ trunk/SophyaPI/PIext/cxxexecwin.cc	(revision 1297)
@@ -289,5 +289,5 @@
   xtext = 7*bsx;
   szx = (int)(xtext+1.5*bsx+3*spx);
-  szy = 6*bsy+7*spy;
+  szy = 7*bsy+8*spy;
   SetSize(szx, szy);
 
@@ -326,4 +326,11 @@
   mText[3] = new PIText(this,"LinkLib",xtext,bsy,px,py);
   mText[3]->SetText("");
+
+  px = spx;
+  py += spy+bsy;
+  mLab[4] = new PILabel(this,"Modules",1.5*bsx,bsy,px,py);
+  px += (int)(1.5*bsx+spx);
+  mText[4] = new PIText(this,"ModImp",xtext,bsy,px,py);
+  mText[4]->SetText("");
 
 // Creation de bouton d'action 
@@ -353,7 +360,7 @@
   delete mTit;
   int i;
-  for(i=0; i<4; i++) delete mLab[i];
+  for(i=0; i<5; i++) delete mLab[i];
   for(i=0; i<3; i++) delete mBut[i];
-  for(i=0; i<4; i++) delete mText[i];
+  for(i=0; i<5; i++) delete mText[i];
 }
 
@@ -365,4 +372,5 @@
   mText[2]->SetText(cxxex->GetLinkOpt());
   mText[3]->SetText(cxxex->GetLinkLibs());
+  mText[4]->SetText(cxxex->GetModuleImport());
   PIWindow::Show();
 }
@@ -382,4 +390,6 @@
       opt = mText[3]->GetText();
       cxxex->FillLinkLibs(opt);
+      opt = mText[4]->GetText();
+      cxxex->FillModuleImport(opt);
       break;
     case 600:    // Bouton Get Options
@@ -388,4 +398,5 @@
       mText[2]->SetText(cxxex->GetLinkOpt());
       mText[3]->SetText(cxxex->GetLinkLibs());
+      mText[4]->SetText(cxxex->GetModuleImport());
       break;
     case 700:   // Bouton Dismiss - On cache la fenetre
Index: trunk/SophyaPI/PIext/cxxexecwin.h
===================================================================
--- trunk/SophyaPI/PIext/cxxexecwin.h	(revision 1291)
+++ trunk/SophyaPI/PIext/cxxexecwin.h	(revision 1297)
@@ -54,7 +54,7 @@
   CxxExecutor * cxxex;
   PILabel  * mTit;
-  PILabel  * mLab[4];
+  PILabel  * mLab[5];
   PIButton * mBut[3];
-  PIText   * mText[4];
+  PIText   * mText[5];
 };
 
Index: trunk/SophyaPI/PIext/pihisto2d.cc
===================================================================
--- trunk/SophyaPI/PIext/pihisto2d.cc	(revision 1291)
+++ 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.;
Index: trunk/SophyaPI/PIext/pihisto2d.h
===================================================================
--- trunk/SophyaPI/PIext/pihisto2d.h	(revision 1291)
+++ trunk/SophyaPI/PIext/pihisto2d.h	(revision 1297)
@@ -92,4 +92,5 @@
 
   PIOptMenu * mOPop[3];
+  PIMenu    * mCasc[2];
   PIButton  * mBut[4];
   PILabel   * mLab[4];
