Changeset 114 in Sophya
- Timestamp:
- Jul 3, 1998, 12:02:54 PM (27 years ago)
- Location:
- trunk/SophyaPI/PI
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/Makefile
r113 r114 18 18 19 19 $(OBJ)lut.o: lut.cc $(EROSDEVREP)/Include/defs.h lut.h 20 $(OBJ)parradapter.o: parradapter.cc $(EROSDEVREP)/Include/ctimer.h \ 21 $(EROSDEVREP)/Include/peida.h $(EROSDEVREP)/Include/defs.h \ 22 $(EROSDEVREP)/Include/utils.h $(EROSDEVREP)/Include/machine.h \ 23 $(EROSDEVREP)/Include/perrors.h \ 24 $(EROSDEVREP)/Include/exceptions.h \ 25 $(EROSDEVREP)/Include/peidainit.h $(EROSDEVREP)/Include/fmath.h \ 26 parradapter.h lut.h 20 $(OBJ)parradapter.o: parradapter.cc parradapter.h \ 21 $(EROSDEVREP)/Include/defs.h $(EROSDEVREP)/Include/machine.h \ 22 lut.h 27 23 $(OBJ)pi3ddrw.o: pi3ddrw.cc pi3ddrw.h pisysdep.h pidrawer.h pibwdggen.h \ 28 24 piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h picmapgen.h \ … … 241 237 $(EROSDEVREP)/Include/pixelmap.h \ 242 238 $(EROSDEVREP)/Include/transfo.h $(EROSDEVREP)/Include/poly.h \ 243 $(EROSDEVREP)/Include/zfidu.h pidrawer.h pibwdggen.h pisysdep.h \ 244 piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h picmapgen.h \ 245 pigraphx.h pigraphgen.h pigraphuc.h psfile.h 239 $(EROSDEVREP)/Include/zfidu.h $(EROSDEVREP)/Include/imgalig.h \ 240 $(EROSDEVREP)/Include/fitsimage.h \ 241 $(EROSDEVREP)/Include/fitsheader.h \ 242 $(EROSDEVREP)/Include/erosio.h $(EROSDEVREP)/Include/fitskeys.h \ 243 $(EROSDEVREP)/Include/erostape.h \ 244 $(EROSDEVREP)/Include/strutil.h \ 245 $(EROSDEVREP)/Include/ptrarray.h \ 246 $(EROSDEVREP)/Include/voidptrarray.h \ 247 $(EROSDEVREP)/Include/basearray.h $(EROSDEVREP)/Include/array.h \ 248 $(EROSDEVREP)/Include/lockfile.h \ 249 $(EROSDEVREP)/Include/erostarfile.h \ 250 $(EROSDEVREP)/Include/xstrstream.h \ 251 $(EROSDEVREP)/Include/dates.h $(EROSDEVREP)/Include/tarlib.h \ 252 pidrawer.h pibwdggen.h pisysdep.h piwdgx.h piwdggen.h pimsghandler.h \ 253 picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h \ 254 psfile.h 246 255 $(OBJ)pisurfdr.o: pisurfdr.cc pisurfdr.h parradapter.h \ 247 256 $(EROSDEVREP)/Include/defs.h $(EROSDEVREP)/Include/machine.h \ -
trunk/SophyaPI/PI/parradapter.cc
r113 r114 6 6 #include <math.h> 7 7 8 #include "ctimer.h" 8 // #include "ctimer.h" Pour mesure TCPU 9 9 #include "parradapter.h" 10 10 -
trunk/SophyaPI/PI/piapplx.cc
r111 r114 101 101 topwdg->SetSize(MBCont()->XSize(), MBCont()->YSize()); 102 102 103 int szx, szy ;104 XtAppContext * appctx = PIXtAppCtx(szx, szy );103 int szx, szy, szf; 104 XtAppContext * appctx = PIXtAppCtx(szx, szy, szf); 105 105 106 106 // Pour appeler FinishCreate() des objets dans la fenetre principale … … 163 163 void PIApplicationX::PrefCompSz(int& szx, int& szy) 164 164 { 165 PIXtAppCtx(szx, szy); 165 int szf; 166 PIXtAppCtx(szx, szy, szf); 166 167 return; 167 168 } … … 214 215 setlinebuf(stdout); 215 216 216 int szx, szy ;217 XtAppContext * appctx = PIXtAppCtx(szx, szy );217 int szx, szy, szf; 218 XtAppContext * appctx = PIXtAppCtx(szx, szy, szf); 218 219 XtAppAddInput(*appctx, p[0], (XtPointer) XtInputReadMask, redirectstream_callback, (XtPointer) streamno); 219 220 } … … 236 237 setlinebuf(stderr); 237 238 238 int szx, szy ;239 XtAppContext * appctx = PIXtAppCtx(szx, szy );239 int szx, szy, szf; 240 XtAppContext * appctx = PIXtAppCtx(szx, szy, szf); 240 241 XtAppAddInput(*appctx, p[0], (XtPointer) XtInputReadMask, redirectstream_callback, (XtPointer) (streamno+1)); 241 242 } -
trunk/SophyaPI/PI/pigraphx.cc
r113 r114 15 15 static XFontStruct * fntst[NMAXFONTSZ][3]; 16 16 static int fntsz[NMAXFONTSZ] = {8,10,12,14,16,20,24}; 17 static int SmallFontIndex = 1; 18 static int NormalFontIndex = 3; 19 static int BigFontIndex = 5; 17 20 static PIFontAtt fntatt[3] = { PI_RomanFont, PI_BoldFont, PI_ItalicFont }; 18 21 #define NMAXCOL 10 … … 366 369 { 367 370 case PI_SmallSizeFont: 368 i = 1;371 i = SmallFontIndex; 369 372 break; 370 373 case PI_NormalSizeFont: 371 i = 3;374 i = NormalFontIndex; 372 375 break; 373 376 case PI_BigSizeFont: 374 i = 5;377 i = BigFontIndex; 375 378 break; 376 379 default: 377 i =2;380 i = NormalFontIndex; 378 381 break; 379 382 } … … 642 645 for (j=0; j<3; j++) fntst[i][j] = NULL; 643 646 644 647 // Choix des trois tailles de fontes standard en fonction de 648 // la taille de fonte par defaut des composantes standard 649 int szx, szy, szf; 650 PIXtAppCtx(szx, szy, szf); 651 int kkk, kkj, kksel, kkdsz = 9999; 652 kksel = NMAXFONTSZ/2; 653 for(kkk=NMAXFONTSZ-1; kkk>=0; kkk--) { 654 kkj = szf - fntsz[kkk]; if (kkj < 0) kkj = -kkj; 655 if (kkj < kkdsz) { kksel = kkk; kkdsz = kkj; } 656 } 657 NormalFontIndex = kksel; 658 SmallFontIndex = (kksel > 1) ? kksel-2 : 0 ; 659 BigFontIndex = (kksel < NMAXFONTSZ-2) ? kksel+2 : NMAXFONTSZ-1 ; 660 661 printf("PIGraphicX::Init()-DBG- FontIndex= %d %d %d (%d) \n", 662 SmallFontIndex, NormalFontIndex, BigFontIndex, szf); 663 645 664 /* Les couleurs */ 646 665 cmap = XDefaultColormap (mdsp, scr); -
trunk/SophyaPI/PI/piimgtools.cc
r112 r114 15 15 /* --Methode-- */ 16 16 PIImgLutWind::PIImgLutWind(PIApplication* par) 17 : PIWindow((PIMsgHandler*)par, "PIImg-ChangeLut", PIWK_dialog, 240, 240, 150, 150) 18 { 19 17 : PIWindow((PIMsgHandler*)par, "PIImageTools", PIWK_dialog, 240, 240, 150, 150) 18 { 19 int bsx, bsy; 20 21 // On definit la taille a partir de la taille par defaut des composantes 22 // PIApplicationPrefCompSize(bsx, bsy); 23 par->PrefCompSz(bsx, bsy); 20 24 mLab[0] = new PILabel(this, "MinPixel", 60, 35, 30, 20); 21 25 mLab[1] = new PILabel(this, "MaxPixel", 60, 35, 30, 65); -
trunk/SophyaPI/PI/pioptmenux.cc
r112 r114 73 73 void PIOptMenuX::FinishCreate() 74 74 { 75 printf("PIOptMenuX::FinishCreate()/DBG %s \n", Nom().c_str());75 // printf("PIOptMenuX::FinishCreate()/DBG %s \n", Nom().c_str()); 76 76 if (mSmsg == 0) SetValue(mMen->ItemMsg(0)); 77 77 } -
trunk/SophyaPI/PI/piperiodx.cc
r91 r114 9 9 pip = (PIPeriodX *)usd; 10 10 pip->DoPeriodic(); 11 int szx, szy ;12 XtAppContext * appctx = PIXtAppCtx(szx, szy );11 int szx, szy, szf; 12 XtAppContext * appctx = PIXtAppCtx(szx, szy, szf); 13 13 id = XtAppAddTimeOut(*appctx, pip->Interval()*1000, xttimer_action, pip); 14 14 pip->SetTimerId(id); … … 35 35 if (dt > 0) mDt = dt; 36 36 37 int szx,szy ;38 XtAppContext * appctx = PIXtAppCtx(szx, szy );37 int szx,szy,szf; 38 XtAppContext * appctx = PIXtAppCtx(szx, szy, szf); 39 39 mTId = XtAppAddTimeOut(*appctx, mDt*1000, xttimer_action, this); 40 40 mFgact = true; -
trunk/SophyaPI/PI/piwdgx.cc
r106 r114 27 27 static int appSzX = 10; 28 28 static int appSzY = 10; 29 static int appSzFont = 10; 29 30 static XFontStruct * stdfnt = NULL; 30 31 31 32 /* Nouvelle-Fonction */ 32 XtAppContext* PIXtAppCtx(int& szx, int& szy )33 XtAppContext* PIXtAppCtx(int& szx, int& szy, int& szf) 33 34 { 34 35 szx = appSzX; szy = appSzY; 36 szf = appSzFont; 35 37 return(&appctx); 36 38 } … … 561 563 appSzY = (float)(fa+fd)*1.4+10; // pour les shadow 562 564 appSzX = (float)len*1.5; 565 appSzFont = fa+fd; 563 566 // Taille multiple de 5 pixels 564 567 if ( (appSzX % 5) != 0 ) appSzX = 5*(appSzX/5 + 1); -
trunk/SophyaPI/PI/piwdgx.h
r110 r114 85 85 // Utile pour avoir acces au Display et Screen X ... 86 86 SysDWdg PIXtTopWdg(); 87 XtAppContext* PIXtAppCtx(int& szx, int& szy );87 XtAppContext* PIXtAppCtx(int& szx, int& szy, int& szf); 88 88 Display * PIXDisplay(); 89 89 #define PIXScreen() DefaultScreen(PIXDisplay()) -
trunk/SophyaPI/PI/piwindowx.cc
r90 r114 79 79 { 80 80 XtActionsRec desact = {"CloseWindow" ,CloseWindow}; 81 int szx, szy ;82 XtAppContext * appctx = PIXtAppCtx(szx, szy );81 int szx, szy, szf; 82 XtAppContext * appctx = PIXtAppCtx(szx, szy, szf); 83 83 XtAppAddActions(*appctx, &desact, 1); fgactl = 1; 84 84 }
Note:
See TracChangeset
for help on using the changeset viewer.