Changeset 1856 in Sophya
- Timestamp:
- Jan 12, 2002, 1:43:47 AM (24 years ago)
- Location:
- trunk/SophyaPI/PIext
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/pihisto.cc
r1645 r1856 38 38 mAdDO = ad; // Flag pour suppression automatique de mHisto 39 39 SetStats(true); 40 SetName("HistoDrw"); 40 41 } 41 42 -
trunk/SophyaPI/PIext/pihisto2d.cc
r1850 r1856 1 1 #include <stdio.h> 2 2 #include <stdlib.h> 3 #include "piapplgen.h" 3 #include <pisysdep.h> 4 #include PIAPP_H 4 5 #include "pihisto2d.h" 5 6 #include "nbrandom.h" … … 40 41 UseDyn(); 41 42 UseFrac(); 43 SetName("Histo2DDrw"); 44 // PIHisto2D has specific control tools 45 mFgSpecContWind = true; 42 46 } 43 47 … … 190 194 SetLimits(mHisto->XMin(), mHisto->XMax(), mHisto->YMin() , mHisto->YMax()); 191 195 } 196 197 //++ 198 void PIHisto2D::ShowControlWindow(PIBaseWdgGen* wdg) 199 // 200 // Affichage de la fenetre de controle H2WinArg 201 //-- 202 { 203 H2WinArg::SetCurrentPIHisto2D(this); 204 H2WinArg::ShowPIHisto2DTools(wdg); 205 } 206 192 207 193 208 //++ … … 445 460 static int nb_h2dWinArg = 0; 446 461 462 447 463 //++ 448 464 PIH2DWdg::PIH2DWdg(PIContainerGen *par, const char *nom, int sx, int sy, int px, int py) … … 536 552 //-- 537 553 { 538 h2dWinArg->SetPIH2DWdg(this); 554 // h2dWinArg->SetPIH2DWdg(this); 555 h2dWinArg->SetCurrentBaseWdg(this); 556 h2dWinArg->SetCurrentPIHisto2D(this->GetPIHisto()); 539 557 h2dWinArg->SetMsgParent((PIMsgHandler*)this); 540 558 if(!h2dWinArg->Visible()) h2dWinArg->Show(); … … 583 601 //-- 584 602 585 //++ 586 H2WinArg::H2WinArg(PIH2DWdg *par) 603 PIBaseWdgGen* H2WinArg::mBWdg = NULL; 604 PIHisto2D* H2WinArg::mH2DDrw = NULL; 605 static H2WinArg* cur_h2winarg = NULL; 606 607 void H2WinArg::ShowPIHisto2DTools() 608 { 609 if (cur_h2winarg == NULL) cur_h2winarg = new H2WinArg(PIApplicationGetApp()); 610 cur_h2winarg->Show(); 611 } 612 613 void H2WinArg::ShowPIHisto2DTools(PIBaseWdgGen* cbw) 614 { 615 if (cur_h2winarg == NULL) cur_h2winarg = new H2WinArg(PIApplicationGetApp()); 616 mBWdg = cbw; 617 cur_h2winarg->Show(); 618 } 619 620 void H2WinArg::HidePIHisto2DTools() 621 { 622 if (cur_h2winarg != NULL) cur_h2winarg->Hide(); 623 } 624 625 void H2WinArg::SetCurrentBaseWdg(PIBaseWdgGen* cbw) 626 { 627 mBWdg = cbw; 628 } 629 630 void H2WinArg::SetCurrentPIHisto2D(PIHisto2D* h2ddrw) 631 { 632 mH2DDrw = h2ddrw; 633 } 634 635 PIBaseWdgGen* H2WinArg::GetCurrentBaseWdg() 636 { 637 return(mBWdg); 638 } 639 640 PIHisto2D* H2WinArg::GetCurrentPIHisto2D() 641 { 642 return(mH2DDrw); 643 } 644 645 //++ 646 H2WinArg::H2WinArg(PIMsgHandler* par) 587 647 // 588 648 // Creation de la fenetre de gestion des parametres … … 623 683 //-- 624 684 : PIWindow((PIMsgHandler *)par,"Options",PIWK_dialog,250,260,150,150) 625 , mH2Wdg(NULL)626 685 , mFgCol(false), mCmap(CMAP_GREYINV32), mRevCmap(false) 627 686 , mTypScal(0) , mLogScale(10.) … … 781 840 } 782 841 842 /* A-Virer Reza 11/01/2002 783 843 //++ 784 844 void H2WinArg::SetPIH2DWdg(PIH2DWdg* h2wdg) … … 791 851 if(dbg) printf("H2WinArg::SetPIH2DWdg mH2Wdg = %lx\n",(long)mH2Wdg); 792 852 } 853 Fin de A-Virer ---- */ 793 854 794 855 //++ … … 801 862 ,(int)UserMsg(msg),(int)ModMsg(msg),(long)sender); 802 863 803 if(!mH2Wdg) return; 804 PIHisto2D* mpih = mH2Wdg->GetPIHisto(); 864 // if(!mH2Wdg) return; 865 if(!mBWdg) return; 866 // PIHisto2D* mpih = mH2Wdg->GetPIHisto(); 867 PIHisto2D* mpih = mH2DDrw; 805 868 if(!mpih) return; 806 869 … … 835 898 mpih->UseDyn(mHMin,mHMax); 836 899 mpih->UseFrac(mFracMin,mFracMax); 837 m H2Wdg->Refresh(); // On rafraichit le dessin (tout le PIScDrawWdg)900 mBWdg->Refresh(); // On rafraichit le dessin (tout le PIScDrawWdg) 838 901 } 839 902 else if(opt==6002) this->Hide(); -
trunk/SophyaPI/PIext/pihisto2d.h
r1850 r1856 31 31 virtual void UpdateLimits(); 32 32 virtual void DrawStats(PIGraphicUC* g); 33 34 // Methode permettant l'affichage d'une fenetre de controle specialisee 35 virtual void ShowControlWindow(PIBaseWdgGen* wdg); 33 36 34 37 inline Histo2D* Histogram() {return(mHisto);} … … 80 83 class H2WinArg : public PIWindow { 81 84 public : 82 H2WinArg(PI H2DWdg *par);85 H2WinArg(PIMsgHandler* par); 83 86 ~H2WinArg(); 84 87 85 void SetPIH2DWdg(PIH2DWdg* h2wdg); 88 static void ShowPIHisto2DTools(); 89 static void ShowPIHisto2DTools(PIBaseWdgGen* cbw); 90 static void HidePIHisto2DTools(); 91 static void SetCurrentBaseWdg(PIBaseWdgGen* cbw); 92 static void SetCurrentPIHisto2D(PIHisto2D* h2ddrw); 93 94 static PIBaseWdgGen* GetCurrentBaseWdg(); 95 static PIHisto2D* GetCurrentPIHisto2D(); 96 86 97 void SetText(); 87 98 … … 89 100 90 101 protected: 91 PIH2DWdg * mH2Wdg; 102 static PIBaseWdgGen * mBWdg; 103 static PIHisto2D* mH2DDrw; 92 104 93 105 PIOptMenu * mOPop[3]; -
trunk/SophyaPI/PIext/pintup3d.cc
r537 r1856 50 50 SelectErrBar(); 51 51 SelectLabel(NULL); 52 SetName("NTup3DDrw"); 52 53 } 53 54 -
trunk/SophyaPI/PIext/pintuple.cc
r1645 r1856 50 50 SelectErrBar(); 51 51 SelectLabel(NULL); 52 SetName("NTupleDrw"); 52 53 } 53 54 -
trunk/SophyaPI/PIext/pistdimgapp.cc
r1642 r1856 19 19 20 20 #include "pistdimgapp.h" 21 #include "pihisto2d.h"21 // #include "pihisto2d.h" 22 22 #include "psfile.h" 23 23 #include "piimgtools.h" … … 564 564 sy = 200+mFgScSz*100; 565 565 win = GetWindow(opt, sx, sy, px, py, flag, (char *)name.c_str()); 566 /* 566 567 if (typeid(*scd) != typeid(PIHisto2D)) 567 scw = new PIScDrawWdg(win, (char *)name.c_str(), sx, sy, px, py);568 568 else scw = new PIH2DWdg(win, (char *)name.c_str(), sx, sy, px, py); 569 */ 570 scw = new PIScDrawWdg(win, (char *)name.c_str(), sx, sy, px, py); 569 571 scw->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic); 570 572 scw->SetUserData(NULL, oid); … … 575 577 // Fonte de trace d'axe 576 578 scw->BaseDrawer()->SetFont(mFName, mFSz, mFAtt); 577 578 if (typeid(*scd) != typeid(PIHisto2D)) scw->AddScDrawer(scd, true);579 /* 580 if (typeid(*scd) != typeid(PIHisto2D)) 579 581 else ((PIH2DWdg*)scw)->SetPIHisto((PIHisto2D*)scd); 582 */ 583 scw->AddScDrawer(scd, true); 580 584 // Titre du plot 581 585 if (mAddTitle) {
Note:
See TracChangeset
for help on using the changeset viewer.