Changeset 1914 in Sophya for trunk/SophyaPI


Ignore:
Timestamp:
Mar 4, 2002, 12:08:38 AM (24 years ago)
Author:
ansari
Message:

Implementation de DecodeOptionString() ds PIGraphicAtt ,
Ajout du flag ExchangeX<>Y ds PIGraphicUC , non implemente
Ajout de la methode DecodeOptionString(), non implemente ds
PIWdgGen, PIScDrawWdg, PIImage, PI3dDrawWdg ....

Reza 03/03/2002

Location:
trunk/SophyaPI/PI
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PI/pi3ddrw.cc

    r1904 r1914  
    370370}
    371371
     372/* --Methode-- */
     373int PIDraw3DWdg::DecodeOptionString(vector<string> & opt, bool rmdecopt)
     374{
     375  // AFAIRE - Reza 01/03/2002
     376  return(0);
     377}
     378
    372379
    373380/* --Methode-- */
  • trunk/SophyaPI/PI/pi3ddrw.h

    r1904 r1914  
    8484  inline PIElDrawer*    BaseDrawer() { return mBDrw; };
    8585
    86   int                   AddDrawer3D(PIDrawer3D*, bool ad=false);   // Ajoute un Drawer
     86//   Methode permettant de decoder des options a partir de chaines
     87  virtual int           DecodeOptionString(vector<string> & opt, bool rmdecopt=true);
     88
     89// Ajoute un Drawer
     90  int                   AddDrawer3D(PIDrawer3D*, bool ad=false);   
    8791
    8892//  Pour tenir trace des Drawers-3D qui sont detruits
  • trunk/SophyaPI/PI/pieldrw.cc

    r1904 r1914  
    7171{
    7272titleT = tt;  titleB = tb;
     73}
     74
     75/* --Methode-- */
     76int PIElDrawer::DecodeOptionString(vector<string> & opt, bool rmdecopt)
     77{
     78  // AFAIRE Reza 01/03/2002
     79  return(0);
    7380}
    7481
  • trunk/SophyaPI/PI/pieldrw.h

    r1904 r1914  
    2222  virtual void       SetTitles(const char* tt=NULL, const char* tb=NULL);
    2323  virtual void       SetTitles(string const & tt, string const & tb);
     24
     25//   Methode de decodage des options
     26  virtual int        DecodeOptionString(vector<string> & opt, bool rmdecopt=true);
    2427
    2528  virtual void       Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax);
  • trunk/SophyaPI/PI/pigraphuc.cc

    r1904 r1914  
    6464  aYdir = false;  // Vrai si Axe Y de Haut vers Bas
    6565  aXlog = aYlog = false;   // Vrai -> Echelle log
     66  aXYexchng = false;       // Vrai -> Echange axes X,Y UserX,Y --> WindowY, X
    6667  SetUCS(0., 1., 0., 1., kAxeDirLtoR, kAxeDirDownUp);
    6768  SetLogScale(false, false);
     
    155156/* --Methode-- */
    156157void PIGraphicUC::SetUCS(double xmin, double xmax, double ymin, double ymax,
    157                          int axrl, int ayud)
     158                         int axrl, int ayud, bool exchxy)
    158159{
    159160  if (axrl == kAxeDirAuto) {
  • trunk/SophyaPI/PI/pigraphuc.h

    r1904 r1914  
    3333//  Definition des coordonnees utilisateur
    3434  virtual void       SetUCS(double xmin, double xmax, double ymin, double ymax,
    35                             int axrl=kAxeDirSame, int ayud=kAxeDirSame);
     35                            int axrl=kAxeDirSame, int ayud=kAxeDirSame,
     36                            bool exchxy=false);
    3637// Echelle logarithmique
    3738  virtual void       SetLogScale(bool logx, bool logy);
     
    4041  inline  bool       isAxeXDirRtoL()   { return aXdir; }
    4142  inline  bool       isAxeYDirUpDown() { return aYdir; }
     43  inline  bool       isAxeXYExchanged() { return aXYexchng; }
    4244
    4345//  Trace graphiques
     
    139141  bool   aXdir, aYdir;           // Sens des axes horiz, vertical
    140142  bool   aXlog, aYlog;           // true-> Echelle logarithmique pour axe X,y
     143  bool   aXYexchng;              // true-> Echange X<>Y userX, Y ---> WindowY, X
    141144  bool   clip;
    142145};
  • trunk/SophyaPI/PI/pigratt.cc

    r1907 r1914  
    55#include "pigratt.h"
    66
     7#include <stdio.h>
     8#include <map>
     9
    710PIGraphicAtt::PIGraphicAtt()
     11{
     12  SetDefaultAtt();
     13}
     14
     15PIGraphicAtt::PIGraphicAtt(PIGraphicAtt const & att)
     16{
     17  CopyFrom(att);
     18}
     19
     20PIGraphicAtt::PIGraphicAtt(vector<string> & att, bool rmdecatt)
     21{
     22  // Initialize attributes
     23  SetDefaultAtt();
     24  // Decode attributes from strings
     25  DecodeAttStrings(att, rmdecatt);
     26}
     27
     28PIGraphicAtt::~PIGraphicAtt()
     29{
     30}
     31
     32
     33void PIGraphicAtt::SetDefaultAtt()
    834{
    935  SetColAtt();
    1036  SetLineAtt();
     37  SetFontAtt();
    1138  SetMarkerAtt(1);
    1239  SetArrowMarkerAtt(5);
     
    1441}
    1542
    16 PIGraphicAtt::PIGraphicAtt(PIGraphicAtt const & att)
    17 {
    18   CopyFrom(att);
    19 }
    20 
    21 PIGraphicAtt::PIGraphicAtt(vector<string> & att, bool rmdecatt)
    22 {
    23   // AFAIRE - Reza 18/02/2002
    24   SetColAtt();
    25   SetLineAtt();
    26   SetMarkerAtt(1);
    27   SetArrowMarkerAtt(5);
    28   SetColMapId();
    29 }
    30 
    31 PIGraphicAtt::~PIGraphicAtt()
    32 {
    33 }
    34 
    3543void PIGraphicAtt::CopyFrom(PIGraphicAtt const & att)
    3644{
    3745  mFCol = att.mFCol;
    3846  mBCol = att.mBCol;
     47  mLAtt = att.mLAtt;
    3948  mFnt = att.mFnt;
    4049  mMSz = att.mMSz;
     
    4655}
    4756
     57bool PIGraphicAtt::Compare(PIGraphicAtt const & att)
     58{
     59  if (mFCol != att.mFCol) return false;
     60  if (mBCol != att.mBCol) return false;
     61  if (mLAtt != att.mLAtt) return false;
     62  bool fnteq = (mFnt == att.mFnt);
     63  if (!fnteq)  return false;
     64  if (mMSz != att.mMSz) return false;
     65  if (mMrk != att.mMrk)  return false;
     66  if (mArrowMrkSz != att.mArrowMrkSz) return false;
     67  if (mArrowMrk != att.mArrowMrk) return false;
     68  if (mCmapid != att.mCmapid) return false;
     69  if (mRevCmap != att.mRevCmap) return false;
     70
     71  return true;
     72}
     73
     74// PIGraphicAtt::DecodeAttStrings(vector<string> & att, bool rmdecatt)
     75// Voir apres InitGrAttStrings()
     76
     77
    4878void PIGraphicAtt::UpdateFrom(PIGraphicAtt const & att)
    4979{
    5080  if (att.mFCol != PI_NotDefColor)  mFCol = att.mFCol;
    5181  if (att.mBCol != PI_NotDefColor)  mBCol = att.mBCol;
     82  if (att.mLAtt != PI_NotDefLineAtt)  mLAtt = att.mLAtt;
    5283  if ( (att.mFnt.GetFontName() != PI_DefaultFont) ||
    5384       (att.mFnt.GetFontAtt() != PI_NotDefFontAtt) ||
     
    80111  mFnt.SetFontSz(fsz);
    81112}
     113
     114
     115// --------------------------------------------------------------------
     116// Variables globales pour decodage de chaines d'attributs graphiques
     117// --------------------------------------------------------------------
     118
     119typedef map<string, PIColors, less<string> > GrAttColors;
     120typedef map<string, PILineAtt, less<string> > GrAttLines;
     121typedef map<string, PIFontName, less<string> > GrAttFontNames;
     122struct gratt_fontatt {
     123  PIFontAtt fatt;
     124  PIFontSize fsz;
     125};
     126typedef map<string, gratt_fontatt, less<string> > GrAttFonts;
     127struct gratt_marker {
     128  PIMarker mrk;
     129  int msz;
     130};
     131typedef map<string, gratt_marker, less<string> > GrAttMarkers;
     132struct gratt_arrowmarker {
     133  PIArrowMarker amrk;
     134  int amsz;
     135};
     136typedef map<string, gratt_arrowmarker, less<string> > GrAttArrowMarkers;
     137typedef map<string, CMapId, less<string> > GrAttColMaps;
     138
     139static bool gratt_init_done = false;
     140static GrAttColors* GrAcolors = NULL;
     141static GrAttLines* GrAlines = NULL;
     142static GrAttFonts* GrAfonts = NULL;
     143static GrAttFontNames* GrAfontNames = NULL;
     144static GrAttMarkers* GrAmarkers = NULL;
     145static GrAttArrowMarkers* GrAarrowMarkers = NULL;
     146static GrAttColMaps* GrAcmaps = NULL;
     147
     148
     149void PIGraphicAtt::InitGrAttStrings()
     150{
     151  if (gratt_init_done) return;
     152
     153  GrAcolors = new GrAttColors;
     154  GrAttColors& GrAcol = *GrAcolors;
     155  PIColors gic;
     156  // Les couleurs
     157  gic = PI_NotDefColor;
     158  GrAcol["defcol"] = gic;
     159  gic = PI_Black;
     160  GrAcol["black"] = gic;
     161  gic = PI_White;
     162  GrAcol["white"] = gic;
     163  gic = PI_Grey;
     164  GrAcol["grey"] = gic;
     165  gic = PI_Red;
     166  GrAcol["red"] = gic;
     167  gic = PI_Blue;
     168  GrAcol["blue"] = gic;
     169  gic = PI_Green;
     170  GrAcol["green"] = gic;
     171  gic = PI_Yellow;
     172  GrAcol["yellow"] = gic;
     173  gic = PI_Magenta;
     174  GrAcol["magenta"] = gic;
     175 
     176  gic = PI_Cyan;
     177  GrAcol["cyan"] = gic;
     178  gic = PI_Turquoise;
     179  GrAcol["turquoise"] = gic;
     180  gic = PI_NavyBlue;
     181  GrAcol["navyblue"] = gic;
     182  gic = PI_Orange;
     183  GrAcol["orange"] = gic;
     184  gic = PI_SiennaRed;
     185  GrAcol["siennared"] = gic;
     186  gic = PI_Purple;
     187  GrAcol["purple"] = gic;
     188  gic = PI_LimeGreen;
     189  GrAcol["limegreen"] = gic;
     190  gic = PI_Gold;
     191  GrAcol["gold"] = gic;
     192  gic = PI_Violet;
     193  GrAcol["violet"] = gic;
     194  gic = PI_VioletRed;
     195  GrAcol["violetred"] = gic;
     196  gic = PI_BlueViolet;
     197  GrAcol["blueviolet"] = gic;
     198  gic = PI_DarkViolet;
     199  GrAcol["darkviolet"] = gic;
     200
     201// Les attributs de lignes
     202  PILineAtt gil;
     203  GrAlines = new GrAttLines;
     204  GrAttLines& GrAlin = *GrAlines;
     205
     206  gil = PI_NotDefLineAtt;
     207  GrAlin["defline"] = gil;
     208  gil = PI_NormalLine;
     209  GrAlin["normalline"] = gil;
     210  gil = PI_ThinLine;
     211  GrAlin["thinline"] = gil;
     212  gil = PI_ThickLine;
     213  GrAlin["thickline"] = gil;
     214  gil = PI_DashedLine;
     215  GrAlin["dashedline"] = gil;
     216  gil = PI_ThinDashedLine;
     217  GrAlin["thindashedline"] = gil;
     218  gil = PI_ThickDashedLine;
     219  GrAlin["thickdashedline"] = gil;
     220  gil = PI_DottedLine;
     221  GrAlin["dottedline"] = gil;
     222  gil = PI_ThinDottedLine;
     223  GrAlin["thindottedline"] = gil;
     224  gil = PI_ThickDottedLine;
     225  GrAlin["thickdottedline"] = gil;
     226  gil = PI_DashDottedLine;
     227  GrAlin["dashdottedline"] = gil;
     228  gil = PI_ThinDashDottedLine;
     229  GrAlin["thindashdottedline"] = gil;
     230  gil = PI_ThickDashDottedLine;
     231  GrAlin["thickdashdottedline"] = gil;
     232
     233  // Noms de fontes
     234  GrAfontNames = new GrAttFontNames;
     235  GrAttFontNames& GrAfontnm = *GrAfontNames;
     236  PIFontName gifn;
     237  gifn = PI_DefaultFont;
     238  GrAfontnm["deffont"] = gifn;
     239  gifn = PI_CourierFont;
     240  GrAfontnm["courierfont"] = gifn;
     241  gifn = PI_HelveticaFont;
     242  GrAfontnm["helveticafont"] = gifn;
     243  gifn = PI_TimesFont;
     244  GrAfontnm["timesfont"] = gifn;
     245  gifn = PI_SymbolFont;
     246  GrAfontnm["symbolfont"] = gifn;
     247
     248  // Attributs de fontes
     249  GrAfonts = new GrAttFonts;
     250  GrAttFonts& GrAfnt = *GrAfonts;
     251  gratt_fontatt gifa;
     252
     253  gifa.fsz = PI_NotDefFontSize;
     254  gifa.fatt = PI_NotDefFontAtt;
     255  GrAfnt["deffontatt"] = gifa;
     256  gifa.fsz = PI_NormalSizeFont;
     257  gifa.fatt = PI_RomanFont;
     258  GrAfnt["normalfont"] = gifa;
     259  gifa.fatt = PI_BoldFont;
     260  GrAfnt["boldfont"] = gifa;
     261  gifa.fatt = PI_ItalicFont;
     262  GrAfnt["italicfont"] = gifa;
     263  gifa.fatt = PI_BoldItalicFont;
     264  GrAfnt["bolditalicfont"] = gifa;
     265  gifa.fsz = PI_SmallSizeFont;
     266  gifa.fatt = PI_RomanFont;
     267  GrAfnt["smallfont"] = gifa;
     268  gifa.fatt = PI_BoldFont;
     269  GrAfnt["smallboldfont"] = gifa;
     270  gifa.fatt = PI_ItalicFont;
     271  GrAfnt["smallitalicfont"] = gifa;
     272  gifa.fatt = PI_BoldItalicFont;
     273  GrAfnt["smallbolditalicfont"] = gifa;
     274  gifa.fsz = PI_LargeSizeFont;
     275  gifa.fatt = PI_RomanFont;
     276  GrAfnt["bigfont"] = gifa;
     277  GrAfnt["largefont"] = gifa;
     278  gifa.fatt = PI_BoldFont;
     279  GrAfnt["bigboldfont"] = gifa;
     280  gifa.fatt = PI_ItalicFont;
     281  GrAfnt["bigitalicfont"] = gifa;
     282  GrAfnt["largeitalicfont"] = gifa;
     283  gifa.fatt = PI_BoldItalicFont;
     284  GrAfnt["bigbolditalicfont"] = gifa;
     285  GrAfnt["largebolditalicfont"] = gifa;
     286  gifa.fsz = PI_HugeSizeFont;
     287  gifa.fatt = PI_RomanFont;
     288  GrAfnt["hugefont"] = gifa;
     289  gifa.fatt = PI_BoldFont;
     290  GrAfnt["hugeboldfont"] = gifa;
     291  gifa.fatt = PI_ItalicFont;
     292  GrAfnt["hugeitalicfont"] = gifa;
     293  gifa.fatt = PI_BoldItalicFont;
     294  GrAfnt["hugebolditalicfont"] = gifa;
     295
     296
     297// Les markers
     298  GrAmarkers = new GrAttMarkers;
     299  GrAttMarkers& GrAmrk = *GrAmarkers;
     300  const char* mrkn[11] = {"dotmarker", "plusmarker", "crossmarker",
     301                          "circlemarker", "fcirclemarker",
     302                          "boxmarker", "fboxmarker",
     303                          "trianglemarker", "ftrianglemarker",
     304                          "starmarker", "fstarmarker"};
     305  PIMarker mrk[11] = {PI_DotMarker, PI_PlusMarker, PI_CrossMarker,
     306                      PI_CircleMarker, PI_FCircleMarker,
     307                      PI_BoxMarker, PI_FBoxMarker,
     308                      PI_TriangleMarker, PI_FTriangleMarker,
     309                      PI_StarMarker, PI_FStarMarker};
     310
     311 
     312  gratt_marker gim;
     313  gim.msz = 1;
     314  gim.mrk = PI_NotDefMarker;
     315  GrAmrk["defmarker"] = gim;
     316 
     317  for(int j=0; j<11; j++) {
     318    string smrk;
     319    char buff[32];
     320    for(int m=1; m<16; m+=2) {
     321      sprintf(buff,"%d",m);
     322      smrk = (string)mrkn[j] + (string)buff;
     323      gim.mrk = mrk[j];  gim.msz = m;
     324      GrAmrk[smrk] = gim;
     325    }
     326  }
     327
     328// Les fleches - ArrowMarkers
     329  GrAarrowMarkers = new GrAttArrowMarkers;
     330  GrAttArrowMarkers& GrAarrmrk = *GrAarrowMarkers;
     331  const char* arrmrkn[5] = {"basicarrow",
     332                            "trianglearrow", "ftrianglearrow",
     333                            "arrowshapedarrow", "farrowshapedarrow"};
     334  PIArrowMarker arrmrk[5] = {PI_BasicArrowMarker,
     335                             PI_TriangleArrowMarker, PI_FTriangleArrowMarker,
     336                             PI_ArrowShapedArrowMarker, PI_FArrowShapedArrowMarker};
     337 
     338  gratt_arrowmarker giam;
     339  giam.amsz = 7;
     340  giam.amrk = PI_NotDefArrowMarker;
     341  GrAarrmrk["defarrow"] = giam;
     342 
     343  for(int j=0; j<5; j++) {
     344    string smrk;
     345    char buff[32];
     346    for(int m=5; m<17; m+=2) {
     347      sprintf(buff,"%d",m);
     348      smrk = (string)arrmrkn[j] + (string)buff;
     349      giam.amrk = arrmrk[j];  giam.amsz = m;
     350      GrAarrmrk[smrk] = giam;
     351    }
     352  }
     353
     354  // Les tables de couleurs
     355  GrAcmaps = new GrAttColMaps;
     356  GrAttColMaps& GrAcmp = *GrAcmaps;
     357  CMapId gicm;
     358  gicm = CMAP_OTHER;
     359  GrAcmp["defcmap"] = gicm;
     360  for(int kcc=0; kcc<PIColorMap::NumberStandardColorMaps(); kcc++) {
     361    gicm = PIColorMap::GetStandardColorMapId(kcc);
     362    string colname = PIColorMap::GetStandardColorMapName(kcc);
     363    for(unsigned int jll=0; jll<colname.length(); jll++)
     364      colname[jll] = tolower(colname[jll]);
     365    GrAcmp[colname] = gicm;
     366  }
     367
     368
     369  gratt_init_done = true;
     370
     371}
     372
     373int PIGraphicAtt::DecodeAttStrings(vector<string> & att, bool rmdecatt)
     374{
     375  if (att.size() == 0)  return(0); 
     376  vector<string> udatt;
     377  unsigned int k = 0;
     378  int ndec = att.size();
     379  for( k=0; k<att.size(); k++ ) {
     380    string gratt = att[k];
     381    // Valeurs par defaut
     382    if (gratt == "default") {
     383      SetDefaultAtt(); 
     384      continue;
     385    }
     386    // Inversion d'indexage de ColorMap
     387    if (gratt == "revcmap")  {
     388      mRevCmap = true;  continue;
     389    }
     390    // Si c'est une couleur
     391    GrAttColors& GrAcol = *GrAcolors;
     392    GrAttColors::const_iterator itc = GrAcol.find(gratt);
     393    if (itc != GrAcol.end())  {
     394      mFCol = (*itc).second;  continue;
     395    }
     396    // Si c'est un attribut de lignes
     397    GrAttLines& GrAlin = *GrAlines;
     398    GrAttLines::const_iterator itl = GrAlin.find(gratt);
     399    if (itl != GrAlin.end())  {
     400      mLAtt = (*itl).second;  continue;
     401    }
     402    // Si c'est un nom de fontes
     403    GrAttFontNames& GrAfontnm = *GrAfontNames;
     404    GrAttFontNames::const_iterator itfn = GrAfontnm.find(gratt);
     405    if (itfn != GrAfontnm.end()) {
     406      mFnt.SetFont((*itfn).second);  continue;
     407    }
     408    // Si c'est un attribut de fontes
     409    GrAttFonts& GrAfnt = *GrAfonts;
     410    GrAttFonts::const_iterator itfa = GrAfnt.find(gratt);
     411    if (itfa != GrAfnt.end()) {
     412      mFnt.SetFontAtt((*itfa).second.fatt); 
     413      mFnt.SetFontSz((*itfa).second.fsz); 
     414      continue;
     415    }
     416    // Si c'est un attribut de markers
     417    GrAttMarkers& GrAmrk = *GrAmarkers;
     418    GrAttMarkers::const_iterator itm = GrAmrk.find(gratt);
     419    if (itm != GrAmrk.end()) {
     420      mMrk = (*itm).second.mrk; 
     421      mMSz = (*itm).second.msz; 
     422      continue;
     423    }
     424    // Si c'est un attribut de ArrowMarker (fleche)
     425    GrAttArrowMarkers& GrAarrmrk = *GrAarrowMarkers;
     426    GrAttArrowMarkers::const_iterator itam = GrAarrmrk.find(gratt);
     427    if (itam != GrAarrmrk.end()) {
     428      mArrowMrk = (*itam).second.amrk; 
     429      mArrowMrkSz = (*itam).second.amsz; 
     430      continue;
     431    }
     432    // Si c'est un colormap
     433    GrAttColMaps& GrAcmp = *GrAcmaps;
     434    GrAttColMaps::const_iterator itcm = GrAcmp.find(gratt);
     435    if (itcm != GrAcmp.end())  {
     436      mCmapid = (*itcm).second; 
     437      continue;
     438    }
     439    ndec--;
     440    if (rmdecatt)  udatt.push_back(gratt);
     441  }
     442  if (rmdecatt)  att = udatt;
     443  return(ndec);
     444}
  • trunk/SophyaPI/PI/pigratt.h

    r1904 r1914  
    2121
    2222  virtual void   CopyFrom(PIGraphicAtt const & att);
     23  virtual bool   Compare(PIGraphicAtt const & att);
     24  virtual void   SetDefaultAtt();
     25
    2326  inline PIGraphicAtt& operator = (PIGraphicAtt const & att)
    2427                 { CopyFrom(att);  return(*this); }
     28  inline bool operator == (PIGraphicAtt const & att)
     29                 { return (Compare(att)); }
     30  inline bool operator != (PIGraphicAtt const & att)
     31                 { return (!Compare(att)); }
    2532
    2633  virtual void   UpdateFrom(PIGraphicAtt const & att);
     34  virtual int    DecodeAttStrings(vector<string> & att, bool rmdecatt=true);
    2735
    2836// Changement des attributs graphiques
    2937  inline void    SetColAtt(PIColors fg=PI_NotDefColor,
    3038                           PIColors bg=PI_NotDefColor)  { mFCol = fg; mBCol = bg; }
    31   inline void    SetLineAtt(PILineAtt lat=PI_NotDefLineAtt)  { mLAtt = lat; }
     39  inline void    SetLineAtt(PILineAtt const & lat)  { mLAtt = lat; }
     40  inline void    SetLineAtt(PILineTypes ltyp=PI_NotDefLineAtt)  { mLAtt = ltyp; }
    3241  inline void    SetFont(PIFont const & fnt)  { mFnt = fnt; }
    3342         void    SetFontAtt(PIFontSize fsz=PI_NotDefFontSize,
     
    6877
    6978protected:
     79  void      InitGrAttStrings();   
     80
    7081  PIColors           mFCol, mBCol;
    7182  PILineAtt          mLAtt;
  • trunk/SophyaPI/PI/piimage.cc

    r1904 r1914  
    504504
    505505/* --Methode-- */
     506int PIImage::DecodeOptionString(vector<string> & opt, bool rmdecopt)
     507{
     508  // AFAIRE - Reza 01/03/2002
     509  return(0);
     510}
     511
     512
     513/* --Methode-- */
    506514void PIImage::SetPave(int x, int y, bool refr, bool cent)
    507515{
  • trunk/SophyaPI/PI/piimage.h

    r1904 r1914  
    7070  void SetOffset(int ox, int oy, bool refr=true);
    7171  void SetPave(int x, int y, bool refr=true, bool cent=true);
     72
     73//   Methode permettant de decoder des options a partir de chaines
     74  virtual int  DecodeOptionString(vector<string> & opt, bool rmdecopt=true);
    7275
    7376// Acces aux informations
  • trunk/SophyaPI/PI/piscdrawwdg.cc

    r1904 r1914  
    201201
    202202int
     203PIScDrawWdg::DecodeOptionString(vector<string> & opt, bool rmdecopt)
     204{
     205  // AFAIRE - Reza 01/03/2002
     206  return(0);
     207}
     208
     209int
    203210PIScDrawWdg::AddScDrawer(PIDrawer* d, bool ad)
    204211{
  • trunk/SophyaPI/PI/piscdrawwdg.h

    r1904 r1914  
    4343                            { mBDrw->SetTitles(tt, tb); }
    4444
    45   int                AddScDrawer(PIDrawer*, bool ad=false);   // Ajoute un Drawer en auto
     45//   Methode permettant de decoder des options a partir de chaines
     46  virtual int        DecodeOptionString(vector<string> & opt, bool rmdecopt=true);
     47
     48// Ajoute un Drawer en auto
     49  int                AddScDrawer(PIDrawer*, bool ad=false);   
     50
    4651  inline PIElDrawer* BaseDrawer() { return mBDrw; };
    4752
  • trunk/SophyaPI/PI/piwdggen.cc

    r1534 r1914  
    7070//      Renvoie la position de l'objet sur l'écran.
    7171//--
     72
     73//++
     74// Titre        Decodage des options
     75//--
     76//++
     77// int  DecodeOptionString(vector<string> & opt, bool rmdecopt=true)
     78//      Méthode virtuelle qui peut être redéfinie dans les classes filles,
     79//      pour decoder des options a partir de chaines de caracteres.
     80//      Renvoie le nombre d'options decodees.
     81//--
     82
     83int PIWdgGen::DecodeOptionString(vector<string> & opt, bool rmdecopt)
     84{
     85  return(0);
     86}
     87
    7288//++
    7389// Titre        Couleurs, etc ...
  • trunk/SophyaPI/PI/piwdggen.h

    r1534 r1914  
    1313#include <string>
    1414#include <list>
     15#include <vector>
    1516
    1617
     
    6869  virtual PIColors       GetBackgroundColor()= 0;
    6970  virtual PIColors       GetForegroundColor()= 0;
     71
     72//   Methode permettant de decoder des options a partir de chaines
     73  virtual int            DecodeOptionString(vector<string> & opt,
     74                                            bool rmdecopt=true);
    7075
    7176//  Gestion des accrochages (binding) aux containers
Note: See TracChangeset for help on using the changeset viewer.