Index: trunk/SophyaPI/PIext/basexecut.cc
===================================================================
--- trunk/SophyaPI/PIext/basexecut.cc	(revision 2463)
+++ trunk/SophyaPI/PIext/basexecut.cc	(revision 2465)
@@ -1071,28 +1071,34 @@
 {
 string kw, usage, grp;
+grp = "External Modules";
+string gdesc = "Dynamic load (shared object modules) management command group";
+mpiac->AddHelpGroup(grp, gdesc);
 kw = "loadmodule";
 usage = "To load and initialize modules \n  Usage: loadmodule fnameso modulename";
 usage += "\n  Related commands: link";  
-mpiac->RegisterCommand(kw, usage, this, "External Modules");
+mpiac->RegisterCommand(kw, usage, this, grp);
 kw = "link";
 usage = "Dynamic linking of compiled user functions \n  Usage: link fnameso f1 [f2 f3]";
 usage += "\n  fnameso: Shared-object file name, f1,f2,f3 : User function names ";
 usage += "\n  Related commands: call loadmodule linkff2";  
-mpiac->RegisterCommand(kw, usage, this, "External Modules");
+mpiac->RegisterCommand(kw, usage, this, grp);
 kw = "linkff2";
 usage = "Dynamic linking of compiled user functions (Set 2)\n  Usage: linkff2 fnameso f1 [f2 f3]";
 usage += "\n  fnameso: Shared-object file name, f1,f2,f3 : User function names ";
 usage += "\n  Related commands: call link loadmodule";  
-mpiac->RegisterCommand(kw, usage, this, "External Modules");
+mpiac->RegisterCommand(kw, usage, this, grp);
 kw = "call";
 usage = "Dynamically linked user function call \n Usage: call userf [arg1 arg2 ...]";
 usage += "\n  User function : f(vector<string>& args)";
 usage += "\n  Related commands: link";  
-mpiac->RegisterCommand(kw, usage, this, "External Modules");
-
+mpiac->RegisterCommand(kw, usage, this, grp);
+
+grp = "Graphics";
+gdesc = "Basic graphics and object display commands";
+mpiac->AddHelpGroup(grp, gdesc);
 kw = "zone";
 usage = "To Divide the Graphic window \n  Usage: zone [nx=1 ny=1]";
 usage += "\n  Related commands: newwin";  
-mpiac->RegisterCommand(kw, usage, this, "Graphics");
+mpiac->RegisterCommand(kw, usage, this, grp);
 kw = "newwin";
 usage = "To Create a New Graphic window, with zones \n";
@@ -1100,8 +1106,8 @@
 usage += "    Usage: newwin [nx ny [sizeX sizeY]] ";
 usage += "\n  Related commands: zone";  
-mpiac->RegisterCommand(kw, usage, this, "Graphics");
+mpiac->RegisterCommand(kw, usage, this, grp);
 kw = "stacknext";
 usage = "Displays the next widget on stack window \n  Usage: stacknext";
-mpiac->RegisterCommand(kw, usage, this, "Graphics");
+mpiac->RegisterCommand(kw, usage, this, grp);
 
 kw = "graphicatt";
@@ -1147,5 +1153,5 @@
 usage += ">> DisplayWindow: next same win stack inset \n";
 usage += "   Related commands: setaxesatt setinsetlimits ";  
-mpiac->RegisterCommand(kw, usage, this, "Graphics");
+mpiac->RegisterCommand(kw, usage, this, grp);
 
 kw = "setaxesatt";
@@ -1167,5 +1173,5 @@
 usage += ">> defdrrect=xmin,xmax,ymin,ymax -> Defines drawing rectangle 2-D plots \n";
 usage += "          The rectangle is defined as a fraction of the widget size\n";
-mpiac->RegisterCommand(kw, usage, this, "Graphics");
+mpiac->RegisterCommand(kw, usage, this, grp);
 
 kw = "setinsetlimits";
@@ -1175,5 +1181,5 @@
 usage += " Usage: setinsetlimits xmin xmax ymin ymax";
 usage += "\n  Related commands: graphicatt /inset";  
-mpiac->RegisterCommand(kw, usage, this, "Graphics");
+mpiac->RegisterCommand(kw, usage, this, grp);
 
 kw = "drpanel";
@@ -1181,5 +1187,5 @@
 usage += " Usage: drpanel xmin xmax ymin ymax [GrAtt] [Name]";
 usage += "\n  Related commands: addtext addline addrect addcirc ...";  
-mpiac->RegisterCommand(kw, usage, this, "Graphics");
+mpiac->RegisterCommand(kw, usage, this, grp);
 
 kw = "addtext";
@@ -1348,10 +1354,10 @@
 usage += "\n  Usage: settitle TopTitle [BottomTitle] [fontAtt]";
 usage += "\n  Related commands: addtext graphicatt";  
-mpiac->RegisterCommand(kw, usage, this, "Graphics");
+mpiac->RegisterCommand(kw, usage, this, grp);
 
 kw = "addtitle";
 usage = "Set the title string (top title / bottom title) \n";
 usage += "   alias for settitle ";
-mpiac->RegisterCommand(kw, usage, this, "Graphics");
+mpiac->RegisterCommand(kw, usage, this, grp);
 
 kw = "setaxelabels";
@@ -1359,10 +1365,10 @@
 usage += "\n  Usage: setaxelabels xLabel yLabel [ColorFntAtt]";
 usage += "\n  Related commands: settitle addtext graphicatt";  
-mpiac->RegisterCommand(kw, usage, this, "Graphics");
+mpiac->RegisterCommand(kw, usage, this, grp);
 
 kw = "addaxelabels";
 usage = "Set the X and Y axis labels for the current 2D graphic object";
 usage += "   alias for setaxelabels ";
-mpiac->RegisterCommand(kw, usage, this, "Graphics");
+mpiac->RegisterCommand(kw, usage, this, grp);
 
 RegisterPIGraphicsHelp(mpiac);
Index: trunk/SophyaPI/PIext/piacmd.cc
===================================================================
--- trunk/SophyaPI/PIext/piacmd.cc	(revision 2463)
+++ trunk/SophyaPI/PIext/piacmd.cc	(revision 2465)
@@ -43,8 +43,13 @@
   inline  void  AddHelpGroup(const char * hgrp, int gid)
                     { hgrpom->AppendItem(hgrp, 20000+gid); }
+  inline  void  AddHelpGroup(string const & hgrp, int gid)
+                    { hgrpom->AppendItem(hgrp.c_str(), 20000+gid); }
   inline  void  ClearHelpList() 
                     { mNitem=0; hitemlist->DeleteAllItems(); }
   inline  void	AddHelpItem(const char * hitem) 
 		    { mNitem++;  hitemlist->AppendItem(hitem, 100+mNitem); }
+  inline  void  SetHelpTextLabel(string const & htxt, string const & hlab)
+                    { mTxt->SetText(htxt); mLab->SetLabel(hlab); }
+
 protected :
   PIStdImgApp* dap;
@@ -144,15 +149,12 @@
 mObjMgr = omg; 
 mImgApp = app;
-
-//MOVE if (mImgApp) mImgApp->GetConsole()->SetPrompt(spromptmul);
-//?? cmdhgrp["All"] = 0;
-//?? cmdgrpid = 1;
-//?? cmdhgrp["PIACmd"] = 1;
 helpwin = new PIAHelpWind(app, this);
-helpwin->AddHelpGroup("All", 0);
-// helpwin->AddHelpGroup("PIACmd", 1);
+helpwin_initdone = false;
 
 string kw = "exitpiapp";
 string grp = "PIACmd";
+string gdesc = "piapp interpreter (class PIACmd) additional builtin commands";
+AddHelpGroup(grp, gdesc);
+
 string usage = "To end the piapp session ";
 RegisterCommand(kw, usage, NULL, grp);
@@ -175,4 +177,5 @@
 cxxexwin  = new  CxxExecWind(app, cxxe);
 
+InitializeHelpWindowMenu();
 }
 
@@ -192,15 +195,9 @@
 
 /* --Methode-- */
-int PIACmd::CheckHelpGrp(string& grp)
-{
-int gid=0;
-CmdHGroup::iterator it = cmdhgrp.find(grp);
-if (it == cmdhgrp.end()) {
-  cmdgrpid++;   gid = cmdgrpid;
-  cmdhgrp[grp] = gid;
-  helpwin->AddHelpGroup(grp.c_str(), gid);
-  }
-else gid = (*it).second;
-return(gid);
+bool PIACmd::CheckHelpGrp(string& grp, int& gid, string& desc)
+{
+bool fgnewgrp = Commander::CheckHelpGrp(grp, gid, desc);
+if (helpwin_initdone && fgnewgrp) helpwin->AddHelpGroup(grp.c_str(), gid);
+return fgnewgrp;
 }
 
@@ -209,4 +206,20 @@
 {
 helpwin->ClearHelpList();
+if (gid == 0) { 
+  string htxt = "All registered commands";
+  string hlab = "All (HelpGroup)";
+  helpwin->SetHelpTextLabel(htxt, hlab);
+}
+else { 
+  CmdHGroup::iterator ith;
+  for(ith = cmdhgrp.begin(); ith != cmdhgrp.end(); ith++) {
+    if ((*ith).second.gid == gid) {
+      string hlab = (*ith).first;
+      hlab += " (HelpGroup)";
+      helpwin->SetHelpTextLabel((*ith).second.desc, hlab);
+      break;
+    }
+  } 
+}
 CmdExmap::iterator it;
 for(it = helpexmap.begin(); it != helpexmap.end(); it++) {
@@ -220,4 +233,13 @@
 }
 
+/* --Methode-- */
+void PIACmd::InitializeHelpWindowMenu()
+{
+  helpwin->AddHelpGroup("All", 0);
+  CmdHGroup::iterator it;
+  for(it = cmdhgrp.begin(); it != cmdhgrp.end(); it++) 
+    helpwin->AddHelpGroup((*it).first, (*it).second.gid);
+  helpwin_initdone = true;
+}
 
 /* Fonction */
@@ -247,12 +269,15 @@
 
 // >>>>>>>>>>> Commande d'interpreteur
-if (kw == "helpwindow") ShowHelpWindow();
+if (kw == "helpwindow") { 
+  ShowHelpWindow();
+  return 0;
+}
 // ----> Sortie d'application
 else if (kw == "exitpiapp") {
   mImgApp->Stop();
-  return(0);
+  return 0;
 }
 else return Commander::ExecuteCommandLine(kw, tokens, toks);
-
+return 0;
 }
 
Index: trunk/SophyaPI/PIext/piacmd.h
===================================================================
--- trunk/SophyaPI/PIext/piacmd.h	(revision 2463)
+++ trunk/SophyaPI/PIext/piacmd.h	(revision 2465)
@@ -45,7 +45,7 @@
     //  inline  CmdInterpreter* CurrentInterpreter() { return(curcmdi); }
 
-  inline  CmdExecutor*    BaseExecutor()  { return(basexec); }
-  inline  CmdExecutor*    ContExecutor()  { return(cntexec); } //_OP_
-  inline  PIStdImgApp*    GetImgApp() { return(mImgApp); }
+  inline  CmdExecutor*   BaseExecutor()  { return(basexec); }
+  inline  CmdExecutor*   ContExecutor()  { return(cntexec); } //_OP_
+  inline  PIStdImgApp*   GetImgApp() { return(mImgApp); }
 
 //   Pour utilisation par PIAHelpWind uniquement 
@@ -53,5 +53,6 @@
 
 protected:
-  virtual int	CheckHelpGrp(string& grp);
+  virtual bool	CheckHelpGrp(string& grp, int& gid, string& desc);
+  virtual void	InitializeHelpWindowMenu();
 
   virtual void  SetCurrentPrompt(const char* pr);
@@ -71,4 +72,6 @@
 // Fenetre d'aide interactive 
   PIAHelpWind* helpwin;
+  bool helpwin_initdone;
+// Fenetres d'execution interactive de C++ , options correspondantes
   CxxExecWind* cxxexwin;
   CxxOptionWind* cxxoptwin;
