Changeset 686 in Sophya for trunk/SophyaPI


Ignore:
Timestamp:
Dec 13, 1999, 7:34:50 PM (26 years ago)
Author:
ercodmgr
Message:

Cosmetiques final pour V_Nov99 - Reza 13/12/99

Location:
trunk/SophyaPI/PIext
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PIext/pintuple.cc

    r685 r686  
    175175  xp = mNT->GetCell(i, xK);
    176176  yp = mNT->GetCell(i, yK);
     177  if ( (xp < xmin2) || (xp > xmax2) || (yp < ymin2) || (yp > ymax2) )  continue;
     178  nok++;
    177179  if ( (xp < xmin) || (xp > xmax) || (yp < ymin) || (yp > ymax) )  continue;
    178   if ( (xp < xmin2) || (xp > xmax2) || (yp < ymin2) || (yp > ymax2) )  continue;
    179180  if ( (i > 0) && (mLAtt != PI_NotDefLineAtt) )   // On relie les points ...
    180181    g->DrawLine(xl, yl, xp, yp);
    181   nok++;
    182182  if ( xebK >= 0 ) {
    183183    xer = mNT->GetCell(i, xebK);
  • trunk/SophyaPI/PIext/pistdimgapp.cc

    r685 r686  
    3434static char WorkDir[256];
    3535
     36// Pour la creation de fenetre info (about piapp)
     37static void createInfoWindow(PIStdImgApp* app);
     38static void deleteInfoWindow();
     39static void showInfoWindow(PIStdImgApp* app);
     40static void hideInfoWindow(PIStdImgApp* app);
    3641
    3742/* ........................................................... */
     
    4651// Les menus
    4752m[0] = new PIMenu(Menubar(),"Fichier");
    48 m[0]->AppendItem("Help", 10100);
     53m[0]->AppendItem("About piapp", 10150);
    4954m[0]->AppendItem("Open-Fits", 10120);
    5055m[0]->AppendItem("Open-PPF", 10130);
    51 m[0]->AppendItem("Close", 10110);
    52 m[0]->AppendItem("delete", 10111);
    5356// m[0]->AppendItem("Options", 10101);
     57m[0]->AppendItem("Help", 10100);
    5458m[0]->AppendItem("Exit", 10105);
    5559
     
    5862m[1]->AppendItem("OpenOutPPF", 10220);
    5963m[1]->AppendItem("CloseOutPPF", 10230);
     64m[1]->AppendItem("Delete CurWdg", 10270);
    6065
    6166m[2] = new PIMenu(Menubar(),"Tools");
     
    8691m[3]->AppendItem("Window 3x3", 10433);
    8792m[3]->AppendItem("Cur->LastWdg", 10441);
     93m[3]->AppendItem("Close CurWin", 10460);
    8894
    8995m[4] = new PIMenu(Menubar(),"PostScript");
     
    159165mObjmgrw = new ObjMgrWind(this);
    160166mPpinmgrw = new PPInMgrWind(this);
     167
     168//  creation de la fenetre info (about piapp)
     169createInfoWindow(this);
    161170
    162171// Attention : A faire apres creation de ObjMgrWind !!!
     
    257266delete mObjmgrw;
    258267delete mPpinmgrw;
     268
     269deleteInfoWindow();
    259270
    260271// Les fichiers
     
    910921  switch(msg)
    911922    {
     923    case 10150 :
     924      showInfoWindow(this);
     925      break;
     926
     927    case 10155 :
     928      hideInfoWindow(this);
     929      break;
     930
    912931    case 10100 :
    913932      mCmd->ShowHelpWindow();
     
    949968      SetReady();
    950969      break;
    951 
    952     case 10110 :
    953       DeleteWindow(mCurWin);
    954       break;
    955970       
    956     case 10111 :
    957       if (mCurWdg) {
    958         int oid = mCurWdg->UserFlag();
    959         DeleteBaseWidget(mCurWdg);
    960         mObjMgr->DelObj_Id(oid);
    961         }
    962       break;
    963 
    964971    case 10105:
    965972      Stop();
     
    10131020    break;
    10141021
     1022  case 10270 :
     1023    if (mCurWdg) {
     1024      int oid = mCurWdg->UserFlag();
     1025      DeleteBaseWidget(mCurWdg);
     1026      mObjMgr->DelObj_Id(oid);
     1027      }
     1028    break;
    10151029
    10161030  default:
     
    11451159    else  cout << " No current widget - select widget with mouse " << endl;
    11461160    break;
     1161    case 10460 :
     1162      DeleteWindow(mCurWin);
     1163      break;
    11471164  default:
    11481165    cerr << "PIStdImgApp::MBProcess4() BUG?? Msg= " <<  msg << endl;   
     
    14141431  maYlog = mSaYlog;
    14151432}
     1433
     1434//  -------------------------------------------------
     1435//        Fenetre info piapp (About piapp)
     1436//  -------------------------------------------------
     1437static PIWindow* infow_win = NULL;
     1438static PIText* infow_txt = NULL;
     1439static PICMapView* infow_cmap = NULL;
     1440static PIButton* infow_but = NULL;
     1441
     1442/* Nouvelle-Fonction */
     1443static void createInfoWindow(PIStdImgApp* app)
     1444{
     1445if (infow_win) return;
     1446
     1447int bsx, bsy;
     1448PIApplicationPrefCompSize(bsx, bsy);
     1449int spx, spy;
     1450spx = bsx/6;   spy = bsy/6;
     1451
     1452infow_win = new PIWindow((PIMsgHandler *)app, "About piapp",
     1453                         PIWK_dialog, bsx*5+3*spx, bsy*4+spy*3, 200, 200);
     1454infow_win->SetAutoDelChilds(true);
     1455infow_txt = new PIText(infow_win,"about_piapp_text", bsx*5+spx, bsy*3, spx, spy);
     1456infow_txt->SetMutiLineMode(true);
     1457infow_txt->SetTextEditable(false);
     1458infow_txt->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
     1459infow_cmap = new PICMapView(infow_win, "about_piapp_cmap", bsx*4, bsy*0.7, spx, 2*spy+bsy*3.15);
     1460infow_cmap->SetColMapId(CMAP_COLBR32, 1., -1., false);
     1461infow_cmap->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
     1462infow_but = new PIButton(infow_win,"OK", 10155, bsx, bsy, bsx*4+2*spx, 2*spy+bsy*3);
     1463infow_but->SetMsgParent((PIMsgHandler *)app);
     1464infow_but->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
     1465char buff[128];
     1466#ifdef SANS_EVOLPLANCK
     1467sprintf(buff, "Version: piapp=%g  PI=%g  PEIDA=%g \n", (double)PIAPP_VERSIONNUMBER,
     1468              (double)PI_VERSIONNUMBER, (float)PeidaVersion());
     1469#else
     1470sprintf(buff, "Version: piapp=%g  PI=%g  SOPHYA=%g \n", (double)PIAPP_VERSIONNUMBER,
     1471              (double)PI_VERSIONNUMBER, piai->Version());
     1472#endif
     1473string info = "piapp : Interactive analysis program\n";
     1474info += buff;
     1475info += "(C) LAL-IN2P3/CNRS  1996-1999\n";
     1476info += "(C) SPP-DAPNIA/CEA  1996-1999\n";
     1477infow_txt->SetText(info);
     1478}
     1479
     1480/* Nouvelle-Fonction */
     1481static void showInfoWindow(PIStdImgApp* app)
     1482{
     1483if (!infow_win) return;
     1484infow_win->Show();
     1485}
     1486/* Nouvelle-Fonction */
     1487static void hideInfoWindow(PIStdImgApp* app)
     1488{
     1489if (!infow_win) return;
     1490infow_win->Hide();
     1491}
     1492
     1493/* Nouvelle-Fonction */
     1494static void deleteInfoWindow()
     1495{
     1496if (!infow_win) return;
     1497delete infow_win;
     1498infow_win = NULL;
     1499infow_txt = NULL;
     1500infow_cmap = NULL;
     1501infow_but = NULL;
     1502}
     1503
  • trunk/SophyaPI/PIext/pistlist.cc

    r685 r686  
    124124  if ( (flx < mFmin) || (flx > mFmax) )  continue;
    125125  xp = sti->PosX();   yp = sti->PosY();
    126   if ( (xp < xmin) || (xp > xmax) || (yp < ymin) || (yp > ymax) )  continue;
    127126  if ( (xp < xmin2) || (xp > xmax2) || (yp < ymin2) || (yp > ymax2) )  continue;
    128127  nok++;
     128  if ( (xp < xmin) || (xp > xmax) || (yp < ymin) || (yp > ymax) )  continue;
    129129  sz = (int)((log10((double)flx/mF0))/mDLgF*(double)nl2-0.01) + msz;
    130130  if (sz < 2)  g->SelMarker(sz, PI_DotMarker);
Note: See TracChangeset for help on using the changeset viewer.