Changeset 2184 in Sophya for trunk/SophyaPI
- Timestamp:
- Sep 5, 2002, 5:39:50 PM (23 years ago)
- Location:
- trunk/SophyaPI/PI
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/piaxestools.cc
r2166 r2184 79 79 { 80 80 int bsx, bsy, spx, spy; 81 int bsycb, spycb; 81 82 82 83 // On definit la taille a partir de la taille par defaut des composantes … … 86 87 spy = bsy/4; 87 88 89 bsycb = 0.80*bsy+0.5; // Taille des checkbox 90 spycb = 0.80*spy+0.5; // Espace-Y inter checkbox 91 88 92 int wszx = 6*spx+3.5*bsx; 89 int wszy = 8*bsy+10*spy;93 int wszy = 5*bsy+9*spy+4*bsycb+3*spycb; 90 94 SetSize(wszx, wszy); 91 95 92 int cpx = spx *2;96 int cpx = spx; 93 97 int cpy = spy*2; 94 98 mLab[0] = new PILabel(this, "X Min Max", 1.25*bsx, bsy, cpx, cpy); … … 99 103 100 104 cpy = spy*2; 101 cpx += 2*spx+1.25*bsx;102 mText[0] = new PIText(this, "x_min_max", 2.25*bsx , bsy, cpx, cpy);105 cpx += spx+1.25*bsx; 106 mText[0] = new PIText(this, "x_min_max", 2.25*bsx+2*spx, bsy, cpx, cpy); 103 107 mText[0]->SetText("-1.0 1.0"); 104 108 cpy += spy+bsy; 105 mText[1] = new PIText(this, "y_min_max", 2.25*bsx , bsy, cpx, cpy);109 mText[1] = new PIText(this, "y_min_max", 2.25*bsx+2*spx, bsy, cpx, cpy); 106 110 mText[1]->SetText("-1.0 1.0"); 107 111 mText[0]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 108 112 mText[1]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 109 113 110 cpx = spx+0.25*bsx; 111 cpy += spy+bsy; 112 mCkb[0] = new PICheckBox(this,"X-RtoL", 2000, bsx, bsy, cpx, cpy); 113 cpx += spx+bsx; 114 mCkb[1] = new PICheckBox(this,"Y-UpDn", 2001, bsx, bsy, cpx, cpy); 115 cpx += spx+bsx; 116 mCkb[2] = new PICheckBox(this,"Grid", 2002, bsx, bsy, cpx, cpy); 114 cpy += spy+bsy; 115 cpx = spx+0.25*bsx; 116 mCkb[3] = new PICheckBox(this,"LogScale-X", 2003, bsx*1.5, bsycb, cpx, cpy); 117 cpx += bsx*1.5+3*spx; 118 mCkb[4] = new PICheckBox(this,"LogScale-Y", 2004, bsx*1.5, bsycb, cpx, cpy); 119 mCkb[3]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 120 mCkb[4]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 121 122 cpx = spx+0.25*bsx; 123 cpy += spycb+bsycb; 124 mCkb[0] = new PICheckBox(this,"X-RightLeft", 2000, bsx*1.5, bsycb, cpx, cpy); 125 cpx += bsx*1.5+3*spx; 126 mCkb[1] = new PICheckBox(this,"Y-UpDn", 2001, bsx*1.5, bsycb, cpx, cpy); 117 127 mCkb[0]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 118 128 mCkb[1]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 129 130 cpx = spx+0.25*bsx; 131 cpy += spycb+bsycb; 132 mCkb[5] = new PICheckBox(this,"Centerd-Axes", 2005, bsx*1.5, bsycb, cpx, cpy); 133 cpx += bsx*1.5+3*spx; 134 mCkb[2] = new PICheckBox(this,"Grid", 2002, bsx*1.5, bsycb, cpx, cpy); 135 mCkb[5]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 119 136 mCkb[2]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 120 cpy += spy+bsy; 121 cpx = spx+0.25*bsx; 122 mCkb[3] = new PICheckBox(this,"LogScale-X", 2003, bsx*1.5, bsy, cpx, cpy); 123 cpx += bsx*1.5+3*spx; 124 mCkb[4] = new PICheckBox(this,"LogScale-Y", 2004, bsx*1.5, bsy, cpx, cpy); 125 mCkb[3]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 126 mCkb[4]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 127 128 cpx = spx+0.25*bsx; 129 cpy += spy+bsy; 130 mCkb[5] = new PICheckBox(this,"Centerd-Axes", 2005, 1.5*bsx, bsy, cpx, cpy); 137 138 cpx = spx+0.25*bsx; 139 cpy += spycb+bsycb; 140 mCkb[6] = new PICheckBox(this,"Minor-Ticks", 2006, bsx*1.5, bsycb, cpx, cpy); 131 141 cpx += 3*spx+1.5*bsx; 132 mCkb[6] = new PICheckBox(this,"Minor-Ticks", 2006, 1.5*bsx, bsy, cpx, cpy); 133 mCkb[5]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 142 mCkb[7] = new PICheckBox(this,"AutoFontSize", 2007, bsx*1.5, bsycb, cpx, cpy); 134 143 mCkb[6]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 144 mCkb[7]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 135 145 136 146 … … 185 195 for(i=0;i<2;i++) delete mText[i]; 186 196 for(i=0;i<8;i++) delete mBut[i]; 187 for(i=0;i< 7;i++) delete mCkb[i];197 for(i=0;i<8;i++) delete mCkb[i]; 188 198 delete mOpt; 189 199 } … … 226 236 mCkb[3]->SetState(scd->isLogScaleX()); 227 237 mCkb[4]->SetState(scd->isLogScaleY()); 238 mCkb[7]->SetState(scd->BaseDrawer()->isAxesAutoFontSize()); 228 239 } 229 240 else { … … 235 246 mCkb[3]->SetState(false); 236 247 mCkb[4]->SetState(false); 248 mCkb[5]->SetState(false); 249 mCkb[6]->SetState(false); 250 mCkb[7]->SetState(true); 237 251 } 238 252 … … 297 311 298 312 scd->SetLogScale(mCkb[3]->GetState(), mCkb[4]->GetState() ); 299 313 scd->BaseDrawer()->SetAxesAutoFontSize(mCkb[7]->GetState() ); 300 314 if (refr) scd->Refresh(); 301 315 return; -
trunk/SophyaPI/PI/piaxestools.h
r2166 r2184 40 40 PIButton* mBut[8]; 41 41 PIText* mText[2]; 42 PICheckBox* mCkb[ 7];42 PICheckBox* mCkb[8]; 43 43 PIOptMenu * mOpt; 44 44 unsigned short mTypAction; -
trunk/SophyaPI/PI/pidrawer.h
r2080 r2184 55 55 56 56 inline unsigned int GetAxesFlags() { return(axesFlags); } 57 inline bool isAxesAutoFontSize( bool fg=true) { return axesAFSz; }57 inline bool isAxesAutoFontSize() { return axesAFSz; } 58 58 59 59 inline PIGraphicUC* GetGraphicUC() { return(mGrUC); }
Note:
See TracChangeset
for help on using the changeset viewer.