Changeset 1970 in Sophya
- Timestamp:
- Apr 30, 2002, 2:32:25 PM (23 years ago)
- Location:
- trunk/SophyaPI/PI
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/pidrawer.cc
r1946 r1970 68 68 PIDrawer::~PIDrawer() 69 69 { 70 // Desactivation totale de la fenetre de controle specialise 71 // ---> parametre d'appel PIBaseWdgGen* wdg=NULL 72 DeactivateControlWindow(NULL); 73 70 74 list<DrwBWId>::iterator it; 71 75 mDndfg = true; … … 265 269 if (mDndfg) return; 266 270 if (!wdg) return; 271 272 // Desactivation de la fenetre de controle specialisee pour la 273 // base-widget duquel on se detache 274 DeactivateControlWindow(wdg); 275 267 276 list<DrwBWId>::iterator it; 268 277 for(it = mBWdgList.begin(); it != mBWdgList.end(); it++) … … 279 288 } 280 289 290 //-------------------------------------------------------------- 291 // Methode de desactivation de la fenetre de controle specialise 292 // Cette methode est appellee dans deux cas : 293 // 1/ lors de la destruction du drawer 294 // Dans ce cas, le parametre PIBaseWdgGen* wdg = NULL 295 // 2/ Lorsque le drawer est detache d'un PIBaseWdg 296 // Dans ce cas, le parametre PIBaseWdgGen* wdg pointe vers le 297 // PIBaseWdg duquel le drawer est detache 298 // Evidemment, "this" pointe toujours sur le drawer qui est 299 // en cours de destruction ou de detachement 300 //-------------------------------------------------------------- 281 301 void 282 302 PIDrawer::DeactivateControlWindow(PIBaseWdgGen* wdg) 283 303 { 284 // On affiche par defaut la fenetre de gestion des attributs graphiques 304 // Par defaut, il n'y a pas de fenetre de controle specialise 305 // Donc, on ne fait rien 285 306 } 286 307 … … 288 309 PIDrawer::DecodeOptionString(vector<string> & opt, bool rmdecop) 289 310 { 290 if (opt.size() == 0) return(0);311 if (opt.size() < 1) return(0); 291 312 PIGraphicAtt gratt; 292 313 int ndec = gratt.DecodeAttStrings(opt, rmdecop); -
trunk/SophyaPI/PI/pieldrw.cc
r1922 r1970 45 45 mEn = 0; 46 46 titleT = titleB = ""; 47 ShowTitles(); 47 48 } 48 49 … … 76 77 int PIElDrawer::DecodeOptionString(vector<string> & opt, bool rmdecopt) 77 78 { 78 if (opt.size() == 0) return(0);79 if (opt.size() < 1) return(0); 79 80 int ndec1 = PIDrawer::DecodeOptionString(opt, rmdecopt); 81 if ((opt.size() - ndec1) < 1) return(ndec1); // si tout a ete decode 80 82 vector<string> udopt; 81 83 unsigned int k = 0; … … 83 85 for( k=0; k<opt.size(); k++ ) { 84 86 string opts = opt[k]; 85 if ( (opts == "stdaxes") || (opts == "defaxes") || (opts == "boxaxes") ) {87 if ( (opts == "stdaxes") || (opts == "defaxes") || (opts == "boxaxes") ) 86 88 SetAxesFlags(kBoxAxes | kExtTicks | kLabels); 87 continue; 88 } 89 if (opts == "simpleaxes") { 89 else if (opts == "simpleaxes") 90 90 SetAxesFlags(kAxesDflt); 91 continue; 92 } 93 if (opts == "boxaxesgrid") { 91 else if (opts == "boxaxesgrid") 94 92 SetAxesFlags(kBoxAxes | kExtTicks | kLabels | kGridOn); 95 continue; 96 } 97 if (opts == "fineaxes") { 93 else if (opts == "fineaxes") 98 94 SetAxesFlags(kBoxAxes | kTicks | kLabels | kMinTicks | kMajTicks); 99 continue; 100 } 101 if ((opts == "grid") || (opts == "fineaxesgrid")) { 95 else if ((opts == "grid") || (opts == "fineaxesgrid")) 102 96 SetAxesFlags(kBoxAxes | kTicks | kLabels | kMinTicks | kMajTicks | kGridOn); 103 continue; 104 } 105 if (opts == "autofontsize") { 97 else if (opts == "autofontsize") 106 98 SetAxesAutoFontSize(true); 107 continue; 108 } 109 if (opts == "fixedfontsize") { 99 else if (opts == "fixedfontsize") 110 100 SetAxesAutoFontSize(false); 111 continue; 112 } 113 114 ndec--; 115 if (rmdecopt) udopt.push_back(opts); 101 else if (opts == "title") ShowTitles(true); 102 else if (opts == "notitle") ShowTitles(false); 103 104 else { 105 ndec--; 106 if (rmdecopt) udopt.push_back(opts); 107 } 116 108 } 117 109 … … 158 150 159 151 // Trace des titres 160 if ( (titleT.length() > 0) || (titleB.length() > 0) ) {152 if ( showTitles && ((titleT.length() > 0) || (titleB.length() > 0)) ) { 161 153 aXdir = false; // Vrai si Axe X de Droite vers Gauche 162 154 aYdir = false; // Vrai si Axe Y de Haut vers Bas -
trunk/SophyaPI/PI/pieldrw.h
r1914 r1970 22 22 virtual void SetTitles(const char* tt=NULL, const char* tb=NULL); 23 23 virtual void SetTitles(string const & tt, string const & tb); 24 25 inline void ShowTitles(bool fg=true) { showTitles = fg; } 24 26 25 27 // Methode de decodage des options … … 69 71 70 72 string titleT, titleB; // Titre Haut - Bas 73 bool showTitles; // Affichage des titres si true 71 74 72 75 }; -
trunk/SophyaPI/PI/pigratt.cc
r1935 r1970 10 10 PIGraphicAtt::PIGraphicAtt() 11 11 { 12 InitGrAttStrings(); // Init attributes decoding maps 12 13 SetDefaultAtt(); 13 14 } … … 15 16 PIGraphicAtt::PIGraphicAtt(PIGraphicAtt const & att) 16 17 { 18 InitGrAttStrings(); // Init attributes decoding maps 17 19 CopyFrom(att); 18 20 } … … 20 22 PIGraphicAtt::PIGraphicAtt(vector<string> & att, bool rmdecatt) 21 23 { 24 InitGrAttStrings(); // Init attributes decoding maps 22 25 // Initialize attributes 23 26 SetDefaultAtt(); … … 36 39 SetLineAtt(); 37 40 SetFontAtt(); 41 mNotDefFnt = false; 38 42 SetMarkerAtt(1); 39 43 SetArrowMarkerAtt(5); … … 47 51 mLAtt = att.mLAtt; 48 52 mFnt = att.mFnt; 53 mNotDefFnt = att.mNotDefFnt; 49 54 mMSz = att.mMSz; 50 55 mMrk = att.mMrk; … … 81 86 if (att.mBCol != PI_NotDefColor) mBCol = att.mBCol; 82 87 if (att.mLAtt != PI_NotDefLineAtt) mLAtt = att.mLAtt; 83 if ( (att.mFnt.GetFontName() != PI_DefaultFont) || 84 (att.mFnt.GetFontAtt() != PI_NotDefFontAtt) || 85 (att.mFnt.GetFontSize() != PI_NotDefFontSize) ) mFnt = att.mFnt; 88 if (att.mNotDefFnt) mFnt = att.mFnt; 89 // if ( (att.mFnt.GetFontName() != PI_DefaultFont) || 90 // (att.mFnt.GetFontAtt() != PI_NotDefFontAtt) || 91 // (att.mFnt.GetFontSize() != PI_NotDefFontSize) ) mFnt = att.mFnt; 86 92 if (att.mMrk != PI_NotDefMarker) { 87 93 mMSz = att.mMSz; … … 101 107 void PIGraphicAtt::SetFontAtt(PIFontSize fsz, PIFontAtt fat) 102 108 { 109 mNotDefFnt = true; 103 110 mFnt.SetFontAtt(fat); 104 111 mFnt.SetFontSz(fsz); … … 107 114 void PIGraphicAtt::SetFontAtt(PIFontName fn, PIFontSize fsz, PIFontAtt fat) 108 115 { 116 mNotDefFnt = true; 109 117 mFnt.SetFont(fn); 110 118 mFnt.SetFontAtt(fat); … … 404 412 GrAttFontNames::const_iterator itfn = GrAfontnm.find(gratt); 405 413 if (itfn != GrAfontnm.end()) { 406 mFnt.SetFont((*itfn).second); continue; 414 mFnt.SetFont((*itfn).second); 415 mNotDefFnt = true; continue; 407 416 } 408 417 // Si c'est un attribut de fontes … … 411 420 if (itfa != GrAfnt.end()) { 412 421 mFnt.SetFontAtt((*itfa).second.fatt); 413 mFnt.SetFontSz((*itfa).second.fsz); 414 continue;422 mFnt.SetFontSz((*itfa).second.fsz); 423 mNotDefFnt = true; continue; 415 424 } 416 425 // Si c'est un attribut de markers -
trunk/SophyaPI/PI/pigratt.h
r1914 r1970 39 39 inline void SetLineAtt(PILineAtt const & lat) { mLAtt = lat; } 40 40 inline void SetLineAtt(PILineTypes ltyp=PI_NotDefLineAtt) { mLAtt = ltyp; } 41 inline void SetFont(PIFont const & fnt) { m Fnt = fnt; }41 inline void SetFont(PIFont const & fnt) { mNotDefFnt = true; mFnt = fnt; } 42 42 void SetFontAtt(PIFontSize fsz=PI_NotDefFontSize, 43 43 PIFontAtt fat=PI_NotDefFontAtt); … … 82 82 PILineAtt mLAtt; 83 83 PIFont mFnt; 84 bool mNotDefFnt; // Si True --> Pas la fonte par defaut 84 85 int mMSz; 85 86 PIMarker mMrk; -
trunk/SophyaPI/PI/piscdrawwdg.cc
r1946 r1970 245 245 continue; 246 246 } 247 /* 248 les attributs d'axes sont decodes par PIElDrawer 249 if (opts == "simpleaxes") { 250 SetAxesFlags(kAxesDflt); 251 continue; 252 } 253 if ( (opts == "stdaxes") || (opts == "boxaxes") ) { 254 SetAxesFlags(kBoxAxes | kExtTicks | kLabels); 255 continue; 256 } 257 if (opts == "boxaxesgrid") { 258 SetAxesFlags(kBoxAxes | kExtTicks | kLabels | kGridOn); 259 continue; 260 } 261 if (opts == "fineaxes") { 262 SetAxesFlags(kBoxAxes | kTicks | kLabels | kMinTicks | kMajTicks); 263 continue; 264 } 265 if (opts == "fineaxesgrid") { 266 SetAxesFlags(kBoxAxes | kTicks | kLabels | kMinTicks | kMajTicks | kGridOn); 267 continue; 268 } 269 */ 247 270 248 271 ndec--; -
trunk/SophyaPI/PI/piversion.h
r1951 r1970 2 2 #define PIVERSION_H_SEEN 3 3 4 #define PI_VERSIONNUMBER 3.6 34 #define PI_VERSIONNUMBER 3.65 5 5 6 6 #endif
Note:
See TracChangeset
for help on using the changeset viewer.