Changeset 1297 in Sophya for trunk/SophyaPI/PIext/pihisto2d.cc
- Timestamp:
- Nov 7, 2000, 2:08:10 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/pihisto2d.cc
r1091 r1297 611 611 SetSize(wszx, wszy); 612 612 613 // menu s bar613 // menu du style de display des bins 614 614 int cpx = 2*spx, cpy = 2*spy; 615 615 mOPop[0] = new PIOptMenu(this, "optmen-h2d-1" ,2*bsx,bsy,cpx,cpy); … … 621 621 mOPop[0]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 622 622 623 // Menu du choix de la dynamique 623 624 cpy += bsy+spy; 624 625 mOPop[1] = new PIOptMenu(this, "optmen-h2d-2",2*bsx,bsy,cpx,cpy); … … 628 629 mOPop[1]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 629 630 631 // Menu du choix des couleurs 630 632 cpy += bsy+spy; 631 633 mOPop[2] = new PIOptMenu(this, "optmen-h2d-3",2*bsx,bsy,cpx,cpy); 632 mOPop[2]->AppendItem("Black&White", 6301); 633 mOPop[2]->AppendItem("Grey32" , 6302); 634 mOPop[2]->AppendItem("GreyInv32" , 6303); 635 mOPop[2]->AppendItem("ColRJ32" , 6304); 636 mOPop[2]->AppendItem("ColBR32" , 6305); 637 mOPop[2]->AppendItem("ColRV32" , 6306); 638 mOPop[2]->AppendItem("Grey128" , 6307); 639 mOPop[2]->AppendItem("GreyInv128", 6308); 640 mOPop[2]->AppendItem("ColRJ128" , 6309); 641 mOPop[2]->AppendItem("ColBR128" , 6310); 642 mOPop[2]->AppendItem("Col16" , 6311); 643 sdum = "Black&White"; mOPop[2]->SetValueStr(sdum); 634 mOPop[2]->AppendItem("Black&White",7000); 635 mCasc[0] = new PIMenu(mOPop[2]->Menu(), "PIStd-128Col"); 636 mCasc[1] = new PIMenu(mOPop[2]->Menu(), "MIDAS-CMap"); 637 int kcc,nsct1=5,nsct2=9,nsct3=PIColorMap::NumberStandardColorMaps()-1; 638 for(kcc=0; kcc<nsct1; kcc++) 639 mOPop[2]->AppendItem(PIColorMap::GetStandardColorMapName(kcc).c_str(),7001+kcc); 640 for(kcc=nsct1; kcc<nsct2; kcc++) 641 mCasc[0]->AppendItem(PIColorMap::GetStandardColorMapName(kcc).c_str(),7001+kcc); 642 mOPop[2]->AppendPDMenu(mCasc[0]); 643 for(kcc=nsct2; kcc<nsct3; kcc++) 644 mCasc[1]->AppendItem(PIColorMap::GetStandardColorMapName(kcc).c_str(),7001+kcc); 645 mOPop[2]->AppendPDMenu(mCasc[1]); 646 for(kcc=nsct3; kcc<PIColorMap::NumberStandardColorMaps(); kcc++) 647 mOPop[2]->AppendItem(PIColorMap::GetStandardColorMapName(kcc).c_str(),7001+kcc); 648 mOPop[2]->SetValue(7000); 644 649 mOPop[2]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 645 650 646 // Labels et zone de saisie texte651 // Labels et zones de saisie texte 647 652 cpy += 2*(bsy+spy); 648 653 mLab[0] = new PILabel(this, " Dyn: ",bsx,bsy,cpx,cpy); … … 696 701 int i; 697 702 if(dbg) printf("H2WinArg::~H2WinArg %lx\n",(long)this); 703 for(i=0;i<2;i++) delete mCasc[i]; 698 704 for(i=0;i<3;i++) delete mOPop[i]; 699 705 for(i=0;i<4;i++) delete mBut[i]; … … 706 712 void H2WinArg::SetText() 707 713 // 708 // Gestion des fenetres de saisie de texte .714 // Gestion des fenetres de saisie de texte et des pop-menus. 709 715 //-- 710 716 { … … 726 732 else if(mTypScal==1) { sdum="Log10"; mOPop[1]->SetValueStr(sdum);} 727 733 728 if(!mFgCol) { sdum="Black&White";mOPop[2]->SetValueStr(sdum);}734 if(!mFgCol) {mOPop[2]->SetValue(7000);} 729 735 else { 730 if(mCmap==CMAP_GREY32) { sdum="Grey32"; mOPop[2]->SetValueStr(sdum);} 731 else if(mCmap==CMAP_GREYINV32) { sdum="GreyInv32"; mOPop[2]->SetValueStr(sdum);} 732 else if(mCmap==CMAP_COLRJ32) { sdum="ColRJ32"; mOPop[2]->SetValueStr(sdum);} 733 else if(mCmap==CMAP_COLBR32) { sdum="ColBR32"; mOPop[2]->SetValueStr(sdum);} 734 else if(mCmap==CMAP_COLRV32) { sdum="ColRV32"; mOPop[2]->SetValueStr(sdum);} 735 else if(mCmap==CMAP_GREY128) { sdum="Grey128"; mOPop[2]->SetValueStr(sdum);} 736 else if(mCmap==CMAP_GREYINV128) { sdum="GreyInv128"; mOPop[2]->SetValueStr(sdum);} 737 else if(mCmap==CMAP_COLRJ128) { sdum="ColRJ128"; mOPop[2]->SetValueStr(sdum);} 738 else if(mCmap==CMAP_COLBR128) { sdum="ColBR128"; mOPop[2]->SetValueStr(sdum);} 739 else if(mCmap==CMAP_COL16) { sdum="Col16"; mOPop[2]->SetValueStr(sdum);} 736 for(int kk=0;kk<PIColorMap::NumberStandardColorMaps();kk++) 737 if(mCmap == PIColorMap::GetStandardColorMapId(kk)) 738 {mOPop[2]->SetValue(7001+kk); break;} 740 739 } 741 740 … … 788 787 else if (opt == 6202) { mTypScal = 1; } 789 788 790 else if (opt == 6301) { mFgCol = false; } 791 else if (opt == 6302) { mFgCol = true; mCmap = CMAP_GREY32; } 792 else if (opt == 6303) { mFgCol = true; mCmap = CMAP_GREYINV32; } 793 else if (opt == 6304) { mFgCol = true; mCmap = CMAP_COLRJ32; } 794 else if (opt == 6305) { mFgCol = true; mCmap = CMAP_COLBR32; } 795 else if (opt == 6306) { mFgCol = true; mCmap = CMAP_COLRV32; } 796 else if (opt == 6307) { mFgCol = true; mCmap = CMAP_GREY128; } 797 else if (opt == 6308) { mFgCol = true; mCmap = CMAP_GREYINV128; } 798 else if (opt == 6309) { mFgCol = true; mCmap = CMAP_COLRJ128; } 799 else if (opt == 6310) { mFgCol = true; mCmap = CMAP_COLBR128; } 800 else if (opt == 6311) { mFgCol = true; mCmap = CMAP_COL16; } 789 else if (opt == 7000) { mFgCol = false; } 790 791 else if (opt >= 7001 && opt <8000) { 792 int k = opt-7001; 793 mFgCol = true; 794 mCmap = PIColorMap::GetStandardColorMapId(k); 795 } 801 796 802 797 else if (opt == 6401) mFPoints = mPScal->GetValue()/100.;
Note:
See TracChangeset
for help on using the changeset viewer.