Index: /trunk/SophyaPI/PI/Makefile
===================================================================
--- /trunk/SophyaPI/PI/Makefile	(revision 137)
+++ /trunk/SophyaPI/PI/Makefile	(revision 138)
@@ -88,7 +88,11 @@
 $(OBJ)pifilechogen.o: pifilechogen.cc pifilechogen.h pisysdep.h piwdgx.h \
  piwdggen.h pimsghandler.h
-$(OBJ)pifilechox.o: pifilechox.cc pisysdep.h pifilechox.h pifilechogen.h \
- piwdgx.h piwdggen.h pimsghandler.h piwindowx.h piwindowgen.h \
- picontainerx.h picontainergen.h
+$(OBJ)pifilechox.o: pifilechox.cc pisysdep.h piapplx.h piapplgen.h \
+ pimsghandler.h picontainerx.h picontainergen.h piwdgx.h piwdggen.h \
+ pimenubarx.h pimenubargen.h pimenux.h pimenugen.h picons.h \
+ pistdwdgx.h pistdwdggen.h pibwdgx.h pibwdggen.h picmap.h picmapx.h \
+ picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h \
+ $(EROSDEVREP)/Include/defs.h pigraphps.h pifilechox.h \
+ pifilechogen.h piwindowx.h piwindowgen.h
 $(OBJ)pigraph3d.o: pigraph3d.cc pigraph3d.h pisysdep.h pigraphuc.h \
  pigraphgen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h \
@@ -270,8 +274,10 @@
  picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h \
  psfile.h
-$(OBJ)pistzwin.o: pistzwin.cc pistzwin.h pisysdep.h piwindowx.h \
- piwindowgen.h picontainerx.h picontainergen.h piwdgx.h piwdggen.h \
- pimsghandler.h psfile.h $(EROSDEVREP)/Include/defs.h pigraphgen.h \
- picmap.h picmapx.h picmapgen.h
+$(OBJ)pistzwin.o: pistzwin.cc \
+ /usr/local/lib/gcc-lib/alphaev56-dec-osf4.0d/2.8.1/include/stdio.h \
+ pistzwin.h pisysdep.h piwindowx.h piwindowgen.h picontainerx.h \
+ picontainergen.h piwdgx.h piwdggen.h pimsghandler.h piperiodx.h \
+ $(EROSDEVREP)/Include/periodic.h $(EROSDEVREP)/Include/defs.h \
+ psfile.h pigraphgen.h picmap.h picmapx.h picmapgen.h
 $(OBJ)pisurfdr.o: pisurfdr.cc pisurfdr.h parradapter.h \
  $(EROSDEVREP)/Include/defs.h $(EROSDEVREP)/Include/machine.h \
Index: /trunk/SophyaPI/PI/parradapter.cc
===================================================================
--- /trunk/SophyaPI/PI/parradapter.cc	(revision 137)
+++ /trunk/SophyaPI/PI/parradapter.cc	(revision 138)
@@ -97,5 +97,5 @@
 }
 
-printf(" -> vit=%d \n", vit);
+// printf(" -> vit=%d \n", vit);
 for(int j=0; j<sY; j++) 
   for(int i=0; i<sX; i++)   {
Index: /trunk/SophyaPI/PI/piapplgen.h
===================================================================
--- /trunk/SophyaPI/PI/piapplgen.h	(revision 137)
+++ /trunk/SophyaPI/PI/piapplgen.h	(revision 138)
@@ -6,6 +6,6 @@
 #include PICONT_H
 #include PIMENUBAR_H
+#include "picons.h"
 
-#include "picons.h"
 
 class PIApplicationGen : public PIMsgHandler {
Index: /trunk/SophyaPI/PI/piapplx.cc
===================================================================
--- /trunk/SophyaPI/PI/piapplx.cc	(revision 137)
+++ /trunk/SophyaPI/PI/piapplx.cc	(revision 138)
@@ -154,13 +154,12 @@
 void PIApplicationX::SetReady()
 {
+Display * mdsp = XtDisplay (topwdg->XtWdg());
 if (mState != kReadyState)
   {
-  Display * mdsp;
   mState = kReadyState;
   Menubar()->SetSensitive();
-  mdsp = XtDisplay (topwdg->XtWdg());
   XDefineCursor(mdsp, XtWindow(topwdg->XtWdg()), a_curs[0]);
-  XFlush(mdsp);
-  }
+  }
+XFlush(mdsp);
 }
 
@@ -168,15 +167,13 @@
 void PIApplicationX::SetBusy()
 {
+Display * mdsp = XtDisplay (topwdg->XtWdg());
 if (mState != kBusyState)
   {
-  Display * mdsp;
   mState = kBusyState;
   Menubar()->SetSensitive();
-  mdsp = XtDisplay (topwdg->XtWdg());
 //  if ( XtIsRealized(topwdg->XtWdg()) )
   XDefineCursor(mdsp, XtWindow(topwdg->XtWdg()), a_curs[2]);
-  XFlush(mdsp);
-  }
-return;
+  }
+XFlush(mdsp);
 }
 
@@ -184,13 +181,13 @@
 void PIApplicationX::SetBlocked()
 {
+Display * mdsp = XtDisplay (topwdg->XtWdg());
 if (mState != kBlockedState)
   {
-  Display * mdsp;
   mState = kBlockedState;
   Menubar()->SetUnSensitive();
-  mdsp = XtDisplay (topwdg->XtWdg());
   XDefineCursor(mdsp, XtWindow(topwdg->XtWdg()), a_curs[1]);
-  XFlush(mdsp);
-  }
+  }
+XFlush(mdsp);
+return;
 }
 
Index: /trunk/SophyaPI/PI/picons.cc
===================================================================
--- /trunk/SophyaPI/PI/picons.cc	(revision 137)
+++ /trunk/SophyaPI/PI/picons.cc	(revision 138)
@@ -48,4 +48,5 @@
 mOffL = 0;
 mNCmdL = 0;
+mCmd = "";
 
 // Pile de rappel des commandes 
@@ -125,8 +126,8 @@
 
 if (mCurL >= (mNL-mNCmdL) ) { // Il faut scroller 
-  ScrollUp();
+  ScrollUp();  
   mCurL = mNL-mNCmdL-1;
   l1 = mNL-mWSzL-1; 
-}
+  }
 if (l2 < mCurL) l2 = mCurL;
 if (ref) DisplayLines(mWGrC, l1, l2);
@@ -136,5 +137,5 @@
 
 /* --Methode-- */
-void PIConsole::AddStr(char* strg, unsigned char va, bool ref)
+void PIConsole::AddStr(const char* strg, unsigned char va, bool ref)
 {
 int l1, l2;
@@ -152,6 +153,7 @@
   else { mCurL++; mCurC = 0; } 
   if (mCurL >= (mNL-mNCmdL) ) { // Il faut scroller 
-    ScrollUp();
+    ScrollUp();  
     mCurL = mNL-mNCmdL-1;
+    l1 = mNL-mWSzL-1; 
     }
   strg++;
@@ -248,5 +250,5 @@
 
 /* --Methode-- */
-void PIConsole::SetPrompt(char* prompt)
+void PIConsole::SetPrompt(const char* prompt)
 {
 strncpy(mPrompt, prompt, 31);  
@@ -342,6 +344,7 @@
         }
       mChangeFg = false;
-      Send( Msg(), PIMsg_OK, mCmdStr);
+      mCmd = mCmdStr;
       ClrCmd();
+      Send( Msg(), PIMsg_OK, NULL);
       break;
 
Index: /trunk/SophyaPI/PI/picons.h
===================================================================
--- /trunk/SophyaPI/PI/picons.h	(revision 137)
+++ /trunk/SophyaPI/PI/picons.h	(revision 138)
@@ -35,5 +35,5 @@
 // Interface d utilisation : 
           void       AddChar(char c, unsigned char va= PIVA_Def, bool ref=true);
-          void       AddStr(char* strg, unsigned char va= PIVA_Def, bool ref=true);
+          void       AddStr(const char* strg, unsigned char va= PIVA_Def, bool ref=true);
 
           void       SelectFont(PIFontSize sz=PI_NormalSizeFont);
@@ -41,9 +41,9 @@
           void       PreferedSize(int& sx, int& sy);
           void       AcceptCmd(bool acc=true, int nrecmx=20);
-          void       SetPrompt(char* prompt); 
+          void       SetPrompt(const char* prompt); 
 
   inline  int        WindNbLines() { return mWSzL; }
   inline  int        NbLines() { return mNL; }          
-  inline  string     GetCmdString() { mCmdStr[mCLC] = '\0'; return((string)mCmdStr); }
+  inline  string     GetCmdString() { return(mCmd); }
 
 // Gestion des evenements input/draw 
@@ -94,4 +94,5 @@
   char* mCmdStr;        // La commande 
   int mCCP, mCLC;       // Position du curseur, longeur de la commande
+  string mCmd;          // Le string de la derniere commande validee
 
 // Pour le rappel des commandes
Index: /trunk/SophyaPI/PI/pidrwtools.cc
===================================================================
--- /trunk/SophyaPI/PI/pidrwtools.cc	(revision 137)
+++ /trunk/SophyaPI/PI/pidrwtools.cc	(revision 138)
@@ -117,4 +117,12 @@
 mOpt[0]->AppendItem("Yellow", 107);
 mOpt[0]->AppendItem("Magenta", 108);
+mOpt[0]->AppendItem("Cyan", 109);
+mOpt[0]->AppendItem("Turquoise", 110);
+mOpt[0]->AppendItem("NavyBlue", 111);
+mOpt[0]->AppendItem("Orange", 112);
+mOpt[0]->AppendItem("SiennaRed", 113);
+mOpt[0]->AppendItem("Purple", 114);
+mOpt[0]->AppendItem("LimeGreen", 115);
+mOpt[0]->AppendItem("Gold", 116);
 mOpt[0]->SetValue(100);
 mOpt[0]->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic);
@@ -276,7 +284,11 @@
 void PIDrwTools::Process(PIMessage msg, PIMsgHandler* /*sender*/, void* /*data*/)
 {
-PIColors cols[9] = { PI_NotDefColor, PI_Black, PI_White,  
-                     PI_Grey, PI_Red, PI_Blue, 
-                     PI_Green, PI_Yellow, PI_Magenta};
+PIColors cols[17] = { PI_NotDefColor, 
+                     PI_Black, PI_White, PI_Grey, 
+                     PI_Red, PI_Blue, PI_Green, 
+                     PI_Yellow, PI_Magenta, 
+                     PI_Cyan , PI_Turquoise, PI_NavyBlue, 
+                     PI_Orange, PI_SiennaRed, PI_Purple, 
+                     PI_LimeGreen, PI_Gold };
 
 PIMarker mrk[12] = { PI_NotDefMarker, PI_DotMarker, 
@@ -328,5 +340,5 @@
     if (drw == NULL)  return;
     k = mOpt[0]->GetValue()-100;
-    if ( (k < 0) || (k > 8) )  k = 0;
+    if ( (k < 0) || (k > 16) )  k = 0;
     drw->SetColAtt(cols[k]);
     k = mOpt[1]->GetValue()-200;
Index: /trunk/SophyaPI/PI/pigraphgen.h
===================================================================
--- /trunk/SophyaPI/PI/pigraphgen.h	(revision 137)
+++ /trunk/SophyaPI/PI/pigraphgen.h	(revision 138)
@@ -15,5 +15,8 @@
                  PI_Black = 0, PI_White = 1,  PI_Grey = 2,
                  PI_Red = 3, PI_Blue = 4, PI_Green = 5,  
-                 PI_Yellow = 6, PI_Magenta = 7 }; 
+                 PI_Yellow = 6, PI_Magenta = 7, 
+                 PI_Cyan = 8, PI_Turquoise = 9, PI_NavyBlue = 10, 
+                 PI_Orange = 11, PI_SiennaRed = 12, PI_Purple = 13,  
+                 PI_LimeGreen = 14, PI_Gold = 15 };
 
 enum PIFontSize { PI_NotDefFontSize = -1, 
Index: /trunk/SophyaPI/PI/pigraphx.cc
===================================================================
--- /trunk/SophyaPI/PI/pigraphx.cc	(revision 137)
+++ /trunk/SophyaPI/PI/pigraphx.cc	(revision 138)
@@ -19,5 +19,5 @@
 static int BigFontIndex = 5;
 static  PIFontAtt fntatt[3] = { PI_RomanFont, PI_BoldFont, PI_ItalicFont }; 
-#define NMAXCOL  10
+#define NMAXCOL  16
 static  PIXColor colpix[NMAXCOL];
 
@@ -680,4 +680,21 @@
 if ( XAllocNamedColor (mdsp, cmap, "magenta", &mycol, &exact) )
   colpix[PI_Magenta] = mycol.pixel;
+if ( XAllocNamedColor (mdsp, cmap, "cyan", &mycol, &exact) )
+  colpix[PI_Cyan] = mycol.pixel;
+if ( XAllocNamedColor (mdsp, cmap, "turquoise", &mycol, &exact) )
+  colpix[PI_Turquoise] = mycol.pixel;
+if ( XAllocNamedColor (mdsp, cmap, "NavyBlue", &mycol, &exact) )
+  colpix[PI_NavyBlue] = mycol.pixel;
+if ( XAllocNamedColor (mdsp, cmap, "orange", &mycol, &exact) )
+  colpix[PI_Orange] = mycol.pixel;
+if ( XAllocNamedColor (mdsp, cmap, "sienna", &mycol, &exact) )
+  colpix[PI_SiennaRed] = mycol.pixel;
+if ( XAllocNamedColor (mdsp, cmap, "purple", &mycol, &exact) )
+  colpix[PI_Purple] = mycol.pixel;
+if ( XAllocNamedColor (mdsp, cmap, "LimeGreen", &mycol, &exact) )
+  colpix[PI_LimeGreen] = mycol.pixel;
+if ( XAllocNamedColor (mdsp, cmap, "gold", &mycol, &exact) )
+  colpix[PI_Gold] = mycol.pixel;
+
 
 /*  le GC pour DrawPixmap  */
Index: /trunk/SophyaPI/PI/pihisto2d.cc
===================================================================
--- /trunk/SophyaPI/PI/pihisto2d.cc	(revision 137)
+++ /trunk/SophyaPI/PI/pihisto2d.cc	(revision 138)
@@ -179,4 +179,7 @@
   if(mTypDisp==3) fracmin=-1.;
 }
+
+// gestion epaisseur de ligne
+if (mLAtt == PI_NotDefLineAtt)  g->SelLine(PI_ThinLine);
 
 // gestion Markers ou plot avec des points.
@@ -278,4 +281,5 @@
 {
   // Une boite dans le coin superieur droit
+  if (mLAtt == PI_NotDefLineAtt)  g->SelLine(PI_ThinLine);
   float cellHeight = (YMax() - YMin()) * 0.05;
   float cellWidth  = (XMax() - XMin()) * 0.23;
Index: /trunk/SophyaPI/PI/piimage.cc
===================================================================
--- /trunk/SophyaPI/PI/piimage.cc	(revision 137)
+++ /trunk/SophyaPI/PI/piimage.cc	(revision 138)
@@ -77,6 +77,6 @@
 AddDrawer(mdrw, true, false, false);
 
+SetLut(0., 32000., kLutType_Lin, 0, false);
 SetColMapId(CMAP_COLRJ32);
-
 // pour le copier-coller
 cpbuffer = NULL;
Index: /trunk/SophyaPI/PI/pintup3d.cc
===================================================================
--- /trunk/SophyaPI/PI/pintup3d.cc	(revision 137)
+++ /trunk/SophyaPI/PI/pintup3d.cc	(revision 138)
@@ -90,4 +90,6 @@
 #endif
 
+if (mLAtt == PI_NotDefLineAtt)  g3->SelLine(PI_ThinLine);
+
 nok = 0;  
 for (int i=0; i<mNT->NEntry(); i++) {
Index: /trunk/SophyaPI/PI/pintuple.cc
===================================================================
--- /trunk/SophyaPI/PI/pintuple.cc	(revision 137)
+++ /trunk/SophyaPI/PI/pintuple.cc	(revision 138)
@@ -70,5 +70,5 @@
 if (!mNT) return;
 if ( (xK < 0) || (yK < 0) )  return;
-
+if (mLAtt == PI_NotDefLineAtt)  g->SelLine(PI_ThinLine);
 nok = 0;  
 for (int i=0; i<mNT->NEntry(); i++) {
Index: /trunk/SophyaPI/PI/pistzwin.cc
===================================================================
--- /trunk/SophyaPI/PI/pistzwin.cc	(revision 137)
+++ /trunk/SophyaPI/PI/pistzwin.cc	(revision 138)
@@ -115,4 +115,11 @@
 void PIZoneWindow::SetZone(int nzx, int nzy)
 {
+int i;
+if (mZWdg) {
+  for(i=0; i<mZx*mZy; i++) 
+    if (mZWdg[i]) delete mZWdg[i];  
+  delete[]  mZWdg;
+  }
+
 if (nzx < 1) nzx = 1;
 if (nzy < 1) nzy = 1;
@@ -121,10 +128,4 @@
 mZx = nzx;  mZy = nzy;   mZc = 0;
 
-int i;
-if (mZWdg) {
-  for(i=0; i<mZx*mZy; i++) 
-    if (mZWdg[i]) delete mZWdg[i];  
-  delete[]  mZWdg;
-  }
 mZWdg = new PIWdgGen*[nzx*nzy];
 for(i=0; i<mZx*mZy; i++) mZWdg[i] = NULL; 
@@ -136,5 +137,4 @@
 {
 if (!child) return;
-// printf("-DBG-PIZoneWindow::ChildAdd(%lx) deleteing Wdg %lx \n", (long)child, (long)mZWdg[mZc]);
 int nx = mZc%mZx;
 int ny = mZc/mZx;
@@ -146,6 +146,5 @@
 child->SetSize(sx, sy);
 child->SetBinding(PIBK_elastic,PIBK_elastic,PIBK_elastic, PIBK_elastic);
-// printf("--DBG-- PIZoneWindow::ChildAdd() %d , Nx,y=%d %d , S= %d %d \n", mZc, nx, ny, sx, sy);
-// printf("--DBG-- ... Child Pos= %d %d, Size= %d %d \n", child->XPos(), child->YPos(),child->XSize(),child->YSize()   );
+//  Il faut faire le delete a cet endroit, sinon probleme avec widget motif XmForm  Reza 18/08/98
 if (mZWdg[mZc])  delete mZWdg[mZc]; 
 mZWdg[mZc] = child;
@@ -178,4 +177,3 @@
 int ny = mZc/mZx;
 px = nx*sx;  py = ny*sy;
-// printf("--DBG-- PIZoneWindow::NextChildPosSize() %d , P=%d %d , S= %d %d \n", mZc, px,py, sx, sy);
 }
Index: /trunk/SophyaPI/PI/piwdggen.cc
===================================================================
--- /trunk/SophyaPI/PI/piwdggen.cc	(revision 137)
+++ /trunk/SophyaPI/PI/piwdggen.cc	(revision 138)
@@ -179,5 +179,6 @@
 PIWdgGen::~PIWdgGen()
 {
-if (parent)  parent->ChildDel(this);   //  On previent le container parent 
+//  ChildDel() doit etre appele par la classe qui implemente le widget
+// if (parent)  parent->ChildDel(this);   //  On previent le container parent 
 }
 
Index: /trunk/SophyaPI/PI/piwdgx.cc
===================================================================
--- /trunk/SophyaPI/PI/piwdgx.cc	(revision 137)
+++ /trunk/SophyaPI/PI/piwdgx.cc	(revision 138)
@@ -182,4 +182,5 @@
 printf("Debug_PIWdgX::~PIWdgX()  %lx %lx \n", (long)this, (long)sdw);
 #endif
+if (parent) parent->ChildDel(this);
 UnManage();
 if (curselwdg == this)  { SelectionLost(); curselwdg = NULL; }
