Index: trunk/SophyaPI/PIext/basexecut.cc
===================================================================
--- trunk/SophyaPI/PIext/basexecut.cc	(revision 330)
+++ trunk/SophyaPI/PIext/basexecut.cc	(revision 331)
@@ -68,5 +68,12 @@
   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);
+  }
 // >>>>>>>>>>> Link dynamique de fonctions C++
 else if (kw == "link" ) {
@@ -107,5 +114,5 @@
 else if (kw == "openfits" ) {
   if (tokens.size() < 1) { cout << "Usage: openfits file " << endl;  return(0); }
-  else mObjMgr->ReadFits(tokens[0]);
+  else { string nomobj = "";  mObjMgr->ReadFits(tokens[0], nomobj); }
 }
 else if (kw == "savefits" ) {
@@ -137,5 +144,8 @@
   mObjMgr->DelObjects(tokens[0]);  
 }
-else if (kw == "listobjs")   mObjMgr->ListObjs();
+else if (kw == "listobjs")   { 
+  if  (tokens.size() < 1)  tokens.push_back("*");
+  mObjMgr->ListObjs(tokens[0]);
+}
 
 // >>>>>>>>>>> Creation d'histos 1D-2D
@@ -488,5 +498,12 @@
 usage += ">> Axes:  stdaxes=defaxes=boxaxes  simpleaxes boxaxesgrid \n";
 usage += "          fineaxes  grid=fineaxesgrid \n"; 
+usage += ">> XYLimits : xylimits  -> Forces X-Y limits in 2-D plots \n";
 usage += ">> DisplayWindow: next same win stack \n";
+usage += "   Related commands: setxylimits";  
+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: gratt";  
 mpiac->RegisterCommand(kw, usage, this, "Graphics");
 
Index: trunk/SophyaPI/PIext/nobjmgr.cc
===================================================================
--- trunk/SophyaPI/PIext/nobjmgr.cc	(revision 330)
+++ trunk/SophyaPI/PIext/nobjmgr.cc	(revision 331)
@@ -65,8 +65,16 @@
 // ..................................................................
 // ......  Gestion des objets nommes, variables globales ............
+struct nobj_diritem {
+  int id;
+  int nobj;
+};
+
+typedef map<string, nobj_diritem, less<string> > NObjDirList;
+
 struct nobj_item {
   AnyDataObj* obj;
   NObjMgrAdapter* obja;
   int num;
+  int dirid;
   list<int> wrsid;
   bool operator==(nobj_item const& b) const
@@ -76,8 +84,10 @@
 typedef map<string, nobj_item, less<string> > NObjList;
 
-static NObjList* myObjs;
+static NObjDirList* myDirs = NULL;
+static NObjList* myObjs = NULL;
 static int fgOInit = 0;
 static int myNObj = 0;
-static string* lastobj = NULL;
+static int myDirId = 0;
+static string* currDir;
 
 static PIStdImgApp* myImgApp=NULL;
@@ -101,6 +111,7 @@
 {
 if (fgOInit == 0) { 
+  myDirs = new NObjDirList;
   myObjs = new NObjList;  
-  lastobj = new string(""); 
+  currDir = new string("home");
   char* varenv;
   TmpDir = new string("");
@@ -149,4 +160,29 @@
 {
 return(servnobjm);
+}
+
+/* --Methode-- */
+void NamedObjMgr::CreateDir(string const& dirname)
+{
+}
+
+/* --Methode-- */
+void NamedObjMgr::DeleteDir(string const& dirname)
+{
+}
+
+/* --Methode-- */
+void NamedObjMgr::SetCurrentDir(string const& dirname)
+{
+}
+
+/* --Methode-- */
+void NamedObjMgr::CleanTmpDir()
+{
+}
+
+/* --Methode-- */
+void NamedObjMgr::CleanOldDir()
+{
 }
 
@@ -169,11 +205,9 @@
 // void  RenameObj(string const& nom, string& nomnew)
 //	Change le nom d'un objet dans la liste.
-// string  LastObjName()
-//	Renvoie le nom du dernier objet ajouté à la liste
 //--
 
 
 /* --Methode-- */
-void NamedObjMgr::AddObj(AnyDataObj* obj, string& nom, bool)
+void NamedObjMgr::AddObj(AnyDataObj* obj, string & nom, bool)
 {
 
@@ -200,16 +234,15 @@
   }
 
-(*lastobj) = nom;
 nobj_item no;
 no.obj = obj;
 no.obja = servnobjm->GetAdapter(obj);  // L'adaptateur
 no.num =  myNObj;
-(*myObjs)[(*lastobj)] = no;
+(*myObjs)[nom] = no;
 if (myImgApp)  { 
-  string str = (*lastobj) + "    (T= " + typeid(*obj).name() + ")" ;
+  string str = nom + "    (T= " + typeid(*obj).name() + ")" ;
   (myImgApp->ObjMgrW())->AddObj(str.c_str(), myNObj+1000);
 }
  
-cout << "NamedObjMgr::AddObj()  Object " << (*lastobj) << " ( "  
+cout << "NamedObjMgr::AddObj()  Object " << nom << " ( "  
      << typeid(*obj).name() << " ) added (Total= " << myObjs->size() << ")" << endl;  
 return;
@@ -217,5 +250,15 @@
 
 /* --Methode-- */
-void NamedObjMgr::DelObj(string const& nom, bool fgd)
+void NamedObjMgr::RenameObj(string & nom, string& nomnew)
+{
+AnyDataObj* obj = GetObj(nom);
+if (obj == NULL) return;
+DelObj(nom, false);
+AddObj(obj, nomnew);
+return;
+}
+
+/* --Methode-- */
+void NamedObjMgr::DelObj(string & nom, bool fgd)
 {
 NObjList::iterator it = myObjs->find(nom);
@@ -237,5 +280,10 @@
 
 /* --Methode-- */
-void NamedObjMgr::DelObjects(string const& patt, bool fgd)
+void NamedObjMgr::DelObj_Id(int oid)
+{
+}
+
+/* --Methode-- */
+void NamedObjMgr::DelObjects(string & patt, bool fgd)
 {
 NObjList::iterator it;  
@@ -251,5 +299,5 @@
 
 /* --Methode-- */
-AnyDataObj* NamedObjMgr::GetObj(string const& nom)
+AnyDataObj* NamedObjMgr::GetObj(string & nom)
 {
 NObjList::iterator it = myObjs->find(nom);
@@ -259,5 +307,5 @@
 
 /* --Methode-- */
-NObjMgrAdapter* NamedObjMgr::GetObjAdapter(string const& nom)
+NObjMgrAdapter* NamedObjMgr::GetObjAdapter(string & nom)
 {
 NObjList::iterator it = myObjs->find(nom);
@@ -267,17 +315,29 @@
 
 /* --Methode-- */
-void NamedObjMgr::RenameObj(string const& nom, string& nomnew)
-{
-AnyDataObj* obj = GetObj(nom);
-if (obj == NULL) return;
-DelObj(nom, false);
-AddObj(obj, nomnew);
-return;
-}
-
-/* --Methode-- */
-string NamedObjMgr::LastObjName()
-{
-return((*lastobj));
+void NamedObjMgr::ListObjs(string & patt)
+{
+int k;
+AnyDataObj* obj=NULL;
+string ctyp;
+char strg[256];
+
+cout << "NamedObjMgr::ListObjs() NObjs= " << myObjs->size() << "\n" ;
+NObjList::iterator it;  k = 0;
+for(it = myObjs->begin(); it != myObjs->end(); it++) {
+  obj = (*it).second.obj;
+
+  ctyp = typeid(*obj).name();
+  sprintf(strg, "%2d/ %16s : %s", k, typeid(*obj).name(), ((*it).first).c_str()); 
+  ctyp = strg;
+  cout << ctyp << "\n" ;
+  k++;
+}
+cout << endl;
+return;
+}
+
+/* --Methode-- */
+void NamedObjMgr::GetObjList(string & patt, vector<string> &)
+{
 }
 
@@ -297,5 +357,5 @@
 
 /* --Methode-- */
-void NamedObjMgr::ReadObj(string const & flnm, string nobj)
+void NamedObjMgr::ReadObj(string const & flnm, string & nobj)
 {
 PPersist* obj=NULL;
@@ -387,5 +447,5 @@
 
 /* --Methode-- */
-void NamedObjMgr::ReadFits(string const & flnm, string nobj)
+void NamedObjMgr::ReadFits(string const & flnm, string & nobj)
 {
 bool ok = true;
@@ -415,5 +475,5 @@
 static int key_for_write = 5000;
 /* --Methode-- */
-void NamedObjMgr::SaveObj(string const& nom, POutPersist& s)
+void NamedObjMgr::SaveObj(string & nom, POutPersist& s)
 {
 NObjMgrAdapter* obja=NULL;
@@ -445,5 +505,5 @@
 
 /* --Methode-- */
-void NamedObjMgr::SaveFits(string const& nom, string const & flnm)
+void NamedObjMgr::SaveFits(string& nom, string const & flnm)
 {
 NObjMgrAdapter* obja=NULL;
@@ -455,29 +515,7 @@
 
 
-/* --Methode-- */
-void NamedObjMgr::ListObjs()
-{
-int k;
-AnyDataObj* obj=NULL;
-string ctyp;
-char strg[256];
-
-cout << "NamedObjMgr::ListObjs() NObjs= " << myObjs->size() << "\n" ;
-NObjList::iterator it;  k = 0;
-for(it = myObjs->begin(); it != myObjs->end(); it++) {
-  obj = (*it).second.obj;
-
-  ctyp = typeid(*obj).name();
-  sprintf(strg, "%2d/ %16s : %s", k, typeid(*obj).name(), ((*it).first).c_str()); 
-  ctyp = strg;
-  cout << ctyp << "\n" ;
-  k++;
-}
-cout << endl;
-return;
-}
-
-/* --Methode-- */
-void NamedObjMgr::PrintObj(string const& nom)
+
+/* --Methode-- */
+void NamedObjMgr::PrintObj(string& nom)
 {
 NObjMgrAdapter* obja=NULL;
@@ -493,5 +531,5 @@
 
 /* --Methode-- */
-void NamedObjMgr::DisplayObj(string const& nom, string dopt) 
+void NamedObjMgr::DisplayObj(string& nom, string dopt) 
 {
 NObjMgrAdapter* obja=NULL;
@@ -535,5 +573,5 @@
 
 /* --Methode-- */
-void NamedObjMgr::DisplayImage(string const& nom, string dopt)
+void NamedObjMgr::DisplayImage(string& nom, string dopt)
 {
 NObjMgrAdapter* obja=NULL;
@@ -567,5 +605,5 @@
 }
 /* --Methode-- */
-void NamedObjMgr::DisplaySurf3D(string const& nom, string dopt)
+void NamedObjMgr::DisplaySurf3D(string& nom, string dopt)
 {
 NObjMgrAdapter* obja=NULL;
@@ -608,5 +646,5 @@
 
 /* --Methode-- */
-void NamedObjMgr::DisplayNT(string const& nom, string& nmx, string& nmy, string& nmz,
+void NamedObjMgr::DisplayNT(string& nom, string& nmx, string& nmy, string& nmz,
                             string& erx, string& ery, string& erz, string dopt)
 {
@@ -657,5 +695,5 @@
 
 /* --Methode-- cmv 13/10/98 */
-void NamedObjMgr::DisplayGFD(string const& nom, string& numvarx, string& numvary, string& err, string dopt)
+void NamedObjMgr::DisplayGFD(string& nom, string& numvarx, string& numvary, string& err, string dopt)
 //	Pour le display 2D ou 3D d'un ``GeneralFitData''.
 //|  nom = nom de l'objet GeneralFitData a representer.
@@ -719,5 +757,5 @@
 
 /* --Methode-- 
-void NamedObjMgr::DisplayImage(string const& nom, string dopt)
+void NamedObjMgr::DisplayImage(string& nom, string dopt)
 {
   cout << "NamedObjMgr::DisplayImage() a faire ! " << endl;
@@ -743,5 +781,5 @@
 
 /* --Methode-- */
-void NamedObjMgr::DisplayPoints2D(string const& nom,  string& expx, string& expy,
+void NamedObjMgr::DisplayPoints2D(string& nom,  string& expx, string& expy,
                                   string& experrx, string& experry,
                                   string& expcut, string dopt)
@@ -787,5 +825,5 @@
 
 /* --Methode-- */
-void NamedObjMgr::DisplayPoints3D(string const& nom,  string& expx, string& expy, string& expz,
+void NamedObjMgr::DisplayPoints3D(string& nom,  string& expx, string& expy, string& expz,
                                   string& expcut, string dopt)
 {
@@ -829,5 +867,5 @@
 
 /* --Methode-- */
-void NamedObjMgr::ProjectH1(string const& nom, string& expx, string& expwt, string& expcut, string& nomh1, string dopt)
+void NamedObjMgr::ProjectH1(string& nom, string& expx, string& expwt, string& expcut, string& nomh1, string dopt)
 {
 NObjMgrAdapter* obja=NULL;
@@ -877,5 +915,5 @@
 
 /* --Methode-- */
-void NamedObjMgr::ProjectH2(string const& nom, string& expx, string& expy, string& expwt, string& expcut, 
+void NamedObjMgr::ProjectH2(string& nom, string& expx, string& expy, string& expwt, string& expcut, 
                             string& nomh2, string dopt)
 {
@@ -928,5 +966,5 @@
 
 /* --Methode-- cmv 13/10/98 */
-void NamedObjMgr::ProjectHProf(string const& nom, string& expx, string& expy, string& expwt, string& expcut, 
+void NamedObjMgr::ProjectHProf(string& nom, string& expx, string& expy, string& expwt, string& expcut, 
                               string& nomprof, string dopt)
 //	Pour remplir un ``GeneralFitData'' a partir de divers objets:
@@ -988,5 +1026,5 @@
 
 /* --Methode-- */
-void NamedObjMgr::FillVect(string const& nom, string& expx, string& expcut, string& nomvec, string dopt)
+void NamedObjMgr::FillVect(string& nom, string& expx, string& expcut, string& nomvec, string dopt)
 {
 NObjMgrAdapter* obja=NULL;
@@ -1029,5 +1067,5 @@
 
 /* --Methode-- */
-void NamedObjMgr::FillNT(string const& nom, string& expx, string& expy, string& expz, string& expt, 
+void NamedObjMgr::FillNT(string& nom, string& expx, string& expy, string& expz, string& expt, 
                          string& expcut, string& nomnt)
 {
@@ -1066,5 +1104,5 @@
 
 /* --Methode-- cmv 13/10/98 */
-void NamedObjMgr::FillGFD(string const& nom, string& expx, string& expy, string& expz,
+void NamedObjMgr::FillGFD(string& nom, string& expx, string& expy, string& expz,
                           string& experr, string& expcut, string& nomgfd)
 //	Pour remplir un ``GeneralFitData'' a partir de divers objets:
@@ -1246,5 +1284,5 @@
 
 /* --Methode-- cmv 13/10/98 */
-void  NamedObjMgr:: Fit12D(string const& nom, string& func,
+void  NamedObjMgr:: Fit12D(string& nom, string& func,
                           string par,string step,string min,string max,
                           string opt)
Index: trunk/SophyaPI/PIext/nobjmgr.h
===================================================================
--- trunk/SophyaPI/PIext/nobjmgr.h	(revision 330)
+++ trunk/SophyaPI/PIext/nobjmgr.h	(revision 331)
@@ -7,7 +7,14 @@
 #define NOBJMGR_H_SEEN
 
-#include "ppersist.h"
+#include "machdefs.h"
+#include "anydataobj.h"
 #include "dlftypes.h"
-#include "anydataobj.h"
+
+#include <string>
+#include <vector>
+#if defined(__KCC__)
+using std::string ;
+#include <vector.h>
+#endif
 
 class NObjMgrAdapter;
@@ -24,32 +31,40 @@
 
 
-//  Pour ajouter, supprimer et acceder aux objets PPersist
-  virtual void		AddObj(AnyDataObj* obj, string& nom, bool crd=false);
-  virtual void          DelObj(string const& nom, bool fgd=true);
-  virtual void		DelObjects(string const& patt, bool fgd=true); 
-  virtual AnyDataObj*	GetObj(string const& nom);
-  virtual void		RenameObj(string const& nom, string& nomnew);
-  virtual string        LastObjName();  // Renvoie le nom du dernier objet ajoute
+// Gestion des repertoires
+  virtual void		CreateDir(string const& dirname);
+  virtual void		DeleteDir(string const& dirname);
+  virtual void		SetCurrentDir(string const& dirname);
+  virtual void		CleanTmpDir();
+  virtual void		CleanOldDir();
+
+//  Pour ajouter, supprimer et acceder aux objets 
+  virtual void		AddObj(AnyDataObj* obj, string & nom, bool crd=false);
+  virtual void		RenameObj(string & nom, string& nomnew);
+  virtual void          DelObj(string & nom, bool fgd=true);
+  virtual void		DelObjects(string & patt, bool fgd=true); 
+  virtual void          DelObj_Id(int oid);
+  virtual AnyDataObj*	GetObj(string & nom);
+  virtual void          ListObjs(string & patt);  		
+  virtual void          GetObjList(string & patt, vector<string>& );  		
 
 //  Lecture et sauvegarde des objets sur fichier
   virtual void		ReadObj(PInPersist& s, int num=-1);
-  virtual void		ReadObj(string const & nomppf, string nobj="");
+  virtual void		ReadObj(string const & nomppf, string & nobj);
   virtual void		ReadAll(string const & nomppf);
-  virtual void		ReadFits(string const & flnm, string nobj="");
-  virtual void          SaveObj(string const& nom, POutPersist& s);
+  virtual void		ReadFits(string const & flnm, string & nobj);
+  virtual void          SaveObj(string & nom, POutPersist& s);
   virtual void          SaveAll(string const& nomppf);
-  virtual void          SaveFits(string const& nom, string const & flnm);
+  virtual void          SaveFits(string & nom, string const & flnm);
 
 // Info sur les objets 
-  virtual void          ListObjs();  		
-  virtual void          PrintObj(string const& nom);
+  virtual void          PrintObj(string & nom);
 
 //  Affichage des objets 
-  virtual void          DisplayObj(string const& nom, string dopt="");
-  virtual void          DisplayImage(string const& nom, string dopt="");
-  virtual void          DisplaySurf3D(string const& nom, string dopt="");
-  virtual void          DisplayNT(string const& nom, string& nmx, string& nmy, string& nmz,  
+  virtual void          DisplayObj(string & nom, string dopt="");
+  virtual void          DisplayImage(string & nom, string dopt="");
+  virtual void          DisplaySurf3D(string & nom, string dopt="");
+  virtual void          DisplayNT(string & nom, string& nmx, string& nmy, string& nmz,  
                                   string& erx, string& ery, string& erz, string dopt="");
-  virtual void          DisplayGFD(string const& nom, string& numvarx, string& numvary, string& err, string dopt="");
+  virtual void          DisplayGFD(string & nom, string& numvarx, string& numvary, string& err, string dopt="");
 
   virtual void		SetGraphicAttributes(string gratt="");
@@ -58,26 +73,26 @@
 
 //  Trace d'expression de NTuple, et d'autres objets
-  virtual void          DisplayPoints2D(string const& nom, string& expx, string& expy,
+  virtual void          DisplayPoints2D(string & nom, string& expx, string& expy,
                                         string& experrx, string& experry, 
                                         string& expcut, string dopt="");
-  virtual void          DisplayPoints3D(string const& nom, string& expx, string& expy, string& expz, 
+  virtual void          DisplayPoints3D(string & nom, string& expx, string& expy, string& expz, 
                                         string& expcut, string dopt="");
 //  Projection d'expressions dans histogramme (et trace) 
-  virtual void          ProjectH1(string const& nom, string& expx, string& expwt, string& expcut, 
+  virtual void          ProjectH1(string & nom, string& expx, string& expwt, string& expcut, 
                                   string& nomh1, string dopt="");
-  virtual void          ProjectH2(string const& nom, string& expx, string& expy, string& expwt, 
+  virtual void          ProjectH2(string & nom, string& expx, string& expy, string& expwt, 
                                   string& expcut, string& nomh2, string dopt="");
-  virtual void          ProjectHProf(string const& nom, string& expx, string& expy, string& expwt, 
+  virtual void          ProjectHProf(string & nom, string& expx, string& expy, string& expwt, 
                                   string& expcut, string& nomprof, string dopt="");
 //  Projection d'expression dans vecteurs et dans n-tuple
-  virtual void          FillVect(string const& nom, string& expx, string& expcut, 
+  virtual void          FillVect(string & nom, string& expx, string& expcut, 
                                  string& nomvec, string dopt="");
-  virtual void          FillNT(string const& nom, string& expx, string& expy, string& expz,
+  virtual void          FillNT(string & nom, string& expx, string& expy, string& expz,
                                string& expt, string& expcut, string& nomnt); 
-  virtual void          FillGFD(string const& nom, string& expx, string& expy, string& expz,
+  virtual void          FillGFD(string & nom, string& expx, string& expy, string& expz,
                                string& experr, string& expcut, string& nomgfd);
 
 //   Methodes de fit, a rajouter  (pour CMV , deux methodes H1 H2 ou 1 seule ??) ...
-  virtual void          Fit12D(string const& nom, string& func,
+  virtual void          Fit12D(string & nom, string& func,
                               string par,string step,string min,string max,string opt);
 
@@ -87,5 +102,5 @@
 
 protected :
-  virtual NObjMgrAdapter*	GetObjAdapter(string const& nom);
+  virtual NObjMgrAdapter*	GetObjAdapter(string & nom);
 };
 
Index: trunk/SophyaPI/PIext/pistdimgapp.cc
===================================================================
--- trunk/SophyaPI/PIext/pistdimgapp.cc	(revision 330)
+++ trunk/SophyaPI/PIext/pistdimgapp.cc	(revision 331)
@@ -194,4 +194,6 @@
 mZoom = 0;
 mAxesFlags = kBoxAxes | kExtTicks | kLabels;
+mXmin = mYmin = -1.;
+mXmax = mYmax = 1;
 SaveGraphicAtt();
 
@@ -367,5 +369,5 @@
 
 /* --Methode-- */
-int PIStdImgApp::DispImage(P2DArrayAdapter* nouv, string const & name, int opt)
+int PIStdImgApp::DispImage(P2DArrayAdapter* nouv, string const & name, int opt, int oid)
 {
 PIImage* pii;
@@ -414,5 +416,5 @@
 if ( mCmapid != CMAP_OTHER ) pii->SetColMapId(mCmapid, false);
 pii->ShowCursor(true);
-pii->SetUserData(NULL, flag);
+pii->SetUserData(NULL, oid);
 pii->SetImage(nouv, true);
 // printf("!!DBG!! PIImage Pos= %d %d  Size= %d %d \n", pii->XPos(), pii->YPos(), pii->XSize(), pii->YSize()   );
@@ -427,5 +429,5 @@
 
 /* --Methode-- */
-int PIStdImgApp::DispScDrawer(PIDrawer* scd, string const & name, int opt, string title)
+int PIStdImgApp::DispScDrawer(PIDrawer* scd, string const & name, int opt, string title, int oid)
 {
 if (scd == NULL)
@@ -462,5 +464,7 @@
 else scw = new PIH2DWdg(win, (char *)name.c_str(), sx, sy, px, py);
 scw->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic);
-scw->SetUserData(NULL, flag);
+scw->SetUserData(NULL, oid);
+if (mFXYlim)  // Forcage limites XY 
+  scw->SetLimits(mXmin, mXmax, mYmin, mYmax);
 scw->SetAxesFlags(mAxesFlags);
 
@@ -480,5 +484,5 @@
 
 /* --Methode-- */
-int PIStdImgApp::Disp3DDrawer(PIDrawer3D* dr3, string const & name, int opt, string title)
+int PIStdImgApp::Disp3DDrawer(PIDrawer3D* dr3, string const & name, int opt, string title, int oid)
 {
 if (dr3 == NULL)
@@ -512,5 +516,5 @@
 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, flag);
+wd3->SetUserData(NULL, oid);
 wd3->AddDrawer3D(dr3, true);
 //   Titre du plot
@@ -785,6 +789,7 @@
       SetBusy();
       if (data)  { 
-        ObjMgr()->ReadFits(pfc->GetFileName());
-        ObjMgr()->DisplayObj(ObjMgr()->LastObjName(), "win");
+        string nomobj="";
+        ObjMgr()->ReadFits(pfc->GetFileName(), nomobj);
+        ObjMgr()->DisplayObj(nomobj, "win");
       }
       mFCMsg = 0;
@@ -816,7 +821,7 @@
     case 10111 :
       if (mCurWdg) {
-        string no = mCurWdg->Nom();
+        int oid = mCurWdg->UserFlag();
         DeleteBaseWidget(mCurWdg);
-        mObjMgr->DelObj(no);
+        mObjMgr->DelObj_Id(oid);
         }
       break;
@@ -1193,4 +1198,10 @@
   mAxesFlags = axfl; 
 }
+/* --Methode-- */
+void PIStdImgApp::SetXYLimits(double xmin, double xmax, double ymin, double ymax)
+{
+  mXmin = xmin;  mXmax= xmax;
+  mYmin = ymin;  mYmax= ymax;
+}
 
 /* --Methode-- */
@@ -1207,4 +1218,7 @@
   mSZoom = mZoom;
   mSAxesFlags = mAxesFlags;
+  mSXmin = mXmin;  mSXmax = mXmax;
+  mSYmin = mYmin;  mSYmax = mYmax;
+  mSFXYlim = mFXYlim;
 }
 
@@ -1222,3 +1236,6 @@
   mZoom = mSZoom;
   mAxesFlags = mSAxesFlags;
-}
+  mXmin = mSXmin;  mXmax = mSXmax;
+  mYmin = mSYmin;  mYmax = mSYmax;
+  mFXYlim = mSFXYlim;
+}
Index: trunk/SophyaPI/PIext/pistdimgapp.h
===================================================================
--- trunk/SophyaPI/PIext/pistdimgapp.h	(revision 330)
+++ trunk/SophyaPI/PIext/pistdimgapp.h	(revision 331)
@@ -46,7 +46,7 @@
      virtual void   SetBlocked();
 
-     int  DispImage(P2DArrayAdapter* nouv, string const & name, int opt);
-     int  DispScDrawer(PIDrawer* scd, string const & name, int opt, string title="");
-     int  Disp3DDrawer(PIDrawer3D* scd, string const & name, int opt, string title="");
+     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);
 
      void CreateGraphWin(int nx=1, int ny=1, int sx=0, int sy = 0);
@@ -94,4 +94,6 @@
      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.);
+     inline void  UseXYLimits(bool fg=false) {  mFXYlim=fg; }
 // Pour sauvegarder-restauration de  l'etat des attributs graphiques
      void  SaveGraphicAtt();   
@@ -158,4 +160,7 @@
     int 	 mZoom, mSZoom;
     unsigned int mAxesFlags, mSAxesFlags;
+    double	 mXmin, mXmax, mYmin, mYmax;
+    double	 mSXmin, mSXmax, mSYmin, mSYmax;
+    bool	 mFXYlim, mSFXYlim;
 
     PIMessage mFCMsg;  // Message for processing FileOpen
Index: trunk/SophyaPI/PIext/servnobjm.cc
===================================================================
--- trunk/SophyaPI/PIext/servnobjm.cc	(revision 330)
+++ trunk/SophyaPI/PIext/servnobjm.cc	(revision 331)
@@ -401,4 +401,7 @@
   mImgapp->SetColMapId();
   mImgapp->SetZoomAtt();
+  mImgapp->SetAxesAtt();
+  mImgapp->SetXYLimits();
+  mImgapp->UseXYLimits();
   return(ropt);
   }
@@ -438,5 +441,7 @@
   else fgcont = false;
   if (fgcont)   continue;
-  
+
+  // Utilisation limites X-Y
+  if ( grt[k] == "xylimits" ) { mImgapp->UseXYLimits(true);  fgsrgr = true;  continue; } 
   // Si c'est une couleur
   it = GrAcolors.find(grt[k]);
