Index: trunk/SophyaPI/PIext/piacmd.cc
===================================================================
--- trunk/SophyaPI/PIext/piacmd.cc	(revision 208)
+++ trunk/SophyaPI/PIext/piacmd.cc	(revision 210)
@@ -139,5 +139,5 @@
   cout << "help  shelp  exec  set  listvars  traceon  traceoff \n"; 
   cout << "timingon  timingoff  shell \n"; 
-  cout << "link  call    zone  gratt  stacknext \n" ;
+  cout << "link  call    zone  grwin  gratt  stacknext \n" ;
   cout << "openppf  saveall  listobjs openfits savefits \n"; 
   cout << "print rename  del delobjs \n";
@@ -156,6 +156,7 @@
   cout << "traceon/off  --  timingon/off  --  shell cmdline\n";
   cout << "link fnameso f1 [f2 f3]  --   call userf [arg1 arg2 ...]\n";
-  cout << "zone nx ny  --  gratt attributes_list  --  stacknext \n";
-  cout << "openfits file -- openppf file -- saveall file -- listobjs --\n";
+  cout << "zone nx ny -- newwin nx ny -- gratt attributes_list -- stacknext \n";
+  cout << "openppf file -- saveall file -- listobjs \n";
+  cout << "openfits file -- savefits nomobj file \n";
   cout << "print nomobj -- rename nomobj nomnew -- del nomobj -- delobjs pattern (*,?) \n";
   cout << "newh1d nomh xmin xmax nbin  --  newh2d nomh xmin xmax nbinx ymin ymax nbiny\n";
@@ -224,5 +225,12 @@
   nx = ny = 1;
   nx = atoi(tokens[0].c_str());    ny = atoi(tokens[1].c_str());
-  mObjMgr->SetGraphicWinZone(nx, ny);
+  mObjMgr->SetGraphicWinZone(nx, ny, false);
+  }  
+else if (kw == "newwin") {
+  if (tokens.size() < 2) { cout << "PIACmd::Do() Usage: newwin nx ny" << endl;  return(0); }
+  int nx, ny;
+  nx = ny = 1;
+  nx = atoi(tokens[0].c_str());    ny = atoi(tokens[1].c_str());
+  mObjMgr->SetGraphicWinZone(nx, ny, true);
   }  
 else if (kw == "gratt") {
Index: trunk/SophyaPI/PIext/pihisto2d.cc
===================================================================
--- trunk/SophyaPI/PIext/pihisto2d.cc	(revision 208)
+++ trunk/SophyaPI/PIext/pihisto2d.cc	(revision 210)
@@ -442,4 +442,14 @@
 
 //++
+void PIH2DWdg::ActivateSpecializedControls()
+//	Pour activer les contrôles spécifiques pour l'affichage Histo-2D	
+//--
+{
+h2dWinArg->SetPIH2DWdg(this);
+h2dWinArg->SetMsgParent((PIMsgHandler*)this);
+if(!h2dWinArg->Visible()) h2dWinArg->Show();
+}
+
+//++
 void PIH2DWdg::But3Press(int x, int y)
 //
@@ -451,7 +461,5 @@
 //--
 {
-h2dWinArg->SetPIH2DWdg(this);
-h2dWinArg->SetMsgParent((PIMsgHandler*)this);
-if(!h2dWinArg->Visible()) h2dWinArg->Show();
+ActivateSpecializedControls();
 if(dbg) printf("PIH2DWdg::But3Press(%d,%d) h2dWinArg=%lx\n"
               ,x,y,(long)h2dWinArg);
Index: trunk/SophyaPI/PIext/pihisto2d.h
===================================================================
--- trunk/SophyaPI/PIext/pihisto2d.h	(revision 208)
+++ trunk/SophyaPI/PIext/pihisto2d.h	(revision 210)
@@ -1,2 +1,7 @@
+// This may look like C code, but it is really -*- C++ -*-
+// Module PIext :   PIHisto2D PIH2DWdg 
+// Traceur Histo-2D    C. Magneville 97-98
+// LAL (Orsay) / IN2P3-CNRS  DAPNIA/SPP (Saclay) / CEA
+
 #ifndef PIHISTO2D_H
 #define PIHISTO2D_H
@@ -65,4 +70,5 @@
 
   virtual string     GetClickText(double x, double y); 
+  virtual void	     ActivateSpecializedControls();   // Pour activer des controles specifiques
   virtual void       But3Press(int x, int y);
 
Index: trunk/SophyaPI/PIext/pistdimgapp.cc
===================================================================
--- trunk/SophyaPI/PIext/pistdimgapp.cc	(revision 208)
+++ trunk/SophyaPI/PIext/pistdimgapp.cc	(revision 210)
@@ -515,6 +515,8 @@
 char buff[64];
 mWId++;
-sprintf(buff, "PI-GraphicWin (%d)",mWId); 
-PIZoneWindow* win = new PIZoneWindow(this,  buff, PIWK_normal, nx, ny, sx, sy, 0, 0);
+int px, py; 
+MainWin()->GetScreenPos(px, py);
+sprintf(buff, "PI-GraphicWin (%d)",mWId);
+PIZoneWindow* win = new PIZoneWindow(this,  buff, PIWK_normal, nx, ny, sx, sy, px+MainWin()->XSize()+30, 0);
 win->SetUserData(NULL, ny*10+nx);  // UserFlag= nY*10 + nX  
 mWList[mWId*10+1] = (PIWindow*)win;
@@ -531,6 +533,8 @@
 char buff[64];
 mWId++;
+int px, py; 
+MainWin()->GetScreenPos(px, py);
 sprintf(buff, "PI-StackWin (%d)",mWId); 
-PIStackWindow* win = new PIStackWindow(this,  buff, PIWK_normal, sx, sy, 0, 0);
+PIStackWindow* win = new PIStackWindow(this,  buff, PIWK_normal, sx, sy, px+MainWin()->XSize()+30, 100);
 win->SetUserData(NULL, 9999);  // UserFlag= 9999 
 mWList[mWId*10+2] = (PIWindow*)win;
@@ -576,6 +580,8 @@
   default :      // Fenetre ordinaire
     {
+    int pwx, pwy; 
+    MainWin()->GetScreenPos(pwx, pwy);
     if ( (sx < 50) && (sy < 50) )   sx = sy = 300+mFgScSz*100; 
-    rw = new PIWindow(this,  nom, PIWK_normal, sx, sy, 0, 0);
+    rw = new PIWindow(this,  nom, PIWK_normal, sx, sy, pwx+MainWin()->XSize()+30, 300);
     rw->SetUserData(NULL, 0);  // UserFlag= 0 
     mWId++;
