Changeset 1131 in Sophya for trunk/SophyaPI/PIext/pistdimgapp.cc


Ignore:
Timestamp:
Aug 22, 2000, 5:09:27 PM (25 years ago)
Author:
ercodmgr
Message:

Introduction de l'option graphique tit/notit (methodes ds PIStdImgApp, modifs ds baseexcut.cc et ds servnobjmgr.cc - Reza 22/08/2000

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PIext/pistdimgapp.cc

    r1075 r1131  
    209209mFImgCenter = false;
    210210maXlog = maYlog = false;
     211mAddTitle = true;
    211212SaveGraphicAtt();
    212213
     
    550551else ((PIH2DWdg*)scw)->SetPIHisto((PIHisto2D*)scd);
    551552//   Titre du plot
    552 if (title.length() <= 0)  title = name;  string t2="";   
    553 scw->SetTitles(title, t2);   
     553if (mAddTitle) {
     554  if (title.length() <= 0)  title = name;  string t2="";   
     555  scw->SetTitles(title, t2);   
     556}
    554557// scw->Refresh();   ? Pas necessaire  Reza 19/08/98, 05/05/99 $CHECK$
    555558mCurWin = win;
     
    612615wd3->AddDrawer3D(dr3, true);
    613616//   Titre du plot
    614 if (title.length() <= 0)  title = name;  string t2="";   
    615 wd3->SetTitles(title, t2);   
     617if (mAddTitle) {
     618  if (title.length() <= 0)  title = name;  string t2="";   
     619  wd3->SetTitles(title, t2);   
     620}
    616621// wd3->Refresh();   ?Pas necessaire   $CHECK$ 05/05/99
    617622mCurWin = win;
     
    650655  if ( (mFSz != PI_NotDefFontSize) && (mFAtt != PI_NotDefFontAtt) )     eld->SetFontAtt(mFSz, mFAtt);
    651656  eld->ElAddText(xp,yp,txt.c_str(),mFCol);
     657  eld->Refresh();
     658  }
     659}
     660/* --Methode-- */
     661void PIStdImgApp::SetTitle(string const & titletop, string const & titlebottom)
     662{
     663if (!mLastWdg)  return;
     664PIElDrawer *eld=NULL;
     665PIScDrawWdg* sdw=NULL;
     666PIDraw3DWdg* w3d=NULL;
     667PIImage* imgw;
     668switch(mLastWdg->kind()) {
     669  case PIScDrawWdg::ClassId :
     670    sdw = dynamic_cast<PIScDrawWdg *>(mLastWdg);
     671    if (sdw) eld = sdw->BaseDrawer();
     672    break;
     673  case PIDraw3DWdg::ClassId :
     674    w3d = dynamic_cast<PIDraw3DWdg *>(mLastWdg);
     675    if (w3d) eld = w3d->BaseDrawer();
     676    break;
     677  case PIImage::ClassId :
     678    imgw = dynamic_cast<PIImage *>(mLastWdg);
     679    if (imgw) eld = imgw->MyElDrawer();
     680    break;
     681  default :
     682    break;
     683  }
     684if (eld) {
     685  if ( (mFSz != PI_NotDefFontSize) && (mFAtt != PI_NotDefFontAtt) )     eld->SetFontAtt(mFSz, mFAtt);
     686  eld->SetTitles(titletop, titlebottom);
    652687  eld->Refresh();
    653688  }
     
    14121447  mSaXlog = maXlog;
    14131448  mSaYlog = maYlog;
     1449  mSAddTitle = mAddTitle;
    14141450}
    14151451
     
    14371473  maXlog = mSaXlog;
    14381474  maYlog = mSaYlog;
     1475  mAddTitle = mSAddTitle;
    14391476}
    14401477
Note: See TracChangeset for help on using the changeset viewer.