Changeset 1884 in Sophya
- Timestamp:
- Jan 22, 2002, 4:56:12 PM (24 years ago)
- Location:
- trunk/SophyaPI
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/pidrawer.cc
r1879 r1884 534 534 535 535 void 536 PIDrawer::GetClickInfo(string& info, double x, double y)536 PIDrawer::GetClickInfo(string& info,double x,double y,double x0,double y0,bool fgdiff) 537 537 { 538 538 } -
trunk/SophyaPI/PI/pidrawer.h
r1879 r1884 44 44 45 45 // Renvoie une information liee au drawer pour une position x,y 46 virtual void GetClickInfo(string& info, double x, double y); 46 virtual void GetClickInfo(string& info,double x,double y 47 ,double x0=0.,double y0=0.,bool fgdiff=false); 47 48 48 49 virtual void Refresh(); // Recalcule les limites et reaffiche -
trunk/SophyaPI/PI/piscdrawwdg.cc
r1882 r1884 242 242 // Donne le texte a afficher pour position x,y 243 243 { 244 char buff[ 128];244 char buff[64]; 245 245 PIDrawer* dr = GetActiveDrawer(); 246 strcpy(buff,"X= "); sprintf(buff+3, mFormatOpt[0].c_str(), x); 247 info += buff;248 strcpy(buff," Y= "); sprintf(buff+4, mFormatOpt[1].c_str(), y);249 if (mFgDeltaPos)250 sprintf(buff +strlen(buff)," (dX=%g, dY=%g)",251 x-mPosForDelta[0], y-mPosForDelta[1]); 252 info += buff;246 247 info+="X="; sprintf(buff,mFormatOpt[0].c_str(),x); info += buff; 248 info+=" Y="; sprintf(buff,mFormatOpt[1].c_str(),y); info += buff; 249 if(mFgDeltaPos) { 250 sprintf(buff," (dX=%g, dY=%g)",x-mPosForDelta[0],y-mPosForDelta[1]); 251 info += buff; 252 } 253 253 254 254 if (dr) { 255 info += " ";info += dr->Name();256 dr->GetClickInfo(info, x, y);255 info += " "; // info += dr->Name(); 256 dr->GetClickInfo(info,x,y,mPosForDelta[0],mPosForDelta[1],mFgDeltaPos); 257 257 } 258 258 return; … … 362 362 else SelPointerShape(PI_ArrowPointer); 363 363 if (mFgDeltaPos) DrawDeltaPosMarker(); 364 if (mFgReticule || mFgDeltaPos) { 365 mWGrC->SelForeground(cForCol); 366 mWGrC->SelGOMode(cGOmod); 367 mWGrC->SelLine(cLatt); 368 } 364 369 if (mTrW) mTrW->Hide(); 365 370 } -
trunk/SophyaPI/PI/piscdrawwdg.h
r1882 r1884 67 67 // concernant le petit pave autour de la pos. courante 68 68 69 void SetTextWin(PILabel * tw, bool trw=true, int tx= 500, int ty=30);69 void SetTextWin(PILabel * tw, bool trw=true, int tx=600, int ty=30); 70 70 71 71 virtual void But1Press(int x, int y); -
trunk/SophyaPI/PIext/pihisto2d.cc
r1883 r1884 351 351 352 352 //++ 353 void PIHisto2D::GetClickInfo(string& info, double x, double y)353 void PIHisto2D::GetClickInfo(string& info,double x,double y,double x0,double y0,bool fgdiff) 354 354 // 355 355 // Info specifique du drawer pour la position x,y 356 356 //-- 357 357 { 358 Histo2D* h = Histogram(); 359 if (h == NULL) return; 360 int i,j; 361 char str[128]; 362 363 h->FindBin(x,y,i,j); 364 if(i<0 || i>=h->NBinX() || j<0 || j>=h->NBinY()) info += " ???"; 365 else { 366 sprintf(str," v= %g",(*h)(i,j)); 367 info += str; 358 Histo2D* h = Histogram(); 359 if(h == NULL) return; 360 361 int i,j; 362 h->FindBin(x,y,i,j); 363 if(i>=0 && i<h->NBinX() && j>=0 && j<h->NBinY()) { 364 char str[64]; 365 if(fgdiff) { 366 int i0,j0; 367 h->FindBin(x0,y0,i0,j0); 368 if(i0>=0 && i0<h->NBinX() && j0>=0 && j0<h->NBinY()) { 369 sprintf(str," DV=%g",(*h)(i,j)-(*h)(i0,j0)); 370 info += str; 371 } else { 372 info += " DV=?"; 373 } 368 374 } 369 return; 375 sprintf(str," V=%g",(*h)(i,j)); 376 info += str; 377 } else { 378 info += " V=?"; 379 } 380 381 return; 370 382 } 371 383 -
trunk/SophyaPI/PIext/pihisto2d.h
r1883 r1884 32 32 // AppendTextInfo a faire un jour - Reza 21/01/2002 33 33 // virtual void AppendTextInfo(string& info, double xmin, double ymin, double xmax, double ymax); 34 virtual void GetClickInfo(string& info, double x, double y); // Info pour position X,Y 34 35 virtual void GetClickInfo(string& info, double x, double y 36 ,double x0=0.,double y0=0.,bool fgdiff=false); 35 37 36 38 virtual void UpdateLimits();
Note:
See TracChangeset
for help on using the changeset viewer.