Index: trunk/SophyaPI/PIext/basexecut.cc
===================================================================
--- trunk/SophyaPI/PIext/basexecut.cc	(revision 1130)
+++ trunk/SophyaPI/PIext/basexecut.cc	(revision 1131)
@@ -103,4 +103,14 @@
   int opt = mObjMgr->GetServiceObj()->DecodeDispOption(tokens[2], fgsr);
   mImgApp->AddText(txt, xp, yp);
+  if (fgsr) mImgApp->RestoreGraphicAtt(); 
+  }
+else if (kw == "settitle") {
+  if (tokens.size() < 2) { cout << "Usage: addtitle fontatt titleup " << endl;  return(0); }
+  bool fgsr = true;
+  int opt = mObjMgr->GetServiceObj()->DecodeDispOption(tokens[0], fgsr);
+  string txt = tokens[1];
+  for(int k=2; k<tokens.size(); k++) txt += (' ' + tokens[k]);
+  string td = "";
+  mImgApp->SetTitle(txt, td);
   if (fgsr) mImgApp->RestoreGraphicAtt(); 
   }
@@ -715,4 +725,5 @@
 usage += ">> XYLimits : xylimits  -> Forces X-Y limits in 2-D plots \n";
 usage += ">> stat/nostat or stats/nostats -> Toggle statistic display flag \n";
+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";  
@@ -741,5 +752,11 @@
 usage += "\n at the specified position (Gr-Object Coordinate) with graphic attribute specification";
 usage += "\n  Usage: addtext x y ColFontAtt TextString";
-usage += "\n  Related commands: graphicatt";  
+usage += "\n  Related commands: settitle graphicatt";  
+mpiac->RegisterCommand(kw, usage, this, "Graphics");
+
+kw = "settitle";
+usage = "Set the title string (top title) for the current graphic object";
+usage += "\n  Usage: settitle FontAtt TopTitle";
+usage += "\n  Related commands: addtext graphicatt";  
 mpiac->RegisterCommand(kw, usage, this, "Graphics");
 
Index: trunk/SophyaPI/PIext/piaversion.h
===================================================================
--- trunk/SophyaPI/PIext/piaversion.h	(revision 1130)
+++ trunk/SophyaPI/PIext/piaversion.h	(revision 1131)
@@ -2,5 +2,5 @@
 #define PIAPPVERSION_H_SEEN
 
-#define PIAPP_VERSIONNUMBER  2.4
+#define PIAPP_VERSIONNUMBER  2.5
 
 #endif
Index: trunk/SophyaPI/PIext/pistdimgapp.cc
===================================================================
--- trunk/SophyaPI/PIext/pistdimgapp.cc	(revision 1130)
+++ trunk/SophyaPI/PIext/pistdimgapp.cc	(revision 1131)
@@ -209,4 +209,5 @@
 mFImgCenter = false;
 maXlog = maYlog = false;
+mAddTitle = true;
 SaveGraphicAtt();
 
@@ -550,6 +551,8 @@
 else ((PIH2DWdg*)scw)->SetPIHisto((PIHisto2D*)scd);
 //   Titre du plot
-if (title.length() <= 0)  title = name;  string t2="";   
-scw->SetTitles(title, t2);    
+if (mAddTitle) {
+  if (title.length() <= 0)  title = name;  string t2="";   
+  scw->SetTitles(title, t2);    
+}
 // scw->Refresh();   ? Pas necessaire  Reza 19/08/98, 05/05/99 $CHECK$ 
 mCurWin = win;
@@ -612,6 +615,8 @@
 wd3->AddDrawer3D(dr3, true);
 //   Titre du plot
-if (title.length() <= 0)  title = name;  string t2="";   
-wd3->SetTitles(title, t2);    
+if (mAddTitle) {
+  if (title.length() <= 0)  title = name;  string t2="";   
+  wd3->SetTitles(title, t2);    
+}
 // wd3->Refresh();   ?Pas necessaire   $CHECK$ 05/05/99
 mCurWin = win;
@@ -650,4 +655,34 @@
   if ( (mFSz != PI_NotDefFontSize) && (mFAtt != PI_NotDefFontAtt) )     eld->SetFontAtt(mFSz, mFAtt); 
   eld->ElAddText(xp,yp,txt.c_str(),mFCol);
+  eld->Refresh();
+  }
+}
+/* --Methode-- */
+void PIStdImgApp::SetTitle(string const & titletop, string const & titlebottom)
+{
+if (!mLastWdg)  return;
+PIElDrawer *eld=NULL;
+PIScDrawWdg* sdw=NULL;
+PIDraw3DWdg* w3d=NULL;
+PIImage* imgw;
+switch(mLastWdg->kind()) {
+  case PIScDrawWdg::ClassId :
+    sdw = dynamic_cast<PIScDrawWdg *>(mLastWdg);
+    if (sdw) eld = sdw->BaseDrawer();
+    break;
+  case PIDraw3DWdg::ClassId :
+    w3d = dynamic_cast<PIDraw3DWdg *>(mLastWdg);
+    if (w3d) eld = w3d->BaseDrawer();
+    break;
+  case PIImage::ClassId :
+    imgw = dynamic_cast<PIImage *>(mLastWdg);
+    if (imgw) eld = imgw->MyElDrawer();
+    break;
+  default :
+    break;
+  }
+if (eld) { 
+  if ( (mFSz != PI_NotDefFontSize) && (mFAtt != PI_NotDefFontAtt) )     eld->SetFontAtt(mFSz, mFAtt); 
+  eld->SetTitles(titletop, titlebottom);
   eld->Refresh();
   }
@@ -1412,4 +1447,5 @@
   mSaXlog = maXlog;
   mSaYlog = maYlog;
+  mSAddTitle = mAddTitle;
 }
 
@@ -1437,4 +1473,5 @@
   maXlog = mSaXlog;
   maYlog = mSaYlog;
+  mAddTitle = mSAddTitle;
 }
 
Index: trunk/SophyaPI/PIext/pistdimgapp.h
===================================================================
--- trunk/SophyaPI/PIext/pistdimgapp.h	(revision 1130)
+++ trunk/SophyaPI/PIext/pistdimgapp.h	(revision 1131)
@@ -53,4 +53,6 @@
   //  Fonction d'ajout de texte (provisoire - Aout 99)
      void AddText(string const & txt, double xp, double yp);
+  //  Fonction Ajout de titre de trace
+     void SetTitle(string const & titleup, string const & titledown);
 
 
@@ -107,4 +109,5 @@
      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
@@ -184,4 +187,5 @@
     bool	 maXlog, mSaXlog;
     bool	 maYlog, mSaYlog;
+    bool         mAddTitle, mSAddTitle;
 
     PIMessage mFCMsg;  // Message for processing FileOpen
Index: trunk/SophyaPI/PIext/servnobjm.cc
===================================================================
--- trunk/SophyaPI/PIext/servnobjm.cc	(revision 1130)
+++ trunk/SophyaPI/PIext/servnobjm.cc	(revision 1131)
@@ -1353,4 +1353,5 @@
   mImgapp->SetXLogScale();
   mImgapp->SetYLogScale();
+  mImgapp->SetAutoAddTitle();
   stats_option = true;
   return(ropt);
@@ -1401,4 +1402,9 @@
   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; }
 
   // Si c'est une couleur
