Changeset 1855 in Sophya
- Timestamp:
- Jan 12, 2002, 1:41:47 AM (24 years ago)
- Location:
- trunk/SophyaPI/PI
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/pidrawer.cc
r1851 r1855 7 7 #include <strings.h> 8 8 #include <iostream.h> 9 #include <typeinfo>9 // #include <typeinfo> 10 10 #include "pidrawer.h" 11 11 … … 66 66 67 67 // Nom par defaut : Le nom de la classe 68 mName = typeid(*this).name(); 68 // mName = typeid(*this).name(); 69 mName = "PIDrawer"; 69 70 // Par defaut, pas de fenetre de controle specifique 70 71 mFgSpecContWind = false; … … 552 553 int kk; 553 554 554 g->SelFontSz(xMajTickLen*3., mFAtt); 555 if (mFSz == PI_NotDefFontSize) 556 g->SelFontSz(xMajTickLen*3., mFAtt); 555 557 556 558 // Choix du bon format pour les labels des axes; … … 581 583 { 582 584 double xOffset = 0; 583 g->SelFontSz(xMajTickLen*3., mFAtt); 585 586 if (mFSz == PI_NotDefFontSize) 587 g->SelFontSz(xMajTickLen*3., mFAtt); 584 588 585 589 // Choix du bon format pour les labels des axes; -
trunk/SophyaPI/PI/pidrwtools.cc
r1852 r1855 80 80 if (mCurBW == cbw) return; 81 81 mCurBW = cbw; 82 cwdrwt->UpdateControlsFromDrawer(-1); 82 if (cwdrwt != NULL) 83 cwdrwt->UpdateControlsFromDrawer(-9); 83 84 } 84 85 … … 256 257 mButdr[0] = new PIButton(this, "-", 1501, bsy, bsy, cpx, cpy); 257 258 cpx += bsy+0.25*spy; 258 mNlb = new PILabel(this,"NumDr", 1. 5*bsy, bsy, cpx, cpy);259 mNlb = new PILabel(this,"NumDr", 1.2*bsy, bsy, cpx, cpy); 259 260 mNlb->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic); 260 261 mNlb->SetLabel(""); 261 262 mNDr = 0; 262 cpx += 1. 5*bsy+0.25*spy;263 cpx += 1.2*bsy+0.25*spy; 263 264 mButdr[1] = new PIButton(this, "+", 1502, bsy, bsy, cpx, cpy); 264 265 mButdr[0]->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic); … … 268 269 mButdr[kb]->SetUnSensitive(); 269 270 } 270 cpx += 2*spx;271 cpx += bsy+2*spx; 271 272 mDrName = new PILabel(this,"DrName", wszx-2*spx-cpx, bsy, cpx, cpy); 272 273 mDrName->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic); … … 276 277 cpy += bsy+spy; 277 278 cpx = 2*spx; 278 int butszx = 0. 8*bsx;279 int butszx = 0.7*bsx; 279 280 mButcf[0] = new PIButton(this, "GetAtt", 2500, butszx, bsy, cpx, cpy); 280 281 cpx += butszx+spx; … … 349 350 { 350 351 PIWindow::Show(); 351 UpdateControlsFromDrawer(- 1);352 UpdateControlsFromDrawer(-9); 352 353 UpdateAttFromDrawer(); 353 354 return; … … 364 365 365 366 if (mCurBW != NULL) { 366 if (numdr < 0) {367 if (numdr < -1) { 367 368 if (mCurBW->NbDrawers() > 0) mNDr = mCurBW->GetActiveDrawerNum(); 368 369 else mNDr = -1; … … 370 371 else { 371 372 if (mCurBW->NbDrawers() > 0) { 373 mNDr = numdr; 372 374 if (mNDr < 0) mNDr = 0; 373 else if (mNDr >= mCurBW->NbDrawers()) mNDr = mCurBW->NbDrawers() ;375 else if (mNDr >= mCurBW->NbDrawers()) mNDr = mCurBW->NbDrawers()-1; 374 376 } 375 377 else mNDr = -1; … … 381 383 382 384 if (butsensnew == 2) { 383 mDrName->SetLabel(dr->Name());384 385 char strg[64]; 385 386 sprintf(strg,"%d",mNDr); 386 387 mNlb->SetLabel(strg); 388 string wdrname = mCurBW->Nom()+":"+dr->Name(); 389 mDrName->SetLabel(wdrname); 387 390 } 388 391 else if (mButSens != butsensnew) { 389 392 if(mButSens == 2) mNlb->SetLabel(""); 390 if (butsensnew == 1) 391 mDrName->SetLabel("No-Drawer"); 393 if (butsensnew == 1) mDrName->SetLabel(mCurBW->Nom()); 392 394 else mDrName->SetLabel("No-BaseWdg"); 393 395 } -
trunk/SophyaPI/PI/piscdrawwdg.cc
r1827 r1855 82 82 83 83 mBDrw = new PIElDrawer; 84 mBDrw->SetName("AxesDrw"); 84 85 SetLimits(-1.,1.,-1.,1.,kAxeDirLtoR,kAxeDirDownUp); 85 86 SetAxesFlags(kBoxAxes | kExtTicks | kLabels); … … 583 584 mAx = ax; 584 585 mAy = ay; 586 mName = "YfXDrawer"; 585 587 } 586 588 -
trunk/SophyaPI/PI/pisurfdr.cc
r537 r1855 65 65 double dzz = (mZmax-mZmin)*0.05; 66 66 mLut = new LUT(zmin-dzz*2, zmax-dzz, 256); 67 68 SetName("SurfDrw"); 67 69 } 68 70 -
trunk/SophyaPI/PI/psfile.cc
r1851 r1855 141 141 { dup stringwidth pop 2 div neg %% get minus(string length/2) \n\ 142 142 0 rmoveto gs 1 -1 sc show gr } bind def \n\ 143 /hr vbshstr %% Horizontal-Right Vertical-BaseLine justified \n\143 /hrshstr %% Horizontal-Right Vertical-BaseLine justified \n\ 144 144 { dup stringwidth pop neg %% get minus(string width) \n\ 145 145 0 rmoveto gs 1 -1 sc show gr } bind def \n\
Note:
See TracChangeset
for help on using the changeset viewer.