Changeset 1589 in Sophya
- Timestamp:
- Jul 23, 2001, 10:14:36 AM (24 years ago)
- Location:
- trunk/SophyaPI/PI
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/Makefile
r1117 r1589 4 4 5 5 all: $(LIB)libPI.a 6 $(LIB)libPI.a : $(OBJ)lut.o $(OBJ)parradapter.o $(OBJ)pi3ddrw.o $(OBJ)piapplgen.o $(OBJ)piapplx.o $(OBJ)pi bwdggen.o $(OBJ)pibwdgx.o $(OBJ)picmap.o $(OBJ)picmapgen.o $(OBJ)picmapview.o $(OBJ)picmapx.o $(OBJ)picons.o $(OBJ)picontainergen.o $(OBJ)picontainerx.o $(OBJ)pidrawer.o $(OBJ)pidrawwin.o $(OBJ)pidrwtools.o $(OBJ)pievthandler.o $(OBJ)pifilechogen.o $(OBJ)pifilechox.o $(OBJ)pifontgen.o $(OBJ)pifontx.o $(OBJ)pigraph3d.o $(OBJ)pigraphgen.o $(OBJ)pigraphps.o $(OBJ)pigraphuc.o $(OBJ)pigraphx.o $(OBJ)piimage.o $(OBJ)piimgtools.o $(OBJ)pilistgen.o $(OBJ)pilistx.o $(OBJ)pimenubargen.o $(OBJ)pimenubarx.o $(OBJ)pimenugen.o $(OBJ)pimenux.o $(OBJ)pimsghandler.o $(OBJ)pioptmenugen.o $(OBJ)pioptmenux.o $(OBJ)piperiodx.o $(OBJ)pipixmapgen.o $(OBJ)pipixmapx.o $(OBJ)piscdrawwdg.o $(OBJ)pistdwdggen.o $(OBJ)pistdwdgx.o $(OBJ)pistzwin.o $(OBJ)pisurfdr.o $(OBJ)pitherm.o $(OBJ)piwdggen.o $(OBJ)piwdgx.o $(OBJ)piwindowgen.o $(OBJ)piwindowx.o $(OBJ)pixtbase.o $(OBJ)psfile.o6 $(LIB)libPI.a : $(OBJ)lut.o $(OBJ)parradapter.o $(OBJ)pi3ddrw.o $(OBJ)piapplgen.o $(OBJ)piapplx.o $(OBJ)piaxestools.o $(OBJ)pibwdggen.o $(OBJ)pibwdgx.o $(OBJ)picmap.o $(OBJ)picmapgen.o $(OBJ)picmapview.o $(OBJ)picmapx.o $(OBJ)picons.o $(OBJ)picontainergen.o $(OBJ)picontainerx.o $(OBJ)pidrawer.o $(OBJ)pidrawwin.o $(OBJ)pidrwtools.o $(OBJ)pievthandler.o $(OBJ)pifilechogen.o $(OBJ)pifilechox.o $(OBJ)pifontgen.o $(OBJ)pifontx.o $(OBJ)pigraph3d.o $(OBJ)pigraphgen.o $(OBJ)pigraphps.o $(OBJ)pigraphuc.o $(OBJ)pigraphx.o $(OBJ)piimage.o $(OBJ)piimgtools.o $(OBJ)pilistgen.o $(OBJ)pilistx.o $(OBJ)pimenubargen.o $(OBJ)pimenubarx.o $(OBJ)pimenugen.o $(OBJ)pimenux.o $(OBJ)pimsghandler.o $(OBJ)pioptmenugen.o $(OBJ)pioptmenux.o $(OBJ)piperiodx.o $(OBJ)pipixmapgen.o $(OBJ)pipixmapx.o $(OBJ)piscdrawwdg.o $(OBJ)pistdwdggen.o $(OBJ)pistdwdgx.o $(OBJ)pistzwin.o $(OBJ)pisurfdr.o $(OBJ)pitherm.o $(OBJ)piwdggen.o $(OBJ)piwdgx.o $(OBJ)piwindowgen.o $(OBJ)piwindowx.o $(OBJ)pixtbase.o $(OBJ)psfile.o 7 7 $(AR) $(ARFLAGS) $@ $? 8 8 ifeq ($(CXX),cxx) … … 11 11 12 12 clean: 13 rm -f $(OBJ)lut.o $(OBJ)parradapter.o $(OBJ)pi3ddrw.o $(OBJ)piapplgen.o $(OBJ)piapplx.o $(OBJ)pi bwdggen.o $(OBJ)pibwdgx.o $(OBJ)picmap.o $(OBJ)picmapgen.o $(OBJ)picmapview.o $(OBJ)picmapx.o $(OBJ)picons.o $(OBJ)picontainergen.o $(OBJ)picontainerx.o $(OBJ)pidrawer.o $(OBJ)pidrawwin.o $(OBJ)pidrwtools.o $(OBJ)pievthandler.o $(OBJ)pifilechogen.o $(OBJ)pifilechox.o $(OBJ)pifontgen.o $(OBJ)pifontx.o $(OBJ)pigraph3d.o $(OBJ)pigraphgen.o $(OBJ)pigraphps.o $(OBJ)pigraphuc.o $(OBJ)pigraphx.o $(OBJ)piimage.o $(OBJ)piimgtools.o $(OBJ)pilistgen.o $(OBJ)pilistx.o $(OBJ)pimenubargen.o $(OBJ)pimenubarx.o $(OBJ)pimenugen.o $(OBJ)pimenux.o $(OBJ)pimsghandler.o $(OBJ)pioptmenugen.o $(OBJ)pioptmenux.o $(OBJ)piperiodx.o $(OBJ)pipixmapgen.o $(OBJ)pipixmapx.o $(OBJ)piscdrawwdg.o $(OBJ)pistdwdggen.o $(OBJ)pistdwdgx.o $(OBJ)pistzwin.o $(OBJ)pisurfdr.o $(OBJ)pitherm.o $(OBJ)piwdggen.o $(OBJ)piwdgx.o $(OBJ)piwindowgen.o $(OBJ)piwindowx.o $(OBJ)pixtbase.o $(OBJ)psfile.o13 rm -f $(OBJ)lut.o $(OBJ)parradapter.o $(OBJ)pi3ddrw.o $(OBJ)piapplgen.o $(OBJ)piapplx.o $(OBJ)piaxestools.o $(OBJ)pibwdggen.o $(OBJ)pibwdgx.o $(OBJ)picmap.o $(OBJ)picmapgen.o $(OBJ)picmapview.o $(OBJ)picmapx.o $(OBJ)picons.o $(OBJ)picontainergen.o $(OBJ)picontainerx.o $(OBJ)pidrawer.o $(OBJ)pidrawwin.o $(OBJ)pidrwtools.o $(OBJ)pievthandler.o $(OBJ)pifilechogen.o $(OBJ)pifilechox.o $(OBJ)pifontgen.o $(OBJ)pifontx.o $(OBJ)pigraph3d.o $(OBJ)pigraphgen.o $(OBJ)pigraphps.o $(OBJ)pigraphuc.o $(OBJ)pigraphx.o $(OBJ)piimage.o $(OBJ)piimgtools.o $(OBJ)pilistgen.o $(OBJ)pilistx.o $(OBJ)pimenubargen.o $(OBJ)pimenubarx.o $(OBJ)pimenugen.o $(OBJ)pimenux.o $(OBJ)pimsghandler.o $(OBJ)pioptmenugen.o $(OBJ)pioptmenux.o $(OBJ)piperiodx.o $(OBJ)pipixmapgen.o $(OBJ)pipixmapx.o $(OBJ)piscdrawwdg.o $(OBJ)pistdwdggen.o $(OBJ)pistdwdgx.o $(OBJ)pistzwin.o $(OBJ)pisurfdr.o $(OBJ)pitherm.o $(OBJ)piwdggen.o $(OBJ)piwdgx.o $(OBJ)piwindowgen.o $(OBJ)piwindowx.o $(OBJ)pixtbase.o $(OBJ)psfile.o 14 14 ifeq ($(CXX),cxx) 15 15 cd $(REPM); rm -f *.o … … 42 42 pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \ 43 43 pievthandler.h psfile.h pigraphps.h 44 $(OBJ)piaxestools.o: piaxestools.cc piaxestools.h pisysdep.h \ 45 $(INC)machdefs.h pistdwdgx.h pistdwdggen.h \ 46 piwdgx.h piwdggen.h pimsghandler.h picolist.h pioptmenux.h \ 47 pioptmenugen.h pimenux.h pimenugen.h piwindowx.h piwindowgen.h \ 48 picontainerx.h picontainergen.h piapplx.h piapplgen.h pimenubarx.h \ 49 pimenubargen.h picons.h pibwdgx.h pibwdggen.h picmap.h picmapx.h \ 50 picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \ 51 pievthandler.h psfile.h pigraphps.h piscdrawwdg.h pidrawer.h 44 52 $(OBJ)pibwdggen.o: pibwdggen.cc pibwdggen.h pisysdep.h \ 45 53 $(INC)machdefs.h piwdgx.h piwdggen.h \ … … 219 227 picontainergen.h pidrawer.h pidrwtools.h pioptmenux.h pioptmenugen.h \ 220 228 pimenux.h pimenugen.h piapplx.h piapplgen.h pimenubarx.h \ 221 pimenubargen.h picons.h p arradapter.h lut.h229 pimenubargen.h picons.h piaxestools.h parradapter.h lut.h 222 230 $(OBJ)pistdwdggen.o: pistdwdggen.cc pistdwdggen.h pisysdep.h \ 223 231 $(INC)machdefs.h piwdgx.h piwdggen.h \ -
trunk/SophyaPI/PI/objlist.list
r1034 r1589 4 4 piapplgen.o 5 5 piapplx.o 6 piaxestools.o 6 7 pibwdggen.o 7 8 pibwdgx.o -
trunk/SophyaPI/PI/pi3ddrw.cc
r547 r1589 117 117 if (v3D_obs) gr3d->Set3DCS_Obs(xO, yO, zO, tO, fO, pO, daxO, dayO, lCO, dlCO); 118 118 else gr3d->Set3DCS(xC,yC,zC, xO, yO, zO, daxO, dayO, dlCO, pO); 119 if (mFgHighLight) gr3d->SelGOMode(PI_GOInvert); // $CHECK$ A changer , Reza 07/2001 119 120 mGrUC = gr3d; 120 121 return(gr3d); -
trunk/SophyaPI/PI/pidrawer.cc
r1568 r1589 321 321 mGrUC->SetUCS(xMin, xMax, yMin, yMax, aXFlg, aYFlg); 322 322 if (aXlog || aYlog) mGrUC->SetLogScale(aXlog, aYlog); 323 if (mFgHighLight) mGrUC->SelGOMode(PI_GOInvert); 323 if (mFgHighLight) mGrUC->SelGOMode(PI_GOInvert); // $CHECK$ A changer , Reza 07/2001 324 324 return(mGrUC); 325 325 } -
trunk/SophyaPI/PI/pidrwtools.cc
r1124 r1589 17 17 // Classe de fenêtre de dialogue permettant de modifier interactivement 18 18 // Les attributs graphique des "Drawer" attachés aux "PIBaseWdg". 19 // Permet aussi de modifier les attributs d'axes pour les "PIScDrawWdg"20 19 //-- 21 20 // Links Parents … … 103 102 104 103 int wszx = 5*spx+3.5*bsx; 105 int wszy = ( 8+3*0.85)*(spy+bsy);104 int wszy = (1+5*0.85)*bsy+(6+5*0.85)*spy; 106 105 SetSize(wszx, wszy); 107 106 108 int cpx = spx*2; 109 int cpy = spy*2; 110 int csx = cpx; 111 int csy = cpy; 112 mLab[0] = new PILabel(this, "X Min Max", 1.25*bsx, bsy, cpx, cpy); 113 cpy += spy+bsy; 114 mLab[1] = new PILabel(this, "Y Min Max", 1.25*bsx, bsy, cpx, cpy); 115 mLab[0]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 116 mLab[1]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 117 118 cpy = spy*2; 119 cpx += spx+1.25*bsx; 120 mText[0] = new PIText(this, "x_min_max", 2.25*bsx, bsy, cpx, cpy); 121 mText[0]->SetText("-1.0 1.0"); 122 cpy += spy+bsy; 123 mText[1] = new PIText(this, "y_min_max", 2.25*bsx, bsy, cpx, cpy); 124 mText[1]->SetText("-1.0 1.0"); 125 mText[0]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 126 mText[1]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 127 128 cpx = spx+0.25*bsx; 129 cpy += spy+bsy; 130 mCkb[0] = new PICheckBox(this,"X-RtoL", 2000, bsx, bsy, cpx, cpy); 131 cpx += spx+bsx; 132 mCkb[1] = new PICheckBox(this,"Y-UpDn", 2001, bsx, bsy, cpx, cpy); 133 cpx += spx+bsx; 134 mCkb[2] = new PICheckBox(this,"Grid", 2002, bsx, bsy, cpx, cpy); 135 mCkb[0]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 136 mCkb[1]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 137 mCkb[2]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 138 cpy += spy+bsy; 139 cpx = spx+0.25*bsx; 140 mCkb[3] = new PICheckBox(this,"LogScale-X", 2003, bsx*1.5, bsy, cpx, cpy); 141 cpx += bsx*1.5+3*spx; 142 mCkb[4] = new PICheckBox(this,"LogScale-Y", 2004, bsx*1.5, bsy, cpx, cpy); 143 mCkb[3]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 144 mCkb[4]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 145 146 cpy += spy+bsy; 147 cpx = spx+0.25*bsx; 148 mBut[0] = new PIButton(this, "SetAxes", 2600, bsx*1.5, bsy, cpx, cpy); 149 cpx += bsx*1.5+3*spx; 150 mBut[1] = new PIButton(this, "AutoLimits", 2700, bsx*1.5, bsy, cpx, cpy); 151 mBut[0]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 152 mBut[1]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 153 154 int offy = cpy+bsy+spy*2; 107 //int cpx = spx*2; 108 //int offy = cpy+bsy+spy*2; 155 109 156 110 // Option-Menu Marker, Line, couleur, etc... 157 cpx = 2*spx;158 cpy += 3*spy+bsy;111 int cpx = 2*spx; 112 int cpy = 2*spy; 159 113 160 114 int bsyo = bsy; … … 249 203 mOpt[4] = new PIOptMenu(this, "bwt-opt-4", bsx*1.75, bsy, cpx, cpy); 250 204 mOpt[4]->AppendItem("Def.Font", 500); 251 mOpt[4]->AppendItem("Normal-Font", 511); 252 mOpt[4]->AppendItem("Bold", 512); 253 mOpt[4]->AppendItem("Ital", 513); 254 mOpt[4]->AppendItem("Small-Font", 521); 255 mOpt[4]->AppendItem("Small-Bold", 522); 256 mOpt[4]->AppendItem("Small-Ital", 523); 257 mOpt[4]->AppendItem("Big-Font", 531); 258 mOpt[4]->AppendItem("Big-Bold", 532); 259 mOpt[4]->AppendItem("Big-Ital", 533); 260 mOpt[4]->AppendItem("Huge-Font", 541); 261 mOpt[4]->AppendItem("Huge-Bold", 542); 262 mOpt[4]->AppendItem("Huge-Ital", 543); 205 mOpt[4]->AppendItem("Courier", 501); 206 mOpt[4]->AppendItem("Helvetica", 502); 207 mOpt[4]->AppendItem("Times", 503); 208 mOpt[4]->AppendItem("Symbol-Font", 504); 263 209 mOpt[4]->SetValue(500); 264 210 mOpt[4]->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic); … … 280 226 281 227 cpx = 2*spx; 228 cpy += spy+bsy; 229 mOpt[6] = new PIOptMenu(this, "bwt-opt-6", bsx*1.75, bsy, cpx, cpy); 230 mOpt[6]->AppendItem("Def.FontAtt", 700); 231 mOpt[6]->AppendItem("Roman-Font", 701); 232 mOpt[6]->AppendItem("Bold-Font", 702); 233 mOpt[6]->AppendItem("Italic-Font", 703); 234 mOpt[6]->AppendItem("BoldItalic", 704); 235 mOpt[6]->SetValue(700); 236 mOpt[6]->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic); 237 238 cpx += spx+1.75*bsx; 239 mOpt[7] = new PIOptMenu(this, "bwt-opt-7", bsx*1.75, bsy, cpx, cpy); 240 mOpt[7]->AppendItem("Def.FontSz", 800); 241 mOpt[7]->AppendItem("Tiny FontSz", 801); 242 mOpt[7]->AppendItem("Small FontSz", 802); 243 mOpt[7]->AppendItem("Normal FontSz", 803); 244 mOpt[7]->AppendItem("Big FontSz", 804); 245 mOpt[7]->AppendItem("Huge FontSz", 805); 246 247 cpx = 2*spx; 282 248 cpy += spy+bsyo; 283 249 bsy = bsyo; spy = spyo; … … 300 266 mButcf[1]->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic); 301 267 302 cpx = spx+0.25*bsx;;303 cpy += spy+bsy;304 mButcf[2] = new PIButton(this, "Refresh", 3 000, bsx*1.5, bsy, cpx, cpy);268 cpx = (wszx-3.2*bsx-2*spx)/2; 269 cpy += 2*spy+bsy; 270 mButcf[2] = new PIButton(this, "Refresh", 3100, bsx*1.2, bsyo, cpx, cpy); 305 271 mButcf[2]->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic); 306 cpx += bsx*1. 5+3*spx;307 mButcf[3] = new PIButton(this, " Dismiss", 3777, bsx*1.5, bsy, cpx, cpy);308 mButcf[ 2]->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic);272 cpx += bsx*1.2+spx; 273 mButcf[3] = new PIButton(this, "Select", 3200, bsx*0.8, bsyo, cpx, cpy); 274 mButcf[3]->ActivatePress(true); 309 275 mButcf[3]->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic); 276 cpx += bsx*0.8+spx; 277 mButcf[4] = new PIButton(this, "Dismiss", 3777, bsx*1.2, bsyo, cpx, cpy); 278 mButcf[4]->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic); 310 279 311 280 cwdrwt = this; … … 318 287 if (cwdrwt == this) cwdrwt = NULL; 319 288 int i; 320 for(i=0; i<2; i++) 321 { 322 delete mLab[i]; 323 delete mBut[i]; 324 delete mText[i]; 325 delete mButcf[i]; 326 } 327 328 for(i=0; i<5; i++) delete mCkb[i]; 329 for(i=0; i<3; i++) delete mButcf[i]; 330 delete mButcf[3]; 331 for(i=0; i<6; i++) delete mOpt[i]; 289 for(i=0; i<5; i++) delete mButcf[i]; 290 for(i=0; i<2; i++) delete mButdr[i]; 291 for(i=0; i<8; i++) delete mOpt[i]; 332 292 for(i=0; i<2; i++) delete mCasc[i]; 333 293 delete mNlb; … … 353 313 PI_ThinDottedLine, PI_DottedLine, PI_ThickDottedLine }; 354 314 355 static PIFontAtt fntatt[4] = { PI_NotDefFontAtt, PI_RomanFont, PI_BoldFont, PI_ItalicFont }; 356 static PIFontSize fntsz[5] = { PI_NotDefFontSize, PI_NormalSizeFont, PI_SmallSizeFont, 357 PI_BigSizeFont, PI_HugeSizeFont }; 315 static PIFontName fntname[5] = { PI_DefaultFont, PI_CourierFont, PI_HelveticaFont, 316 PI_TimesFont, PI_SymbolFont}; 317 static PIFontAtt fntatt[5] = { PI_NotDefFontAtt, PI_RomanFont, PI_BoldFont, 318 PI_ItalicFont, PI_BoldItalicFont }; 319 static PIFontSize fntsz[6] = { PI_NotDefFontSize, PI_TinySizeFont, PI_SmallSizeFont, 320 PI_NormalSizeFont, PI_BigSizeFont, PI_HugeSizeFont }; 358 321 359 322 /* --Methode-- */ … … 361 324 { 362 325 PIWindow::Show(); 363 char buff[92]; 326 364 327 mNDr = 0; 365 366 328 if (mCurBW != NULL) { 367 329 mNDr = mCurBW->NbDrawers()-1; 368 330 if (mNDr < 0) mNDr = 0; 369 331 } 332 else mNDr = 0; 333 char buff[32]; 334 sprintf(buff,"%d", mNDr); 335 mNlb->SetLabel(buff); 370 336 371 337 UpdateAttFromDrawer(); 372 373 mCkb[0]->SetState(false);374 mCkb[1]->SetState(false);375 mCkb[2]->SetState(false);376 mCkb[3]->SetState(false);377 mCkb[4]->SetState(false);378 379 if ((mCurBW != NULL) && ( mCurBW->kind() == PIScDrawWdg::ClassId ) ) {380 PIScDrawWdg* scd = ( PIScDrawWdg*)mCurBW;381 sprintf(buff, "%g %g", scd->XMin(), scd->XMax());382 mText[0]->SetText(buff);383 sprintf(buff, "%g %g", scd->YMin(), scd->YMax());384 mText[1]->SetText(buff);385 int xa, ya;386 scd->GetAxesConfig(xa, ya);387 if (xa & kAxeDirRtoL) mCkb[0]->SetState(true);388 if (ya & kAxeDirUpDown) mCkb[1]->SetState(true);389 if (scd->GetAxesFlags() & kGridOn) mCkb[2]->SetState(true);390 mCkb[3]->SetState(scd->isLogScaleX());391 mCkb[4]->SetState(scd->isLogScaleY());392 }393 else {394 mText[0]->SetText("-1.0 1.0");395 mText[1]->SetText("-1.0 1.0");396 }397 sprintf(buff, "%d", mNDr);398 mNlb->SetLabel(buff);399 400 401 402 338 return; 403 339 } … … 415 351 mOpt[4]->SetValue(500); 416 352 mOpt[5]->SetValue(600); 353 mOpt[6]->SetValue(700); 354 mOpt[7]->SetValue(800); 417 355 418 356 if ( (mCurBW != NULL) && (mCurBW->NbDrawers() > 0) ) … … 420 358 421 359 if (!dr) return; 422 int jj,kk;360 int ii,jj,kk; 423 361 PIColors fc = dr->GetFgColAtt(); 424 362 for(kk=0; kk<17; kk++) … … 436 374 if (kk%2 == 0) kk++; 437 375 mOpt[3]->SetValue(400+kk); 376 PIFontName fnm = dr->GetFontName(); 438 377 PIFontAtt fat = dr->GetFontAtt(); 439 378 PIFontSize fsz = dr->GetFontSz(); 440 for(kk=0; kk<4; kk++) 379 for(ii=0; ii<5; ii++) 380 if (fnm == fntname[ii]) break; 381 for(kk=0; kk<5; kk++) 441 382 if (fat == fntatt[kk]) break; 442 383 for(jj=0; jj<5; jj++) 443 384 if (fsz == fntsz[jj]) break; 444 385 445 if (kk >= 4) kk = 3; 446 if (jj >= 5) jj = 4; 447 mOpt[4]->SetValue(500+jj*10+kk); 386 if (ii >= 5) ii = 1; 387 if (kk >= 5) kk = 1; 388 if (jj >= 6) jj = 3; 389 mOpt[4]->SetValue(500+ii); 390 mOpt[6]->SetValue(700+kk); 391 mOpt[7]->SetValue(800+jj); 392 448 393 PILineAtt lat = dr->GetLineAtt(); 449 394 for(kk=0; kk<10; kk++) … … 454 399 455 400 /* --Methode-- */ 401 void PIDrwTools::SetGraphicAtt(bool fgref) 402 { 403 if (mCurBW == NULL) return; 404 PIDrawer* drw = mCurBW->GetDrawer(mNDr); 405 if (drw == NULL) return; 406 int k,ii,jj,kk; 407 k = mOpt[0]->GetValue()-100; 408 if ( (k < 0) || (k > 16) ) k = 0; 409 drw->SetColAtt(cols[k]); 410 k = mOpt[1]->GetValue()-200; 411 if (k == 0) drw->SetColMapId(CMAP_OTHER); 412 else drw->SetColMapId(PIColorMap::GetStandardColorMapId(k-1)); 413 k = mOpt[2]->GetValue()-300; 414 if ( (k < 0) || (k > 11) ) k = 0; 415 kk = mOpt[3]->GetValue()-400; 416 if ( (kk < 1) || (kk > 27) ) kk = 1; 417 // if ((k > 0) && (kk < 3)) { // Protection contre Marker taille 1 autre que Dotmarker 418 // mOpt[3]->SetValue(403); 419 // kk = 3; 420 // } 421 drw->SetMarkerAtt(kk, mrk[k]); 422 ii = (mOpt[4]->GetValue()-500); 423 jj = (mOpt[6]->GetValue()-700); 424 kk = (mOpt[7]->GetValue()-800); 425 drw->SetFont(fntname[ii], fntsz[kk], fntatt[jj]); 426 427 k = mOpt[5]->GetValue()-600; 428 if ( (k < 0) || (k > 9) ) k = 0; 429 drw->SetLineAtt(line[k]); 430 if (fgref) mCurBW->Refresh(); 431 else drw->Refresh(); 432 } 433 434 /* --Methode-- */ 456 435 void PIDrwTools::Process(PIMessage msg, PIMsgHandler* /*sender*/, void* /*data*/) 457 436 { 458 459 msg = UserMsg(msg); 460 if (msg == 3777) { Hide(); return; } 461 462 if (mCurBW == NULL) return; 463 464 char strg[64]; 465 int k, kk, kkk; 466 467 switch (msg) { 468 469 case 2600 : 470 { 471 double xmin, xmax, ymin, ymax; 472 int axrl = kAxeDirLtoR; 473 int ayud = kAxeDirDownUp; 474 PIScDrawWdg* scd=NULL; 475 scd = dynamic_cast<PIScDrawWdg*>(mCurBW); 476 if ( scd == NULL ) { 477 cerr << "PIDrwTools: SetAxes applicable to PIScDrawWdg only ! " << endl; 478 return; 437 char strg[64]; 438 439 PIMessage mod = ModMsg(msg); 440 msg = UserMsg(msg); 441 442 switch (msg) { 443 case 2800 : 444 UpdateAttFromDrawer(); 445 break; 446 447 case 2900 : 448 SetGraphicAtt(false); 449 break; 450 451 case 3100 : 452 SetGraphicAtt(true); 453 break; 454 455 case 3200 : 456 if ((mCurBW != NULL) && (mCurBW->GetDrawer(mNDr) != NULL) ) { 457 if (mod == PIMsg_Press) mCurBW->GetDrawer(mNDr)->HighLight(true); 458 else mCurBW->GetDrawer(mNDr)->HighLight(false); 479 459 } 480 if (mText[0]->GetText().length() > 1) { 481 xmin = -1.; xmax = 1.; 482 sscanf(mText[0]->GetText().c_str(), "%lg %lg" , &xmin, &xmax); 483 } 484 else { 485 xmin = scd->XMin(); 486 xmax = scd->XMax(); 487 } 488 if (mText[1]->GetText().length() > 1) { 489 ymin = -1.; ymax = 1.; 490 sscanf(mText[1]->GetText().c_str(), "%lg %lg" , &ymin, &ymax); 491 } 492 else { 493 ymin = scd->YMin(); 494 ymax = scd->YMax(); 495 } 496 if (mCkb[0]->GetState()) axrl = kAxeDirRtoL ; 497 if (mCkb[1]->GetState()) ayud = kAxeDirUpDown; 498 scd->SetLimits(xmin, xmax, ymin, ymax, axrl, ayud); 499 unsigned int flags = scd->GetAxesFlags(); 500 if (mCkb[2]->GetState()) scd->SetAxesFlags(flags | kGridOn); 501 else scd->SetAxesFlags(flags & ~kGridOn); 502 scd->SetLogScale(mCkb[3]->GetState(), mCkb[4]->GetState() ); 503 504 // else mCurBW->SetDefaultDrawerLimits(xmin, xmax, ymin, ymax, axrl, ayud); 505 mCurBW->Refresh(); 506 } 507 break; 508 509 case 2700 : 510 { 511 PIScDrawWdg* scd=NULL; 512 scd = dynamic_cast<PIScDrawWdg*>(mCurBW); 513 if ( scd != NULL ) scd->UpdateLimits(); 514 else { 515 PIDraw3DWdg* dr3 = dynamic_cast<PIDraw3DWdg *>(mCurBW); 516 if (dr3 != NULL) dr3->Update3DView(); 517 } 518 } 519 break; 520 521 case 2800 : 522 UpdateAttFromDrawer(); 523 break; 524 525 case 2900 : 526 case 3000 : 527 { 528 PIDrawer* drw = mCurBW->GetDrawer(mNDr); 529 if (drw == NULL) return; 530 k = mOpt[0]->GetValue()-100; 531 if ( (k < 0) || (k > 16) ) k = 0; 532 drw->SetColAtt(cols[k]); 533 k = mOpt[1]->GetValue()-200; 534 if (k == 0) drw->SetColMapId(CMAP_OTHER); 535 else drw->SetColMapId(PIColorMap::GetStandardColorMapId(k-1)); 536 k = mOpt[2]->GetValue()-300; 537 if ( (k < 0) || (k > 11) ) k = 0; 538 kk = mOpt[3]->GetValue()-400; 539 if ( (kk < 1) || (kk > 27) ) kk = 1; 540 if ((k > 0) && (kk < 3)) { // Protection contre Marker taille 1 autre que Dotmarker 541 mOpt[3]->SetValue(403); 542 kk = 3; 543 } 544 drw->SetMarkerAtt(kk, mrk[k]); 545 k = (mOpt[4]->GetValue()-500); 546 kk = k/10; kkk = k%10; 547 drw->SetFontAtt(fntsz[kk], fntatt[kkk]); 548 k = mOpt[5]->GetValue()-600; 549 if ( (k < 0) || (k > 9) ) k = 0; 550 drw->SetLineAtt(line[k]); 551 if (msg == 2900) drw->Refresh(); 552 else mCurBW->Refresh(); 553 } 554 break; 555 556 case 3501 : 557 case 3502 : 558 if (msg == 3501) { mNDr--; if (mNDr < 0) mNDr = 0; } 559 else { mNDr++; if (mNDr >= mCurBW->NbDrawers()) mNDr--; } 560 sprintf(strg, "%d", mNDr); 561 mNlb->SetLabel(strg); 562 /* On ne change pas les options choisies Reza+cmv 2/10/98 563 mOpt[0]->SetValue(100); 564 mOpt[1]->SetValue(200); 565 mOpt[2]->SetValue(300); 566 mOpt[3]->SetValue(405); 567 mOpt[4]->SetValue(500); 568 mOpt[5]->SetValue(600); 460 break; 461 462 case 3777 : 463 Hide(); 464 break; 465 466 case 3501 : 467 case 3502 : 468 if (mCurBW) { 469 if (msg == 3501) { mNDr--; if (mNDr < 0) mNDr = 0; } 470 else { mNDr++; if (mNDr >= mCurBW->NbDrawers()) mNDr--; } 471 sprintf(strg, "%d", mNDr); 472 mNlb->SetLabel(strg); 473 } 474 /* On ne change pas les options choisies Reza+cmv 2/10/98 475 mOpt[0]->SetValue(100); 476 mOpt[1]->SetValue(200); 477 mOpt[2]->SetValue(300); 478 mOpt[3]->SetValue(405); 479 mOpt[4]->SetValue(500); 480 mOpt[5]->SetValue(600); 569 481 */ 570 break;571 572 default :573 break;482 break; 483 484 default : 485 break; 574 486 } 575 487 … … 577 489 } 578 490 491 492 -
trunk/SophyaPI/PI/pidrwtools.h
r1124 r1589 32 32 protected: 33 33 virtual void UpdateAttFromDrawer(); 34 virtual void SetGraphicAtt(bool fgref); 34 35 virtual void Process(PIMessage msg, PIMsgHandler* sender, void* data=NULL); 35 36 36 37 private: 37 // Pour changer les axes38 PILabel* mLab[2];39 PIButton* mBut[2];40 PIText* mText[2];41 PICheckBox* mCkb[5];42 38 // Pour couleur, fontes, etc 43 PIOptMenu* mOpt[ 6];39 PIOptMenu* mOpt[8]; 44 40 PIMenu* mCasc[5]; 45 41 PILabel* mNlb; 46 42 PIButton* mButdr[2]; 47 PIButton* mButcf[ 4];43 PIButton* mButcf[5]; 48 44 int mNDr; 49 45 int mtyp, msz; -
trunk/SophyaPI/PI/piscdrawwdg.cc
r1510 r1589 9 9 #include "piscdrawwdg.h" 10 10 #include "pidrwtools.h" 11 #include "piaxestools.h" 11 12 #include "parradapter.h" 12 13 … … 110 111 if (mTrW) delete mTrW; 111 112 if (mInfoW) delete mInfoW; 113 if (PIAxesTools::GetCurrentScDrawWdg() == this) 114 PIAxesTools::SetCurrentScDrawWdg(NULL); 115 // Pour PIDrwTools, c'est fait par le destructeur de PIBaseWdgGen 112 116 } 113 117 … … 125 129 PIDrwTools::ShowPIDrwTools(); // Fentre axes et options de trace 126 130 } 131 else if (key == 'A' || key == 'a') { 132 PIAxesTools::SetCurrentScDrawWdg(this); 133 PIAxesTools::ShowPIAxesTools(); // Fenetre de gestion des axes 134 } 127 135 else if (key == 'I' || key == 'i') UpdateInfoWindow(); // Fenetre Text-Info 128 136 } … … 316 324 Send(Msg(), PIMsg_Active); 317 325 PIDrwTools::SetCurrentBaseWdg(this); 326 PIAxesTools::SetCurrentScDrawWdg(this); 318 327 } 319 328 … … 393 402 Send(Msg(), PIMsg_Active); 394 403 PIDrwTools::SetCurrentBaseWdg(this); 404 PIAxesTools::SetCurrentScDrawWdg(this); 395 405 } 396 406 … … 454 464 Send(Msg(), PIMsg_Active); 455 465 PIDrwTools::SetCurrentBaseWdg(this); 466 PIAxesTools::SetCurrentScDrawWdg(this); 456 467 } 457 468
Note:
See TracChangeset
for help on using the changeset viewer.