Changeset 686 in Sophya for trunk/SophyaPI
- Timestamp:
- Dec 13, 1999, 7:34:50 PM (26 years ago)
- Location:
- trunk/SophyaPI/PIext
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/pintuple.cc
r685 r686 175 175 xp = mNT->GetCell(i, xK); 176 176 yp = mNT->GetCell(i, yK); 177 if ( (xp < xmin2) || (xp > xmax2) || (yp < ymin2) || (yp > ymax2) ) continue; 178 nok++; 177 179 if ( (xp < xmin) || (xp > xmax) || (yp < ymin) || (yp > ymax) ) continue; 178 if ( (xp < xmin2) || (xp > xmax2) || (yp < ymin2) || (yp > ymax2) ) continue;179 180 if ( (i > 0) && (mLAtt != PI_NotDefLineAtt) ) // On relie les points ... 180 181 g->DrawLine(xl, yl, xp, yp); 181 nok++;182 182 if ( xebK >= 0 ) { 183 183 xer = mNT->GetCell(i, xebK); -
trunk/SophyaPI/PIext/pistdimgapp.cc
r685 r686 34 34 static char WorkDir[256]; 35 35 36 // Pour la creation de fenetre info (about piapp) 37 static void createInfoWindow(PIStdImgApp* app); 38 static void deleteInfoWindow(); 39 static void showInfoWindow(PIStdImgApp* app); 40 static void hideInfoWindow(PIStdImgApp* app); 36 41 37 42 /* ........................................................... */ … … 46 51 // Les menus 47 52 m[0] = new PIMenu(Menubar(),"Fichier"); 48 m[0]->AppendItem(" Help", 10100);53 m[0]->AppendItem("About piapp", 10150); 49 54 m[0]->AppendItem("Open-Fits", 10120); 50 55 m[0]->AppendItem("Open-PPF", 10130); 51 m[0]->AppendItem("Close", 10110);52 m[0]->AppendItem("delete", 10111);53 56 // m[0]->AppendItem("Options", 10101); 57 m[0]->AppendItem("Help", 10100); 54 58 m[0]->AppendItem("Exit", 10105); 55 59 … … 58 62 m[1]->AppendItem("OpenOutPPF", 10220); 59 63 m[1]->AppendItem("CloseOutPPF", 10230); 64 m[1]->AppendItem("Delete CurWdg", 10270); 60 65 61 66 m[2] = new PIMenu(Menubar(),"Tools"); … … 86 91 m[3]->AppendItem("Window 3x3", 10433); 87 92 m[3]->AppendItem("Cur->LastWdg", 10441); 93 m[3]->AppendItem("Close CurWin", 10460); 88 94 89 95 m[4] = new PIMenu(Menubar(),"PostScript"); … … 159 165 mObjmgrw = new ObjMgrWind(this); 160 166 mPpinmgrw = new PPInMgrWind(this); 167 168 // creation de la fenetre info (about piapp) 169 createInfoWindow(this); 161 170 162 171 // Attention : A faire apres creation de ObjMgrWind !!! … … 257 266 delete mObjmgrw; 258 267 delete mPpinmgrw; 268 269 deleteInfoWindow(); 259 270 260 271 // Les fichiers … … 910 921 switch(msg) 911 922 { 923 case 10150 : 924 showInfoWindow(this); 925 break; 926 927 case 10155 : 928 hideInfoWindow(this); 929 break; 930 912 931 case 10100 : 913 932 mCmd->ShowHelpWindow(); … … 949 968 SetReady(); 950 969 break; 951 952 case 10110 :953 DeleteWindow(mCurWin);954 break;955 970 956 case 10111 :957 if (mCurWdg) {958 int oid = mCurWdg->UserFlag();959 DeleteBaseWidget(mCurWdg);960 mObjMgr->DelObj_Id(oid);961 }962 break;963 964 971 case 10105: 965 972 Stop(); … … 1013 1020 break; 1014 1021 1022 case 10270 : 1023 if (mCurWdg) { 1024 int oid = mCurWdg->UserFlag(); 1025 DeleteBaseWidget(mCurWdg); 1026 mObjMgr->DelObj_Id(oid); 1027 } 1028 break; 1015 1029 1016 1030 default: … … 1145 1159 else cout << " No current widget - select widget with mouse " << endl; 1146 1160 break; 1161 case 10460 : 1162 DeleteWindow(mCurWin); 1163 break; 1147 1164 default: 1148 1165 cerr << "PIStdImgApp::MBProcess4() BUG?? Msg= " << msg << endl; … … 1414 1431 maYlog = mSaYlog; 1415 1432 } 1433 1434 // ------------------------------------------------- 1435 // Fenetre info piapp (About piapp) 1436 // ------------------------------------------------- 1437 static PIWindow* infow_win = NULL; 1438 static PIText* infow_txt = NULL; 1439 static PICMapView* infow_cmap = NULL; 1440 static PIButton* infow_but = NULL; 1441 1442 /* Nouvelle-Fonction */ 1443 static void createInfoWindow(PIStdImgApp* app) 1444 { 1445 if (infow_win) return; 1446 1447 int bsx, bsy; 1448 PIApplicationPrefCompSize(bsx, bsy); 1449 int spx, spy; 1450 spx = bsx/6; spy = bsy/6; 1451 1452 infow_win = new PIWindow((PIMsgHandler *)app, "About piapp", 1453 PIWK_dialog, bsx*5+3*spx, bsy*4+spy*3, 200, 200); 1454 infow_win->SetAutoDelChilds(true); 1455 infow_txt = new PIText(infow_win,"about_piapp_text", bsx*5+spx, bsy*3, spx, spy); 1456 infow_txt->SetMutiLineMode(true); 1457 infow_txt->SetTextEditable(false); 1458 infow_txt->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 1459 infow_cmap = new PICMapView(infow_win, "about_piapp_cmap", bsx*4, bsy*0.7, spx, 2*spy+bsy*3.15); 1460 infow_cmap->SetColMapId(CMAP_COLBR32, 1., -1., false); 1461 infow_cmap->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 1462 infow_but = new PIButton(infow_win,"OK", 10155, bsx, bsy, bsx*4+2*spx, 2*spy+bsy*3); 1463 infow_but->SetMsgParent((PIMsgHandler *)app); 1464 infow_but->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 1465 char buff[128]; 1466 #ifdef SANS_EVOLPLANCK 1467 sprintf(buff, "Version: piapp=%g PI=%g PEIDA=%g \n", (double)PIAPP_VERSIONNUMBER, 1468 (double)PI_VERSIONNUMBER, (float)PeidaVersion()); 1469 #else 1470 sprintf(buff, "Version: piapp=%g PI=%g SOPHYA=%g \n", (double)PIAPP_VERSIONNUMBER, 1471 (double)PI_VERSIONNUMBER, piai->Version()); 1472 #endif 1473 string info = "piapp : Interactive analysis program\n"; 1474 info += buff; 1475 info += "(C) LAL-IN2P3/CNRS 1996-1999\n"; 1476 info += "(C) SPP-DAPNIA/CEA 1996-1999\n"; 1477 infow_txt->SetText(info); 1478 } 1479 1480 /* Nouvelle-Fonction */ 1481 static void showInfoWindow(PIStdImgApp* app) 1482 { 1483 if (!infow_win) return; 1484 infow_win->Show(); 1485 } 1486 /* Nouvelle-Fonction */ 1487 static void hideInfoWindow(PIStdImgApp* app) 1488 { 1489 if (!infow_win) return; 1490 infow_win->Hide(); 1491 } 1492 1493 /* Nouvelle-Fonction */ 1494 static void deleteInfoWindow() 1495 { 1496 if (!infow_win) return; 1497 delete infow_win; 1498 infow_win = NULL; 1499 infow_txt = NULL; 1500 infow_cmap = NULL; 1501 infow_but = NULL; 1502 } 1503 -
trunk/SophyaPI/PIext/pistlist.cc
r685 r686 124 124 if ( (flx < mFmin) || (flx > mFmax) ) continue; 125 125 xp = sti->PosX(); yp = sti->PosY(); 126 if ( (xp < xmin) || (xp > xmax) || (yp < ymin) || (yp > ymax) ) continue;127 126 if ( (xp < xmin2) || (xp > xmax2) || (yp < ymin2) || (yp > ymax2) ) continue; 128 127 nok++; 128 if ( (xp < xmin) || (xp > xmax) || (yp < ymin) || (yp > ymax) ) continue; 129 129 sz = (int)((log10((double)flx/mF0))/mDLgF*(double)nl2-0.01) + msz; 130 130 if (sz < 2) g->SelMarker(sz, PI_DotMarker);
Note:
See TracChangeset
for help on using the changeset viewer.