Index: trunk/SophyaPI/PI/pidrawer.cc
===================================================================
--- trunk/SophyaPI/PI/pidrawer.cc	(revision 206)
+++ trunk/SophyaPI/PI/pidrawer.cc	(revision 207)
@@ -59,11 +59,26 @@
 
 //++
+// Titre	Les axes
+//--
+//++
 // void  SetLimits(double xmin, double xmax, double ymin, double ymax, -
 //                 int axrl=kAxeDirSame, int ayud=kAxeDirSame)
 //	Définit les limites du système de coordonnées.
+//|	kAxeDirSame , kAxeDirAuto
+//|	kAxeDirLtoR , kAxeDirRtoL  (Axe X)
+//|	kAxeDirDownUp , kAxeDirUpDown (Axe Y)	
+// void  GetAxesConfig(int& xa, int& ya) 
+//	Renvoie la configuration des axes.
+// double XMin()  XMax()
+//	Limites de l'axe X
+// double YMin()  YMax()
+//	Limites de l'axe Y
 // void  SetAxesFlags(unsigned int flags=kAxesNone)
 //	Attributs de tracé d'axes
 //|	kStdAxes , kBoxAxes , kTicks , kIntTicks , kExtTicks 
-//|	kMajTicks , kMinTicks , kLabels , kAxesDflt , kAxesNone
+//|	kMajTicks , kMinTicks , kLabels , kGridOn
+//|	kAxesDflt , kAxesNone
+// unsigned int GetAxesFlags()
+//	Renvoie les attributs de tracé d'axes  
 // void  DrawAxes(PIGraphicUC* g)
 //	Méthode de tracé des axes
@@ -95,6 +110,12 @@
   yMax = ymax;
   aXFlg = axrl;  aYFlg = ayud;
-  CalcTicks();
   limitsFixed = 1;
+}
+
+void
+PIDrawer::GetAxesConfig(int& xa, int& ya)
+{
+xa = (aXdir) ? kAxeDirRtoL : kAxeDirLtoR;
+ya = (aYdir) ? kAxeDirUpDown : kAxeDirDownUp;
 }
 
@@ -144,4 +165,21 @@
 //	Modifie les attributs graphiques de "g" à partir des attributs courant
 //	de l'objet "PIDrawer"
+// 
+// PIColors  GetFgColAtt()
+//	Renvoie l'attribut de couleur d'avant-plan
+// PIColors  GetBgColAtt()
+//	Renvoie l'attribut de couleur d'arrière-plan
+// PILineAtt  GetLineAtt()
+//	Renvoie l'attribut de ligne
+// PIFontSize GetFontSz()
+//	Renvoie l'attribut de taille de fonte
+// PIFontAtt  GetFontAtt()
+//	Renvoie l'attribut de type de fonte
+// int  GetMarkerSz()
+//	Renvoie l'attribut de taille de marker
+// PIMarker GetMarker()
+//	Renvoie l'attribut de type de marker
+// CMapId GetColMapId()
+//	Renvoie l'attribut de type de table de couleur
 //--
 
@@ -283,4 +321,7 @@
   if (mLAtt == PI_NotDefLineAtt)  g->SelLine(PI_ThinLine);
   else g->SelLine(mLAtt);
+//  On calcule les ticks 
+  CalcTicks();
+
   unsigned int flags = axesFlags;
 
Index: trunk/SophyaPI/PI/pidrawer.h
===================================================================
--- trunk/SophyaPI/PI/pidrawer.h	(revision 206)
+++ trunk/SophyaPI/PI/pidrawer.h	(revision 207)
@@ -45,24 +45,38 @@
   virtual void       UpdateLimits();   // Calcule et change les limites  
 
-  double XMin() const {return xMin;}
-  double XMax() const {return xMax;}
-  double YMin() const {return yMin;}
-  double YMax() const {return yMax;}
+  inline double      XMin() const {return xMin;}
+  inline double      XMax() const {return xMax;}
+  inline double      YMin() const {return yMin;}
+  inline double      YMax() const {return yMax;}
+
+  void                GetAxesConfig(int& xa, int& ya);
   inline unsigned int GetAxesFlags() { return(axesFlags); }
   
   inline PIGraphicUC*    GetGraphicUC() { return(mGrUC); }
 
-  int    LimitsFixed() const {return limitsFixed;}
-  void   FreeLimits() {limitsFixed = 0;}
-
-  void               SetColAtt(PIColors fg=PI_NotDefColor, 
+  inline int          LimitsFixed() const {return limitsFixed;}
+  inline void         FreeLimits() {limitsFixed = 0;}
+
+// Changement des attributs graphiques
+  virtual void       SetColAtt(PIColors fg=PI_NotDefColor, 
                                PIColors bg=PI_NotDefColor);
-  void               SetLineAtt(PILineAtt lat=PI_NotDefLineAtt);
-  void               SetFontAtt(PIFontSize fsz=PI_NotDefFontSize,
+  virtual void       SetLineAtt(PILineAtt lat=PI_NotDefLineAtt);
+  virtual void       SetFontAtt(PIFontSize fsz=PI_NotDefFontSize,
                                 PIFontAtt fat=PI_NotDefFontAtt);
-  void               SetMarkerAtt(int sz=-1, PIMarker mrk=PI_NotDefMarker);
-  void               SetColMapId(CMapId cid=CMAP_OTHER);
+  virtual void       SetMarkerAtt(int sz=-1, PIMarker mrk=PI_NotDefMarker);
+  virtual void       SetColMapId(CMapId cid=CMAP_OTHER);
 
   void               SelGraAtt(PIGraphicUC* g);
+
+// Acces aux attributs graphiques
+  inline PIColors    GetFgColAtt()  { return(mFCol); }
+  inline PIColors    GetBgColAtt()  { return(mBCol); }
+  inline PILineAtt   GetLineAtt()   { return(mLAtt); }
+  inline PIFontSize  GetFontSz()    { return(mFSz);  }
+  inline PIFontAtt   GetFontAtt()   { return(mFAtt); }
+  inline int         GetMarkerSz()  { return(mMSz);  }
+  inline PIMarker    GetMarker()    { return(mMrk);  } 
+  inline CMapId      GetColMapId()  { return(mCmapid); }
+
 
 //  --- Methode static ----
Index: trunk/SophyaPI/PI/pidrwtools.cc
===================================================================
--- trunk/SophyaPI/PI/pidrwtools.cc	(revision 206)
+++ trunk/SophyaPI/PI/pidrwtools.cc	(revision 207)
@@ -54,5 +54,5 @@
 spy = bsy/4;
 
-int wszx = 5*spx+3.5*bsx; 
+int wszx = 5*spx+4.25*bsx; 
 int wszy = (6+3*0.85)*(spy+bsy);
 SetSize(wszx, wszy);
@@ -70,8 +70,8 @@
 cpy = spy*2;
 cpx += spx+1.5*bsx; 
-mText[0] = new PIText(this, "x_min_max", 2.0*bsx, bsy, cpx, cpy);
+mText[0] = new PIText(this, "x_min_max", 2.75*bsx, bsy, cpx, cpy);
 mText[0]->SetText("-1.0  1.0");
 cpy += spy+bsy; 
-mText[1] = new PIText(this, "y_min_max", 2.0*bsx, bsy, cpx, cpy);
+mText[1] = new PIText(this, "y_min_max", 2.75*bsx, bsy, cpx, cpy);
 mText[1]->SetText("-1.0  1.0");
 mText[0]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
@@ -80,9 +80,9 @@
 cpx = spx+0.25*bsx;
 cpy += spy+bsy; 
-mCkb[0] = new PICheckBox(this,"X-RtoL", 2000, bsx, bsy, cpx, cpy);
-cpx += spx+bsx; 
-mCkb[1] = new PICheckBox(this,"Y-UpDn", 2000, bsx, bsy, cpx, cpy);
-cpx += spx+bsx; 
-mCkb[2] = new PICheckBox(this,"Grid", 2000, bsx, bsy, cpx, cpy);
+mCkb[0] = new PICheckBox(this,"X-RtoL", 2000, bsx*1.25, bsy, cpx, cpy);
+cpx += spx+1.25*bsx; 
+mCkb[1] = new PICheckBox(this,"Y-UpDn", 2000, bsx*1.25, bsy, cpx, cpy);
+cpx += spx+1.25*bsx; 
+mCkb[2] = new PICheckBox(this,"Grid", 2000, bsx*1.25, bsy, cpx, cpy);
 mCkb[0]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
 mCkb[1]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
@@ -91,9 +91,9 @@
 cpy += spy+bsy; 
 cpx = 2.5*spx;;
-mBut[0] = new PIButton(this, "Apply", 2600, bsx, bsy, cpx, cpy);
-cpx += bsx*1.25;
-mBut[1] = new PIButton(this, "Auto", 2700, bsx, bsy, cpx, cpy);
-cpx += bsx*1.25;
-mBut[2] = new PIButton(this, "Dismiss", 2500,  bsx, bsy, cpx, cpy);
+mBut[0] = new PIButton(this, "Apply", 2600, bsx*1.25, bsy, cpx, cpy);
+cpx += bsx*1.50;
+mBut[1] = new PIButton(this, "Auto", 2700, bsx*1.25, bsy, cpx, cpy);
+cpx += bsx*1.50;
+mBut[2] = new PIButton(this, "Dismiss", 2500,  bsx*1.25, bsy, cpx, cpy);
 mBut[0]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
 mBut[1]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
@@ -110,5 +110,5 @@
 bsy = 0.85*bsy;   spy = 0.85*spy;
 
-mOpt[0] = new PIOptMenu(this, "bwt-opt-0", bsx*1.75, bsy, cpx, cpy);
+mOpt[0] = new PIOptMenu(this, "bwt-opt-0", bsx*2.0, bsy, cpx, cpy);
 mOpt[0]->AppendItem("Def.Col", 100);
 mOpt[0]->AppendItem("Black", 101);
@@ -131,6 +131,6 @@
 mOpt[0]->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic);
 
-cpx += spx+1.75*bsx; 
-mOpt[1] = new PIOptMenu(this, "bwt-opt-1", bsx*1.75, bsy, cpx, cpy);
+cpx += spx+2.25*bsx; 
+mOpt[1] = new PIOptMenu(this, "bwt-opt-1", bsx*2.0, bsy, cpx, cpy);
 mOpt[1]->AppendItem("No.CMap", 200);
 mOpt[1]->AppendItem("Grey32", 201);
@@ -150,5 +150,5 @@
 cpx = 2*spx;
 cpy += spy+bsy;
-mOpt[2] = new PIOptMenu(this, "bwt-opt-2", bsx*1.75, bsy, cpx, cpy);
+mOpt[2] = new PIOptMenu(this, "bwt-opt-2", bsx*2.0, bsy, cpx, cpy);
 mOpt[2]->AppendItem("Def.Mrk", 300);
 mOpt[2]->AppendItem("Mrk Dot(.)", 301);
@@ -166,6 +166,6 @@
 mOpt[2]->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic);
 
-cpx += spx+1.75*bsx; 
-mOpt[3] = new PIOptMenu(this, "bwt-opt-3", bsx*1.75, bsy, cpx, cpy);
+cpx += spx+2.25*bsx; 
+mOpt[3] = new PIOptMenu(this, "bwt-opt-3", bsx*2.0, bsy, cpx, cpy);
 mOpt[3]->AppendItem("Mrk 1 pt", 401);
 mOpt[3]->AppendItem("Mrk 3 pt", 403);
@@ -181,5 +181,5 @@
 cpx = 2*spx;
 cpy += spy+bsy;
-mOpt[4] = new PIOptMenu(this, "bwt-opt-4", bsx*1.75, bsy, cpx, cpy);
+mOpt[4] = new PIOptMenu(this, "bwt-opt-4", bsx*2.0, bsy, cpx, cpy);
 mOpt[4]->AppendItem("Def.Font", 500);
 mOpt[4]->AppendItem("Normal-Font", 511);
@@ -198,6 +198,6 @@
 mOpt[4]->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic);
 
-cpx += spx+1.75*bsx; 
-mOpt[5] = new PIOptMenu(this, "bwt-opt-5", bsx*1.75, bsy, cpx, cpy);
+cpx += spx+2.25*bsx; 
+mOpt[5] = new PIOptMenu(this, "bwt-opt-5", bsx*2.0, bsy, cpx, cpy);
 mOpt[5]->AppendItem("Def.Line", 600);
 mOpt[5]->AppendItem("Thin-Line", 601);
@@ -213,5 +213,5 @@
 mOpt[5]->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic);
 
-cpx = 2*spx;
+cpx = spx;
 cpy += spy+bsyo;
 bsy = bsyo; spy = spyo;
@@ -227,10 +227,13 @@
 mNlb->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic);
 
-cpx = wszx-1.7*bsx-3*spx;
-mButcf[0] = new PIButton(this, "SetAtt", 2800, bsx*0.85, bsy, cpx, cpy);
-cpx += 0.85*bsx+spx;
-mButcf[1] = new PIButton(this, "Refresh", 2900, bsx*0.85, bsy, cpx, cpy);
+cpx = wszx-2.5*bsx-3*spx;
+mButcf[0] = new PIButton(this, "GetAtt", 2800, bsx*0.80, bsy, cpx, cpy);
+cpx += 0.80*bsx+spx;
+mButcf[1] = new PIButton(this, "SetAtt", 2900, bsx*0.80, bsy, cpx, cpy);
+cpx += 0.80*bsx+spx;
+mButcf[2] = new PIButton(this, "Refresh", 3000, bsx*0.90, bsy, cpx, cpy);
 mButcf[0]->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic);
 mButcf[1]->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic);
+mButcf[2]->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic);
 
 cwdrwt = this;
@@ -248,8 +251,8 @@
   delete mBut[i];
   delete mText[i];
-  delete mButdr[i];
   delete mButcf[i];
   }
-for(i=0; i<3; i++) delete mCkb[i];
+
+for(i=0; i<3; i++) { delete mCkb[i];   delete mButcf[i]; }
 delete mBut[2];
 for(i=0; i<6; i++)  delete mOpt[i];
@@ -289,8 +292,16 @@
 char buff[92]; 
 mNDr = 0;
+
 if (mCurBW != NULL)  { 
   mNDr = mCurBW->NbDrawers()-1;
   if (mNDr < 0)  mNDr = 0;
   }
+
+UpdateAttFromDrawer();
+
+mCkb[0]->SetState(false);
+mCkb[1]->SetState(false);
+mCkb[2]->SetState(false);
+
 if ((mCurBW != NULL) && ( mCurBW->kind() == PIScDrawWdg::ClassId ) ) {
   PIScDrawWdg* scd = ( PIScDrawWdg*)mCurBW;
@@ -299,4 +310,9 @@
   sprintf(buff, "%g  %g", scd->YMin(), scd->YMax());
   mText[1]->SetText(buff);
+  int xa, ya;
+  scd->GetAxesConfig(xa, ya);
+  if (xa & kAxeDirRtoL) mCkb[0]->SetState(true);
+  if (ya & kAxeDirUpDown)  mCkb[1]->SetState(true);
+  if (scd->GetAxesFlags() & kGridOn) mCkb[2]->SetState(true);
   }
 else {
@@ -307,7 +323,14 @@
 mNlb->SetLabel(buff);
 
-mCkb[0]->SetState(false);
-mCkb[1]->SetState(false);
-mCkb[2]->SetState(false);
+
+
+return;
+}
+
+/* --Methode-- */
+void PIDrwTools::UpdateAttFromDrawer()
+{
+
+PIDrawer* dr = NULL;
 
 mOpt[0]->SetValue(100);
@@ -318,7 +341,39 @@
 mOpt[5]->SetValue(600);
 
+if ( (mCurBW != NULL) && (mCurBW->NbDrawers() > 0) ) 
+  dr = mCurBW->GetDrawer(mNDr);
+
+if (!dr)  return;
+int jj,kk;
+PIColors fc = dr->GetFgColAtt();
+for(kk=0; kk<17; kk++) 
+  if (fc == cols[kk])  { mOpt[0]->SetValue(100+kk);  break; }    
+CMapId cmi = dr->GetColMapId();
+for(kk=0; kk<11; kk++)
+  if (cmi == cmap[kk]) { mOpt[1]->SetValue(200+kk);  break; }  
+PIMarker mk = dr->GetMarker();   
+for(kk=0; kk<12; kk++) 
+  if (mk == mrk[kk])   { mOpt[2]->SetValue(300+kk);  break; }
+kk = dr->GetMarkerSz();
+if (kk < 1)  kk = 1;
+if (kk > 15) kk = 15;
+if (kk%2 == 0) kk++;
+mOpt[3]->SetValue(400+kk);
+PIFontAtt fat = dr->GetFontAtt();
+PIFontSize fsz = dr->GetFontSz();
+for(kk=0; kk<4; kk++)
+  if (fat ==  fntatt[kk]) break;
+for(jj=0; jj<5; jj++) 
+  if (fsz == fntsz[jj])  break;
+
+if (kk >= 4) kk = 3;
+if (jj >= 5) jj = 4;
+mOpt[4]->SetValue(500+jj*10+kk);
+PILineAtt lat = dr->GetLineAtt();
+for(kk=0; kk<10; kk++)
+  if (lat == line[kk])   { mOpt[5]->SetValue(600+kk);  break; }
+
 return;
 }
-
 
 /* --Methode-- */
@@ -360,5 +415,9 @@
 
   case 2800 :
+    UpdateAttFromDrawer();
+    break;
+
   case 2900 :
+  case 3000 :
     {
     PIDrawer* drw = mCurBW->GetDrawer(mNDr);
@@ -381,5 +440,5 @@
     if ( (k < 0) || (k > 9) )  k = 0;
     drw->SetLineAtt(line[k]);
-    if (msg == 2800) drw->Refresh();
+    if (msg == 2900) drw->Refresh();
     else mCurBW->Refresh();
     }
Index: trunk/SophyaPI/PI/pidrwtools.h
===================================================================
--- trunk/SophyaPI/PI/pidrwtools.h	(revision 206)
+++ trunk/SophyaPI/PI/pidrwtools.h	(revision 207)
@@ -30,4 +30,5 @@
 
 protected:
+  virtual void  UpdateAttFromDrawer();
   virtual void  Process(PIMessage msg, PIMsgHandler* sender, void* data=NULL);
 
@@ -42,5 +43,5 @@
   PILabel* mNlb;
   PIButton* mButdr[2];
-  PIButton* mButcf[2];
+  PIButton* mButcf[3];
   int mNDr;
   int mtyp, msz;
Index: trunk/SophyaPI/PI/piscdrawwdg.h
===================================================================
--- trunk/SophyaPI/PI/piscdrawwdg.h	(revision 206)
+++ trunk/SophyaPI/PI/piscdrawwdg.h	(revision 207)
@@ -32,6 +32,4 @@
   inline void        SetAxesFlags(unsigned int flags=kBoxAxes | kExtTicks | kLabels) 
                                   { mBDrw->SetAxesFlags(flags); }
-  inline unsigned int GetAxesFlags() { return(mBDrw->GetAxesFlags()); }
-
   inline void	     SetTitles(const char* tt=NULL, const char* tb=NULL)
                             { mBDrw->SetTitles(tt, tb); }
@@ -42,10 +40,16 @@
   inline PIElDrawer* BaseDrawer() { return mBDrw; };
 
-  double XMin() const {return mBDrw->XMin();}
-  double XMax() const {return mBDrw->XMax();}
-  double YMin() const {return mBDrw->YMin();}
-  double YMax() const {return mBDrw->YMax();}
-  double XPPos() const { return mPPos[0]; }
-  double YPPos() const { return mPPos[1]; }
+// Configuration et limites des axes 
+  inline unsigned int GetAxesFlags() { return(mBDrw->GetAxesFlags()); }
+  inline void         GetAxesConfig(int& xa, int& ya) { mBDrw->GetAxesConfig(xa, ya); }
+
+  inline double XMin() const {return mBDrw->XMin();}
+  inline double XMax() const {return mBDrw->XMax();}
+  inline double YMin() const {return mBDrw->YMin();}
+  inline double YMax() const {return mBDrw->YMax();}
+
+  inline double XPPos() const { return mPPos[0]; }
+  inline double YPPos() const { return mPPos[1]; }
+
   int    LimitsFixed() const {return mBDrw->LimitsFixed();}
   void   FreeLimits() { mBDrw->FreeLimits(); }
