Changeset 1862 in Sophya
- Timestamp:
- Jan 17, 2002, 11:12:56 AM (24 years ago)
- Location:
- trunk/SophyaPI/PIext
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/pihisto2d.cc
r1861 r1862 178 178 printf("PIHisto2D::Print FgCol=%d Cmap=%d (Rev=%d) TypScal=%d TypDisp=%d (FPoints=%g)\n" 179 179 ,(int)mFgCol,(int)mCmap,(int)mRevCmap,mTypScal,mTypDisp,mFPoints); 180 printf(" Dyn=%g,%g Frac=%g,%g LogSc=%g H=% lx\n"181 ,mHMin,mHMax,mFracMin,mFracMax,mLogScale, (long)mHisto);180 printf(" Dyn=%g,%g Frac=%g,%g LogSc=%g H=%p\n" 181 ,mHMin,mHMax,mFracMin,mFracMax,mLogScale,mHisto); 182 182 if(lp<1) return; 183 183 mHisto->PrintStatus(); … … 432 432 433 433 434 /* 435 // NOT USED ANYMORE... KEEP IT FOR MEMORY 434 436 ///////////////////////////////////////////////////////////////// 435 437 // Classe PIH2DWdg … … 460 462 static int nb_h2dWinArg = 0; 461 463 462 463 464 //++ 464 465 PIH2DWdg::PIH2DWdg(PIContainerGen *par, const char *nom, int sx, int sy, int px, int py) … … 466 467 // Createur d'un Widget de dessin d'histogramme 2D. 467 468 // Le menu pour choisir les options d'affichage apparait 468 // suite a u clic du bouton-3 de la souris(cf H2WinArg::H2WinArg).469 // suite a ALT-O (cf H2WinArg::H2WinArg). 469 470 //-- 470 471 : PIScDrawWdg(par,nom,sx,sy,px,py) … … 472 473 if(!h2dWinArg) h2dWinArg = new H2WinArg(this); 473 474 nb_h2dWinArg++; 474 if(dbg) printf("PIH2DWdg::PIH2DWdg % lx h2dWinArg=%lx%d\n"475 , (long)this,(long)h2dWinArg,nb_h2dWinArg);475 if(dbg) printf("PIH2DWdg::PIH2DWdg %p h2dWinArg=%p %d\n" 476 ,this,h2dWinArg,nb_h2dWinArg); 476 477 mPih = NULL; 477 478 // Pour afficher le menu option de trace … … 491 492 h2dWinArg=NULL; 492 493 } 493 if(dbg) printf("PIH2DWdg::~PIH2DWdg h2dWinArg=% lx%d\n"494 , (long)h2dWinArg,nb_h2dWinArg);494 if(dbg) printf("PIH2DWdg::~PIH2DWdg h2dWinArg=%p %d\n" 495 ,h2dWinArg,nb_h2dWinArg); 495 496 if(mPih) delete mPih; 496 497 } … … 506 507 mPih = new PIHisto2D(histo, true); 507 508 AddScDrawer(mPih); 508 if(dbg) printf("PIH2DWdg::SetHisto mPih=% lx\n",(long)mPih);509 if(dbg) printf("PIH2DWdg::SetHisto mPih=%p\n",mPih); 509 510 } 510 511 … … 519 520 mPih = pih2; 520 521 AddScDrawer(mPih); 521 if(dbg) printf("PIH2DWdg::SetPIHisto mPih=% lx\n",(long)mPih);522 if(dbg) printf("PIH2DWdg::SetPIHisto mPih=%p\n",mPih); 522 523 } 523 524 … … 570 571 { 571 572 ActivateSpecializedControls(); 572 if(dbg) printf("PIH2DWdg::But3Press(%d,%d) h2dWinArg=% lx\n"573 ,x,y, (long)h2dWinArg);574 } 575 573 if(dbg) printf("PIH2DWdg::But3Press(%d,%d) h2dWinArg=%p\n" 574 ,x,y,h2dWinArg); 575 } 576 */ 576 577 577 578 ///////////////////////////////////////////////////////////////// … … 649 650 // des dessins des histogrammes 2D. Cette fenetre de 650 651 // dialogue est partagee par tous les widget de dessin 651 // des histogrammes 2D. Pour la faire apparaitre pour la 652 // faire apparaitre la premiere fois, cliquez avec le bouton 653 // numero 3 de la souris (bouton de droite) dans la fenetre 654 // de dessin de l'histogramme. Si elle est deja presente, 655 // pour la connecter a une autre fenetre de dessin cliquez avec 656 // le meme bouton dans cette fenetre. 652 // des histogrammes 2D. Pour faire apparaitre la fenetre 653 // tapez ALT-O. 657 654 //-- 658 655 //++ … … 689 686 , mFracMin(0.1), mFracMax(0.9) 690 687 { 691 string sdum; 692 if(dbg) printf("H2WinArg::H2WinArg %lx par=%lx\n",(long)this,(long)par); 688 if(dbg) printf("H2WinArg::H2WinArg %p par=%p\n",this,par); 693 689 694 690 // Taille automatique … … 708 704 mOPop[0]->AppendItem(".+12..Z*" ,6103); 709 705 mOPop[0]->AppendItem("Carres Pleins",6104); 710 sdum = "Carres Var."; mOPop[0]->SetValueStr(sdum);711 706 mOPop[0]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 712 707 … … 716 711 mOPop[1]->AppendItem("Lineaire",6201); 717 712 mOPop[1]->AppendItem("Log10" ,6202); 718 sdum = "Lineaire"; mOPop[1]->SetValueStr(sdum);719 713 mOPop[1]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 720 714 … … 736 730 for(kcc=nsct3; kcc<PIColorMap::NumberStandardColorMaps(); kcc++) 737 731 mOPop[2]->AppendItem(PIColorMap::GetStandardColorMapName(kcc).c_str(),7001+kcc); 738 mOPop[2]->SetValue(7000);732 //mOPop[2]->SetValue(7000); 739 733 mOPop[2]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 740 734 … … 767 761 mPScal = new PIScale(this,"FracPoints",6401,kSDirLtoR 768 762 ,int(2.5*bsx),int(1.25*bsy),cpx+bsx+spx,cpy); 763 mPScal->SetMinMax(0,100); 769 764 mPScal->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 770 mPScal->SetMinMax(0,100); 765 766 // 771 767 SetText(); 768 // 772 769 773 770 // Boutons … … 794 791 { 795 792 int i; 796 if(dbg) printf("H2WinArg::~H2WinArg % lx\n",(long)this);793 if(dbg) printf("H2WinArg::~H2WinArg %p\n",this); 797 794 for(i=0;i<2;i++) delete mCasc[i]; 798 795 for(i=0;i<3;i++) delete mOPop[i]; … … 805 802 806 803 //++ 804 void H2WinArg::Show() 805 // 806 // Initialisation sur ouverture ALT-O 807 //-- 808 { 809 if(dbg) printf("H2WinArg::Show() mH2DDrw=%p\n",mH2DDrw); 810 // Pour recuperer les valeurs du Drawer sur lequel on fait ALT-O 811 /* 812 if(mH2DDrw) { 813 mFgCol = mH2DDrw->Color(); 814 mCmap = mH2DDrw->ColMap(); mRevCmap = mH2DDrw->IsColMapRev(); 815 mTypScal = mH2DDrw->TypScale(); mLogScale = mH2DDrw->LogScale(); 816 mTypDisp = mH2DDrw->TypDisplay(); mFPoints = mH2DDrw->FPoints(); 817 mHMin = mH2DDrw->HMin(); mHMax = mH2DDrw->HMax(); 818 mFracMin = mH2DDrw->FMin(); mFracMax = mH2DDrw->FMax(); 819 SetText(); 820 } 821 */ 822 PIWindow::Show(); 823 return; 824 } 825 826 //++ 807 827 void H2WinArg::SetText() 808 828 // … … 810 830 //-- 811 831 { 832 if(dbg) printf("H2WinArg::SetText()\n"); 812 833 string sdum; 813 834 char str[256]; 835 814 836 sprintf(str,"%g %g",mHMin,mHMax); 815 837 mText[0]->SetText(str); 838 816 839 sprintf(str,"%g %g",mFracMin,mFracMax); 817 840 mText[1]->SetText(str); 841 818 842 sprintf(str,"%g",mLogScale); 819 843 mText[2]->SetText(str); 844 if(mTypScal==1) mText[2]->SetSensitive(); 845 else mText[2]->SetUnSensitive(); 820 846 821 847 if(mTypDisp==0) {sdum="Carres Var."; mOPop[0]->SetValueStr(sdum);} … … 836 862 837 863 mPScal->SetValue(int(mFPoints*100.)); 838 839 if(dbg)printf("H2WinArg::SetText\n"); 840 } 841 842 /* A-Virer Reza 11/01/2002 843 //++ 844 void H2WinArg::SetPIH2DWdg(PIH2DWdg* h2wdg) 845 // 846 // Connexion du widget de representation d'un histogramme 2D 847 // avec la fenetre de gestion des parametres. 848 //-- 849 { 850 mH2Wdg = h2wdg; 851 if(dbg) printf("H2WinArg::SetPIH2DWdg mH2Wdg = %lx\n",(long)mH2Wdg); 852 } 853 Fin de A-Virer ---- */ 864 if(mTypDisp==1) mPScal->SetSensitive(); 865 else mPScal->SetUnSensitive(); 866 } 854 867 855 868 //++ … … 859 872 //-- 860 873 { 861 if(dbg) printf("H2WinArg::Process(%d-%d , % lx...) \n"862 ,(int)UserMsg(msg),(int)ModMsg(msg), (long)sender);874 if(dbg) printf("H2WinArg::Process(%d-%d , %p ...) \n" 875 ,(int)UserMsg(msg),(int)ModMsg(msg),sender); 863 876 864 877 // if(!mH2Wdg) return; … … 869 882 870 883 int opt = UserMsg(msg); 884 871 885 if(opt == 6101) {mTypDisp = 0;} 872 886 else if(opt == 6102) {mTypDisp = 1;} … … 878 892 879 893 else if(opt == 7000) {mFgCol = false;} 880 881 894 else if(opt >= 7001 && opt <8000) { 882 895 int k = opt-7001; … … 908 921 mHMin = mpih->HMin(); mHMax = mpih->HMax(); 909 922 mFracMin = mpih->FMin(); mFracMax = mpih->FMax(); 910 SetText();911 923 } 912 924 else if(opt==6004) mpih->Print(2); 925 926 SetText(); 913 927 914 928 if(dbg) { -
trunk/SophyaPI/PIext/pihisto2d.h
r1856 r1862 62 62 63 63 //////////////////////////////////////////////////////////////////// 64 /* 65 // NOT USED ANYMORE... KEEP IT FOR MEMORY 64 66 class PIH2DWdg : public PIScDrawWdg { 65 67 public: 66 68 PIH2DWdg(PIContainerGen *par,const char *nom,int sx=300,int sy=300,int px=0,int py=0); 67 69 ~PIH2DWdg(); 68 69 70 void SetHisto(Histo2D* histo); 70 71 void SetPIHisto(PIHisto2D* pih2); 71 72 72 inline PIHisto2D* GetPIHisto() {return mPih;} 73 74 73 virtual string GetClickText(double x, double y); 75 74 virtual void ActivateSpecializedControls(); // Pour activer des controles specifiques 76 75 virtual void But3Press(int x, int y); 77 78 76 protected: 79 77 PIHisto2D* mPih; 80 78 }; 79 */ 81 80 82 81 //////////////////////////////////////////////////////////////////// … … 97 96 void SetText(); 98 97 98 virtual void Show(); 99 99 virtual void Process(PIMessage msg,PIMsgHandler* sender,void* data=NULL); 100 100
Note:
See TracChangeset
for help on using the changeset viewer.