Changeset 331 in Sophya for trunk/SophyaPI/PIext/pistdimgapp.cc


Ignore:
Timestamp:
Jun 28, 1999, 1:56:16 PM (26 years ago)
Author:
ercodmgr
Message:

Ajout SetXYLimits et debut d'introduction de repertoire dans la gestion des objets nommes - Reza 28/6/99

File:
1 edited

Legend:

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

    r295 r331  
    194194mZoom = 0;
    195195mAxesFlags = kBoxAxes | kExtTicks | kLabels;
     196mXmin = mYmin = -1.;
     197mXmax = mYmax = 1;
    196198SaveGraphicAtt();
    197199
     
    367369
    368370/* --Methode-- */
    369 int PIStdImgApp::DispImage(P2DArrayAdapter* nouv, string const & name, int opt)
     371int PIStdImgApp::DispImage(P2DArrayAdapter* nouv, string const & name, int opt, int oid)
    370372{
    371373PIImage* pii;
     
    414416if ( mCmapid != CMAP_OTHER ) pii->SetColMapId(mCmapid, false);
    415417pii->ShowCursor(true);
    416 pii->SetUserData(NULL, flag);
     418pii->SetUserData(NULL, oid);
    417419pii->SetImage(nouv, true);
    418420// printf("!!DBG!! PIImage Pos= %d %d  Size= %d %d \n", pii->XPos(), pii->YPos(), pii->XSize(), pii->YSize()   );
     
    427429
    428430/* --Methode-- */
    429 int PIStdImgApp::DispScDrawer(PIDrawer* scd, string const & name, int opt, string title)
     431int PIStdImgApp::DispScDrawer(PIDrawer* scd, string const & name, int opt, string title, int oid)
    430432{
    431433if (scd == NULL)
     
    462464else scw = new PIH2DWdg(win, (char *)name.c_str(), sx, sy, px, py);
    463465scw->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic);
    464 scw->SetUserData(NULL, flag);
     466scw->SetUserData(NULL, oid);
     467if (mFXYlim)  // Forcage limites XY
     468  scw->SetLimits(mXmin, mXmax, mYmin, mYmax);
    465469scw->SetAxesFlags(mAxesFlags);
    466470
     
    480484
    481485/* --Methode-- */
    482 int PIStdImgApp::Disp3DDrawer(PIDrawer3D* dr3, string const & name, int opt, string title)
     486int PIStdImgApp::Disp3DDrawer(PIDrawer3D* dr3, string const & name, int opt, string title, int oid)
    483487{
    484488if (dr3 == NULL)
     
    512516PIDraw3DWdg* wd3 = new PIDraw3DWdg(win, (char *)name.c_str(), sx, sy, px, py);
    513517wd3->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic);
    514 wd3->SetUserData(NULL, flag);
     518wd3->SetUserData(NULL, oid);
    515519wd3->AddDrawer3D(dr3, true);
    516520//   Titre du plot
     
    785789      SetBusy();
    786790      if (data)  {
    787         ObjMgr()->ReadFits(pfc->GetFileName());
    788         ObjMgr()->DisplayObj(ObjMgr()->LastObjName(), "win");
     791        string nomobj="";
     792        ObjMgr()->ReadFits(pfc->GetFileName(), nomobj);
     793        ObjMgr()->DisplayObj(nomobj, "win");
    789794      }
    790795      mFCMsg = 0;
     
    816821    case 10111 :
    817822      if (mCurWdg) {
    818         string no = mCurWdg->Nom();
     823        int oid = mCurWdg->UserFlag();
    819824        DeleteBaseWidget(mCurWdg);
    820         mObjMgr->DelObj(no);
     825        mObjMgr->DelObj_Id(oid);
    821826        }
    822827      break;
     
    11931198  mAxesFlags = axfl;
    11941199}
     1200/* --Methode-- */
     1201void PIStdImgApp::SetXYLimits(double xmin, double xmax, double ymin, double ymax)
     1202{
     1203  mXmin = xmin;  mXmax= xmax;
     1204  mYmin = ymin;  mYmax= ymax;
     1205}
    11951206
    11961207/* --Methode-- */
     
    12071218  mSZoom = mZoom;
    12081219  mSAxesFlags = mAxesFlags;
     1220  mSXmin = mXmin;  mSXmax = mXmax;
     1221  mSYmin = mYmin;  mSYmax = mYmax;
     1222  mSFXYlim = mFXYlim;
    12091223}
    12101224
     
    12221236  mZoom = mSZoom;
    12231237  mAxesFlags = mSAxesFlags;
    1224 }
     1238  mXmin = mSXmin;  mXmax = mSXmax;
     1239  mYmin = mSYmin;  mYmax = mSYmax;
     1240  mFXYlim = mSFXYlim;
     1241}
Note: See TracChangeset for help on using the changeset viewer.