Changeset 1855 in Sophya


Ignore:
Timestamp:
Jan 12, 2002, 1:41:47 AM (24 years ago)
Author:
ansari
Message:

Correction diverses (PIDrwTools en particulier) Reza 11/01/2001

Location:
trunk/SophyaPI/PI
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PI/pidrawer.cc

    r1851 r1855  
    77#include <strings.h>
    88#include <iostream.h>
    9 #include <typeinfo>
     9// #include <typeinfo>
    1010#include "pidrawer.h"
    1111
     
    6666
    6767  // Nom par defaut : Le nom de la classe
    68   mName = typeid(*this).name();
     68  //  mName = typeid(*this).name();
     69  mName = "PIDrawer";
    6970  // Par defaut, pas de fenetre de controle specifique
    7071  mFgSpecContWind = false;
     
    552553  int kk;
    553554
    554   g->SelFontSz(xMajTickLen*3., mFAtt);
     555  if (mFSz == PI_NotDefFontSize)
     556    g->SelFontSz(xMajTickLen*3., mFAtt);
    555557
    556558  // Choix du bon format pour les labels des axes;
     
    581583{
    582584  double xOffset = 0;
    583   g->SelFontSz(xMajTickLen*3., mFAtt);
     585
     586  if (mFSz == PI_NotDefFontSize)
     587    g->SelFontSz(xMajTickLen*3., mFAtt);
    584588
    585589  // Choix du bon format pour les labels des axes;
  • trunk/SophyaPI/PI/pidrwtools.cc

    r1852 r1855  
    8080if (mCurBW == cbw) return;
    8181mCurBW = cbw;
    82 cwdrwt->UpdateControlsFromDrawer(-1);
     82if (cwdrwt != NULL)
     83  cwdrwt->UpdateControlsFromDrawer(-9);
    8384}
    8485
     
    256257mButdr[0] = new PIButton(this, "-", 1501, bsy, bsy, cpx, cpy);
    257258cpx += bsy+0.25*spy;
    258 mNlb = new PILabel(this,"NumDr", 1.5*bsy, bsy, cpx, cpy);
     259mNlb = new PILabel(this,"NumDr", 1.2*bsy, bsy, cpx, cpy);
    259260mNlb->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic);
    260261mNlb->SetLabel("");
    261262mNDr = 0;
    262 cpx += 1.5*bsy+0.25*spy;
     263cpx += 1.2*bsy+0.25*spy;
    263264mButdr[1] = new PIButton(this, "+", 1502, bsy, bsy, cpx, cpy);
    264265mButdr[0]->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic);
     
    268269  mButdr[kb]->SetUnSensitive();
    269270}
    270 cpx += 2*spx;
     271cpx += bsy+2*spx;
    271272mDrName = new PILabel(this,"DrName", wszx-2*spx-cpx, bsy, cpx, cpy);
    272273mDrName->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic);
     
    276277cpy += bsy+spy;
    277278cpx = 2*spx;
    278 int butszx = 0.8*bsx;
     279int butszx = 0.7*bsx;
    279280mButcf[0] = new PIButton(this, "GetAtt", 2500, butszx, bsy, cpx, cpy);
    280281cpx += butszx+spx;
     
    349350{
    350351PIWindow::Show();
    351 UpdateControlsFromDrawer(-1);
     352UpdateControlsFromDrawer(-9);
    352353UpdateAttFromDrawer();
    353354return;
     
    364365 
    365366  if (mCurBW != NULL) {
    366     if (numdr < 0) {
     367    if (numdr < -1) {
    367368      if (mCurBW->NbDrawers() > 0)  mNDr = mCurBW->GetActiveDrawerNum();
    368369      else mNDr = -1;
     
    370371    else {
    371372      if (mCurBW->NbDrawers() > 0) {
     373        mNDr = numdr;
    372374        if (mNDr < 0)  mNDr = 0;
    373         else if (mNDr >= mCurBW->NbDrawers()) mNDr = mCurBW->NbDrawers();
     375        else if (mNDr >= mCurBW->NbDrawers()) mNDr = mCurBW->NbDrawers()-1;
    374376      }
    375377      else mNDr = -1;
     
    381383
    382384  if (butsensnew == 2) {
    383     mDrName->SetLabel(dr->Name());
    384385    char strg[64];
    385386    sprintf(strg,"%d",mNDr);
    386387    mNlb->SetLabel(strg);
     388    string wdrname = mCurBW->Nom()+":"+dr->Name();
     389    mDrName->SetLabel(wdrname);
    387390  }
    388391  else if (mButSens != butsensnew) {
    389392    if(mButSens == 2)  mNlb->SetLabel("");
    390     if (butsensnew == 1)
    391       mDrName->SetLabel("No-Drawer");
     393    if (butsensnew == 1)   mDrName->SetLabel(mCurBW->Nom());
    392394    else  mDrName->SetLabel("No-BaseWdg");
    393395  }
  • trunk/SophyaPI/PI/piscdrawwdg.cc

    r1827 r1855  
    8282
    8383  mBDrw = new PIElDrawer;
     84  mBDrw->SetName("AxesDrw");
    8485  SetLimits(-1.,1.,-1.,1.,kAxeDirLtoR,kAxeDirDownUp);
    8586  SetAxesFlags(kBoxAxes | kExtTicks | kLabels); 
     
    583584  mAx = ax;
    584585  mAy = ay;
     586  mName = "YfXDrawer";
    585587}
    586588
  • trunk/SophyaPI/PI/pisurfdr.cc

    r537 r1855  
    6565  double dzz = (mZmax-mZmin)*0.05;
    6666  mLut = new LUT(zmin-dzz*2, zmax-dzz, 256);
     67
     68  SetName("SurfDrw");
    6769}
    6870
  • trunk/SophyaPI/PI/psfile.cc

    r1851 r1855  
    141141{ dup stringwidth pop 2 div neg  %% get minus(string length/2)  \n\
    142142  0 rmoveto gs 1 -1 sc show gr } bind def \n\
    143 /hrvbshstr   %% Horizontal-Right Vertical-BaseLine justified \n\
     143/hrshstr   %% Horizontal-Right Vertical-BaseLine justified \n\
    144144{ dup stringwidth pop neg  %% get minus(string width)  \n\
    145145  0 rmoveto gs 1 -1 sc show gr } bind def \n\
Note: See TracChangeset for help on using the changeset viewer.