Index: trunk/SophyaPI/PIext/basexecut.cc
===================================================================
--- trunk/SophyaPI/PIext/basexecut.cc	(revision 2259)
+++ trunk/SophyaPI/PIext/basexecut.cc	(revision 2263)
@@ -9,4 +9,5 @@
 #include "pdlmgr.h"
 #include "ctimer.h"
+#include "strutilxx.h"
 
 #include "pistdimgapp.h"
@@ -46,4 +47,6 @@
 
 
+/* Macro pour tester si flag normalized coordinate est present */
+#define _CkBoolNC_(_jk_) ((tokens.size()>_jk_) && (tokens[_jk_] == "true")) ? true : false;
  
 /* --Methode-- */
@@ -123,5 +126,8 @@
 }
 else if (kw == "addtext") {
-  if (tokens.size() < 3) { cout << "Usage: addtext x y txt [colfontatt]" << endl;  return(0); }
+  if (tokens.size() < 3) { 
+    cout << "Usage: addtext x y txt [colfontatt] [fgnc]" << endl;  
+    return(0); 
+  }
   double xp = atof(tokens[0].c_str());
   double yp = atof(tokens[1].c_str());
@@ -129,9 +135,27 @@
   string sop;
   if (tokens.size() > 3) sop = tokens[3];
-  mImgApp->AddText(txt, xp, yp, sop);
+  bool fgnc = _CkBoolNC_(4);  
+  mImgApp->AddText(txt, xp, yp, sop, fgnc);
+  }
+else if (kw == "addctext") {
+  if (tokens.size() < 5) { 
+    cout << "Usage: addctext x y txt s_up s_dn [colfontatt] [updnfatt] [fgnc] " << endl;  
+    return(0); 
+  }
+  double xp = atof(tokens[0].c_str());
+  double yp = atof(tokens[1].c_str());
+  string sop;
+  if (tokens.size() > 5) sop = tokens[5];
+  string sopfss;
+  if (tokens.size() > 6) sopfss = tokens[6];
+  bool fgnc = _CkBoolNC_(7);  
+  mImgApp->AddCompText(tokens[2], tokens[3], tokens[4], xp, yp, sop, sopfss, fgnc);
   }
 else if ((kw == "addline") || (kw == "addrect") || (kw == "addfrect") ||
 	 (kw == "addarrow") ) {
-  if (tokens.size() < 4) { cout << "Usage: addline/addrect/addfrect x1 y1 x2 y2 [colatt]" << endl;  return(0); }
+  if (tokens.size() < 4) { 
+    cout << "Usage: addline/addrect/addfrect x1 y1 x2 y2 [colatt] [fgnc]" << endl;  
+    return(0); 
+  }
   double xp1 = atof(tokens[0].c_str());
   double yp1 = atof(tokens[1].c_str());
@@ -140,13 +164,17 @@
   string sop;
   if (tokens.size() > 4) sop = tokens[4];
-  if (kw == "addline") mImgApp->AddLine(xp1, yp1, xp2, yp2, sop, false);
-  else if (kw == "addarrow") mImgApp->AddLine(xp1, yp1, xp2, yp2, sop, true);
+  bool fgnc = _CkBoolNC_(5);  
+  if (kw == "addline") mImgApp->AddLine(xp1, yp1, xp2, yp2, sop, false, fgnc);
+  else if (kw == "addarrow") mImgApp->AddLine(xp1, yp1, xp2, yp2, sop, true, fgnc);
   else {
     bool fgfill = (kw == "addrect") ? false : true;
-    mImgApp->AddRectangle(xp1, yp1, xp2, yp2, sop, fgfill);
+    mImgApp->AddRectangle(xp1, yp1, xp2, yp2, sop, fgfill, fgnc);
   }
 }
 else if ((kw == "addcirc") || (kw == "addfcirc")) {
-  if (tokens.size() < 3) { cout << "Usage: addcirc/addfcirc xc yc r [colatt]" << endl;  return(0); }
+  if (tokens.size() < 3) { 
+    cout << "Usage: addcirc/addfcirc xc yc r [colatt] [fgnc]" << endl;  
+    return(0); 
+  }
   double xc = atof(tokens[0].c_str());
   double yc = atof(tokens[1].c_str());
@@ -154,10 +182,11 @@
   string sop;
   if (tokens.size() > 3) sop = tokens[3];
+  bool fgnc = _CkBoolNC_(4);  
   bool fgfill = (kw == "addcirc") ? false : true;
-  mImgApp->AddCircle(xc, yc, rad, sop, fgfill);
+  mImgApp->AddCircle(xc, yc, rad, sop, fgfill, fgnc);
   }
 else if (kw == "addmarker") {
   if (tokens.size() < 2) { 
-    cout << "Usage: addmarker x y [gratt]" << endl;  
+    cout << "Usage: addmarker x y [gratt] [fgnc]" << endl;  
     return(0); 
   }
@@ -166,9 +195,10 @@
   string sop;
   if (tokens.size() > 2) sop = tokens[2];
-  mImgApp->AddCircle(xm, ym, -1, sop, false);
+  bool fgnc = _CkBoolNC_(3);  
+  mImgApp->AddCircle(xm, ym, -1, sop, false, fgnc);
 }
 else if ((kw == "addarc") || (kw == "addfarc") ) {
   if (tokens.size() < 6) { 
-    cout << "Usage: addarc/addfarc x1 y1 x2 y2 x3 y3 [gratt]" << endl;  
+    cout << "Usage: addarc/addfarc x1 y1 x2 y2 x3 y3 [gratt] [fgnc]" << endl;  
     return(0); 
   }
@@ -181,7 +211,30 @@
   string sop;
   if (tokens.size() > 6) sop = tokens[6];
+  bool fgnc = _CkBoolNC_(7);  
   bool fgfill = (kw == "addarc") ? false : true;
-  mImgApp->AddArc(x1, y1, x2, y2, x3, y3, sop, fgfill);
-}
+  mImgApp->AddArc(x1, y1, x2, y2, x3, y3, sop, fgfill, fgnc);
+}
+else if ((kw == "addpoly") || (kw == "addfpoly")) {
+  if (tokens.size() < 1) { 
+    cout << "Usage: addpoly/addfpoly 'x1,y1 x2,y2 x3,y3 ...' [gratt] [fgnc]" << endl;  
+    return(0); 
+  }
+  vector<string> sxy;
+  vector<double> xpol, ypol;
+  double xp, yp;
+  FillVStringFrString(tokens[0], sxy);
+  for(int jkk=0; jkk<sxy.size(); jkk++) {
+    xp = yp = 0;
+    if (sscanf(sxy[jkk].c_str(), "%lg,%lg", &xp, &yp) == 2) { 
+      xpol.push_back(xp); 
+      ypol.push_back(yp);
+    }
+  }
+  string sop;
+  if (tokens.size() > 1) sop = tokens[1];
+  bool fgnc = _CkBoolNC_(2);  
+  bool fgfill = (kw == "addpoly") ? false : true;
+  mImgApp->AddPoly(xpol, ypol, sop, fgfill, fgnc);
+  }
 
 
@@ -704,4 +757,36 @@
   srvo->NtFromASCIIFile(tokens[0],tokens[1],def_val);
   }
+
+#ifndef SANS_EVOLPLANCK
+/* Lecture matrice/vecteur depuis fichier ASCII  */
+else if ((kw == "mtxfrascii") || (kw == "vecfrascii") ) {
+  if(tokens.size() < 2) { 
+    cout<<"Usage: mtxfrascii/vecfrascii mtx/vec_name file_name "<<endl;
+    return(0);
+    }
+  TMatrix<r_8> mtx;
+  TVector<r_8> vec;
+  FILE* fip = fopen(tokens[1].c_str(), "r");
+  if (fip == NULL) {
+    cout << "vec/mtxfrascii: can not open file " << tokens[1] << endl;
+    return(0);
+  }
+  fclose(fip);
+  ifstream is(tokens[1].c_str());
+  sa_size_t nr, nc;
+  if (kw == "mtxfrascii") {
+    mtx.ReadASCII(is, nr, nc);
+    mObjMgr->AddObj(mtx, tokens[0]);    
+    cout << "mtxfrascii: TMatrix<r_8> " << tokens[0] << " read from file " 
+	 << tokens[1] << endl;
+  }
+  else {
+    vec.ReadASCII(is, nr, nc);
+    mObjMgr->AddObj(vec, tokens[0]);    
+    cout << "vecfrascii: TVector<r_8> " << tokens[0] << " read from file " 
+	 << tokens[1] << endl;
+  }
+}
+#endif
 
 else if (kw == "fillnt" ) {
@@ -851,8 +936,11 @@
 usage += "             hugefont  hugeboldfont hugeitalicfont hugebolditalicfont \n";
 usage += ">> Font Names: deffont courierfont helveticafont timesfont symbolfont  \n";
-usage += ">> Marker: dotmarker<T>  plusmarker<T>  crossmarker<T> circlemarker <T> \n";
+usage += ">> Marker: dotmarker<T>  plusmarker<T>  crossmarker<T> circlemarker<T> \n";
 usage += "           fcirclemarker<T> boxmarker<T> fboxmarker<T> trianglemarker<T> \n";
 usage += "           ftrianglemarker<T>  starmarker<T>  fstarmarker<T> \n";
-usage += "   with <T> = 1 3 5 7 9 , Example fboxmarker5 , plusmarker9 ... \n";
+usage += "   with <T> = 1 3 5 7 .. 15 , Example fboxmarker5 , plusmarker9 ... \n";
+usage += ">> ArrowMarker: basicarrow<T>  trianglearrow<T>  ftrianglearrow<T> \n";
+usage += "                arrowshapedarrow<T> farrowshapedarrow<T> \n";
+usage += "   with <T> = 5 7 .. 15 , Example trianglearrow7 ... \n";
 usage += ">> ColorTables: defcmap  grey32  invgrey32  colrj32  colbr32 \n";
 usage += "                grey128  invgrey128  colrj128  colbr128 \n";
@@ -914,12 +1002,22 @@
 usage += "\n The Base/AxesDrawer is used to handle added text strings" ;
 usage += "\n Alt<Z> to remove added elements";
-usage += "\n  Usage: addtext x y TextString [ColFontPosAtt]";
+usage += "\n  Usage: addtext x y TextString [ColFontPosAtt] [fgnc=false/true]";
 usage += "\n  (use quotes '' for multi word text strings) ";
+usage += "\n  if fgnc==true : Normalized 0..1 coordinates specification (def=false)";
 usage += "\n Text position/direction attribute: "; 
 usage += "\n      horizleft horizcenter horizright";
 usage += "\n      vertbottom vertcenter verttop ";
 usage += "\n      textdirhoriz textdirvertup textdirvertdown ";
-usage += "\n  Related commands: addline addarrow addrect addfrect";
-usage += "\n      addcirc addfcirc addarc addfrac settitle graphicatt";  
+usage += "\n  Related commands: addctext addline addarrow addrect addfrect";
+usage += "\n      addcirc addfcirc addarc addfrac addpoly addfpoly settitle graphicatt";  
+mpiac->RegisterCommand(kw, usage, this, "Graphics");
+
+kw = "addctext";
+usage = "Adds a composite text string with superscript and subscripts ";
+usage += "\n at the specified position (+ color/font/pos/dir attributes) ";
+usage += "\n  Usage: addctext x y Text sUp sDown [ColFontPosAtt] [UpDownFontAtt] [fgnc]";
+usage += "\n  if fgnc==true : Normalized 0..1 coordinates specification (def=false)";
+usage += "\n  Related commands: addtext addline addrect ...";
+usage += "\n      (See command addtext and graphicatt for more details)";  
 mpiac->RegisterCommand(kw, usage, this, "Graphics");
 
@@ -929,7 +1027,8 @@
 usage += "\n The Base/AxesDrawer is used to handle added lines"; 
 usage += "\n Alt<Z> to remove added elements";
-usage += "\n  Usage: addline x1 y1 x2 y2 [GraphicAtt]";
+usage += "\n  Usage: addline x1 y1 x2 y2 [GraphicAtt] [fgnc=false/true]";
+usage += "\n  if fgnc==true : Normalized 0..1 coordinates specification (def=false)";
 usage += "\n  Related commands: addarrow addtext addrect addfrect ";
-usage += "\n       addmarker addcirc addfcirc addarc addfarc graphicatt";  
+usage += "\n       addmarker addcirc addfcirc addarc addfarc addpoly addfpoly graphicatt";  
 mpiac->RegisterCommand(kw, usage, this, "Graphics");
 
@@ -939,8 +1038,10 @@
 usage += "\n The Base/AxesDrawer is used to handle added lines"; 
 usage += "\n Alt<Z> to remove added elements";
-usage += "\n  Usage: addarrow x1 y1 x2 y2 [GraphicAtt]";
+usage += "\n  Usage: addarrow x1 y1 x2 y2 [GraphicAtt] [fgnc=false/true]";
+usage += "\n  if fgnc==true : Normalized 0..1 coordinates specification (def=false)";
 usage += "\n  Related commands: addline addtext addrect addfrect ";
-usage += "\n       addmarker addcirc addfcirc addarc addfarc graphicatt";  
-mpiac->RegisterCommand(kw, usage, this, "Graphics");
+usage += "\n       addmarker addcirc addfcirc addarc addfarc addpoly addfpoly graphicatt";  
+mpiac->RegisterCommand(kw, usage, this, "Graphics");
+kw = "addarrow_nc";
 
 kw = "addrect";
@@ -949,7 +1050,8 @@
 usage += "\n The Base/AxesDrawer is used to handle added rectangle"; 
 usage += "\n Alt<Z> to remove added elements";
-usage += "\n  Usage: addrect x1 y1 x2 y2 [GraphicAtt]";
+usage += "\n  Usage: addrect x1 y1 x2 y2 [GraphicAtt] [fgnc=false/true]";
+usage += "\n  if fgnc==true : Normalized 0..1 coordinates specification (def=false)";
 usage += "\n  Related commands: addtext addline addarrow addfrect";
-usage += "\n       addcirc addfcirc addarc addfarc graphicatt";  
+usage += "\n       addcirc addfcirc addarc addfarc addpoly addfpoly graphicatt";  
 mpiac->RegisterCommand(kw, usage, this, "Graphics");
 
@@ -959,7 +1061,8 @@
 usage += "\n The Base/AxesDrawer is used to handle added rectangle"; 
 usage += "\n Alt<Z> to remove added elements";
-usage += "\n  Usage: addfrect x1 y1 x2 y2 [GraphicAtt]";
+usage += "\n  Usage: addfrect x1 y1 x2 y2 [GraphicAtt] [fgnc=false/true]";
+usage += "\n  if fgnc==true : Normalized 0..1 coordinates specification (def=false)";
 usage += "\n  Related commands: addtext addline addarrow addrect";
-usage += "\n       addcirc addfcirc graphicatt";  
+usage += "\n       addcirc addfcirc addpoly addfpoly graphicatt";  
 mpiac->RegisterCommand(kw, usage, this, "Graphics");
 
@@ -969,7 +1072,8 @@
 usage += "\n The Base/AxesDrawer is used to handle added circles"; 
 usage += "\n Alt<Z> to remove added elements";
-usage += "\n  Usage: addmarker xpos ypos [GraphicAtt]";
+usage += "\n  Usage: addmarker xpos ypos [GraphicAtt] [fgnc=false/true]";
+usage += "\n  if fgnc==true : Normalized 0..1 coordinates specification (def=false)";
 usage += "\n  Related commands: addtext addline addarrow addfrect addfrect";
-usage += "\n       addcirc addfcirc addarc addfarc graphicatt";  
+usage += "\n       addcirc addfcirc addarc addfarc addpoly addfpoly graphicatt";  
 mpiac->RegisterCommand(kw, usage, this, "Graphics");
 
@@ -979,7 +1083,8 @@
 usage += "\n The Base/AxesDrawer is used to handle added circles"; 
 usage += "\n Alt<Z> to remove added elements";
-usage += "\n  Usage: addcirc xcenter ycenter radius [GraphicAtt]";
+usage += "\n  Usage: addcirc xcenter ycenter radius [GraphicAtt] [fgnc=false/true]";
+usage += "\n  if fgnc==true : Normalized 0..1 coordinates specification (def=false)";
 usage += "\n  Related commands: addtext addline addarrow addfrect addfrect";
-usage += "\n       addfcirc addarc addfarc graphicatt";  
+usage += "\n       addfcirc addarc addfarc addpoly addfpoly graphicatt";  
 mpiac->RegisterCommand(kw, usage, this, "Graphics");
 
@@ -989,7 +1094,8 @@
 usage += "\n The Base/AxesDrawer is used to handle added circles"; 
 usage += "\n Alt<Z> to remove added elements";
-usage += "\n  Usage: addcirc xcenter ycenter radius [GraphicAtt]";
+usage += "\n  Usage: addcirc xcenter ycenter radius [GraphicAtt] [fgnc=false/true]";
+usage += "\n  if fgnc==true : Normalized 0..1 coordinates specification (def=false)";
 usage += "\n  Related commands: addtext addline addarrow addfrect addfrect";
-usage += "\n       addcirc addarc addfarc graphicatt";  
+usage += "\n       addcirc addarc addfarc addpoly addfpoly graphicatt";  
 mpiac->RegisterCommand(kw, usage, this, "Graphics");
 
@@ -999,7 +1105,8 @@
 usage += "\n The Base/AxesDrawer is used to handle added arcs"; 
 usage += "\n Alt<Z> to remove added elements";
-usage += "\n  Usage: addarc x1 y1 x2 y2 x3 y3 [GraphicAtt]";
+usage += "\n  Usage: addarc x1 y1 x2 y2 x3 y3 [GraphicAtt] [fgnc=false/true]";
+usage += "\n  if fgnc==true : Normalized 0..1 coordinates specification (def=false)";
 usage += "\n  Related commands: addtext addline addarrow addfrect addfrect";
-usage += "\n       addcirc addfcirc addfarc graphicatt";  
+usage += "\n       addcirc addfcirc addfarc addpoly addfpoly graphicatt";  
 mpiac->RegisterCommand(kw, usage, this, "Graphics");
 
@@ -1009,7 +1116,26 @@
 usage += "\n The Base/AxesDrawer is used to handle added arcs"; 
 usage += "\n Alt<Z> to remove added elements";
-usage += "\n  Usage: addarc x1 y1 x2 y2 x3 y3 [GraphicAtt]";
+usage += "\n  Usage: addarc x1 y1 x2 y2 x3 y3 [GraphicAtt] [fgnc=false/true]";
+usage += "\n  if fgnc==true : Normalized 0..1 coordinates specification (def=false)";
 usage += "\n  Related commands: addtext addline addarrow addfrect addfrect";
-usage += "\n       addcirc addfcirc addfarc graphicatt";  
+usage += "\n       addcirc addfcirc addfarc addpoly addfpoly graphicatt";  
+mpiac->RegisterCommand(kw, usage, this, "Graphics");
+
+kw = "addpoly";
+usage = "Adds a polyline/polygon to the current graphic object";
+usage += "\n  Usage: addploy 'x1,y1 x2,y2 x3,y3 ...' [GraphicAtt] [fgnc=false/true]";
+usage += "\n  Coordinates specified as pairs x,y in a single word (use simple or double quotes";
+usage += "\n  if fgnc==true : Normalized 0..1 coordinates specification (def=false)";
+usage += "\n  Related commands: addtext addline addarrow addfrect addfrect";
+usage += "\n       addcirc addfcirc addfarc  graphicatt";  
+mpiac->RegisterCommand(kw, usage, this, "Graphics");
+
+kw = "addfpoly";
+usage = "Adds a filled polygon to the current graphic object";
+usage += "\n  Usage: addploy 'x1,y1 x2,y2 x3,y3 ...' [GraphicAtt] [fgnc=false/true]";
+usage += "\n  Coordinates specified as pairs x,y in a single word (use simple or double quotes";
+usage += "\n  if fgnc==true : Normalized 0..1 coordinates specification (def=false)";
+usage += "\n  Related commands: addtext addline addarrow addfrect addfrect";
+usage += "\n       addcirc addfcirc addfarc  graphicatt";  
 mpiac->RegisterCommand(kw, usage, this, "Graphics");
 
@@ -1039,5 +1165,5 @@
 
 kw = "openfits";
-usage = "Loads a FITS file into an apprpiate object \n Usage: openfits filename";
+usage = "Loads a FITS file into an appropriate object \n Usage: openfits filename";
 usage += "\n  Related commands: savefits openppf";  
 mpiac->RegisterCommand(kw, usage, this, "FileIO");
@@ -1071,5 +1197,16 @@
 usage += "\n  Related commands: ntloop fillnt ";
 mpiac->RegisterCommand(kw, usage, this, "FileIO");
-
+#ifndef SANS_EVOLPLANCK
+kw = "mtxfrascii";
+usage = "Reads a matrix from an ASCII file (TMatrix<r_8>)";
+usage += "\n Usage: mtxfrascii mtx_name file_name";
+usage += "\n  Related commands: vecfrascii ntfrascii ";
+mpiac->RegisterCommand(kw, usage, this, "FileIO");
+kw = "vecfrascii";
+usage = "Reads a vactor from an ASCII file (TVector<r_8>)";
+usage += "\n Usage: vecfrascii vec_name file_name";
+usage += "\n  Related commands: mtxfrascii ntfrascii ";
+mpiac->RegisterCommand(kw, usage, this, "FileIO");
+#endif
 
 kw = "print";
@@ -1491,5 +1628,6 @@
 usage += "o <Alt>C : Copy/Paste / Copies the selected regions content as text in the copy/paste buffer \n";
 usage += "o <Alt>X : Show/Hide the Cut Window \n";
-usage += "o <Alt>Z : Removes signs overlayed on image (Drawer 0) \n";
+usage += "o <Alt>Z : Removes added graphic elements (handled by BaseDrawer - 0) \n";
+usage += "o <Alt>E : Removes the last added graphic element \n";
 usage += "o <Alt>+ or <Cntl>+ : Zoom in \n";
 usage += "o <Alt>- or <Cntl>- : Zoom out \n";
@@ -1510,5 +1648,6 @@
 usage += "           Drawer 0 manages the axes, as well as the added text \n";
 usage += "o <Alt>V : Copy/Paste / Text paste at the current position \n";
-usage += "o <Alt>Z : Removes added signs (text) to Drawer 0 \n";
+usage += "o <Alt>Z : Removes added graphic elements (handled by BaseDrawer - 0) \n";
+usage += "o <Alt>E : Removes the last added graphic element \n";
 usage += "o <Alt>I : Shows (or updates) a text info window on the selected rectangle \n";
 usage += "o <Alt>M : Activate/Deactivate a measurement cursor on Button-1\n";
@@ -1530,5 +1669,6 @@
 usage += "o <Alt>O : = <Alt>G \n";
 usage += "o <Alt>V : Copy/Paste / Text paste at the current position (Drawer 0)\n";
-usage += "o <Alt>Z : Removes added signs (text) to Drawer 0 \n";
+usage += "o <Alt>Z : Removes added graphic elements (handled by BaseDrawer - 0) \n";
+usage += "o <Alt>E : Removes the last added graphic element \n";
 usage += "o <Alt>A : Activate/Deactivate axes drawing \n";
 usage += "o <Alt>S : Activate/Deactivate object rotation mode on Button-2 \n";
Index: trunk/SophyaPI/PIext/nobjmgr.cc
===================================================================
--- trunk/SophyaPI/PIext/nobjmgr.cc	(revision 2259)
+++ trunk/SophyaPI/PIext/nobjmgr.cc	(revision 2263)
@@ -1394,7 +1394,8 @@
   return;
 }
-Vector * vx = dynamic_cast<Vector *>(obj);
-if (vx == NULL) {
-  cout << "NamedObjMgr::DisplayVector() Error " << nomvx << " not a Vector ! " << endl;
+//Vector * vx = dynamic_cast<Vector *>(obj);
+BaseArray* bax = dynamic_cast<BaseArray *>(obj);
+if (bax == NULL) {
+  cout << "NamedObjMgr::DisplayVector() Error " << nomvx << " not a BaseArray ! " << endl;
   return;  
 }
@@ -1405,27 +1406,28 @@
   return;
 }
-Vector * vy = dynamic_cast<Vector *>(obj);
-if (vy == NULL) {
-  cout << "NamedObjMgr::DisplayVector() Error " << nomvy << " not a Vector ! " << endl;
+BaseArray* bay = dynamic_cast<BaseArray *>(obj);
+if (bay == NULL) {
+  cout << "NamedObjMgr::DisplayVector() Error " << nomvy << " not a BaseArray ! " << endl;
   return;  
 }
 
-
+Vector vx = *bax;
+Vector vy = *bay;
 Vector * cvx, * cvy;
 
-if (vx->Size() != vy->Size()) {
+if (vx.Size() != vy.Size()) {
   cout << "NamedObjMgr::DisplayVector() Warning / Vx.Size() != Vy.Size() " << endl;
-  if (vx->Size() < vy->Size()) {
-    cvx = new Vector(*vx);
-    cvy = new Vector(vy->SubVector(Range(0, 0, vx->Size()-1)));
+  if (vx.Size() < vy.Size()) {
+    cvx = new Vector(vx);
+    cvy = new Vector(vy.SubVector(Range(0, 0, vx.Size()-1)));
   }
   else {
-    cvx = new Vector(vx->SubVector(Range(0, 0, vy->Size()-1)));
-    cvy = new Vector(*vy);
+    cvx = new Vector(vx.SubVector(Range(0, 0, vy.Size()-1)));
+    cvy = new Vector(vy);
   }
 }
 else {
-  cvx = new Vector(*vx);
-  cvy = new Vector(*vy);
+  cvx = new Vector(vx);
+  cvy = new Vector(vy);
 }
 
Index: trunk/SophyaPI/PIext/piacmd.cc
===================================================================
--- trunk/SophyaPI/PIext/piacmd.cc	(revision 2259)
+++ trunk/SophyaPI/PIext/piacmd.cc	(revision 2263)
@@ -1712,6 +1712,18 @@
 }
 
-/* --Methode-- */
-void PIACmd::HelptoLaTex(string const & fname)
+/*  Les definitions suivantes doivent se trouver ds l'en-tete du fichier LaTeX 
+  \newcommand{\piacommand}[1]{
+    \framebox{\bf \Large #1 } \index{#1} % (Command) 
+  }
+
+  \newcommand{\piahelpitem}[1]{
+    \framebox{\bf \Large #1 } \index{#1} (Help item)
+  }
+
+  \newcommand{\myppageref}[1]{ (p. \pageref{#1} ) }
+*/
+
+/* --Methode-- */
+void PIACmd::HelptoLaTeX(string const & fname)
 {
 FILE *fip;
@@ -1725,11 +1737,13 @@
 fputs("\\begin{itemize} \n",fip);
 CmdHGroup::iterator it;
-for(it = cmdhgrp.begin(); it != cmdhgrp.end(); it++) 
+for(it = cmdhgrp.begin(); it != cmdhgrp.end(); it++) {
+  if ((*it).first == "All") continue;
   fprintf(fip,"\\item {\\bf %s }  (p. \\pageref{%s}) \n", 
          (*it).first.c_str(), (*it).first.c_str());
+}
 
 fputs("\\end{itemize} \n",fip);
 
-fputs("\\newpage \n",fip);
+fputs("\\vspace*{10mm} \n",fip);
 
 CmdExmap::iterator ite;
@@ -1750,5 +1764,5 @@
 fputs("\\end{tabular} \n", fip);
 fputs("\\end{center} \n", fip);
-fputs("\n \n \\vspace{1cm} \n",fip);
+fputs("\n \n \\newpage  \\vspace{1cm} \n",fip);
 
 fputs("\\begin{center} \n ", fip);
@@ -1777,7 +1791,8 @@
   fprintf(fip,"\\subsection{%s} \\label{%s} \n", 
           (*it).first.c_str(), (*it).first.c_str());
+  fprintf(fip,"\\noindent \n");
   for(ite = helpexmap.begin(); ite != helpexmap.end(); ite++) {
     if ((*ite).second.group != gid)  continue;
-    fprintf(fip,"{ \\Large $ \\star \\star \\star $ }  Help item {\\bf \\Large %s } \\label{%s} \n", 
+    fprintf(fip,"\\piahelpitem{%s} \\label{%s} \n", 
             (*ite).first.c_str(), (*ite).first.c_str());
     fputs("\\begin{verbatim} \n",fip);
@@ -1787,5 +1802,5 @@
   for(ite = cmdexmap.begin(); ite != cmdexmap.end(); ite++) {
     if ((*ite).second.group != gid)  continue;
-    fprintf(fip,"{ \\Large $ \\star \\star \\star $ }  Command {\\bf \\Large %s } \\label{%s} \n", 
+    fprintf(fip,"\\piacommand{%s} \\label{%s} \n", 
             (*ite).first.c_str(), (*ite).first.c_str());
     fputs("\\begin{verbatim} \n",fip);
Index: trunk/SophyaPI/PIext/piacmd.h
===================================================================
--- trunk/SophyaPI/PIext/piacmd.h	(revision 2259)
+++ trunk/SophyaPI/PIext/piacmd.h	(revision 2263)
@@ -91,5 +91,5 @@
           void          ShowCxxExecWindow();
 
-  virtual void 		HelptoLaTex(string const & flnm);
+  virtual void 		HelptoLaTeX(string const & flnm);
 
   inline  CmdInterpreter* CurrentInterpreter() { return(curcmdi); }
Index: trunk/SophyaPI/PIext/piaversion.h
===================================================================
--- trunk/SophyaPI/PIext/piaversion.h	(revision 2259)
+++ trunk/SophyaPI/PIext/piaversion.h	(revision 2263)
@@ -2,5 +2,5 @@
 #define PIAPPVERSION_H_SEEN
 
-#define PIAPP_VERSIONNUMBER  3.65
+#define PIAPP_VERSIONNUMBER  3.80
 
 #endif
Index: trunk/SophyaPI/PIext/pistdimgapp.cc
===================================================================
--- trunk/SophyaPI/PIext/pistdimgapp.cc	(revision 2259)
+++ trunk/SophyaPI/PIext/pistdimgapp.cc	(revision 2263)
@@ -19,4 +19,5 @@
 
 #include "pistdimgapp.h"
+#include "servnobjm.h"
 // #include "pihisto2d.h"
 #include "psfile.h"
@@ -95,4 +96,7 @@
 m[0]->AppendItem("Open-Fits", 10120);
 m[0]->AppendItem("Open-PPF", 10130);
+#ifndef SANS_EVOLPLANCK
+m[0]->AppendItem("Open-ASCII", 10140);
+#endif
 // m[0]->AppendItem("Options", 10101);
 m[0]->AppendItem("Help", 10100);
@@ -251,4 +255,5 @@
 pfc_fits = new PIFileChooser(this,"FITS-FileChooser", 10125); 
 pfc_ppf = new PIFileChooser(this,"PPF-FileChooser", 10135); 
+pfc_ascii = new PIFileChooser(this,"ASCII-FileChooser", 10145); 
 pfc_ps = new PIFileChooser(this,"PS-FileChooser", 10525); 
 
@@ -345,4 +350,5 @@
 delete pfc_fits;
 delete pfc_ppf;
+delete pfc_ascii;
 delete pfc_ps;
 
@@ -796,5 +802,5 @@
 
 /* --Methode-- */
-void PIStdImgApp::AddText(string const & txt, double xp, double yp, string const& sop)
+void PIStdImgApp::AddText(string const & txt, double xp, double yp, string const& sop, bool fgcn)
 {
 PIDrawer *eld=CurrentElDrawer();
@@ -813,11 +819,37 @@
 unsigned long tpd = 0;
 gratt.DecodeTextPosDirAtt(opts, tpd, false);
-elmgr->ElAddText(xp,yp,txt.c_str(), gratt, tpd);
+elmgr->ElAddText(xp,yp,txt.c_str(), gratt, tpd, fgcn);
 eld->Refresh();
 }
 
 /* --Methode-- */
+void PIStdImgApp::AddCompText(string const & txt, string const & txtup, string const & txtdn, 
+			      double xp, double yp, string const& sop, 
+			      string const& optss, bool fgcn)
+{
+PIDrawer *eld=CurrentElDrawer();
+if (eld == NULL) return;
+PIElDrawer* eld2 = dynamic_cast<PIElDrawer *>(eld);
+PIElDrawer3D* eld3 = dynamic_cast<PIElDrawer3D *>(eld);
+if ((eld2 == NULL) && (eld3 == NULL)) return;
+PIElDrwMgr* elmgr;
+if (eld2) elmgr = &(eld2->ElDrwMgr());
+else if (eld3) elmgr = &(eld3->ElDrwMgr());
+if (elmgr == NULL) return;
+
+vector<string> opts;
+ParseDisplayOption(sop, opts);
+PIGraphicAtt gratt(opts);
+unsigned long tpd = 0;
+gratt.DecodeTextPosDirAtt(opts, tpd, false);
+ParseDisplayOption(optss, opts);
+PIGraphicAtt grattss(opts);
+elmgr->ElAddCompText(xp,yp,txt.c_str(), gratt, txtup, txtdn, grattss, tpd, fgcn);
+eld->Refresh();
+}
+
+/* --Methode-- */
 void PIStdImgApp::AddLine(double xp1, double yp1, double xp2, double yp2, 
-			  string const& sop, bool fgarrow)
+			  string const& sop, bool fgarrow, bool fgcn)
 {
 PIDrawer *eld=CurrentElDrawer();
@@ -835,6 +867,6 @@
 PIGraphicAtt gratt(opts);
 if (fgarrow) 
-  elmgr->ElAddArrow(xp1, yp1, xp2, yp2, gratt);
-else elmgr->ElAddLine(xp1, yp1, xp2, yp2, gratt);
+  elmgr->ElAddArrow(xp1, yp1, xp2, yp2, gratt, fgcn);
+else elmgr->ElAddLine(xp1, yp1, xp2, yp2, gratt, fgcn);
 eld->Refresh();
 }
@@ -842,5 +874,5 @@
 /* --Methode-- */
 void PIStdImgApp::AddRectangle(double xp1, double yp1, double xp2, double yp2, 
-			       string const& sop, bool fgfill)
+			       string const& sop, bool fgfill, bool fgcn)
 {
 PIDrawer *eld=CurrentElDrawer();
@@ -872,11 +904,12 @@
 PIGraphicAtt gratt(opts);
 
-if (fgfill) elmgr->ElAddFRect(xp, yp, dx, dy, gratt);
-else elmgr->ElAddRect(xp, yp, dx, dy, gratt);
+if (fgfill) elmgr->ElAddFRect(xp, yp, dx, dy, gratt, fgcn);
+else elmgr->ElAddRect(xp, yp, dx, dy, gratt, fgcn);
 eld->Refresh();
 }
 
 /* --Methode-- */
-void PIStdImgApp::AddCircle(double xc, double yc, double r, string const& sop, bool fgfill)
+void PIStdImgApp::AddCircle(double xc, double yc, double r, string const& sop, 
+			    bool fgfill, bool fgcn)
 {
 PIDrawer *eld=CurrentElDrawer();
@@ -895,6 +928,6 @@
   elmgr->ElAddMarker(xc, yc, gratt);
 else {
-  if (fgfill) elmgr->ElAddFCirc(xc, yc, r, gratt);
-  else elmgr->ElAddCirc(xc, yc, r, gratt);
+  if (fgfill) elmgr->ElAddFCirc(xc, yc, r, gratt, fgcn);
+  else elmgr->ElAddCirc(xc, yc, r, gratt, fgcn);
 }
 eld->Refresh();
@@ -903,5 +936,5 @@
 /* --Methode-- */
 void PIStdImgApp::AddArc(double x1, double y1, double x2, double y2,
-			 double x3, double y3, string const& sop, bool fgfill)
+			 double x3, double y3, string const& sop, bool fgfill, bool fgcn)
 {
 PIDrawer *eld=CurrentElDrawer();
@@ -919,8 +952,33 @@
 PIGraphicAtt gratt(opts);
 if (fgfill) 
-  elmgr->ElAddFArc(x1, y1, x2, y2, x3, y3, gratt);
-else  elmgr->ElAddArc(x1, y1, x2, y2, x3, y3, gratt);
+  elmgr->ElAddFArc(x1, y1, x2, y2, x3, y3, gratt, fgcn);
+else  elmgr->ElAddArc(x1, y1, x2, y2, x3, y3, gratt, fgcn);
 eld->Refresh();
 }
+
+/* --Methode-- */
+void PIStdImgApp::AddPoly(vector<double>& xpol, vector<double>& ypol, 
+			  string const& sop, bool fgfill, bool fgcn)
+{
+PIDrawer *eld=CurrentElDrawer();
+if (eld == NULL) return;
+PIElDrawer* eld2 = dynamic_cast<PIElDrawer *>(eld);
+PIElDrawer3D* eld3 = dynamic_cast<PIElDrawer3D *>(eld);
+if ((eld2 == NULL) && (eld3 == NULL)) return;
+PIElDrwMgr* elmgr = NULL;
+if (eld2) elmgr = &(eld2->ElDrwMgr());
+else if (eld3) elmgr = &(eld3->ElDrwMgr());
+if (elmgr == NULL) return;
+
+vector<string> opts;
+ParseDisplayOption(sop, opts);
+PIGraphicAtt gratt(opts);
+if (fgfill) 
+  elmgr->ElAddFPoly(xpol, ypol, gratt, fgcn);
+else  elmgr->ElAddPoly(xpol, ypol, gratt, fgcn);
+eld->Refresh();
+
+}
+
 
 /* --Methode-- */
@@ -1426,4 +1484,40 @@
       break;
         
+#ifndef SANS_EVOLPLANCK
+    case 10140 :
+      pfc_ascii->AcceptNewFile(false);
+      mFCMsg = 10145; 
+      pfc_ascii->SetMsg(mFCMsg);
+      SetBlocked();
+      pfc_ascii->Show();
+      break;
+
+    case 10145 :
+      SetBusy();
+      if (data)  { 
+	string afname = pfc_ascii->GetFileName();
+        string nomobj = ObjMgr()->GetServiceObj()->FileName2Name(afname);
+	string cmd = "mtxfrascii ";
+	cmd += nomobj;  cmd += " ";  cmd += afname;
+	try {
+	  mCmd->Interpret(cmd);
+	}  
+	catch ( PThrowable & exc ) {
+	  cerr << "\n PIStdImgApp::Process()/ Cmd->Interpret() Exception :" 
+	       << (string)typeid(exc).name() << " Msg= " 
+	       << exc.Msg() << endl;
+	  cout << endl; 
+	}
+	catch ( ... ) {
+	  cerr << "\n PIStdImgApp::Process()/ Cmd->Interpret() Catched Exception ... " << endl;
+	  cout << endl; 
+	}
+	
+      }
+      mFCMsg = 0;
+      SetReady();
+      break;
+#endif
+
     case 10105:
       Stop();
Index: trunk/SophyaPI/PIext/pistdimgapp.h
===================================================================
--- trunk/SophyaPI/PIext/pistdimgapp.h	(revision 2259)
+++ trunk/SophyaPI/PIext/pistdimgapp.h	(revision 2263)
@@ -66,14 +66,19 @@
      
   //  Fonction d'ajout de texte (provisoire - Aout 99) 
-     void AddText(string const & txt, double xp, double yp, string const& opt);
+     void AddText(string const & txt, double xp, double yp, string const& opt, bool fgcn=false);
+     void AddCompText(string const & txt, string const & txtup, string const & txtdn, 
+		      double xp, double yp, string const& opt, 
+		      string const& optss, bool fgcn=false);
   //  Ajout de lignes, rectangles, cercles (provisoires - Aout 2001)
      void AddLine(double xp1, double yp1, double xp2, double yp2, 
-		  string const& opt, bool fgarrow=false);
+		  string const& opt, bool fgarrow=false, bool fgcn=false);
      void AddRectangle(double xp1, double yp1, double xp2, double yp2, string const& opt, 
-		       bool fgfill=false);
+		       bool fgfill=false, bool fgcn=false);
      void AddCircle(double xc, double yc, double r, string const& opt, 
-		    bool fgfill=false);
+		    bool fgfill=false, bool fgcn=false);
      void AddArc(double x1, double y1, double x2, double y2,
-		 double x3, double y3, string const& opt, bool fgfill=false);
+		 double x3, double y3, string const& opt, bool fgfill=false, bool fgcn=false);
+     void AddPoly(vector<double>& x, vector<double>& y, 
+		  string const& opt, bool fgfill=false, bool fgcn=false);
 
   //  Fonction Ajout de titre de trace
@@ -172,4 +177,5 @@
     PIFileChooser * pfc_fits;   // Pour les fichiers FITS
     PIFileChooser * pfc_ppf;    //  Pour les PPF 
+    PIFileChooser * pfc_ascii;  //  Pour les fichiers ASCII 
     PIFileChooser * pfc_ps;     // Pour les PostScript
 
