Changeset 331 in Sophya for trunk/SophyaPI/PIext
- Timestamp:
- Jun 28, 1999, 1:56:16 PM (26 years ago)
- Location:
- trunk/SophyaPI/PIext
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/basexecut.cc
r330 r331 68 68 mObjMgr->SetGraphicAttributes(tokens[0]); 69 69 } 70 70 else if (kw == "setxylimits") { 71 if (tokens.size() < 4) { cout << "Usage: setxylimits xmin xmax ymin ymax" << endl; return(0); } 72 double xmin = atof(tokens[0].c_str()); 73 double xmax = atof(tokens[1].c_str()); 74 double ymin = atof(tokens[2].c_str()); 75 double ymax = atof(tokens[3].c_str()); 76 mImgApp->SetXYLimits(xmin, xmax, ymin, ymax); 77 } 71 78 // >>>>>>>>>>> Link dynamique de fonctions C++ 72 79 else if (kw == "link" ) { … … 107 114 else if (kw == "openfits" ) { 108 115 if (tokens.size() < 1) { cout << "Usage: openfits file " << endl; return(0); } 109 else mObjMgr->ReadFits(tokens[0]);116 else { string nomobj = ""; mObjMgr->ReadFits(tokens[0], nomobj); } 110 117 } 111 118 else if (kw == "savefits" ) { … … 137 144 mObjMgr->DelObjects(tokens[0]); 138 145 } 139 else if (kw == "listobjs") mObjMgr->ListObjs(); 146 else if (kw == "listobjs") { 147 if (tokens.size() < 1) tokens.push_back("*"); 148 mObjMgr->ListObjs(tokens[0]); 149 } 140 150 141 151 // >>>>>>>>>>> Creation d'histos 1D-2D … … 488 498 usage += ">> Axes: stdaxes=defaxes=boxaxes simpleaxes boxaxesgrid \n"; 489 499 usage += " fineaxes grid=fineaxesgrid \n"; 500 usage += ">> XYLimits : xylimits -> Forces X-Y limits in 2-D plots \n"; 490 501 usage += ">> DisplayWindow: next same win stack \n"; 502 usage += " Related commands: setxylimits"; 503 mpiac->RegisterCommand(kw, usage, this, "Graphics"); 504 505 kw = "setxylimits"; 506 usage = "Define 2-D plot limits \n Usage: setxylimits xmin xmax ymin ymax"; 507 usage += "\n Related commands: gratt"; 491 508 mpiac->RegisterCommand(kw, usage, this, "Graphics"); 492 509 -
trunk/SophyaPI/PIext/nobjmgr.cc
r330 r331 65 65 // .................................................................. 66 66 // ...... Gestion des objets nommes, variables globales ............ 67 struct nobj_diritem { 68 int id; 69 int nobj; 70 }; 71 72 typedef map<string, nobj_diritem, less<string> > NObjDirList; 73 67 74 struct nobj_item { 68 75 AnyDataObj* obj; 69 76 NObjMgrAdapter* obja; 70 77 int num; 78 int dirid; 71 79 list<int> wrsid; 72 80 bool operator==(nobj_item const& b) const … … 76 84 typedef map<string, nobj_item, less<string> > NObjList; 77 85 78 static NObjList* myObjs; 86 static NObjDirList* myDirs = NULL; 87 static NObjList* myObjs = NULL; 79 88 static int fgOInit = 0; 80 89 static int myNObj = 0; 81 static string* lastobj = NULL; 90 static int myDirId = 0; 91 static string* currDir; 82 92 83 93 static PIStdImgApp* myImgApp=NULL; … … 101 111 { 102 112 if (fgOInit == 0) { 113 myDirs = new NObjDirList; 103 114 myObjs = new NObjList; 104 lastobj = new string("");115 currDir = new string("home"); 105 116 char* varenv; 106 117 TmpDir = new string(""); … … 149 160 { 150 161 return(servnobjm); 162 } 163 164 /* --Methode-- */ 165 void NamedObjMgr::CreateDir(string const& dirname) 166 { 167 } 168 169 /* --Methode-- */ 170 void NamedObjMgr::DeleteDir(string const& dirname) 171 { 172 } 173 174 /* --Methode-- */ 175 void NamedObjMgr::SetCurrentDir(string const& dirname) 176 { 177 } 178 179 /* --Methode-- */ 180 void NamedObjMgr::CleanTmpDir() 181 { 182 } 183 184 /* --Methode-- */ 185 void NamedObjMgr::CleanOldDir() 186 { 151 187 } 152 188 … … 169 205 // void RenameObj(string const& nom, string& nomnew) 170 206 // Change le nom d'un objet dans la liste. 171 // string LastObjName()172 // Renvoie le nom du dernier objet ajouté à la liste173 207 //-- 174 208 175 209 176 210 /* --Methode-- */ 177 void NamedObjMgr::AddObj(AnyDataObj* obj, string & nom, bool)211 void NamedObjMgr::AddObj(AnyDataObj* obj, string & nom, bool) 178 212 { 179 213 … … 200 234 } 201 235 202 (*lastobj) = nom;203 236 nobj_item no; 204 237 no.obj = obj; 205 238 no.obja = servnobjm->GetAdapter(obj); // L'adaptateur 206 239 no.num = myNObj; 207 (*myObjs)[ (*lastobj)] = no;240 (*myObjs)[nom] = no; 208 241 if (myImgApp) { 209 string str = (*lastobj)+ " (T= " + typeid(*obj).name() + ")" ;242 string str = nom + " (T= " + typeid(*obj).name() + ")" ; 210 243 (myImgApp->ObjMgrW())->AddObj(str.c_str(), myNObj+1000); 211 244 } 212 245 213 cout << "NamedObjMgr::AddObj() Object " << (*lastobj)<< " ( "246 cout << "NamedObjMgr::AddObj() Object " << nom << " ( " 214 247 << typeid(*obj).name() << " ) added (Total= " << myObjs->size() << ")" << endl; 215 248 return; … … 217 250 218 251 /* --Methode-- */ 219 void NamedObjMgr::DelObj(string const& nom, bool fgd) 252 void NamedObjMgr::RenameObj(string & nom, string& nomnew) 253 { 254 AnyDataObj* obj = GetObj(nom); 255 if (obj == NULL) return; 256 DelObj(nom, false); 257 AddObj(obj, nomnew); 258 return; 259 } 260 261 /* --Methode-- */ 262 void NamedObjMgr::DelObj(string & nom, bool fgd) 220 263 { 221 264 NObjList::iterator it = myObjs->find(nom); … … 237 280 238 281 /* --Methode-- */ 239 void NamedObjMgr::DelObjects(string const& patt, bool fgd) 282 void NamedObjMgr::DelObj_Id(int oid) 283 { 284 } 285 286 /* --Methode-- */ 287 void NamedObjMgr::DelObjects(string & patt, bool fgd) 240 288 { 241 289 NObjList::iterator it; … … 251 299 252 300 /* --Methode-- */ 253 AnyDataObj* NamedObjMgr::GetObj(string const& nom)301 AnyDataObj* NamedObjMgr::GetObj(string & nom) 254 302 { 255 303 NObjList::iterator it = myObjs->find(nom); … … 259 307 260 308 /* --Methode-- */ 261 NObjMgrAdapter* NamedObjMgr::GetObjAdapter(string const& nom)309 NObjMgrAdapter* NamedObjMgr::GetObjAdapter(string & nom) 262 310 { 263 311 NObjList::iterator it = myObjs->find(nom); … … 267 315 268 316 /* --Methode-- */ 269 void NamedObjMgr::RenameObj(string const& nom, string& nomnew) 270 { 271 AnyDataObj* obj = GetObj(nom); 272 if (obj == NULL) return; 273 DelObj(nom, false); 274 AddObj(obj, nomnew); 275 return; 276 } 277 278 /* --Methode-- */ 279 string NamedObjMgr::LastObjName() 280 { 281 return((*lastobj)); 317 void NamedObjMgr::ListObjs(string & patt) 318 { 319 int k; 320 AnyDataObj* obj=NULL; 321 string ctyp; 322 char strg[256]; 323 324 cout << "NamedObjMgr::ListObjs() NObjs= " << myObjs->size() << "\n" ; 325 NObjList::iterator it; k = 0; 326 for(it = myObjs->begin(); it != myObjs->end(); it++) { 327 obj = (*it).second.obj; 328 329 ctyp = typeid(*obj).name(); 330 sprintf(strg, "%2d/ %16s : %s", k, typeid(*obj).name(), ((*it).first).c_str()); 331 ctyp = strg; 332 cout << ctyp << "\n" ; 333 k++; 334 } 335 cout << endl; 336 return; 337 } 338 339 /* --Methode-- */ 340 void NamedObjMgr::GetObjList(string & patt, vector<string> &) 341 { 282 342 } 283 343 … … 297 357 298 358 /* --Methode-- */ 299 void NamedObjMgr::ReadObj(string const & flnm, string nobj)359 void NamedObjMgr::ReadObj(string const & flnm, string & nobj) 300 360 { 301 361 PPersist* obj=NULL; … … 387 447 388 448 /* --Methode-- */ 389 void NamedObjMgr::ReadFits(string const & flnm, string nobj)449 void NamedObjMgr::ReadFits(string const & flnm, string & nobj) 390 450 { 391 451 bool ok = true; … … 415 475 static int key_for_write = 5000; 416 476 /* --Methode-- */ 417 void NamedObjMgr::SaveObj(string const& nom, POutPersist& s)477 void NamedObjMgr::SaveObj(string & nom, POutPersist& s) 418 478 { 419 479 NObjMgrAdapter* obja=NULL; … … 445 505 446 506 /* --Methode-- */ 447 void NamedObjMgr::SaveFits(string const& nom, string const & flnm)507 void NamedObjMgr::SaveFits(string& nom, string const & flnm) 448 508 { 449 509 NObjMgrAdapter* obja=NULL; … … 455 515 456 516 457 /* --Methode-- */ 458 void NamedObjMgr::ListObjs() 459 { 460 int k; 461 AnyDataObj* obj=NULL; 462 string ctyp; 463 char strg[256]; 464 465 cout << "NamedObjMgr::ListObjs() NObjs= " << myObjs->size() << "\n" ; 466 NObjList::iterator it; k = 0; 467 for(it = myObjs->begin(); it != myObjs->end(); it++) { 468 obj = (*it).second.obj; 469 470 ctyp = typeid(*obj).name(); 471 sprintf(strg, "%2d/ %16s : %s", k, typeid(*obj).name(), ((*it).first).c_str()); 472 ctyp = strg; 473 cout << ctyp << "\n" ; 474 k++; 475 } 476 cout << endl; 477 return; 478 } 479 480 /* --Methode-- */ 481 void NamedObjMgr::PrintObj(string const& nom) 517 518 /* --Methode-- */ 519 void NamedObjMgr::PrintObj(string& nom) 482 520 { 483 521 NObjMgrAdapter* obja=NULL; … … 493 531 494 532 /* --Methode-- */ 495 void NamedObjMgr::DisplayObj(string const& nom, string dopt)533 void NamedObjMgr::DisplayObj(string& nom, string dopt) 496 534 { 497 535 NObjMgrAdapter* obja=NULL; … … 535 573 536 574 /* --Methode-- */ 537 void NamedObjMgr::DisplayImage(string const& nom, string dopt)575 void NamedObjMgr::DisplayImage(string& nom, string dopt) 538 576 { 539 577 NObjMgrAdapter* obja=NULL; … … 567 605 } 568 606 /* --Methode-- */ 569 void NamedObjMgr::DisplaySurf3D(string const& nom, string dopt)607 void NamedObjMgr::DisplaySurf3D(string& nom, string dopt) 570 608 { 571 609 NObjMgrAdapter* obja=NULL; … … 608 646 609 647 /* --Methode-- */ 610 void NamedObjMgr::DisplayNT(string const& nom, string& nmx, string& nmy, string& nmz,648 void NamedObjMgr::DisplayNT(string& nom, string& nmx, string& nmy, string& nmz, 611 649 string& erx, string& ery, string& erz, string dopt) 612 650 { … … 657 695 658 696 /* --Methode-- cmv 13/10/98 */ 659 void NamedObjMgr::DisplayGFD(string const& nom, string& numvarx, string& numvary, string& err, string dopt)697 void NamedObjMgr::DisplayGFD(string& nom, string& numvarx, string& numvary, string& err, string dopt) 660 698 // Pour le display 2D ou 3D d'un ``GeneralFitData''. 661 699 //| nom = nom de l'objet GeneralFitData a representer. … … 719 757 720 758 /* --Methode-- 721 void NamedObjMgr::DisplayImage(string const& nom, string dopt)759 void NamedObjMgr::DisplayImage(string& nom, string dopt) 722 760 { 723 761 cout << "NamedObjMgr::DisplayImage() a faire ! " << endl; … … 743 781 744 782 /* --Methode-- */ 745 void NamedObjMgr::DisplayPoints2D(string const& nom, string& expx, string& expy,783 void NamedObjMgr::DisplayPoints2D(string& nom, string& expx, string& expy, 746 784 string& experrx, string& experry, 747 785 string& expcut, string dopt) … … 787 825 788 826 /* --Methode-- */ 789 void NamedObjMgr::DisplayPoints3D(string const& nom, string& expx, string& expy, string& expz,827 void NamedObjMgr::DisplayPoints3D(string& nom, string& expx, string& expy, string& expz, 790 828 string& expcut, string dopt) 791 829 { … … 829 867 830 868 /* --Methode-- */ 831 void NamedObjMgr::ProjectH1(string const& nom, string& expx, string& expwt, string& expcut, string& nomh1, string dopt)869 void NamedObjMgr::ProjectH1(string& nom, string& expx, string& expwt, string& expcut, string& nomh1, string dopt) 832 870 { 833 871 NObjMgrAdapter* obja=NULL; … … 877 915 878 916 /* --Methode-- */ 879 void NamedObjMgr::ProjectH2(string const& nom, string& expx, string& expy, string& expwt, string& expcut,917 void NamedObjMgr::ProjectH2(string& nom, string& expx, string& expy, string& expwt, string& expcut, 880 918 string& nomh2, string dopt) 881 919 { … … 928 966 929 967 /* --Methode-- cmv 13/10/98 */ 930 void NamedObjMgr::ProjectHProf(string const& nom, string& expx, string& expy, string& expwt, string& expcut,968 void NamedObjMgr::ProjectHProf(string& nom, string& expx, string& expy, string& expwt, string& expcut, 931 969 string& nomprof, string dopt) 932 970 // Pour remplir un ``GeneralFitData'' a partir de divers objets: … … 988 1026 989 1027 /* --Methode-- */ 990 void NamedObjMgr::FillVect(string const& nom, string& expx, string& expcut, string& nomvec, string dopt)1028 void NamedObjMgr::FillVect(string& nom, string& expx, string& expcut, string& nomvec, string dopt) 991 1029 { 992 1030 NObjMgrAdapter* obja=NULL; … … 1029 1067 1030 1068 /* --Methode-- */ 1031 void NamedObjMgr::FillNT(string const& nom, string& expx, string& expy, string& expz, string& expt,1069 void NamedObjMgr::FillNT(string& nom, string& expx, string& expy, string& expz, string& expt, 1032 1070 string& expcut, string& nomnt) 1033 1071 { … … 1066 1104 1067 1105 /* --Methode-- cmv 13/10/98 */ 1068 void NamedObjMgr::FillGFD(string const& nom, string& expx, string& expy, string& expz,1106 void NamedObjMgr::FillGFD(string& nom, string& expx, string& expy, string& expz, 1069 1107 string& experr, string& expcut, string& nomgfd) 1070 1108 // Pour remplir un ``GeneralFitData'' a partir de divers objets: … … 1246 1284 1247 1285 /* --Methode-- cmv 13/10/98 */ 1248 void NamedObjMgr:: Fit12D(string const& nom, string& func,1286 void NamedObjMgr:: Fit12D(string& nom, string& func, 1249 1287 string par,string step,string min,string max, 1250 1288 string opt) -
trunk/SophyaPI/PIext/nobjmgr.h
r326 r331 7 7 #define NOBJMGR_H_SEEN 8 8 9 #include "ppersist.h" 9 #include "machdefs.h" 10 #include "anydataobj.h" 10 11 #include "dlftypes.h" 11 #include "anydataobj.h" 12 13 #include <string> 14 #include <vector> 15 #if defined(__KCC__) 16 using std::string ; 17 #include <vector.h> 18 #endif 12 19 13 20 class NObjMgrAdapter; … … 24 31 25 32 26 // Pour ajouter, supprimer et acceder aux objets PPersist 27 virtual void AddObj(AnyDataObj* obj, string& nom, bool crd=false); 28 virtual void DelObj(string const& nom, bool fgd=true); 29 virtual void DelObjects(string const& patt, bool fgd=true); 30 virtual AnyDataObj* GetObj(string const& nom); 31 virtual void RenameObj(string const& nom, string& nomnew); 32 virtual string LastObjName(); // Renvoie le nom du dernier objet ajoute 33 // Gestion des repertoires 34 virtual void CreateDir(string const& dirname); 35 virtual void DeleteDir(string const& dirname); 36 virtual void SetCurrentDir(string const& dirname); 37 virtual void CleanTmpDir(); 38 virtual void CleanOldDir(); 39 40 // Pour ajouter, supprimer et acceder aux objets 41 virtual void AddObj(AnyDataObj* obj, string & nom, bool crd=false); 42 virtual void RenameObj(string & nom, string& nomnew); 43 virtual void DelObj(string & nom, bool fgd=true); 44 virtual void DelObjects(string & patt, bool fgd=true); 45 virtual void DelObj_Id(int oid); 46 virtual AnyDataObj* GetObj(string & nom); 47 virtual void ListObjs(string & patt); 48 virtual void GetObjList(string & patt, vector<string>& ); 33 49 34 50 // Lecture et sauvegarde des objets sur fichier 35 51 virtual void ReadObj(PInPersist& s, int num=-1); 36 virtual void ReadObj(string const & nomppf, string nobj="");52 virtual void ReadObj(string const & nomppf, string & nobj); 37 53 virtual void ReadAll(string const & nomppf); 38 virtual void ReadFits(string const & flnm, string nobj="");39 virtual void SaveObj(string const& nom, POutPersist& s);54 virtual void ReadFits(string const & flnm, string & nobj); 55 virtual void SaveObj(string & nom, POutPersist& s); 40 56 virtual void SaveAll(string const& nomppf); 41 virtual void SaveFits(string const& nom, string const & flnm);57 virtual void SaveFits(string & nom, string const & flnm); 42 58 43 59 // Info sur les objets 44 virtual void ListObjs(); 45 virtual void PrintObj(string const& nom); 60 virtual void PrintObj(string & nom); 46 61 47 62 // Affichage des objets 48 virtual void DisplayObj(string const& nom, string dopt="");49 virtual void DisplayImage(string const& nom, string dopt="");50 virtual void DisplaySurf3D(string const& nom, string dopt="");51 virtual void DisplayNT(string const& nom, string& nmx, string& nmy, string& nmz,63 virtual void DisplayObj(string & nom, string dopt=""); 64 virtual void DisplayImage(string & nom, string dopt=""); 65 virtual void DisplaySurf3D(string & nom, string dopt=""); 66 virtual void DisplayNT(string & nom, string& nmx, string& nmy, string& nmz, 52 67 string& erx, string& ery, string& erz, string dopt=""); 53 virtual void DisplayGFD(string const& nom, string& numvarx, string& numvary, string& err, string dopt="");68 virtual void DisplayGFD(string & nom, string& numvarx, string& numvary, string& err, string dopt=""); 54 69 55 70 virtual void SetGraphicAttributes(string gratt=""); … … 58 73 59 74 // Trace d'expression de NTuple, et d'autres objets 60 virtual void DisplayPoints2D(string const& nom, string& expx, string& expy,75 virtual void DisplayPoints2D(string & nom, string& expx, string& expy, 61 76 string& experrx, string& experry, 62 77 string& expcut, string dopt=""); 63 virtual void DisplayPoints3D(string const& nom, string& expx, string& expy, string& expz,78 virtual void DisplayPoints3D(string & nom, string& expx, string& expy, string& expz, 64 79 string& expcut, string dopt=""); 65 80 // Projection d'expressions dans histogramme (et trace) 66 virtual void ProjectH1(string const& nom, string& expx, string& expwt, string& expcut,81 virtual void ProjectH1(string & nom, string& expx, string& expwt, string& expcut, 67 82 string& nomh1, string dopt=""); 68 virtual void ProjectH2(string const& nom, string& expx, string& expy, string& expwt,83 virtual void ProjectH2(string & nom, string& expx, string& expy, string& expwt, 69 84 string& expcut, string& nomh2, string dopt=""); 70 virtual void ProjectHProf(string const& nom, string& expx, string& expy, string& expwt,85 virtual void ProjectHProf(string & nom, string& expx, string& expy, string& expwt, 71 86 string& expcut, string& nomprof, string dopt=""); 72 87 // Projection d'expression dans vecteurs et dans n-tuple 73 virtual void FillVect(string const& nom, string& expx, string& expcut,88 virtual void FillVect(string & nom, string& expx, string& expcut, 74 89 string& nomvec, string dopt=""); 75 virtual void FillNT(string const& nom, string& expx, string& expy, string& expz,90 virtual void FillNT(string & nom, string& expx, string& expy, string& expz, 76 91 string& expt, string& expcut, string& nomnt); 77 virtual void FillGFD(string const& nom, string& expx, string& expy, string& expz,92 virtual void FillGFD(string & nom, string& expx, string& expy, string& expz, 78 93 string& experr, string& expcut, string& nomgfd); 79 94 80 95 // Methodes de fit, a rajouter (pour CMV , deux methodes H1 H2 ou 1 seule ??) ... 81 virtual void Fit12D(string const& nom, string& func,96 virtual void Fit12D(string & nom, string& func, 82 97 string par,string step,string min,string max,string opt); 83 98 … … 87 102 88 103 protected : 89 virtual NObjMgrAdapter* GetObjAdapter(string const& nom);104 virtual NObjMgrAdapter* GetObjAdapter(string & nom); 90 105 }; 91 106 -
trunk/SophyaPI/PIext/pistdimgapp.cc
r295 r331 194 194 mZoom = 0; 195 195 mAxesFlags = kBoxAxes | kExtTicks | kLabels; 196 mXmin = mYmin = -1.; 197 mXmax = mYmax = 1; 196 198 SaveGraphicAtt(); 197 199 … … 367 369 368 370 /* --Methode-- */ 369 int PIStdImgApp::DispImage(P2DArrayAdapter* nouv, string const & name, int opt )371 int PIStdImgApp::DispImage(P2DArrayAdapter* nouv, string const & name, int opt, int oid) 370 372 { 371 373 PIImage* pii; … … 414 416 if ( mCmapid != CMAP_OTHER ) pii->SetColMapId(mCmapid, false); 415 417 pii->ShowCursor(true); 416 pii->SetUserData(NULL, flag);418 pii->SetUserData(NULL, oid); 417 419 pii->SetImage(nouv, true); 418 420 // printf("!!DBG!! PIImage Pos= %d %d Size= %d %d \n", pii->XPos(), pii->YPos(), pii->XSize(), pii->YSize() ); … … 427 429 428 430 /* --Methode-- */ 429 int PIStdImgApp::DispScDrawer(PIDrawer* scd, string const & name, int opt, string title )431 int PIStdImgApp::DispScDrawer(PIDrawer* scd, string const & name, int opt, string title, int oid) 430 432 { 431 433 if (scd == NULL) … … 462 464 else scw = new PIH2DWdg(win, (char *)name.c_str(), sx, sy, px, py); 463 465 scw->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic); 464 scw->SetUserData(NULL, flag); 466 scw->SetUserData(NULL, oid); 467 if (mFXYlim) // Forcage limites XY 468 scw->SetLimits(mXmin, mXmax, mYmin, mYmax); 465 469 scw->SetAxesFlags(mAxesFlags); 466 470 … … 480 484 481 485 /* --Methode-- */ 482 int PIStdImgApp::Disp3DDrawer(PIDrawer3D* dr3, string const & name, int opt, string title )486 int PIStdImgApp::Disp3DDrawer(PIDrawer3D* dr3, string const & name, int opt, string title, int oid) 483 487 { 484 488 if (dr3 == NULL) … … 512 516 PIDraw3DWdg* wd3 = new PIDraw3DWdg(win, (char *)name.c_str(), sx, sy, px, py); 513 517 wd3->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic); 514 wd3->SetUserData(NULL, flag);518 wd3->SetUserData(NULL, oid); 515 519 wd3->AddDrawer3D(dr3, true); 516 520 // Titre du plot … … 785 789 SetBusy(); 786 790 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"); 789 794 } 790 795 mFCMsg = 0; … … 816 821 case 10111 : 817 822 if (mCurWdg) { 818 string no = mCurWdg->Nom();823 int oid = mCurWdg->UserFlag(); 819 824 DeleteBaseWidget(mCurWdg); 820 mObjMgr->DelObj (no);825 mObjMgr->DelObj_Id(oid); 821 826 } 822 827 break; … … 1193 1198 mAxesFlags = axfl; 1194 1199 } 1200 /* --Methode-- */ 1201 void PIStdImgApp::SetXYLimits(double xmin, double xmax, double ymin, double ymax) 1202 { 1203 mXmin = xmin; mXmax= xmax; 1204 mYmin = ymin; mYmax= ymax; 1205 } 1195 1206 1196 1207 /* --Methode-- */ … … 1207 1218 mSZoom = mZoom; 1208 1219 mSAxesFlags = mAxesFlags; 1220 mSXmin = mXmin; mSXmax = mXmax; 1221 mSYmin = mYmin; mSYmax = mYmax; 1222 mSFXYlim = mFXYlim; 1209 1223 } 1210 1224 … … 1222 1236 mZoom = mSZoom; 1223 1237 mAxesFlags = mSAxesFlags; 1224 } 1238 mXmin = mSXmin; mXmax = mSXmax; 1239 mYmin = mSYmin; mYmax = mSYmax; 1240 mFXYlim = mSFXYlim; 1241 } -
trunk/SophyaPI/PIext/pistdimgapp.h
r295 r331 46 46 virtual void SetBlocked(); 47 47 48 int DispImage(P2DArrayAdapter* nouv, string const & name, int opt );49 int DispScDrawer(PIDrawer* scd, string const & name, int opt, string title="" );50 int Disp3DDrawer(PIDrawer3D* scd, string const & name, int opt, string title="" );48 int DispImage(P2DArrayAdapter* nouv, string const & name, int opt, int oid=0); 49 int DispScDrawer(PIDrawer* scd, string const & name, int opt, string title="", int oid=0); 50 int Disp3DDrawer(PIDrawer3D* scd, string const & name, int opt, string title="", int oid=0); 51 51 52 52 void CreateGraphWin(int nx=1, int ny=1, int sx=0, int sy = 0); … … 94 94 void SetZoomAtt(int zoom=0); 95 95 void SetAxesAtt(unsigned int axfl=kBoxAxes | kExtTicks | kLabels); 96 void SetXYLimits(double xmin=-1., double xmax=1., double ymin=-1., double ymax=1.); 97 inline void UseXYLimits(bool fg=false) { mFXYlim=fg; } 96 98 // Pour sauvegarder-restauration de l'etat des attributs graphiques 97 99 void SaveGraphicAtt(); … … 158 160 int mZoom, mSZoom; 159 161 unsigned int mAxesFlags, mSAxesFlags; 162 double mXmin, mXmax, mYmin, mYmax; 163 double mSXmin, mSXmax, mSYmin, mSYmax; 164 bool mFXYlim, mSFXYlim; 160 165 161 166 PIMessage mFCMsg; // Message for processing FileOpen -
trunk/SophyaPI/PIext/servnobjm.cc
r330 r331 401 401 mImgapp->SetColMapId(); 402 402 mImgapp->SetZoomAtt(); 403 mImgapp->SetAxesAtt(); 404 mImgapp->SetXYLimits(); 405 mImgapp->UseXYLimits(); 403 406 return(ropt); 404 407 } … … 438 441 else fgcont = false; 439 442 if (fgcont) continue; 440 443 444 // Utilisation limites X-Y 445 if ( grt[k] == "xylimits" ) { mImgapp->UseXYLimits(true); fgsrgr = true; continue; } 441 446 // Si c'est une couleur 442 447 it = GrAcolors.find(grt[k]);
Note:
See TracChangeset
for help on using the changeset viewer.