- Timestamp:
- May 30, 2005, 9:41:30 AM (20 years ago)
- Location:
- trunk/SophyaPI/PI
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/piaxes.h
r2754 r2780 19 19 kIntTicks = 0x0010, 20 20 kExtTicks = 0x0020, 21 kMajTicks = 0x00 30,22 kMinTicks = 0x00 40,21 kMajTicks = 0x0040, 22 kMinTicks = 0x0080, 23 23 24 24 kLabelsH = 0x1000, -
trunk/SophyaPI/PI/pibargraph.cc
r2615 r2780 44 44 fgValLabel = false; 45 45 packFrac = 0.5; 46 GetGraphicAtt().SetColAtt(PI_Black, PI_White); 47 GetGraphicAtt().SetFontAtt(PI_DefaultFont, PI_NormalSizeFont, PI_RomanFont); 48 GetGraphicAtt().SetLineAtt(PI_NormalLine); 46 49 SetName("BarGraph"); 47 50 } -
trunk/SophyaPI/PI/pibwdggen.cc
r2615 r2780 743 743 744 744 PIGraphic* g = WindowGraphic(); 745 g->SaveGraphicAtt(); 745 746 746 747 if (mDrElastic) { … … 789 790 break; 790 791 } 792 g->RestoreGraphicAtt(); 791 793 return; 792 794 } -
trunk/SophyaPI/PI/picontainergen.cc
r2777 r2780 202 202 if (stfcr) return; 203 203 PIWdg::FinishCreate(); 204 if (!stvis) return; 204 205 for(int k=0; k<NbChilds(); k++) GetChild(k)->FinishCreate(); 205 206 stfcr = true; -
trunk/SophyaPI/PI/picontainerx.cc
r2777 r2780 33 33 // Pour gerer le probleme de l'appel a FinishCreate() 34 34 // lorsque celui du parent est deja appele 35 if (finishDone) FinishCreate(); 35 //--- les container sont cree dans l'etat inactif/invisible - FinishCreate() est 36 // donc desormais appele par PIContainerGen::Show() --- Mai 2005 ---- 37 //--- plus appele ici if (finishDone) FinishCreate(); ---- 36 38 } 37 39 … … 55 57 // *************** Reza - Fev 2005 *************** 56 58 // Probleme lie a la table des fonctions virtuelles - voir ci-dessus 57 if (finishDone) FinishCreate(); 59 //--- les container sont cree dans l'etat inactif/invisible - FinishCreate() est 60 // donc desormais appele par PIContainerGen::Show() --- Mai 2005 ---- 61 //--- plus appele ici if (finishDone) FinishCreate(); ---- 58 62 } 59 63 -
trunk/SophyaPI/PI/pidrawer.cc
r2615 r2780 214 214 // définie par "xmin-xmax" , "ymin-ymax" dans le système de coordonnées du 215 215 // PIDrawer. 216 // void Refresh() 217 // Rafraîchit le dessin du PIDrawer sur tous les PIBaseWdg auxquel il est attaché. 216 // void Refresh(bool refwdg=false) 217 // "refwdg==false": Rafraîchit le dessin du PIDrawer sur tous les PIBaseWdg auxquel il est attaché. 218 // "refwdg==true": Appelle *Refresh()* sur tous les PIBaseWdg auxquel il est attaché. 218 219 // void HighLight(bool fgh) 219 220 // Rafraichit le dessin du PIDrawer sur tous les PIBaseWdg auxquel il est attaché, … … 229 230 230 231 void 231 PIDrawer::Refresh( )232 PIDrawer::Refresh(bool refwdg) 232 233 { 233 234 list<DrwBWId>::iterator it; 234 for(it = mBWdgList.begin(); it != mBWdgList.end(); it++) 235 (*it).wdg->CallDrawer((*it).id); 235 if (refwdg) { 236 for(it = mBWdgList.begin(); it != mBWdgList.end(); it++) 237 (*it).wdg->Refresh(); 238 } 239 else { 240 for(it = mBWdgList.begin(); it != mBWdgList.end(); it++) 241 (*it).wdg->CallDrawer((*it).id); 242 } 236 243 237 244 } -
trunk/SophyaPI/PI/pidrawer.h
r2530 r2780 47 47 virtual double GetDistanceToPoint(double x, double y); 48 48 49 virtual void Refresh( ); // Recalcule les limites et reaffiche49 virtual void Refresh(bool refwdg=false); // Recalcule les limites et reaffiche 50 50 virtual void UpdateLimits(); // Calcule et change les limites 51 51 -
trunk/SophyaPI/PI/pidrwtools.cc
r2615 r2780 755 755 PIApplicationPrefCompSize(bsx, bsy); 756 756 spx = bsx/8; spy = bsy/6; 757 tsx = 6*bsx+2*spx; tsy = 6*bsy+4*spy;757 tsx = 7.5*bsx+2*spx; tsy = 6*bsy+4*spy; 758 758 SetSize(tsx,tsy); 759 759 int cpx = spx; 760 760 int cpy = spy; 761 mTxt[0] = new PIText(this, "drwoshelp", true, true, bsx* 6.0, 4*bsy, cpx, cpy);761 mTxt[0] = new PIText(this, "drwoshelp", true, true, bsx*7.5, 4*bsy, cpx, cpy); 762 762 mTxt[0]->SetTextEditable(false); 763 763 mTxt[0]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 764 764 mTxt[0]->SetText(""); 765 765 cpy += 4*bsy+spy; 766 mTxt[1] = new PIText(this, "drwosset", bsx* 6.0, bsy, cpx, cpy);766 mTxt[1] = new PIText(this, "drwosset", bsx*7.5, bsy, cpx, cpy); 767 767 mTxt[1]->SetTextEditable(true); 768 768 mTxt[1]->SetMsg(5555); … … 770 770 mTxt[1]->SetText(""); 771 771 cpy += bsy+spy; 772 mLab = new PILabel(this, "drwntyp", bsx*2.2, bsy, cpx, cpy); 772 int lsx = tsx-4.8*bsx-6*spx; 773 mLab = new PILabel(this, "drwntyp", lsx, bsy, cpx, cpy); 773 774 mLab->SetBorderWidth(1); 774 775 mLab->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 775 776 mLab->SetLabel(""); 776 cpx += 2.3*bsx;777 cpx += lsx+spx; 777 778 mBut[0] = new PIButton(this, "SetOption", 555, bsx*1.2, bsy, cpx, cpy); 778 779 mBut[0]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 779 cpx += 1.25*bsx;780 cpx += (1.2*bsx+spx); 780 781 mBut[1] = new PIButton(this, "GetOption", 666, bsx*1.2, bsy, cpx, cpy); 781 782 mBut[1]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 782 cpx += 1.25*bsx;783 mBut[2] = new PIButton(this, " Dimiss", 777, bsx*1.2, bsy, cpx, cpy);783 cpx += (1.2*bsx+spx); 784 mBut[2] = new PIButton(this, "Refresh", 500, bsx*1.2, bsy, cpx, cpy); 784 785 mBut[2]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 786 cpx += (1.2*bsx+spx); 787 mBut[3] = new PIButton(this, "Dimiss", 777, bsx*1.2, bsy, cpx, cpy); 788 mBut[3]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 785 789 } 786 790 … … 794 798 delete mBut[1]; 795 799 delete mBut[2]; 800 delete mBut[3]; 796 801 } 797 802 /* --Methode-- */ … … 824 829 break; 825 830 case 555: 831 case 500: 826 832 case 5555: 827 833 if (mDrw) { … … 843 849 // cout << " DBG-C[" << kk << "] " << vops[kk] << endl; 844 850 mDrw->DecodeOptionString(vops, false); 845 ops = "<< " + ops + " >> Decoded"; 851 // ops = "<< " + ops + " >> Decoded"; 852 ops = ""; 846 853 mTxt[1]->SetText(ops); 847 mDrw->Refresh(); 854 if (msg == 500) mDrw->Refresh(true); 855 else mDrw->Refresh(false); 848 856 } 849 857 break; -
trunk/SophyaPI/PI/pidrwtools.h
r2539 r2780 77 77 PIText* mTxt[2]; 78 78 PILabel* mLab; 79 PIButton* mBut[ 3];79 PIButton* mBut[4]; 80 80 PIDrawer* mDrw; 81 81 }; -
trunk/SophyaPI/PI/pieldrw.cc
r2754 r2780 682 682 683 683 // fh = g->GetFontHeightUC(gas, gds); 684 fh = 0.075*(YMax()-YMin());685 684 if ( titleT.length() > 0) { 685 fh = 0.04*(YMax()-YMin()); 686 686 if (g->isAxeYDirUpDown()) fy = g->DeltaUCY(YMin(), -fh); 687 687 else fy = g->DeltaUCY(YMax(), fh); 688 g->DrawString(fx, fy, titleT.c_str(), PI_HorizontalCenter | PI_Vertical Center);688 g->DrawString(fx, fy, titleT.c_str(), PI_HorizontalCenter | PI_VerticalBottom); 689 689 // printf(" PIElDrawer::Draw()/DBG (%g , %g) %s - %g \n", fx, fy, titleT.c_str(), fh); 690 690 } 691 691 if ( titleB.length() > 0) { 692 fx = g->CalcStringWidth(titleB.c_str()); 693 if(aXdir) fx = g->DeltaUCX(XMax(), -(XMax()-XMin()-fx)/2.); 694 else fx = g->DeltaUCX(XMin(), (XMax()-XMin()-fx)/2.); 695 if (g->isAxeYDirUpDown()) fy = g->DeltaUCY(YMax(), fh*1.5); 696 else fy = g->DeltaUCY(YMin(), -fh*1.5); 697 g->DrawString(fx, fy, titleB.c_str(), PI_HorizontalCenter | PI_VerticalCenter); 692 fh = 0.075*(YMax()-YMin()); 693 if (g->isAxeYDirUpDown()) fy = g->DeltaUCY(YMax(), fh); 694 else fy = g->DeltaUCY(YMin(), -fh); 695 g->DrawString(fx, fy, titleB.c_str(), PI_HorizontalCenter | PI_VerticalTop); 698 696 // printf(" PIElDrawer::Draw()/DBG (%g , %g) %s - %g \n", fx, fy, titleT.c_str(), fh); 699 697 } -
trunk/SophyaPI/PI/pigratt.cc
r2754 r2780 662 662 // A FAIRE - Reza->CMV Mars 2004 663 663 // On ne vide pas (ne met pas a zero) att, mais on ajoute derriere. 664 att.push_back(" A FAIRE - Reza->CMV Mars 2004");664 att.push_back("??GraphicAtt??"); 665 665 return 1; 666 666 } -
trunk/SophyaPI/PI/pitxtdrw.cc
r2754 r2780 40 40 { 41 41 fgFrame = fgframe; 42 GetGraphicAtt().SetColAtt(PI_Black, PI_White); 43 GetGraphicAtt().SetFontAtt(PI_DefaultFont, PI_NormalSizeFont, PI_RomanFont); 44 GetGraphicAtt().SetLineAtt(PI_NormalLine); 42 45 SetName("TextDrw"); 43 46 } … … 81 84 void PITextDrawer::Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax) 82 85 { 83 if ( mLines.size() < 1) return;86 if ((mLines.size() < 1) && !fgFrame) return; 84 87 PIGraphicAtt siatt = GetGraphicAtt(); 85 88 PIGraphicAtt catt; … … 90 93 catt = siatt; 91 94 catt.UpdateFrom(mLines[k].att); 95 SetGraphicAtt(catt); 92 96 SelGraAtt(g); 93 97 if (mLines[k].att.GetMarker() != PI_NotDefMarker) { 94 x = 0.03;95 98 ym = (double)y-(double)(g->GetFontHeight(fa, fd))*0.5; 96 99 g->DrawMarker(x, ym); … … 100 103 x = (double)x+dxu+0.02; 101 104 } 102 else x = 0.05;103 105 // Trace des lignes de texte 104 106 g->DrawString(x,y,mLines[k].line.c_str(),PI_VerticalTop); 105 107 y = (double)y-(double)(g->GetFontHeight(fa, fd))*1.1; 106 108 } 109 SetGraphicAtt(siatt); 107 110 if (fgFrame) { // Trace de cadre 108 SetGraphicAtt(siatt);109 111 SelGraAtt(g); 110 112 x = y = 0.; -
trunk/SophyaPI/PI/piyfxdrw.cc
r2615 r2780 107 107 PIAxes::ReSizeMinMax(isLogScaleY(),ymin,ymax); 108 108 SetLimits(xmin,xmax,ymin,ymax); 109 SetAxesFlags(kBoxAxes | kExtTicks | kLabels);109 // NE PAS FAIRE - Reza Mai 2005 SetAxesFlags(kBoxAxes | kExtTicks | kLabels); 110 110 } 111 111 … … 116 116 double xp,yp; 117 117 int i; 118 119 if (axesFlags != kAxesNone) DrawAxes(g); 118 120 119 121 if ((mAx == NULL)) mSz = 0;
Note:
See TracChangeset
for help on using the changeset viewer.