Index: /trunk/SophyaPI/PIext/basexecut.cc
===================================================================
--- /trunk/SophyaPI/PIext/basexecut.cc	(revision 1970)
+++ /trunk/SophyaPI/PIext/basexecut.cc	(revision 1971)
@@ -61,5 +61,5 @@
   nx = ny = 1;
   nx = atoi(tokens[0].c_str());    ny = atoi(tokens[1].c_str());
-  mObjMgr->SetGraphicWinZone(nx, ny, false);
+  if (mImgApp) mImgApp->SetZone(nx, ny);
   }  
 else if (kw == "newwin") {
@@ -68,18 +68,20 @@
   if(tokens.size() > 0) nx = atoi(tokens[0].c_str());
   if(tokens.size() > 1) ny = atoi(tokens[1].c_str());
-  mObjMgr->SetGraphicWinZone(nx, ny, true);
+  if (mImgApp) mImgApp->CreateGraphWin(nx, ny);
   }  
 else if (kw == "stacknext") mImgApp->StackWinNext(); 
 else if (kw == "graphicatt") {
   if (tokens.size() < 1) { cout << "Usage: graphicatt attributes_list (att=def->defaut)" << endl;  return(0); }
-  mObjMgr->SetGraphicAttributes(tokens[0]); 
-  }
-else if (kw == "setxylimits") {
-  if (tokens.size() < 4) { cout << "Usage: setxylimits xmin xmax ymin ymax" << endl;  return(0); }
-  double xmin = atof(tokens[0].c_str());
-  double xmax = atof(tokens[1].c_str());
-  double ymin = atof(tokens[2].c_str());
-  double ymax = atof(tokens[3].c_str());
-  mImgApp->SetXYLimits(xmin, xmax, ymin, ymax);
+  string opts = tokens[0];
+  if (tokens.size() > 1) 
+    for(int kt=1; kt<tokens.size(); kt++)  { opts += ' '; opts += tokens[kt]; }
+  if (mImgApp) mImgApp->SetDefaultGraphicAttributes(opts);
+  }
+else if (kw == "setaxesatt") {
+  if (tokens.size() < 1) { cout << "Usage: setaxesatt attributes_list " << endl;  return(0); }
+  string opts = tokens[0];
+  if (tokens.size() > 1) 
+    for(int kt=1; kt<tokens.size(); kt++)  { opts += ' '; opts += tokens[kt]; }
+  if (mImgApp) mImgApp->SetDefaultAxesAttributes(opts);
   }
 else if (kw == "setinsetlimits") {
@@ -91,10 +93,4 @@
   mImgApp->SetInsetLimits(xmin, xmax, ymin, ymax);
   }
-else if (kw == "setimgcenter") {
-  if (tokens.size() < 2) { cout << "Usage: setimgcenter xc yc" << endl;  return(0); }
-  int xc = atoi(tokens[0].c_str());
-  int yc = atoi(tokens[1].c_str());
-  mImgApp->SetImageCenterPosition(xc, yc);
-  }
 else if (kw == "addtext") {
   if (tokens.size() < 3) { cout << "Usage: addtext x y txt [colfontatt]" << endl;  return(0); }
@@ -102,9 +98,7 @@
   double yp = atof(tokens[1].c_str());
   string txt = tokens[2];
-  bool fgsr = false;
-  if (tokens.size() > 3) 
-    mObjMgr->GetServiceObj()->DecodeDispOption(tokens[3], fgsr);
-  mImgApp->AddText(txt, xp, yp);
-  if (fgsr) mImgApp->RestoreGraphicAtt(); 
+  string sop;
+  if (tokens.size() > 3) sop = tokens[3];
+  mImgApp->AddText(txt, xp, yp, sop);
   }
 else if ((kw == "addline") || (kw == "addrect") || (kw == "addfrect")) {
@@ -114,13 +108,11 @@
   double xp2 = atof(tokens[2].c_str());
   double yp2 = atof(tokens[3].c_str());
-  bool fgsr = false;
-  if (tokens.size() > 4) 
-   mObjMgr->GetServiceObj()->DecodeDispOption(tokens[4], fgsr);
-  if (kw == "addline") mImgApp->AddLine(xp1, yp1, xp2, yp2);
+  string sop;
+  if (tokens.size() > 4) sop = tokens[4];
+  if (kw == "addline") mImgApp->AddLine(xp1, yp1, xp2, yp2, sop);
   else {
     bool fgfill = (kw == "addrect") ? false : true;
-    mImgApp->AddRectangle(xp1, yp1, xp2, yp2, fgfill);
-  }
-  if (fgsr) mImgApp->RestoreGraphicAtt(); 
+    mImgApp->AddRectangle(xp1, yp1, xp2, yp2, sop, fgfill);
+  }
   }
 else if ((kw == "addcirc") || (kw == "addfcirc")) {
@@ -130,9 +122,8 @@
   double rad = atof(tokens[2].c_str());
   bool fgsr = false;
-  if (tokens.size() > 3) 
-    mObjMgr->GetServiceObj()->DecodeDispOption(tokens[3], fgsr);
+  string sop;
+  if (tokens.size() > 3) sop = tokens[3];
   bool fgfill = (kw == "addcirc") ? false : true;
-  mImgApp->AddCircle(xc, yc, rad, fgfill);
-  if (fgsr) mImgApp->RestoreGraphicAtt(); 
+  mImgApp->AddCircle(xc, yc, rad, sop, fgfill);
   }
 
@@ -141,10 +132,5 @@
   if (tokens.size() < 1) { cout << "Usage: settitle TopTitle [BotTitle] [fontatt]" << endl;  return(0); }
   bool fgsr = true;
-  if (tokens.size() > 2)
-    mObjMgr->GetServiceObj()->DecodeDispOption(tokens[2], fgsr);
-  if (tokens.size() < 2)
-    tokens.push_back("");
   mImgApp->SetTitle(tokens[0], tokens[1]);
-  if (fgsr) mImgApp->RestoreGraphicAtt(); 
   }
   
@@ -397,5 +383,5 @@
     }
   else {
-    if (tokens.size() < 5)  tokens.push_back("n");
+    if (tokens.size() < 5)  tokens.push_back("next");
     mObjMgr->GetServiceObj()->PlotFunc2D(tokens[3], tokens[0], xmin, xmax, ymin, ymax, 
                                          nx, ny, tokens[4]);
@@ -415,5 +401,5 @@
 else if ( (kw == "disp") || (kw == "surf") || (kw == "imag") ) {
   if (tokens.size() < 1) { cout << "Usage: disp/surf/imag nameobj [opt]" << endl; return(0); }
-  string opt = "n";
+  string opt = "next";
   if (tokens.size() > 1)  opt = tokens[1];
   if (kw == "disp") mObjMgr->DisplayObj(tokens[0], opt);
@@ -457,5 +443,5 @@
   string numvary = "";
   string err = "";
-  string opt = "n";
+  string opt = "next";
   if(tokens.size()>2) err = tokens[2];
   if(tokens.size()>3) opt = tokens[3];
@@ -468,5 +454,5 @@
      return(0);}
   string err = "";
-  string opt = "n";
+  string opt = "next";
   if(tokens.size()>3) err = tokens[3];
   if(tokens.size()>4) opt = tokens[4];
@@ -767,5 +753,5 @@
 kw = "graphicatt";
 usage = "To change default graphic options \n  Usage: graphicatt att_list \n";
-usage += "att_list=def back to default values, Example: gratt red,circlemarker5";
+usage += "att_list=def back to default values, Example: gratt 'red circlemarker5'";
 usage += "\n ------------------ Graphic attribute list ------------------ \n";
 usage += ">> Colors: defcol black white grey red blue green yellow \n";
@@ -791,7 +777,7 @@
 usage += ">> ZoomFactors: defzoom zoomx1 zoomx2 zoomx3 zoomx4 zoomx5 \n";
 usage += "                               zoom/2 zoom/3 zoom/4 zoom/5 \n";
-usage += ">> Image centering: centerimg -> Position the image in widget \n";
+usage += ">> imagecenter=ix,iy -> Position the image in widget \n";
 usage += ">> Axes:  stdaxes=defaxes=boxaxes  simpleaxes boxaxesgrid \n";
-usage += "          fineaxes  grid=fineaxesgrid \n"; 
+usage += "          fineaxes  fineaxesgrid \n"; 
 usage += ">> LogScale : linx liny logx logy -> Lin/Log Scales for 2D plots \n";
 usage += ">> XYLimits : xylimits  -> Forces X-Y limits in 2-D plots \n";
@@ -799,11 +785,15 @@
 usage += ">> title/notitle or tit/notit -> Toggle Auto AddTitle flag \n";
 usage += ">> DisplayWindow: next same win stack inset \n";
-usage += "   Related commands: setxylimits setinsetlimits setimgcenter";  
+usage += "   Related commands: setaxesatt setinsetlimits ";  
 mpiac->RegisterCommand(kw, usage, this, "Graphics");
 
-kw = "setxylimits";
-usage = "Define 2-D plot limits \n Usage: setxylimits xmin xmax ymin ymax";
-usage += "\n  Related commands: graphicatt /xylimits";  
+kw = "setaxesatt";
+usage = "To set default axes attributes \n  Usage: setaxesatt att_list \n";
+usage += ">> Axes:  stdaxes=defaxes=boxaxes  simpleaxes boxaxesgrid \n";
+usage += "          fineaxes  fineaxesgrid \n"; 
+usage += ">> LogScale : linx liny logx logy -> Lin/Log Scales for 2D plots \n";
+usage += ">> xylimits=xmin,xmax,ymin,ymax  -> Forces X-Y limits in 2-D plots \n";
 mpiac->RegisterCommand(kw, usage, this, "Graphics");
+
 
 kw = "setinsetlimits";
Index: /trunk/SophyaPI/PIext/contmodex.cc
===================================================================
--- /trunk/SophyaPI/PIext/contmodex.cc	(revision 1970)
+++ /trunk/SophyaPI/PIext/contmodex.cc	(revision 1971)
@@ -106,20 +106,14 @@
    // On affiche le Drawer
    int wrsid = 0;
-   bool fgsr = true;
-   cout << " dopt " << dopt<<endl;
-   int opt = omg.GetServiceObj()->DecodeDispOption(dopt, fgsr);
    
    string name = "contour";
-   cout << " ContModExecutor::Execute() : name "<<name<<" " <<" opt |"<<opt<<"| dopt |"<<dopt<<"| contdrw |"<<contdrw<<endl;
-   wrsid = omg.GetImgApp()->DispScDrawer(contdrw, name, opt); 
+   cout << " ContModExecutor::Execute() : name "<<name<<" " <<"| dopt |"<<dopt<<"| contdrw |"<<contdrw<<endl;
+   wrsid = omg.GetImgApp()->DispScDrawer(contdrw, name, dopt); 
    cout << " fin de ContModExecutor::Execute() "<< endl;
    
 
-   if (fgsr) omg.GetImgApp()->RestoreGraphicAtt();    
    // Ne pas oublier d'associer le wrsid a l'objet si on utilise le P2DArrayAdapter* arr
-   // Il semble que cela ne soit pas accessible pour le moment depuis l'exterieur ds NamedObjMgr
-
-
-
+   omg.AddWRsId(tokens[0], wrsid);
+   
 
    }
@@ -180,13 +174,10 @@
      bool fgsr = true;
      
-     int opt = omg.GetServiceObj()->DecodeDispOption(dopt, fgsr);
-   
      string name = "contour";
      
-     wrsid = omg.GetImgApp()->DispScDrawer(contdrw, name, opt); 
+     wrsid = omg.GetImgApp()->DispScDrawer(contdrw, name, dopt); 
      
-     
-
-     if (fgsr) omg.GetImgApp()->RestoreGraphicAtt();    
+     // Ne pas oublier d'associer le wrsid a l'objet si on utilise le P2DArrayAdapter* arr
+     omg.AddWRsId(tokens[0], wrsid);
 
    }
Index: /trunk/SophyaPI/PIext/flowmodex.cc
===================================================================
--- /trunk/SophyaPI/PIext/flowmodex.cc	(revision 1970)
+++ /trunk/SophyaPI/PIext/flowmodex.cc	(revision 1971)
@@ -89,10 +89,8 @@
    // On affiche le Drawer
    int wrsid = 0;
-   bool fgsr = true;
-   int opt = omg.GetServiceObj()->DecodeDispOption(dopt, fgsr);
-   
    string name = "ChampVec";
    
-   wrsid = omg.GetImgApp()->DispScDrawer(p2dv , name, opt); 
+   wrsid = omg.GetImgApp()->DispScDrawer(p2dv , name, dopt); 
+   omg.AddWRsId(tokens[0], wrsid);
 
 }else if(kw == "plot2dvec"){
@@ -140,11 +138,9 @@
   p2dv->SelectVW(ntn[2],ntn[3]);
 
-  bool fgsr = true;
   if (tokens.size() > 6) dopt = tokens[6];
 
-  int opt = omg.GetServiceObj()->DecodeDispOption(dopt, fgsr);
   string name = "ChampVec";
    
-  int wrsid = omg.GetImgApp()->DispScDrawer(p2dv , name, opt); 
+  int wrsid = omg.GetImgApp()->DispScDrawer(p2dv , name, dopt); 
 
 }
Index: /trunk/SophyaPI/PIext/nobjmgr.cc
===================================================================
--- /trunk/SophyaPI/PIext/nobjmgr.cc	(revision 1970)
+++ /trunk/SophyaPI/PIext/nobjmgr.cc	(revision 1971)
@@ -1135,6 +1135,4 @@
 
 int wrsid = 0;
-bool fgsr = true;
-int opt = servnobjm->DecodeDispOption(dopt, fgsr);
 
 string n1,r1;
@@ -1143,8 +1141,8 @@
 if (dr) { 
   PIDrawer3D * dr3 = dynamic_cast<PIDrawer3D *>(dr);
-  if(dr3)  wrsid = myImgApp->Disp3DDrawer(dr3, n1, opt);
-  else wrsid = myImgApp->DispScDrawer( dr, n1, opt); 
-  }
-else if (arr) wrsid = myImgApp->DispImage(arr, n1, opt);
+  if(dr3)  wrsid = myImgApp->Disp3DDrawer(dr3, n1, dopt);
+  else wrsid = myImgApp->DispScDrawer( dr, n1, dopt); 
+  }
+else if (arr) wrsid = myImgApp->DispImage(arr, n1, dopt);
 
 if(wrsid != 0) {
@@ -1153,5 +1151,5 @@
   (*it).second.wrsid.push_back(wrsid);
   }
-if (fgsr) myImgApp->RestoreGraphicAtt(); 
+
 return;
 }
@@ -1184,7 +1182,5 @@
 
 int wrsid = 0;
-bool fgsr = true;
-int opt = servnobjm->DecodeDispOption(dopt, fgsr);
-wrsid = myImgApp->DispImage(arr, n1, opt);
+wrsid = myImgApp->DispImage(arr, n1, dopt);
 
 if(wrsid != 0) {
@@ -1193,5 +1189,4 @@
   (*it).second.wrsid.push_back(wrsid);
   }
-if (fgsr) myImgApp->RestoreGraphicAtt(); 
 return;
 }
@@ -1230,8 +1225,6 @@
 
 int wrsid = 0;
-bool fgsr = true;
-int opt = servnobjm->DecodeDispOption(dopt, fgsr);
 PISurfaceDrawer* sdr = new PISurfaceDrawer(arr, true, true, true);
-wrsid = myImgApp->Disp3DDrawer(sdr, n1, opt);
+wrsid = myImgApp->Disp3DDrawer(sdr, n1, dopt);
 if(wrsid >= 0) {
   NObjList::iterator it = myObjs->find(nom);
@@ -1240,5 +1233,4 @@
   }
 
-if (fgsr) myImgApp->RestoreGraphicAtt();  
 return; 
 }
@@ -1265,7 +1257,5 @@
 
 int wrsid = 0;
-bool fgsr = true;
-dopt = "defline," + dopt;
-int opt = servnobjm->DecodeDispOption(dopt, fgsr);
+dopt = "defline " + dopt;
 
 string n1,r1;
@@ -1279,9 +1269,8 @@
   pin->SelectErrBar(erx.c_str(), ery.c_str(), erz.c_str());
   string titre = nmz + "%" + nmy + "%" + nmz;
-  wrsid = myImgApp->Disp3DDrawer(pin, n1, opt, titre);  
+  wrsid = myImgApp->Disp3DDrawer(pin, n1, dopt, titre);  
 }
 else {
   PINTuple* pin = new PINTuple(nt, false);
-  pin->SetStats(Services2NObjMgr::GetStatsOption(dopt));
   pin->SelectXY(nmx.c_str(), nmy.c_str());
   pin->SelectWt(wt.c_str());
@@ -1289,5 +1278,5 @@
   pin->SelectErrBar(erx.c_str(), ery.c_str());
   string titre = nmy + "%" + nmx;
-  wrsid = myImgApp->DispScDrawer( (PIDrawer*)pin, n1, opt, titre);
+  wrsid = myImgApp->DispScDrawer( (PIDrawer*)pin, n1, dopt, titre);
   }
 
@@ -1298,5 +1287,4 @@
   }
 
-if (fgsr) myImgApp->RestoreGraphicAtt(); 
 return;
 }
@@ -1326,7 +1314,4 @@
    return;}
 
-// Decodage des options classiques
-bool fgsr = true;
-int opt = servnobjm->DecodeDispOption(dopt, fgsr);
 // Decodage des erreurs a representer
 bool errx=false, erry=false, errz=false;
@@ -1350,10 +1335,10 @@
   pigfd->SelectXY(numvx,numvy);
   pigfd->SelectErrBar(errx,erry,errz);
-  wrsid = myImgApp->Disp3DDrawer(pigfd,n1,opt);  
+  wrsid = myImgApp->Disp3DDrawer(pigfd,n1,dopt);  
 } else {                   // display 2D
   PIGenFitDat* pigfd = new PIGenFitDat(((GeneralFitData*)obj),false);
   pigfd->SelectX(numvx);
   pigfd->SelectErrBar(errx,erry);
-  wrsid = myImgApp->DispScDrawer((PIDrawer*)pigfd,n1,opt);
+  wrsid = myImgApp->DispScDrawer((PIDrawer*)pigfd,n1,dopt);
 }
 
@@ -1363,5 +1348,5 @@
   (*it).second.wrsid.push_back(wrsid);
 }
-if (fgsr) myImgApp->RestoreGraphicAtt(); 
+
 return;
 }
@@ -1424,7 +1409,4 @@
 PIYfXDrawer * vxydrw = new PIYfXDrawer(avx, avy, true);
 
-// Decodage des options classiques
-bool fgsr = true;
-int opt = servnobjm->DecodeDispOption(dopt, fgsr);
 string nx,rx;
 ParseObjectName(nomvx, rx, nx);
@@ -1434,7 +1416,6 @@
 string title = ny + " (Y) vs. " + nx + " (X)";
 // display 2D
-int wrsid = myImgApp->DispScDrawer(vxydrw, title, opt);
-
-if (fgsr) myImgApp->RestoreGraphicAtt(); 
+int wrsid = myImgApp->DispScDrawer(vxydrw, title, dopt);
+
 return;
 
@@ -1452,5 +1433,5 @@
 
 
-/* --Methode-- */
+/* --Methode-- 
 void NamedObjMgr::SetGraphicAttributes(string gratt)
 {
@@ -1460,5 +1441,4 @@
 }
 
-/* --Methode-- */
 void NamedObjMgr::SetGraphicWinZone(int nzx, int nzy, bool fcr)
 {
@@ -1467,4 +1447,5 @@
 else myImgApp->SetZone(nzx, nzy);
 }
+*/
 
 /* --Methode-- */
Index: /trunk/SophyaPI/PIext/nobjmgr.h
===================================================================
--- /trunk/SophyaPI/PIext/nobjmgr.h	(revision 1970)
+++ /trunk/SophyaPI/PIext/nobjmgr.h	(revision 1971)
@@ -92,7 +92,4 @@
   virtual void          DisplayVector(string & nomvx, string& nomvy, string dopt="");
 
-  virtual void		SetGraphicAttributes(string gratt="");
-  virtual void		SetGraphicWinZone(int nzx, int nzy, bool fcr=false);
-
 
 // Acces au PIApplication et a la classe de service 
Index: /trunk/SophyaPI/PIext/nomhistadapter.cc
===================================================================
--- /trunk/SophyaPI/PIext/nomhistadapter.cc	(revision 1970)
+++ /trunk/SophyaPI/PIext/nomhistadapter.cc	(revision 1971)
@@ -79,8 +79,7 @@
 PIDrawer* NOMAdapter_Histo::GetDrawer(string & dopt)
 {
-if (typeid(*mHis) == typeid(HProf))  dopt = "fcirclemarker5," + dopt;
-else dopt = "thinline," + dopt;
+if (typeid(*mHis) == typeid(HProf))  dopt = "fcirclemarker5 " + dopt;
+else dopt = "thinline " + dopt;
 PIHisto * pih = new PIHisto(mHis, false);
-pih->SetStats(Services2NObjMgr::GetStatsOption(dopt));
 return( pih );
 }
@@ -252,5 +251,5 @@
 PIDrawer* NOMAdapter_Histo2D::GetDrawer(string & dopt)
 {
-dopt = "thinline," + dopt;
+dopt = "thinline " + dopt;
 return( new PIHisto2D(mHis, false) );
 }
Index: /trunk/SophyaPI/PIext/nommatvecadapter.cc
===================================================================
--- /trunk/SophyaPI/PIext/nommatvecadapter.cc	(revision 1970)
+++ /trunk/SophyaPI/PIext/nommatvecadapter.cc	(revision 1971)
@@ -68,5 +68,5 @@
 PIDrawer* NOMAdapter_Vector::GetDrawer(string & dopt)
 {
-dopt = "thinline," + dopt;
+dopt = "thinline " + dopt;
 return( new PIYfXDrawer( new POVectorAdapter(mVec, false), NULL, true) );
 }
Index: /trunk/SophyaPI/PIext/nomtmatvecadapter.cc
===================================================================
--- /trunk/SophyaPI/PIext/nomtmatvecadapter.cc	(revision 1970)
+++ /trunk/SophyaPI/PIext/nomtmatvecadapter.cc	(revision 1971)
@@ -141,5 +141,5 @@
 if (v == NULL) return(NULL);
 else {
-  dopt = "thinline," + dopt;
+  dopt = "thinline " + dopt;
   return( new PIYfXDrawer( new POTVectorAdapter<T>(v, false), NULL, true) );
   }
Index: /trunk/SophyaPI/PIext/piaversion.h
===================================================================
--- /trunk/SophyaPI/PIext/piaversion.h	(revision 1970)
+++ /trunk/SophyaPI/PIext/piaversion.h	(revision 1971)
@@ -2,5 +2,5 @@
 #define PIAPPVERSION_H_SEEN
 
-#define PIAPP_VERSIONNUMBER  3.20
+#define PIAPP_VERSIONNUMBER  3.40
 
 #endif
Index: /trunk/SophyaPI/PIext/pihisto.cc
===================================================================
--- /trunk/SophyaPI/PIext/pihisto.cc	(revision 1970)
+++ /trunk/SophyaPI/PIext/pihisto.cc	(revision 1971)
@@ -133,4 +133,30 @@
 }
 
+int
+PIHisto::DecodeOptionString(vector<string> & opt, bool rmdecopt)
+{
+  if (opt.size() < 1)  return(0);  
+  int ndec1 = PIDrawer::DecodeOptionString(opt, rmdecopt);
+  if ((opt.size() - ndec1) < 1) return(ndec1);  // si tout a ete decode
+
+  vector<string> udopt;  // On gardera ici les options non decodees
+  unsigned int k = 0;
+  int ndec = opt.size();
+  for( k=0; k<opt.size(); k++ ) {
+    string opts = opt[k];
+    if (opts == "stat")  SetStats(true);
+    else if (opts == "nostat")  SetStats(false);
+    else {
+      ndec--;
+      // S'il faut supprimer les options decodees
+      if (rmdecopt)  udopt.push_back(opts);
+    }
+  }  
+  // S'il faut supprimer les options decodees, on remplace l'argument opt
+  // par le vecteur des options non decodees.
+  if (rmdecopt)  opt = udopt;
+  return(ndec+ndec1);  
+}
+
 void
 PIHisto::DrawStats(PIGraphicUC* g)
Index: /trunk/SophyaPI/PIext/pihisto.h
===================================================================
--- /trunk/SophyaPI/PIext/pihisto.h	(revision 1970)
+++ /trunk/SophyaPI/PIext/pihisto.h	(revision 1971)
@@ -17,4 +17,7 @@
   inline  Histo*     Histogram() { return(mHisto); }
 
+//   Methode de decodage des options
+  virtual int        DecodeOptionString(vector<string> & opt, bool rmdecopt=true);
+
 protected:
   virtual void       DrawStats(PIGraphicUC* g);
Index: /trunk/SophyaPI/PIext/pintuple.cc
===================================================================
--- /trunk/SophyaPI/PIext/pintuple.cc	(revision 1970)
+++ /trunk/SophyaPI/PIext/pintuple.cc	(revision 1971)
@@ -259,2 +259,42 @@
 return;
 }
+
+/*  La methode DecodeOptionString permet de decoder un ensemble d'options 
+    et de parametre d'affichage specifie sous forme d'un vecteur de string.
+    Si rmdecopt == true, les options decodees sont supprimees du vecteur 
+    de string fourni en entree - ce qui permet l'enchainement eventuel 
+    de plusieurs decodages de string.
+    Les options peuvent etre sous forme de flag : "stat" "nostat" 
+    ou plus complexes, par exemple "dynamic=-3,3"
+    Rc: La methode renvoie le nombre d'options decodees 
+*/
+
+/* --Methode-- */
+int PINTuple::DecodeOptionString(vector<string> & opt, bool rmdecopt)
+{
+  if (opt.size() < 1)  return(0);  
+  // On appelle d'abord le decodage de la classe PIDrawer de laquelle
+  // on herite. (Pas obligatoire) on decode donc ici les attributs de
+  // couleur, fontes ...
+  int ndec1 = PIDrawer::DecodeOptionString(opt, rmdecopt);
+  if ((opt.size() - ndec1) < 1) return(ndec1);  // si tout a ete decode
+
+  vector<string> udopt;  // On gardera ici les options non decodees
+  unsigned int k = 0;
+  int ndec = opt.size();
+  for( k=0; k<opt.size(); k++ ) {
+    string opts = opt[k];
+    if (opts == "stat")  SetStats(true);
+    else if (opts == "nostat")  SetStats(false);
+    else {
+      // Si option non decode
+      ndec--;
+      // S'il faut supprimer les options decodees
+      if (rmdecopt)  udopt.push_back(opts);
+    }
+  }  
+  // S'il faut supprimer les options decodees, on remplace l'argument opt
+  // par le vecteur des options non decodees.
+  if (rmdecopt)  opt = udopt;
+  return(ndec+ndec1);  
+}
Index: /trunk/SophyaPI/PIext/pintuple.h
===================================================================
--- /trunk/SophyaPI/PIext/pintuple.h	(revision 1970)
+++ /trunk/SophyaPI/PIext/pintuple.h	(revision 1971)
@@ -14,4 +14,5 @@
   virtual           ~PINTuple();
   
+
   virtual void       Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax);
   virtual void       UpdateLimits();
@@ -24,4 +25,7 @@
   inline  void       SetStats(bool fg=true) { stats = fg; }
   virtual void       AppendTextInfo(string& info, double xmin, double ymin, double xmax, double ymax);
+
+//   Methode de decodage des options
+  virtual int        DecodeOptionString(vector<string> & opt, bool rmdecopt=true);
        
 protected:
Index: /trunk/SophyaPI/PIext/pistdimgapp.cc
===================================================================
--- /trunk/SophyaPI/PIext/pistdimgapp.cc	(revision 1970)
+++ /trunk/SophyaPI/PIext/pistdimgapp.cc	(revision 1971)
@@ -93,10 +93,12 @@
 m[3]->AppendItem("Window", 10411);
 m[3]->AppendItem("Window 2x1", 10421);
-m[3]->AppendItem("Window 1x2", 10412);
+// m[3]->AppendItem("Window 1x2", 10412);
 m[3]->AppendItem("Window 2x2", 10422);
-m[3]->AppendItem("Window 3x1", 10431);
+// m[3]->AppendItem("Window 3x1", 10431);
 m[3]->AppendItem("Window 3x3", 10433);
 m[3]->AppendItem("Cur->LastWdg", 10441);
 m[3]->AppendItem("Close CurWin", 10460);
+m[3]->AppendCheckItem("StatZoomWin", 10470);
+m[3]->SetStateMsg(10470, true);
 
 m[4] = new PIMenu(Menubar(),"PostScript");
@@ -138,18 +140,39 @@
 MainWin()->SetSize(msx, msy);
 
+//------------------------------------------------------
+// On cree un container intermediaire permettant de gerer 
+// le widget zoom, colormap, stats, ...
+
 int bss = 100+mFgScSz*15;
-gimv = new PIPixmap(MainWin(), "GloV", bss, bss, 5, 5);
+
+int statc_szy = bss+10+14+mFgScSz*2+5; 
+statcont = new PIContainer(MainWin(), "ZGCSCont", msx, statc_szy, 0, 0);
+statcont->SetBinding(PIBK_fixed,PIBK_fixed,PIBK_fixed, PIBK_free);
+
+gimv = new PIPixmap(statcont, "GloV", bss, bss, 5, 5);
 gimv->SetBinding(PIBK_fixed,PIBK_fixed,PIBK_free, PIBK_free); 
-zoom = new PIPixmap(MainWin(), "Zoom", bss, bss, bss+10, 5);
+zoom = new PIPixmap(statcont, "Zoom", bss, bss, bss+10, 5);
 zoom->SetBinding(PIBK_fixed,PIBK_fixed,PIBK_free, PIBK_free); 
-cmapv = new PICMapView(MainWin(), "CMapView", msx-10, 14+mFgScSz*2, 5, bss+10); 
+cmapv = new PICMapView(statcont, "CMapView", msx-10, 14+mFgScSz*2, 5, bss+10); 
 cmapv->SetBinding(PIBK_fixed,PIBK_fixed,PIBK_fixed, PIBK_free); 
-
-int cpy = bss+10+14+mFgScSz*2+5;
+labstat = new PILabel(statcont, "statlabel", msx-2*(bss+20), 20, 2*bss+20, 10);
+labstat->SetBinding(PIBK_fixed,PIBK_fixed,PIBK_fixed, PIBK_free); 
+labstat->SetLabel("Stat-Zoom-ColMap Window");
+labstat->SetForegroundColor(PI_Red);
+labstat->SetBorderWidth(1);
+statcont->Show();
+// StatZoomWindowSetVisible(true);
+//------------------------------------------------------
+
+//int cpy = bss+10+14+mFgScSz*2+5;
+int cpy = statc_szy;
 
 // Creation d'une console avec gestion des commandes  
-mCons = new PIConsole(MainWin(), "Console", 30200, 512, 132, msx, msy-cpy, 0, cpy );
+consolecont = new PIContainer(MainWin(), "ConsoleCont", msx, msy-cpy, 0, cpy );
+consolecont->SetBinding(PIBK_fixed,PIBK_fixed,PIBK_fixed, PIBK_fixed); 
+mCons = new PIConsole(consolecont, "Console", 30200, 512, 132, msx, msy-cpy, 0, 0 );
 mCons->SetBinding(PIBK_fixed,PIBK_fixed,PIBK_fixed, PIBK_fixed); 
 mCons->AcceptCmd(true, 50);
+consolecont->Show();
 redirecout = false;
 // RedirectStdOutErr(true);  pas par defaut 
@@ -200,23 +223,7 @@
 
 // Attributs graphiques courants
-mFCol = mBCol = PI_NotDefColor;
-mLAtt = PI_NotDefLineAtt;
-mFName = PI_DefaultFont;   
-mFSz = PI_NotDefFontSize;
-mFAtt = PI_NotDefFontAtt;
-mMSz = -1;
-mMrk = PI_NotDefMarker;
-mCmapid = CMAP_OTHER;
-mRevCmap = false; 
-mZoom = 0;
 mAxesFlags = kBoxAxes | kExtTicks | kLabels;
-SetXYLimits(-1, 1., -1., 1.);
-mFXYlim = false;
 SetInsetLimits(0.4, 0.6, 0.4, 0.6);
-SetImageCenterPosition(-1,-1);
-mFImgCenter = false;
-maXlog = maYlog = false;
 mAddTitle = true;
-SaveGraphicAtt();
 
 // Initialisation 
@@ -269,4 +276,7 @@
 delete gimv;
 delete cmapv;
+delete labstat;
+
+delete statcont;
 
 delete pfc_fits;
@@ -275,4 +285,5 @@
 
 delete mCons;
+ delete consolecont;
 
 delete mObjmgrw;
@@ -449,5 +460,5 @@
 
 /* --Methode-- */
-int PIStdImgApp::DispImage(P2DArrayAdapter* nouv, string const & name, int opt, int oid)
+int PIStdImgApp::DispImage(P2DArrayAdapter* nouv, string const & name, string const& sop, int oid)
 {
 PIImage* pii;
@@ -468,24 +479,19 @@
   }
 
-int zm = 1;
-if (mZoom == 0) {  // Facteur de zoom auto 
-  zm = (nouv->XSize() > nouv->YSize()) ? nouv->XSize() :  nouv->YSize();
-  zm = (zm >= 250) ? 250/zm : 1;
-  }
-else zm = mZoom;
-
-if (zm == 0)  zm = 1;
-if (zm < -10)  zm = -10; 
-if (zm > 10)  zm = 10;
-
-if (zm > 0)  { sx = nouv->XSize()*zm;  sy = nouv->YSize()*zm; }
-else  { 
-  sx = (int)((float)nouv->XSize()*(-1./float(zm)));  
-  sy = (int)((float)nouv->YSize()*(-1./float(zm))); 
-  } 
+// On decode les options graphiques
+vector<string> opts;
+DispWinEnum dwopt = ParseDisplayOption(sop, opts);
+
+// Pas de same ou inset pour DispImage
+if ((dwopt == Disp_Same) || (dwopt == Disp_Inset) ) dwopt = Disp_Next;
+
+// Choix de la taille de fenetre
+#define MINPIIMGSIZE 100
+sx = (nouv->XSize() > MINPIIMGSIZE) ? nouv->XSize() : MINPIIMGSIZE;
+sy = (nouv->YSize() > MINPIIMGSIZE) ? nouv->XSize() : MINPIIMGSIZE;
 if (sx > 400+mFgScSz*100) sx = 400+mFgScSz*100;
 if (sy > 400+mFgScSz*100) sy = 400+mFgScSz*100;
 px = py = 0;
-win = GetWindow(opt, sx, sy, px, py, flag, (char *)name.c_str());
+win = GetWindow(dwopt, sx, sy, px, py, flag, (char *)name.c_str());
 pii = new PIImage(win, (char *)name.c_str(), sx, sy, px,py);
 pii->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic);
@@ -493,14 +499,26 @@
 pii->SetGloVWin(gimv, false);
 pii->SetCMapWin(cmapv, false);
-pii->SetZoom(zm, false);
-if ( mCmapid != CMAP_OTHER ) pii->SetColMapId(mCmapid, mRevCmap, false);
 pii->ShowCursor(true);
 pii->SetUserData(NULL, oid);
-// Centrage eventuel du pave
-if (mFImgCenter && (mXImgCenter > 0) && (mYImgCenter > 0)) {
-  pii->SetImage(nouv, false);
-  pii->SetPave(mXImgCenter, mYImgCenter, true, true);
-  }
-else pii->SetImage(nouv, true);
+
+// decode des options en chaine de caracteres
+pii->DecodeOptionString(mDefaultAtt, false);  // d'abord les options par defaut
+pii->DecodeOptionString(opts);      // ensuite, les options specifies en argument
+
+
+// On recalcule la taille de la fenetre si Disp_Win
+if (dwopt == Disp_Win) {
+  int sx2 = (int)((float)nouv->XSize()*pii->GetZoomF());
+  int sy2 = (int)((float)nouv->YSize()*pii->GetZoomF());
+  
+  if (sx2 > 400+mFgScSz*100) sx2 = 400+mFgScSz*100;
+  if (sy2 > 400+mFgScSz*100) sy2 = 400+mFgScSz*100;
+  if (sx2 < MINPIIMGSIZE) sx = MINPIIMGSIZE;
+  if (sy2 < MINPIIMGSIZE) sy = MINPIIMGSIZE;
+  if ((sx2 != sx) || (sy2 != sy))  win->SetSize(sx2, sy2);
+}
+
+pii->SetImage(nouv, false);
+
 // printf("!!DBG!! PIImage Pos= %d %d  Size= %d %d \n", pii->XPos(), pii->YPos(), pii->XSize(), pii->YSize()   );
 mCurWin = win;
@@ -509,4 +527,5 @@
 mBWId++;
 mBWList[mBWId] = pii;
+pii->Refresh();
 return(mBWId); 
 }
@@ -514,5 +533,6 @@
 
 /* --Methode-- */
-int PIStdImgApp::DispScDrawer(PIDrawer* scd, string const & name, int opt, string title, int oid)
+int PIStdImgApp::DispScDrawer(PIDrawer* scd, string const & name, string const& sop, 
+			      string title, int oid)
 {
 if (scd == NULL)
@@ -522,20 +542,14 @@
   }
 
-// Changement d'attributs graphiques courants du drawer
-if (mFCol != PI_NotDefColor) scd->GetGraphicAtt().SetColAtt(mFCol, mBCol);
-if (mLAtt != PI_NotDefLineAtt) scd->GetGraphicAtt().SetLineAtt(mLAtt);
-if ( (mFSz != PI_NotDefFontSize) && (mFAtt != PI_NotDefFontAtt) ) 
-  scd->GetGraphicAtt().SetFontAtt(mFSz, mFAtt); 
-if ( mFName != PI_DefaultFont ) 
-  scd->GetGraphicAtt().SetFontAtt(mFName, scd->GetGraphicAtt().GetFontSz(), 
-			       scd->GetGraphicAtt().GetFontAtt());
-if ( (mMrk != PI_NotDefMarker) && (mMSz >= 0) ) 
-  scd->GetGraphicAtt().SetMarkerAtt(mMSz, mMrk);
-if ( mCmapid != CMAP_OTHER ) scd->GetGraphicAtt().SetColMapId(mCmapid);
-
-
-if ( (!mLastWdg) && ( (opt == Disp_Same) || (opt == Disp_Inset) ) )  opt = Disp_Next;
+// On decode les options graphiques
+vector<string> opts;
+DispWinEnum dwopt = ParseDisplayOption(sop, opts);
+if ( (!mLastWdg) && ( (dwopt == Disp_Same) || (dwopt == Disp_Inset) ) )  dwopt = Disp_Next;
 // Trace en superpoistion
-if ( (opt == Disp_Same) && (mLastWdg) ) {  
+if ( (dwopt == Disp_Same) && (mLastWdg) ) {  
+  // Les options 
+  scd->DecodeOptionString(mDefaultAtt, false);
+  scd->DecodeOptionString(opts, true);
+
   if (mLastWdg->kind() == PIScDrawWdg::ClassId)  ((PIScDrawWdg*)mLastWdg)->AddScDrawer(scd, true);
   else mLastWdg->AddDrawer(scd, true, true, true);
@@ -546,13 +560,14 @@
 }
 // Trace en medaillon
-else if ( (opt == Disp_Inset) && (mLastWdg) ) {
+else if ( (dwopt == Disp_Inset) && (mLastWdg) ) {
   PIGrCoord x1, x2, y1, y2;
   x1 = mIXmin;  x2 = mIXmax;
   y2 = 1.-mIYmin;  y1 = 1.-mIYmax;
+  // Les options 
+  scd->DecodeOptionString(mDefaultAtt, false);
+  scd->DecodeOptionString(opts, true);
+
   scd->SetAxesFlags(mAxesFlags);
-  if (maXlog || maYlog)  scd->SetLogScale(maXlog, maYlog);  // Echelle log
-  if (mFXYlim)  // Forcage limites XY 
-    scd->SetLimits(mXmin, mXmax, mYmin, mYmax);  
-  else scd->UpdateLimits();
+  scd->UpdateLimits();
   mLastWdg->AddDrawer(scd, x1, y1, x2, y2, true, false, true);
   scd->Refresh();
@@ -562,4 +577,5 @@
 }
 
+// Creation d'un nouveau PIScDrawWdg
 PIWindow* win;
 PIScDrawWdg* scw;
@@ -567,23 +583,26 @@
 sx = 200+mFgScSz*100;
 sy = 200+mFgScSz*100;
-win = GetWindow(opt, sx, sy, px, py, flag, (char *)name.c_str());
-/*
-if (typeid(*scd) != typeid(PIHisto2D)) 
-else scw = new PIH2DWdg(win, (char *)name.c_str(), sx, sy, px, py);
-*/
+win = GetWindow(dwopt, sx, sy, px, py, flag, (char *)name.c_str());
+
 scw = new PIScDrawWdg(win, (char *)name.c_str(), sx, sy, px, py);
 scw->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic);
 scw->SetUserData(NULL, oid);
-if (maXlog || maYlog)  scw->SetLogScale(maXlog, maYlog);  // Echelle log
-if (mFXYlim)  // Forcage limites XY 
-  scw->SetLimits(mXmin, mXmax, mYmin, mYmax);
+
+// Decodage des options :
+vector<string> scwatt;
 scw->SetAxesFlags(mAxesFlags);
-// Fonte de trace d'axe
-scw->BaseDrawer()->GetGraphicAtt().SetFontAtt(mFName, mFSz, mFAtt);
-/*
-if (typeid(*scd) != typeid(PIHisto2D)) 
-else ((PIH2DWdg*)scw)->SetPIHisto((PIHisto2D*)scd);
-*/
-scw->AddScDrawer(scd, true);
+if ( mDefaultAtt.size() > 0) { 
+  scwatt = mDefaultAtt;
+  scw->DecodeOptionString(scwatt, true);
+}
+if ( mAxesAtt.size() > 0) { 
+  scwatt = mAxesAtt;
+  scw->DecodeOptionString(scwatt, true);
+}
+if (opts.size() > 0) 
+  scd->DecodeOptionString(opts, true);
+if (opts.size() > 0) 
+  scw->DecodeOptionString(opts, false);
+
 //   Titre du plot
 if (mAddTitle) {
@@ -592,5 +611,7 @@
 }
 
+scw->AddScDrawer(scd, true);
 // scw->Refresh();   ? Pas necessaire  Reza 19/08/98, 05/05/99 $CHECK$ 
+
 mCurWin = win;
 mCurWdg = scw;
@@ -602,5 +623,6 @@
 
 /* --Methode-- */
-int PIStdImgApp::Disp3DDrawer(PIDrawer3D* dr3, string const & name, int opt, string title, int oid)
+int PIStdImgApp::Disp3DDrawer(PIDrawer3D* dr3, string const & name, string const& sop, 
+			      string title, int oid)
 {
 if (dr3 == NULL)
@@ -610,19 +632,15 @@
   }
 
-// Changement d'attributs graphiques courants du drawer
-if (mFCol != PI_NotDefColor) dr3->GetGraphicAtt().SetColAtt(mFCol, mBCol);
-if (mLAtt != PI_NotDefLineAtt) dr3->GetGraphicAtt().SetLineAtt(mLAtt);
-if ( (mFSz != PI_NotDefFontSize) && (mFAtt != PI_NotDefFontAtt) ) 
-  dr3->GetGraphicAtt().SetFontAtt(mFSz, mFAtt); 
-if ( mFName != PI_DefaultFont ) 
-  dr3->GetGraphicAtt().SetFontAtt(mFName, dr3->GetGraphicAtt().GetFontSz(), 
-				  dr3->GetGraphicAtt().GetFontAtt());
-if ( (mMrk != PI_NotDefMarker) && (mMSz >= 0) ) 
-  dr3->GetGraphicAtt().SetMarkerAtt(mMSz, mMrk);
-if ( mCmapid != CMAP_OTHER ) dr3->GetGraphicAtt().SetColMapId(mCmapid);
-
-if ( (!mLastWdg) && ( (opt == Disp_Same) || (opt == Disp_Inset) ) )  opt = Disp_Next;
+// On decode les options graphiques
+vector<string> opts;
+DispWinEnum dwopt = ParseDisplayOption(sop, opts);
+
+if ( (!mLastWdg) && ( (dwopt == Disp_Same) || (dwopt == Disp_Inset) ) )  dwopt = Disp_Next;
 // Trace en superpoistion
-if ( (opt == Disp_Same) && (mLastWdg) ) {
+if ( (dwopt == Disp_Same) && (mLastWdg) ) {
+  // Les options 
+  dr3->DecodeOptionString(mDefaultAtt, false);
+  dr3->DecodeOptionString(opts, true);
+
   if (mLastWdg->kind() == PIDraw3DWdg::ClassId)  ((PIDraw3DWdg*)mLastWdg)->AddDrawer3D(dr3, true);
   else mLastWdg->AddDrawer(dr3, true, true, true);
@@ -633,8 +651,12 @@
 }
 // Trace en medaillon
-else if ( (opt == Disp_Inset) && (mLastWdg) ) {
+else if ( (dwopt == Disp_Inset) && (mLastWdg) ) {
   PIGrCoord x1, x2, y1, y2;
   x1 = mIXmin;  x2 = mIXmax;
   y2 = 1.-mIYmin;  y1 = 1.-mIYmax;
+  // Les options 
+  dr3->DecodeOptionString(mDefaultAtt, false);
+  dr3->DecodeOptionString(opts, true);
+
   dr3->SetAxesFlags(mAxesFlags);
   dr3->UpdateLimits();
@@ -651,9 +673,25 @@
 sx = 200+mFgScSz*100;
 sy = 200+mFgScSz*100;
-win = GetWindow(opt, sx, sy, px, py, flag, (char *)name.c_str());
+win = GetWindow(dwopt, sx, sy, px, py, flag, (char *)name.c_str());
 PIDraw3DWdg* wd3 = new PIDraw3DWdg(win, (char *)name.c_str(), sx, sy, px, py);
 wd3->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic);
 wd3->SetUserData(NULL, oid);
-wd3->AddDrawer3D(dr3, true);
+
+// Decodage des options :
+vector<string> scwatt;
+// wd3->SetAxesFlags(mAxesFlags);  Attributs d'axes 3D a faire 
+if ( mDefaultAtt.size() > 0) { 
+  scwatt = mDefaultAtt;
+  wd3->DecodeOptionString(scwatt, true);
+}
+if ( mAxesAtt.size() > 0) { 
+  scwatt = mAxesAtt;
+  wd3->DecodeOptionString(scwatt, true);
+}
+if (opts.size() > 0)  
+  dr3->DecodeOptionString(opts, true);
+if (opts.size() > 0)  
+  wd3->DecodeOptionString(opts, false);
+
 //   Titre du plot
 if (mAddTitle) {
@@ -661,5 +699,8 @@
   wd3->SetTitles(title, t2);    
 }
+
+wd3->AddDrawer3D(dr3, true);
 // wd3->Refresh();   ?Pas necessaire   $CHECK$ 05/05/99
+
 mCurWin = win;
 mCurWdg = wd3;
@@ -671,30 +712,32 @@
 
 /* --Methode-- */
-void PIStdImgApp::AddText(string const & txt, double xp, double yp)
+void PIStdImgApp::AddText(string const & txt, double xp, double yp, string const& sop)
 {
 PIElDrawer *eld=CurrentElDrawer();
 if (eld == NULL) return;
 
-if ( (mFSz != PI_NotDefFontSize) && (mFAtt != PI_NotDefFontAtt) ) 
-  eld->GetGraphicAtt().SetFontAtt(mFSz, mFAtt); 
-if ( mFName != PI_DefaultFont ) 
-  eld->GetGraphicAtt().SetFontAtt(mFName, eld->GetGraphicAtt().GetFontSz(), 
-				  eld->GetGraphicAtt().GetFontAtt());
-eld->ElAddText(xp,yp,txt.c_str(),mFCol);
+vector<string> opts;
+ParseDisplayOption(sop, opts);
+PIGraphicAtt gratt(opts);
+eld->ElAddText(xp,yp,txt.c_str(), gratt.GetColor());
 eld->Refresh();
 }
 
 /* --Methode-- */
-void PIStdImgApp::AddLine(double xp1, double yp1, double xp2, double yp2)
+void PIStdImgApp::AddLine(double xp1, double yp1, double xp2, double yp2, string const& sop)
 {
 PIElDrawer *eld=CurrentElDrawer();
 if (eld == NULL) return;
 
-eld->ElAddLine(xp1, yp1, xp2, yp2, mFCol);
+vector<string> opts;
+ParseDisplayOption(sop, opts);
+PIGraphicAtt gratt(opts);
+eld->ElAddLine(xp1, yp1, xp2, yp2, gratt.GetColor());
 eld->Refresh();
 }
 
 /* --Methode-- */
-void PIStdImgApp::AddRectangle(double xp1, double yp1, double xp2, double yp2, bool fgfill)
+void PIStdImgApp::AddRectangle(double xp1, double yp1, double xp2, double yp2, 
+			       string const& sop, bool fgfill)
 {
 PIElDrawer *eld=CurrentElDrawer();
@@ -715,17 +758,26 @@
   yp = yp2; dy = yp1-yp2;
 }
-if (fgfill) eld->ElAddFRect(xp, yp, dx, dy, mFCol);
-else eld->ElAddRect(xp, yp, dx, dy, mFCol);
+
+vector<string> opts;
+ParseDisplayOption(sop, opts);
+PIGraphicAtt gratt(opts);
+
+if (fgfill) eld->ElAddFRect(xp, yp, dx, dy, gratt.GetColor());
+else eld->ElAddRect(xp, yp, dx, dy, gratt.GetColor());
 eld->Refresh();
 }
 
 /* --Methode-- */
-void PIStdImgApp::AddCircle(double xc, double yc, double r, bool fgfill)
+void PIStdImgApp::AddCircle(double xc, double yc, double r, string const& sop, bool fgfill)
 {
 PIElDrawer *eld=CurrentElDrawer();
 if (eld == NULL) return;
 
-if (fgfill) eld->ElAddFCirc(xc, yc, r, mFCol);
-else eld->ElAddCirc(xc, yc, r, mFCol);
+vector<string> opts;
+ParseDisplayOption(sop, opts);
+PIGraphicAtt gratt(opts);
+
+if (fgfill) eld->ElAddFCirc(xc, yc, r, gratt.GetColor());
+else eld->ElAddCirc(xc, yc, r, gratt.GetColor());
 eld->Refresh();
 }
@@ -737,9 +789,4 @@
 if (eld == NULL) return;
 
-if ( (mFSz != PI_NotDefFontSize) && (mFAtt != PI_NotDefFontAtt) ) 
-  eld->GetGraphicAtt().SetFontAtt(mFSz, mFAtt); 
-if ( mFName != PI_DefaultFont ) 
-  eld->GetGraphicAtt().SetFontAtt(mFName, eld->GetGraphicAtt().GetFontSz(), 
-				  eld->GetGraphicAtt().GetFontAtt());
 eld->SetTitles(titletop, titlebottom);
 eld->Refresh();
@@ -815,5 +862,5 @@
 
 /* --Methode-- */
-PIWindow* PIStdImgApp::GetWindow(int typ, int& sx, int& sy, int& px, int& py, int& flag, char * nom)
+PIWindow* PIStdImgApp::GetWindow(DispWinEnum typ, int& sx, int& sy, int& px, int& py, int& flag, char * nom)
 {
 PIWindow* rw;
@@ -821,4 +868,5 @@
 switch (typ) {
   case Disp_Next :  // Fenetre graphique courante
+  case Disp_Default :
     {
     if (mGrW == NULL) CreateGraphWin();
@@ -993,4 +1041,29 @@
 }
 
+/* --Methode-- */
+void PIStdImgApp::StatZoomWindowSetVisible(bool fg)
+{
+
+  if (fg) {
+    consolecont->SetBinding(PIBK_free,PIBK_free,PIBK_free, PIBK_free); 
+    int szy = MainWin()->YSize();
+    MainWin()->SetSize(MainWin()->XSize(), szy+statcont->YSize());
+    consolecont->SetPos(0, statcont->YSize());
+    consolecont->SetSize(MainWin()->XSize(), szy);
+    consolecont->SetBinding(PIBK_fixed,PIBK_fixed,PIBK_fixed, PIBK_fixed); 
+    statcont->Show();
+    m[3]->SetStateMsg(10470, true);
+  }
+  else {
+    statcont->Hide();
+    consolecont->SetBinding(PIBK_free,PIBK_free,PIBK_free, PIBK_free); 
+    MainWin()->SetSize(MainWin()->XSize(), MainWin()->YSize()-statcont->YSize());
+    consolecont->SetPos(0, 0);
+    consolecont->SetSize(MainWin()->XSize(), MainWin()->YSize());
+    consolecont->SetBinding(PIBK_fixed,PIBK_fixed,PIBK_fixed, PIBK_fixed); 
+    m[3]->SetStateMsg(10470, false);    
+  }
+  
+}
 
 /* --Methode-- */
@@ -1040,4 +1113,64 @@
 m[4]->SetSensitivityMsg(10516, false);
 }
+
+//---------------------------------------------------------------------------
+//--------- Gestion des attributs graphiques et autres options de trace -----
+
+/* --Methode-- */
+void PIStdImgApp::SetInsetLimits(double xmin, double xmax, double ymin, double ymax)
+{
+  mIXmin = xmin;  mIXmax= xmax;
+  mIYmin = ymin;  mIYmax= ymax;
+}
+
+/* --Methode-- */
+void PIStdImgApp::SetDefaultGraphicAttributes(string const & opt)
+{
+  ParseDisplayOption(opt, mDefaultAtt);
+}
+
+/* --Methode-- */
+void PIStdImgApp::SetDefaultAxesAttributes(string const & opt)
+{
+  ParseDisplayOption(opt, mAxesAtt);
+}
+
+/* --Methode-- */
+DispWinEnum PIStdImgApp::ParseDisplayOption(string const & sop, vector<string>& opts)
+{
+  DispWinEnum rc = Disp_Next;
+  //DBG  cerr << " DBG-Parse-A sop=" << sop << " sop.length()= " << sop.length() << endl;
+  if (opts.size() > 0)  opts.erase(opts.begin(), opts.end());
+  if (sop.length() < 1) return(rc);
+  string gratt = sop;
+  for(int i=0; i<gratt.length(); i++) gratt[i] = tolower(gratt[i]);
+  if ( (gratt == "def") || (gratt == "default") ) return(rc);
+// On separe en mots espaces par des blancs ou tabulation 
+  size_t p = 0;
+  size_t q = 0;
+  size_t l = gratt.length();
+  string token;
+  while (q < l)  {
+    p = gratt.find_first_not_of(" \t",q);   // au debut d'un token
+    if (p >= l) break;
+    q = gratt.find_first_of(" \t",p);       // Premier blanc ou tab suivant
+    if (q<l) token = gratt.substr(p,q-p);
+    else token = gratt.substr(p);
+    if (token == "") continue;
+    // Decodage option fenetre d'affichage (win, next, ...)
+    if (token == "win")   rc =  Disp_Win;
+    else if (token == "same")  rc = Disp_Same;
+    else if (token == "inset")   rc = Disp_Inset;
+    else  if (token == "stack")   rc = Disp_Stack;
+    // Option a etre decode par les drawers, etc ...
+    else  opts.push_back(token); 
+  }
+
+  //DBG  cerr << " DBG-Parse-B opts.size()=" << opts.size() << endl;
+  return (rc);
+}
+
+//---------------------------------------------------------------------------
+//------------       Methodes privees (MBProcessx, ...)    ----------
 
 /* --Methode-- */
@@ -1295,4 +1428,7 @@
       DeleteWindow(mCurWin);
       break;
+    case 10470 :
+      StatZoomWindowSetVisible(m[3]->GetStateMsg(10470));
+      break;
   default:
     cerr << "PIStdImgApp::MBProcess4() BUG?? Msg= " <<  msg << endl;    
@@ -1461,119 +1597,4 @@
 
 
-/* --Methode-- */
-void PIStdImgApp::SetColAtt(PIColors fg, PIColors bg)
-{
-  mFCol = fg;
-  mBCol = bg;
-}
-/* --Methode-- */
-void PIStdImgApp::SetLineAtt(PILineAtt lat)
-{
-  mLAtt = lat;
-}
-
-/* --Methode-- */
-void PIStdImgApp::SetFontName(PIFontName fn)
-{
-  mFName = fn;
-}
-
-/* --Methode-- */
-void PIStdImgApp::SetFontAtt(PIFontSize fsz, PIFontAtt fat)
-{
-  mFSz = fsz;
-  mFAtt = fat;
-}
-/* --Methode-- */
-void PIStdImgApp::SetMarkerAtt(int sz, PIMarker mrk)
-{
-  mMSz = sz;
-  mMrk = mrk;
-}
-
-/* --Methode-- */
-void PIStdImgApp::SetZoomAtt(int zoom)
-{
-  if ( (zoom > 10) || (zoom < -10) ) zoom = 0;
-  mZoom = zoom;
-}
-/* --Methode-- */
-void PIStdImgApp::SetAxesAtt(unsigned int axfl)
-{
-  mAxesFlags = axfl; 
-}
-/* --Methode-- */
-void PIStdImgApp::SetXYLimits(double xmin, double xmax, double ymin, double ymax)
-{
-  mXmin = xmin;  mXmax= xmax;
-  mYmin = ymin;  mYmax= ymax;
-}
-/* --Methode-- */
-void PIStdImgApp::SetInsetLimits(double xmin, double xmax, double ymin, double ymax)
-{
-  mIXmin = xmin;  mIXmax= xmax;
-  mIYmin = ymin;  mIYmax= ymax;
-}
-/* --Methode-- */
-void PIStdImgApp::SetImageCenterPosition(int x, int y)
-{
-  mXImgCenter = x;  mYImgCenter = y;
-}
-
-/* --Methode-- */
-void PIStdImgApp::SaveGraphicAtt()
-{
-  mSFCol = mFCol;
-  mSBCol = mBCol;
-  mSLAtt = mLAtt;
-  mSFName = mFName;
-  mSFSz = mFSz;
-  mSFAtt = mFAtt;
-  mSMSz = mMSz;
-  mSMrk = mMrk;
-  mSCmapid = mCmapid;
-  mSRevCmap = mRevCmap;
-  mSZoom = mZoom;
-  mSAxesFlags = mAxesFlags;
-  mSXmin = mXmin;  mSXmax = mXmax;
-  mSYmin = mYmin;  mSYmax = mYmax;
-  mSIXmin = mIXmin;  mSIXmax = mIXmax;
-  mSIYmin = mIYmin;  mSIYmax = mIYmax;
-  mSFXYlim = mFXYlim;
-  mSXImgCenter = mXImgCenter;
-  mSYImgCenter = mYImgCenter;
-  mSFImgCenter = mFImgCenter;
-  mSaXlog = maXlog;
-  mSaYlog = maYlog;
-  mSAddTitle = mAddTitle;
-}
-
-/* --Methode-- */
-void PIStdImgApp::RestoreGraphicAtt()
-{
-  mFCol = mSFCol;
-  mBCol = mSBCol;
-  mLAtt = mSLAtt;
-  mFName = mSFName;
-  mFSz = mSFSz;
-  mFAtt = mSFAtt;
-  mMSz = mSMSz;
-  mMrk = mSMrk;
-  mCmapid = mSCmapid;
-  mRevCmap = mSRevCmap;
-  mZoom = mSZoom;
-  mAxesFlags = mSAxesFlags;
-  mXmin = mSXmin;  mXmax = mSXmax;
-  mYmin = mSYmin;  mYmax = mSYmax;
-  mIXmin = mSIXmin;  mIXmax = mSIXmax;
-  mIYmin = mSIYmin;  mIYmax = mSIYmax;
-  mFXYlim = mSFXYlim;
-  mXImgCenter = mSXImgCenter;
-  mYImgCenter = mSYImgCenter;
-  mFImgCenter = mSFImgCenter;
-  maXlog = mSaXlog;
-  maYlog = mSaYlog;
-  mAddTitle = mSAddTitle;
-}
 
 //  -------------------------------------------------
@@ -1620,6 +1641,6 @@
 string info = "piapp : Interactive analysis program\n";
 info += buff;
-info += "(C) LAL-IN2P3/CNRS  1996-2000\n";
-info += "(C) SPP-DAPNIA/CEA  1996-2000\n";
+info += "(C) LAL-IN2P3/CNRS  1996-2002\n";
+info += "(C) SPP-DAPNIA/CEA  1996-2002\n";
 infow_txt->SetText(info);
 }
Index: /trunk/SophyaPI/PIext/pistdimgapp.h
===================================================================
--- /trunk/SophyaPI/PIext/pistdimgapp.h	(revision 1970)
+++ /trunk/SophyaPI/PIext/pistdimgapp.h	(revision 1971)
@@ -31,5 +31,5 @@
 
 
-enum {Disp_Next=0, Disp_Win=1, Disp_Same=2, Disp_Stack=3, Disp_Inset=4};
+enum DispWinEnum {Disp_Default, Disp_Next, Disp_Win, Disp_Same, Disp_Stack, Disp_Inset};
 
 typedef map<long, PIWindow*, less<long> > WindMList;
@@ -47,14 +47,18 @@
      virtual void   SetBlocked();
 
-     int  DispImage(P2DArrayAdapter* nouv, string const & name, int opt, int oid=0);
-     int  DispScDrawer(PIDrawer* scd, string const & name, int opt, string title="", int oid=0);
-     int  Disp3DDrawer(PIDrawer3D* scd, string const & name, int opt, string title="", int oid=0);
+     int  DispImage(P2DArrayAdapter* nouv, string const & name, string const & opt, int oid=0);
+     int  DispScDrawer(PIDrawer* scd, string const & name, string const & opt, 
+		       string title="", int oid=0);
+     int  Disp3DDrawer(PIDrawer3D* scd, string const & name, string const & opt, 
+		       string title="", int oid=0);
 
   //  Fonction d'ajout de texte (provisoire - Aout 99) 
-     void AddText(string const & txt, double xp, double yp);
+     void AddText(string const & txt, double xp, double yp, string const& opt);
   //  Ajout de lignes, rectangles, cercles (provisoires - Aout 2001)
-     void AddLine(double xp1, double yp1, double xp2, double yp2);
-     void AddRectangle(double xp1, double yp1, double xp2, double yp2, bool fgfill=false);
-     void AddCircle(double xc, double yc, double r, bool fgfill=false);
+     void AddLine(double xp1, double yp1, double xp2, double yp2, string const& opt);
+     void AddRectangle(double xp1, double yp1, double xp2, double yp2, string const& opt, 
+		       bool fgfill=false);
+     void AddCircle(double xc, double yc, double r, string const& opt, 
+		    bool fgfill=false);
 
   //  Fonction Ajout de titre de trace
@@ -66,5 +70,5 @@
      void CreateGraphWin(int nx=1, int ny=1, int sx=0, int sy = 0);
      void CreateStackWin(int sx=0, int sy = 0);
-     PIWindow * GetWindow(int typ, int& sx, int& sy, int& px, int& py, int& flag, char * nom);
+     PIWindow * GetWindow(DispWinEnum typ, int& sx, int& sy, int& px, int& py, int& flag, char * nom);
      void SetZone(int nzx=1, int nzy=1);
      void StackWinNext();
@@ -93,4 +97,7 @@
      inline PPInMgrWind* PPInMgrW() { return mPpinmgrw; }
 
+// Gestion (show/hide) de la fenetre Stat/ZoomWindow 
+    void   StatZoomWindowSetVisible(bool fg=true);
+
 // Redirection ou Non de StdOut/StdErr
      void  RedirectStdOutErr(bool fg = true);
@@ -99,28 +106,12 @@
      void  CatchSignals(bool fgfpe=true, bool fgsegv=true);
 
-//  Gestion d attributs graphiques courants
-     void  SetColAtt(PIColors fg=PI_NotDefColor, 
-                     PIColors bg=PI_NotDefColor);
-     void  SetLineAtt(PILineAtt lat=PI_NotDefLineAtt);
-     void  SetFontName(PIFontName fn=PI_DefaultFont);
-     void  SetFontAtt(PIFontSize fsz=PI_NotDefFontSize,
-                      PIFontAtt fat=PI_NotDefFontAtt);
-     void  SetMarkerAtt(int sz=-1, PIMarker mrk=PI_NotDefMarker);
-     inline void  SetColMapId(CMapId cid=CMAP_OTHER) { mCmapid = cid; }
-     inline void  SetReverseColMapFlag(bool fg=false) { mRevCmap = fg; }
-     void  SetZoomAtt(int zoom=0);
-     void  SetAxesAtt(unsigned int axfl=kBoxAxes | kExtTicks | kLabels);
-     void  SetXYLimits(double xmin=-1., double xmax=1., double ymin=-1., double ymax=1.);
      void  SetInsetLimits(double xmin=0.4, double xmax=0.6, double ymin=0.4, double ymax=0.6);
-     void  SetImageCenterPosition(int x=-1, int y=-1);
-     inline void  UseXYLimits(bool fg=false) {  mFXYlim=fg; }
-     inline void  UseImageCenter(bool fg=false) { mFImgCenter=fg; }
-     inline void  SetXLogScale(bool logx=false) { maXlog = logx; }
-     inline void  SetYLogScale(bool logy=false) { maYlog = logy; }
      inline void  SetAutoAddTitle(bool aatit=true) { mAddTitle = aatit; }
-
-// Pour sauvegarder-restauration de  l'etat des attributs graphiques
-     void  SaveGraphicAtt();   
-     void  RestoreGraphicAtt();   
+     void  SetAxesAtt(unsigned int axfl) { mAxesFlags = axfl; }
+  //     void  SaveGraphicAtt();
+  //     void  RestoreGraphicAtt();
+     void  SetDefaultGraphicAttributes(string const & opt);
+     void  SetDefaultAxesAttributes(string const & opt);
+     DispWinEnum ParseDisplayOption(string const & opt, vector<string>& opts);
 
 // Gestion fichiers PS
@@ -141,4 +132,5 @@
     void MBProcess6(PIMessage msg, PIMsgHandler* sender, void* data=NULL);
 
+    
 
     NamedObjMgr* mObjMgr;
@@ -148,7 +140,9 @@
     PIMenu* mc;
 
+    PIContainer* statcont;    // Container pour les widgets zoom, gimv, cmapv ...
     PIPixmap* zoom;
     PIPixmap* gimv;
     PICMapView* cmapv;
+    PILabel* labstat;
 
     PIFileChooser * pfc_fits;   // Pour les fichiers FITS
@@ -156,4 +150,5 @@
     PIFileChooser * pfc_ps;     // Pour les PostScript
 
+    PIContainer* consolecont;    // Container pour la PIConsole
     PIConsole* mCons;
     bool redirecout;    // true if stdout/err redirected to mCons;
@@ -176,30 +171,15 @@
     PPInMgrWind* mPpinmgrw;
 
-//  Gestion d attributs graphiques courants, etat sauvegarde
-    PIColors     mFCol, mBCol, mSFCol, mSBCol;
-    PILineAtt    mLAtt, mSLAtt;
-    PIFontName   mFName, mSFName;
-    PIFontSize   mFSz, mSFSz;
-    PIFontAtt    mFAtt, mSFAtt;
-    int          mMSz, mSMSz;
-    PIMarker     mMrk,mSMrk;  
-    CMapId       mCmapid, mSCmapid;
-    bool         mRevCmap, mSRevCmap;
-    int 	 mZoom, mSZoom;
-    unsigned int mAxesFlags, mSAxesFlags;
-    double	 mXmin, mXmax, mYmin, mYmax;
-    double	 mSXmin, mSXmax, mSYmin, mSYmax;
+  // Attributs graphiques, etc ...
     double	 mIXmin, mIXmax, mIYmin, mIYmax;
-    double	 mSIXmin, mSIXmax, mSIYmin, mSIYmax;
-    int		 mXImgCenter, mYImgCenter;
-    int		 mSXImgCenter, mSYImgCenter;
-    bool	 mFXYlim, mSFXYlim;
-    bool	 mFImgCenter, mSFImgCenter;
-    bool	 maXlog, mSaXlog;
-    bool	 maYlog, mSaYlog;
-    bool         mAddTitle, mSAddTitle;
+    bool         mAddTitle;
+    unsigned int mAxesFlags;
 
+    vector<string> mDefaultAtt;
+    vector<string> mAxesAtt;  
+
+  //  Controles et gestion divers 
     PIMessage mFCMsg;  // Message for processing FileOpen
-    int mFgScSz;   // Dlag ScreenSize
+    int mFgScSz;   // Flag ScreenSize
     bool mFgCWImg; // true -> Current Widget is PIImage
 };
Index: /trunk/SophyaPI/PIext/servnobjm.cc
===================================================================
--- /trunk/SophyaPI/PIext/servnobjm.cc	(revision 1970)
+++ /trunk/SophyaPI/PIext/servnobjm.cc	(revision 1971)
@@ -53,5 +53,4 @@
 mOmg = omg;
 dynlink = NULL;
-InitGrAttNames();
 }
   
@@ -235,9 +234,6 @@
   vya->DefineXCoordinate(xmin, (xmax-xmin)/np);
   PIYfXDrawer* dr = new   PIYfXDrawer(vya, NULL, true) ; 
-  bool fgsr = true;
-  dopt = "thinline," + dopt;
-  int opt = DecodeDispOption(dopt, fgsr);
-  int rsid = mImgapp->DispScDrawer(dr, titre, opt);
-  if (fgsr) mImgapp->RestoreGraphicAtt(); 
+  dopt = "thinline " + dopt;
+  int rsid = mImgapp->DispScDrawer(dr, titre, dopt);
   if (nom.length() > 0) { 
     mOmg->AddObj(vpy, nom);
@@ -245,5 +241,4 @@
     }
   }
-
 return;
 }
@@ -304,11 +299,8 @@
     }
   else titre = nom;
-  bool fgsr = true;
-  int opt = DecodeDispOption(dopt, fgsr);
   P2DArrayAdapter* arr = new POMatrixAdapter(mtx, false);
   arr->DefineXYCoordinates(xmin, ymin, dx, dy);
   PISurfaceDrawer* sdr = new PISurfaceDrawer(arr, true, true, true);
-  int rsid = mImgapp->Disp3DDrawer(sdr, titre, opt);
-  if (fgsr) mImgapp->RestoreGraphicAtt();
+  int rsid = mImgapp->Disp3DDrawer(sdr, titre, dopt);
   if (nom.length() > 0)  { 
     mOmg->AddObj(mtx, nom);
@@ -352,14 +344,10 @@
 // nt->Print(0,10);
 PINTuple* pin = new PINTuple(nt, true);
-pin->SetStats(Services2NObjMgr::GetStatsOption(dopt));
 pin->SelectXY(ntn[0], ntn[1]);
 if ( haserr ) pin->SelectErrBar(ntn[2], ntn[3]);
 
-bool fgsr = true;
-dopt = "defline," + dopt;
-int opt = DecodeDispOption(dopt, fgsr);
+dopt = "defline " + dopt;
 string titre =  nom + ":" + expy + "%" + expx;
-mImgapp->DispScDrawer( (PIDrawer*)pin, titre, opt);
-if (fgsr) mImgapp->RestoreGraphicAtt();
+mImgapp->DispScDrawer( (PIDrawer*)pin, titre, dopt);
 return;
 }
@@ -392,7 +380,5 @@
 PINTuple3D* pin = new PINTuple3D(nt, true);
 pin->SelectXYZ(ntn[0], ntn[1], ntn[2]);
-bool fgsr = true;
-dopt = "defline," + dopt;
-int opt = DecodeDispOption(dopt, fgsr);
+dopt = "defline " + dopt;
 
 // Pour plot a partir de DispScDrawer
@@ -401,7 +387,6 @@
 // Pour plot a partir de Disp3DDrawer
 string titre =  nom + ":" + expy + "%" + expx;
-mImgapp->Disp3DDrawer(pin, titre, opt);
-
-if (fgsr) mImgapp->RestoreGraphicAtt();
+mImgapp->Disp3DDrawer(pin, titre, dopt);
+
 return;
 }
@@ -432,13 +417,9 @@
 
 PINTuple* pin = new PINTuple(nt, true);
-pin->SetStats(Services2NObjMgr::GetStatsOption(dopt));
 pin->SelectXY(ntn[0], ntn[1]);
 pin->SelectWt(ntn[2]);
 
-bool fgsr = true;
-int opt = DecodeDispOption(dopt, fgsr);
 string titre =  nom + ":" + expwt + "_" + expy + "%" + expx ;
-mImgapp->DispScDrawer( (PIDrawer*)pin, titre, opt);
-if (fgsr) mImgapp->RestoreGraphicAtt();
+mImgapp->DispScDrawer( (PIDrawer*)pin, titre, dopt);
 return;
 }
@@ -1315,385 +1296,4 @@
 
 
-// Variable pour stocker l'option de stat des drawers
-static bool stats_option = true;
-/* --Methode-- */
-void Services2NObjMgr::SetDefaultStatsOption(bool opt)
-{
-  stats_option = opt;
-}
-
-typedef vector<string> GraTok;
-
-/* --Methode-- */
-bool Services2NObjMgr::GetStatsOption(string& gratt)
-{
-int ropt = Disp_Next;
-for(int i=0; i<gratt.length(); i++) gratt[i] = tolower(gratt[i]);
-// On separe en mots separes par des virgules 
-gratt = ","+gratt;
-size_t p = 0;
-size_t q = 0;
-size_t l = gratt.length();
-string token;
-
-GraTok grt;
-
-while (q < l)  {
-  p = gratt.find_first_not_of(" ,",q+1); // au debut d'un token
-  if (p>=l) break;
-  q = gratt.find_first_of(" ,",p); // la fin du token;
-  token = gratt.substr(p,q-p);
-  grt.push_back(token);
-  }
-int k;
-bool fgsame = false;
-int option = 0; 
-for(k=0; k<grt.size(); k++) {
-  if ( (grt[k] == "same") || (grt[k] == "s") )  option = 1;
-  else if ( (grt[k] == "stat") || (grt[k] == "stats") ) option = 2;
-  else if ( (grt[k] == "nostat") || (grt[k] == "nostats") ) option = 3;
-}
-
-if (option == 0)  return(stats_option);
-else if ( (option == 1) || (option == 3) )  return(false);
-else return(true);
-}
-
-/* --Methode-- */
-int Services2NObjMgr::DecodeDispOption(string& gratt, bool& fgsrgr)
-{
-int ropt = Disp_Next;
-if (!mImgapp)  return(ropt); 
-
-for(int i=0; i<gratt.length(); i++) gratt[i] = tolower(gratt[i]);
-
-if (fgsrgr) mImgapp->SaveGraphicAtt();
-
-if ( (gratt == "def") || (gratt == "default") )  {  // Remise aux valeurs par defaut = non defini
-  mImgapp->SetColAtt();
-  mImgapp->SetLineAtt();
-  mImgapp->SetFontName();
-  mImgapp->SetFontAtt();
-  mImgapp->SetMarkerAtt();
-  mImgapp->SetColMapId();
-  mImgapp->SetReverseColMapFlag();
-  mImgapp->SetZoomAtt();
-  mImgapp->SetAxesAtt();
-  mImgapp->SetXYLimits();
-  mImgapp->UseXYLimits();
-  mImgapp->SetImageCenterPosition();
-  mImgapp->UseImageCenter();
-  mImgapp->SetXLogScale();
-  mImgapp->SetYLogScale();
-  mImgapp->SetAutoAddTitle();
-  stats_option = true;
-  return(ropt);
-  }
-
-// On separe en mots separes par des virgules 
-gratt = ","+gratt;
-size_t p = 0;
-size_t q = 0;
-size_t l = gratt.length();
-string token;
-
-GraTok grt;
-
-while (q < l)  {
-  p = gratt.find_first_not_of(" ,",q+1); // au debut d'un token
-  if (p>=l) break;
-  q = gratt.find_first_of(" ,",p); // la fin du token;
-  token = gratt.substr(p,q-p);
-  grt.push_back(token);
-  }
-
-
-static GrAttNames::iterator it;
-
-int k; 
-bool fgcont = true;
-fgsrgr = false;
-
-for(k=0; k<grt.size(); k++) {
-//  cout << "--DBG--SetGraphicAttributes() " << grt[k] << endl;
-
- // Decodage option affichage (win, next, etc 
-  fgcont = true;
-  if ( (grt[k] == "win") || (grt[k] == "w") )  ropt =  Disp_Win;
-  else if ( (grt[k] == "same") || (grt[k] == "s") )  ropt = Disp_Same;
-  else if ( (grt[k] == "inset") || (grt[k] == "ins") )  ropt = Disp_Inset;
-  else  if ( (grt[k] == "stack") || (grt[k] == "st") )  ropt = Disp_Stack;
-  else fgcont = false;
-  if (fgcont)   continue;
-
-  // Utilisation limites X-Y
-  if ( grt[k] == "xylimits" ) { mImgapp->UseXYLimits(true);  fgsrgr = true;  continue; }
-  if ( grt[k] == "centerimg" ) { mImgapp->UseImageCenter(true);  fgsrgr = true;  continue; }
-  // Echelle logarithmique d'axe
-  if ( grt[k] == "logx" )  { mImgapp->SetXLogScale(true); fgsrgr = true;  continue; }
-  if ( grt[k] == "linx" )  { mImgapp->SetXLogScale(false); fgsrgr = true;  continue; }
-  if ( grt[k] == "logy" )  { mImgapp->SetYLogScale(true); fgsrgr = true;  continue; }
-  if ( grt[k] == "liny" )  { mImgapp->SetYLogScale(false); fgsrgr = true;  continue; }
-  // Ajout automatique de titre
-  if ( ( grt[k] == "tit" ) || ( grt[k] == "title" ) )
-    { mImgapp->SetAutoAddTitle(true); fgsrgr = true;  continue; }
-  if ( ( grt[k] == "notit" ) || ( grt[k] == "notitle" ) )
-    { mImgapp->SetAutoAddTitle(false); fgsrgr = true;  continue; }
-
-  // Inversion d'indexage de ColorMap
-  if (grt[k] == "revcmap") 
-    { mImgapp->SetReverseColMapFlag(true); fgsrgr = true;  continue; }
-
-  // Si c'est une couleur
-  it = GrAcolors.find(grt[k]);
-  if (it != GrAcolors.end())  { mImgapp->SetColAtt((PIColors)((*it).second.a1)); fgsrgr = true; continue; }
-  // Si c'est un attribut de lignes
-  it = GrAlines.find(grt[k]);
-  if (it != GrAlines.end())  { mImgapp->SetLineAtt(PILineAtt((PILineTypes)((*it).second.a1)));  fgsrgr = true; continue; }
-  // Si c'est un attribut de fontes
-  it = GrAfonts.find(grt[k]);
-  if (it != GrAfonts.end())  { mImgapp->SetFontAtt((PIFontSize)((*it).second.a2), (PIFontAtt)((*it).second.a1) ); 
-                               fgsrgr = true;  continue; }
-  // Si c'est un nom de fontes
-  it = GrAfontNames.find(grt[k]);
-  if (it != GrAfontNames.end()) { mImgapp->SetFontName((PIFontName)((*it).second.a1));
-                                 fgsrgr = true;  continue; }
-  // Si c'est un attribut de markers
-  it = GrAmarkers.find(grt[k]);
-  if (it != GrAmarkers.end())  { mImgapp->SetMarkerAtt((*it).second.a2, (PIMarker)((*it).second.a1) ); 
-                                 fgsrgr = true;  continue; }
-  // Si c'est un colormap
-  it = GrAcmap.find(grt[k]);
-  if (it != GrAcmap.end())  { mImgapp->SetColMapId( (CMapId)((*it).second.a1) ); fgsrgr = true; continue; }  
-  // Si c'est un facteur de zoom
-  it = GrAzoom.find(grt[k]);
-  if (it != GrAzoom.end())  { mImgapp->SetZoomAtt( (*it).second.a1 );  fgsrgr = true; continue; }  
-  // Si c'est un attribut d'axe
-  it = GrAaxes.find(grt[k]);
-  if (it != GrAaxes.end())  { mImgapp->SetAxesAtt( (*it).second.a1 );  fgsrgr = true; continue; }  
-  
-  }  
-
-return(ropt);
-}
-
-
-// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-// Initialisation des chaines de caracteres designant les attributs graphiques 
-
-/* --Methode-- */
-void Services2NObjMgr::InitGrAttNames()
-{
-gratt_item gi;
-// Les couleurs
-gi.a2 = 0;
-gi.a1 = PI_NotDefColor;
-GrAcolors["defcol"] = gi;
-gi.a1 = PI_Black;
-GrAcolors["black"] = gi;
-gi.a1 = PI_White;
-GrAcolors["white"] = gi;
-gi.a1 = PI_Grey;
-GrAcolors["grey"] = gi;
-gi.a1 = PI_Red;
-GrAcolors["red"] = gi;
-gi.a1 = PI_Blue;
-GrAcolors["blue"] = gi;
-gi.a1 = PI_Green;
-GrAcolors["green"] = gi;
-gi.a1 = PI_Yellow;
-GrAcolors["yellow"] = gi;
-gi.a1 = PI_Magenta;
-GrAcolors["magenta"] = gi;
-
-gi.a1 = PI_Cyan;
-GrAcolors["cyan"] = gi;
-gi.a1 = PI_Turquoise;
-GrAcolors["turquoise"] = gi;
-gi.a1 = PI_NavyBlue;
-GrAcolors["navyblue"] = gi;
-gi.a1 = PI_Orange;
-GrAcolors["orange"] = gi;
-gi.a1 = PI_SiennaRed;
-GrAcolors["siennared"] = gi;
-gi.a1 = PI_Purple;
-GrAcolors["purple"] = gi;
-gi.a1 = PI_LimeGreen;
-GrAcolors["limegreen"] = gi;
-gi.a1 = PI_Gold;
-GrAcolors["gold"] = gi;
-gi.a1 = PI_Violet;
-GrAcolors["violet"] = gi;
-gi.a1 = PI_VioletRed;
-GrAcolors["violetred"] = gi;
-gi.a1 = PI_BlueViolet;
-GrAcolors["blueviolet"] = gi;
-gi.a1 = PI_DarkViolet;
-GrAcolors["darkviolet"] = gi;
-
-// Les attributs de lignes
-gi.a2 = 0;
-gi.a1 = PI_NotDefLineAtt;
-GrAlines["defline"] = gi;
-gi.a1 = PI_NormalLine;
-GrAlines["normalline"] = gi;
-gi.a1 = PI_ThinLine;
-GrAlines["thinline"] = gi;
-gi.a1 = PI_ThickLine;
-GrAlines["thickline"] = gi;
-gi.a1 = PI_DashedLine;
-GrAlines["dashedline"] = gi;
-gi.a1 = PI_ThinDashedLine;
-GrAlines["thindashedline"] = gi;
-gi.a1 = PI_ThickDashedLine;
-GrAlines["thickdashedline"] = gi;
-gi.a1 = PI_DottedLine;
-GrAlines["dottedline"] = gi;
-gi.a1 = PI_ThinDottedLine;
-GrAlines["thindottedline"] = gi;
-gi.a1 = PI_ThickDottedLine;
-GrAlines["thickdottedline"] = gi;
-gi.a1 = PI_DashDottedLine;
-GrAlines["dashdottedline"] = gi;
-gi.a1 = PI_ThinDashDottedLine;
-GrAlines["thindashdottedline"] = gi;
-gi.a1 = PI_ThickDashDottedLine;
-GrAlines["thickdashdottedline"] = gi;
-
-// Noms de fontes
-gi.a2 = 0;
-gi.a1 = PI_DefaultFont;
-GrAfontNames["deffont"] = gi;
-gi.a1 = PI_CourierFont;
-GrAfontNames["courierfont"] = gi;
-gi.a1 = PI_HelveticaFont;
-GrAfontNames["helveticafont"] = gi;
-gi.a1 = PI_TimesFont;
-GrAfontNames["timesfont"] = gi;
-gi.a1 = PI_SymbolFont;
-GrAfontNames["symbolfont"] = gi;
-
-// Attributs de fontes 
-gi.a2 = PI_NotDefFontSize;
-gi.a1 = PI_NotDefFontAtt;
-GrAfontNames["deffontatt"] = gi;
-gi.a2 = PI_NormalSizeFont;
-gi.a1 = PI_RomanFont;
-GrAfonts["normalfont"] = gi;
-gi.a1 = PI_BoldFont;
-GrAfonts["boldfont"] = gi;
-gi.a1 = PI_ItalicFont;
-GrAfonts["italicfont"] = gi;
-gi.a1 = PI_BoldItalicFont;
-GrAfonts["bolditalicfont"] = gi;
-gi.a2 = PI_SmallSizeFont;
-gi.a1 = PI_RomanFont;
-GrAfonts["smallfont"] = gi;
-gi.a1 = PI_BoldFont;
-GrAfonts["smallboldfont"] = gi;
-gi.a1 = PI_ItalicFont;
-GrAfonts["smallitalicfont"] = gi;
-gi.a1 = PI_BoldItalicFont;
-GrAfonts["smallbolditalicfont"] = gi;
-gi.a2 = PI_LargeSizeFont;
-gi.a1 = PI_RomanFont;
-GrAfonts["bigfont"] = gi;
-GrAfonts["largefont"] = gi;
-gi.a1 = PI_BoldFont;
-GrAfonts["bigboldfont"] = gi;
-gi.a1 = PI_ItalicFont;
-GrAfonts["bigitalicfont"] = gi;
-GrAfonts["largeitalicfont"] = gi;
-gi.a1 = PI_BoldItalicFont;
-GrAfonts["bigbolditalicfont"] = gi;
-GrAfonts["largebolditalicfont"] = gi;
-gi.a2 = PI_HugeSizeFont;
-gi.a1 = PI_RomanFont;
-GrAfonts["hugefont"] = gi;
-gi.a1 = PI_BoldFont;
-GrAfonts["hugeboldfont"] = gi;
-gi.a1 = PI_ItalicFont;
-GrAfonts["hugeitalicfont"] = gi;
-gi.a1 = PI_BoldItalicFont;
-GrAfonts["hugebolditalicfont"] = gi;
-
-
-// Les markers 
-const char* mrkn[11] = { "dotmarker", "plusmarker", "crossmarker", 
-                         "circlemarker", "fcirclemarker", "boxmarker", "fboxmarker", 
-                         "trianglemarker", "ftrianglemarker", "starmarker", "fstarmarker"};
-PIMarker mrk[11] = { PI_DotMarker, PI_PlusMarker, PI_CrossMarker, 
-                     PI_CircleMarker, PI_FCircleMarker, PI_BoxMarker, PI_FBoxMarker, 
-                     PI_TriangleMarker, PI_FTriangleMarker, PI_StarMarker, PI_FStarMarker};
-
-gi.a2 = 0;
-gi.a1 = PI_NotDefMarker;
-GrAmarkers["defmarker"] = gi;
- 
-for(int j=0; j<11; j++) {
-  string smrk;
-  char buff[16];
-  for(int m=1; m<10; m+=2) {
-    sprintf(buff,"%d",m);
-    smrk = (string)mrkn[j] + (string)buff;
-    gi.a1 = mrk[j];  gi.a2 = m;
-    GrAmarkers[smrk] = gi;
-    }
-  }
-
-// Les tables de couleurs 
-gi.a2 = 0;
-gi.a1 = CMAP_OTHER;
-GrAcmap["defcmap"] = gi;
-for(int kcc=0; kcc<PIColorMap::NumberStandardColorMaps(); kcc++) {
-  gi.a1 = PIColorMap::GetStandardColorMapId(kcc);
-  string colname = PIColorMap::GetStandardColorMapName(kcc);
-  for(int jll=0; jll<colname.length(); jll++)
-    colname[jll] = tolower(colname[jll]);
-  GrAcmap[colname] = gi;
-}
-
-
-// La valeur de zoom
-gi.a2 = 0;
-gi.a1 = 0;
-GrAzoom["defzoom"] = gi;
-gi.a1 = 1;
-GrAzoom["zoomx1"] = gi;
-gi.a1 = 2;
-GrAzoom["zoomx2"] = gi;
-gi.a1 = 3;
-GrAzoom["zoomx3"] = gi;
-gi.a1 = 4;
-GrAzoom["zoomx4"] = gi;
-gi.a1 = 5;
-GrAzoom["zoomx5"] = gi;
-gi.a1 = -2;
-GrAzoom["zoom/2"] = gi;
-gi.a1 = -3;
-GrAzoom["zoom/3"] = gi;
-gi.a1 = -4;
-GrAzoom["zoom/4"] = gi;
-gi.a1 = -5;
-GrAzoom["zoom/5"] = gi;
-
-// Attributs d'axes
-gi.a2 = 0;
-gi.a1 = (int)(kBoxAxes | kExtTicks | kLabels);
-GrAaxes["stdaxes"] = gi;
-GrAaxes["defaxes"] = gi;
-GrAaxes["boxaxes"] = gi;
-gi.a1 = (int)kAxesDflt;
-GrAaxes["simpleaxes"] = gi;
-gi.a1 = (int)(kBoxAxes | kExtTicks | kLabels | kGridOn);
-GrAaxes["boxaxesgrid"] = gi;
-
-gi.a1 = (int)(kBoxAxes | kTicks | kLabels | kMinTicks | kMajTicks);
-GrAaxes["fineaxes"] = gi;
- gi.a1 = (int)(kBoxAxes | kTicks | kLabels | kMinTicks | kMajTicks | kGridOn);
-GrAaxes["grid"] = gi;
-GrAaxes["fineaxesgrid"] = gi;
-                
-}
 
 
Index: /trunk/SophyaPI/PIext/servnobjm.h
===================================================================
--- /trunk/SophyaPI/PIext/servnobjm.h	(revision 1970)
+++ /trunk/SophyaPI/PIext/servnobjm.h	(revision 1971)
@@ -113,12 +113,8 @@
 // Utilitaires divers 
   static void   DecodeLoopParameters(string& loop, int& i1, int& i2, int& di);
-  int 		DecodeDispOption(string& dopt, bool& fgsrgr);
-  static bool   GetStatsOption(string& dopt);
-  static void   SetDefaultStatsOption(bool opt);
   string 	FileName2Name(string const & fn);
   char* 	PClassIdToClassName(int cid);
 
 protected:
-  void 		InitGrAttNames();
 
 // Pour enregister les objets et leurs adaptateurs pour NamedObjMgr
@@ -129,19 +125,4 @@
   ObjAdaptList objadaplist;
 
-//   Variables membre , en public pour le moment
-  struct gratt_item {
-    int a1, a2;
-  };
-  typedef map<string, gratt_item, less<string> > GrAttNames;
-  
-//  Pour les changements d'attributs graphiques / de visualisation
-  GrAttNames GrAcolors;
-  GrAttNames GrAlines;
-  GrAttNames GrAmarkers;
-  GrAttNames GrAfonts;
-  GrAttNames GrAfontNames;
-  GrAttNames GrAcmap;  
-  GrAttNames GrAzoom;  
-  GrAttNames GrAaxes;  
 
   PDynLinkMgr * dynlink;  // shared-lib lib.so
