Changeset 1971 in Sophya for trunk/SophyaPI/PIext/pistdimgapp.h


Ignore:
Timestamp:
Apr 30, 2002, 2:34:41 PM (23 years ago)
Author:
ansari
Message:

1/ Basculement de decodage des options de display aux methodes
PIDrawer/PIWdg::DecodeOptionString()
2/ Possibilite de Show/Hide de la partie Zoom/ColorMap/Stat du MainWindow

Reza 30/4/2002

File:
1 edited

Legend:

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

    r1642 r1971  
    3131
    3232
    33 enum {Disp_Next=0, Disp_Win=1, Disp_Same=2, Disp_Stack=3, Disp_Inset=4};
     33enum DispWinEnum {Disp_Default, Disp_Next, Disp_Win, Disp_Same, Disp_Stack, Disp_Inset};
    3434
    3535typedef map<long, PIWindow*, less<long> > WindMList;
     
    4747     virtual void   SetBlocked();
    4848
    49      int  DispImage(P2DArrayAdapter* nouv, string const & name, int opt, int oid=0);
    50      int  DispScDrawer(PIDrawer* scd, string const & name, int opt, string title="", int oid=0);
    51      int  Disp3DDrawer(PIDrawer3D* scd, string const & name, int opt, string title="", int oid=0);
     49     int  DispImage(P2DArrayAdapter* nouv, string const & name, string const & opt, int oid=0);
     50     int  DispScDrawer(PIDrawer* scd, string const & name, string const & opt,
     51                       string title="", int oid=0);
     52     int  Disp3DDrawer(PIDrawer3D* scd, string const & name, string const & opt,
     53                       string title="", int oid=0);
    5254
    5355  //  Fonction d'ajout de texte (provisoire - Aout 99)
    54      void AddText(string const & txt, double xp, double yp);
     56     void AddText(string const & txt, double xp, double yp, string const& opt);
    5557  //  Ajout de lignes, rectangles, cercles (provisoires - Aout 2001)
    56      void AddLine(double xp1, double yp1, double xp2, double yp2);
    57      void AddRectangle(double xp1, double yp1, double xp2, double yp2, bool fgfill=false);
    58      void AddCircle(double xc, double yc, double r, bool fgfill=false);
     58     void AddLine(double xp1, double yp1, double xp2, double yp2, string const& opt);
     59     void AddRectangle(double xp1, double yp1, double xp2, double yp2, string const& opt,
     60                       bool fgfill=false);
     61     void AddCircle(double xc, double yc, double r, string const& opt,
     62                    bool fgfill=false);
    5963
    6064  //  Fonction Ajout de titre de trace
     
    6670     void CreateGraphWin(int nx=1, int ny=1, int sx=0, int sy = 0);
    6771     void CreateStackWin(int sx=0, int sy = 0);
    68      PIWindow * GetWindow(int typ, int& sx, int& sy, int& px, int& py, int& flag, char * nom);
     72     PIWindow * GetWindow(DispWinEnum typ, int& sx, int& sy, int& px, int& py, int& flag, char * nom);
    6973     void SetZone(int nzx=1, int nzy=1);
    7074     void StackWinNext();
     
    9397     inline PPInMgrWind* PPInMgrW() { return mPpinmgrw; }
    9498
     99// Gestion (show/hide) de la fenetre Stat/ZoomWindow
     100    void   StatZoomWindowSetVisible(bool fg=true);
     101
    95102// Redirection ou Non de StdOut/StdErr
    96103     void  RedirectStdOutErr(bool fg = true);
     
    99106     void  CatchSignals(bool fgfpe=true, bool fgsegv=true);
    100107
    101 //  Gestion d attributs graphiques courants
    102      void  SetColAtt(PIColors fg=PI_NotDefColor,
    103                      PIColors bg=PI_NotDefColor);
    104      void  SetLineAtt(PILineAtt lat=PI_NotDefLineAtt);
    105      void  SetFontName(PIFontName fn=PI_DefaultFont);
    106      void  SetFontAtt(PIFontSize fsz=PI_NotDefFontSize,
    107                       PIFontAtt fat=PI_NotDefFontAtt);
    108      void  SetMarkerAtt(int sz=-1, PIMarker mrk=PI_NotDefMarker);
    109      inline void  SetColMapId(CMapId cid=CMAP_OTHER) { mCmapid = cid; }
    110      inline void  SetReverseColMapFlag(bool fg=false) { mRevCmap = fg; }
    111      void  SetZoomAtt(int zoom=0);
    112      void  SetAxesAtt(unsigned int axfl=kBoxAxes | kExtTicks | kLabels);
    113      void  SetXYLimits(double xmin=-1., double xmax=1., double ymin=-1., double ymax=1.);
    114108     void  SetInsetLimits(double xmin=0.4, double xmax=0.6, double ymin=0.4, double ymax=0.6);
    115      void  SetImageCenterPosition(int x=-1, int y=-1);
    116      inline void  UseXYLimits(bool fg=false) {  mFXYlim=fg; }
    117      inline void  UseImageCenter(bool fg=false) { mFImgCenter=fg; }
    118      inline void  SetXLogScale(bool logx=false) { maXlog = logx; }
    119      inline void  SetYLogScale(bool logy=false) { maYlog = logy; }
    120109     inline void  SetAutoAddTitle(bool aatit=true) { mAddTitle = aatit; }
    121 
    122 // Pour sauvegarder-restauration de  l'etat des attributs graphiques
    123      void  SaveGraphicAtt();   
    124      void  RestoreGraphicAtt();   
     110     void  SetAxesAtt(unsigned int axfl) { mAxesFlags = axfl; }
     111  //     void  SaveGraphicAtt();
     112  //     void  RestoreGraphicAtt();
     113     void  SetDefaultGraphicAttributes(string const & opt);
     114     void  SetDefaultAxesAttributes(string const & opt);
     115     DispWinEnum ParseDisplayOption(string const & opt, vector<string>& opts);
    125116
    126117// Gestion fichiers PS
     
    141132    void MBProcess6(PIMessage msg, PIMsgHandler* sender, void* data=NULL);
    142133
     134   
    143135
    144136    NamedObjMgr* mObjMgr;
     
    148140    PIMenu* mc;
    149141
     142    PIContainer* statcont;    // Container pour les widgets zoom, gimv, cmapv ...
    150143    PIPixmap* zoom;
    151144    PIPixmap* gimv;
    152145    PICMapView* cmapv;
     146    PILabel* labstat;
    153147
    154148    PIFileChooser * pfc_fits;   // Pour les fichiers FITS
     
    156150    PIFileChooser * pfc_ps;     // Pour les PostScript
    157151
     152    PIContainer* consolecont;    // Container pour la PIConsole
    158153    PIConsole* mCons;
    159154    bool redirecout;    // true if stdout/err redirected to mCons;
     
    176171    PPInMgrWind* mPpinmgrw;
    177172
    178 //  Gestion d attributs graphiques courants, etat sauvegarde
    179     PIColors     mFCol, mBCol, mSFCol, mSBCol;
    180     PILineAtt    mLAtt, mSLAtt;
    181     PIFontName   mFName, mSFName;
    182     PIFontSize   mFSz, mSFSz;
    183     PIFontAtt    mFAtt, mSFAtt;
    184     int          mMSz, mSMSz;
    185     PIMarker     mMrk,mSMrk; 
    186     CMapId       mCmapid, mSCmapid;
    187     bool         mRevCmap, mSRevCmap;
    188     int          mZoom, mSZoom;
    189     unsigned int mAxesFlags, mSAxesFlags;
    190     double       mXmin, mXmax, mYmin, mYmax;
    191     double       mSXmin, mSXmax, mSYmin, mSYmax;
     173  // Attributs graphiques, etc ...
    192174    double       mIXmin, mIXmax, mIYmin, mIYmax;
    193     double       mSIXmin, mSIXmax, mSIYmin, mSIYmax;
    194     int          mXImgCenter, mYImgCenter;
    195     int          mSXImgCenter, mSYImgCenter;
    196     bool         mFXYlim, mSFXYlim;
    197     bool         mFImgCenter, mSFImgCenter;
    198     bool         maXlog, mSaXlog;
    199     bool         maYlog, mSaYlog;
    200     bool         mAddTitle, mSAddTitle;
     175    bool         mAddTitle;
     176    unsigned int mAxesFlags;
    201177
     178    vector<string> mDefaultAtt;
     179    vector<string> mAxesAtt; 
     180
     181  //  Controles et gestion divers
    202182    PIMessage mFCMsg;  // Message for processing FileOpen
    203     int mFgScSz;   // Dlag ScreenSize
     183    int mFgScSz;   // Flag ScreenSize
    204184    bool mFgCWImg; // true -> Current Widget is PIImage
    205185};
Note: See TracChangeset for help on using the changeset viewer.