Changeset 1850 in Sophya for trunk/SophyaPI/PIext/pihisto2d.h


Ignore:
Timestamp:
Jan 7, 2002, 4:56:32 PM (24 years ago)
Author:
cmv
Message:

1-/ correction bug init. sur TypScal (pb vu par Marc switch Lineaire/Log10)
2-/ Amelioration du widget d'options (clic souris 3)
3-/ reverse color map

cmv 7/1/2002

File:
1 edited

Legend:

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

    r1297 r1850  
    1818class PIHisto2D : public PIDrawer {
    1919public:
    20                      PIHisto2D(Histo2D* histo, bool ad=false);
    21   virtual            ~PIHisto2D();
    22           void       UseColors(bool fg=false, CMapId cmap=CMAP_GREYINV32);
    23           void       UseScale(unsigned short type=0,float logscale=10.);
    24           void       UseDisplay(unsigned short type=0, float fnpt=0.5);
    25           void       UseDyn(float hmin=1., float hmax=-1.);
    26           void       UseFrac(float frmin=0.1, float frmax=0.9);
    27           void       Print(int lp=0);
    28   virtual void       Draw(PIGraphicUC* g,double xmin,double ymin,double xmax,double ymax);
    29   virtual void       UpdateLimits();
    30   virtual void       DrawStats(PIGraphicUC* g);
     20  PIHisto2D(Histo2D* histo, bool ad=false);
     21  virtual ~PIHisto2D();
    3122
    32   inline Histo2D*       Histogram() { return(mHisto); }
    33   inline bool           Color() { return(mFgCol); }
    34   inline CMapId         ColMap() { return(mCmap); }
    35   inline unsigned short TypScale() { return(mTypScal); }
    36   inline unsigned short TypDisplay() { return(mTypDisp); }
    37   inline float          FPoints() { return(mFPoints); }
    38   inline float          HMax() { return(mHMax);}
    39   inline float          HMin() { return(mHMin);}
    40   inline float          FMax() { return(mFracMax);}
    41   inline float          FMin() { return(mFracMin);}
    42   inline float          LogScale() { return(mLogScale);}
     23  void UseColors(bool fg=false,CMapId cmap=CMAP_GREYINV32,bool revcmap=false);
     24  void UseScale(unsigned short type=0,float logscale=10.);
     25  void UseDisplay(unsigned short type=0,float fnpt=0.5);
     26  void UseDyn(float hmin=1.,float hmax=-1.);
     27  void UseFrac(float frmin=0.1,float frmax=0.9);
     28  void Print(int lp=0);
     29
     30  virtual void Draw(PIGraphicUC* g,double xmin,double ymin,double xmax,double ymax);
     31  virtual void UpdateLimits();
     32  virtual void DrawStats(PIGraphicUC* g);
     33
     34  inline Histo2D*       Histogram()   {return(mHisto);}
     35  inline bool           Color()       {return(mFgCol);}
     36  inline CMapId         ColMap()      {return(mCmap);}
     37  inline bool           IsColMapRev() {return(mRevCmap);}
     38  inline unsigned short TypScale()    {return(mTypScal);}
     39  inline unsigned short TypDisplay()  {return(mTypDisp);}
     40  inline float          FPoints()     {return(mFPoints);}
     41  inline float          HMax()        {return(mHMax);}
     42  inline float          HMin()        {return(mHMin);}
     43  inline float          FMax()        {return(mFracMax);}
     44  inline float          FMin()        {return(mFracMin);}
     45  inline float          LogScale()    {return(mLogScale);}
    4346
    4447protected:
     
    4851  Histo2D* mHisto;
    4952  bool mAdDO;
    50   bool mFgCol;
    51   CMapId mCmap;
    52   unsigned short mTypScal;
    53   unsigned short mTypDisp;
    54   float mFPoints;
     53  bool mFgCol; CMapId mCmap; bool mRevCmap;
     54  unsigned short mTypScal; float mLogScale;
     55  unsigned short mTypDisp; float mFPoints;
    5556  float mHMin,mHMax;
    5657  float mFracMin,mFracMax;
    57   float mLogScale;
    5858};
    5959
     
    6161class PIH2DWdg : public PIScDrawWdg {
    6262public:
    63                      PIH2DWdg(PIContainerGen *par, const char *nom, int sx=300, int sy=300,
    64                               int px=0, int py=0);
    65                      ~PIH2DWdg();
     63  PIH2DWdg(PIContainerGen *par,const char *nom,int sx=300,int sy=300,int px=0,int py=0);
     64  ~PIH2DWdg();
    6665
    67   void               SetHisto(Histo2D* histo);
    68   void               SetPIHisto(PIHisto2D* pih2);
    69   inline PIHisto2D*  GetPIHisto() {return mPih;}
     66  void SetHisto(Histo2D* histo);
     67  void SetPIHisto(PIHisto2D* pih2);
    7068
    71   virtual string     GetClickText(double x, double y);
    72   virtual void       ActivateSpecializedControls();   // Pour activer des controles specifiques
    73   virtual void       But3Press(int x, int y);
     69  inline PIHisto2D* GetPIHisto() {return mPih;}
     70
     71  virtual string GetClickText(double x, double y);
     72  virtual void   ActivateSpecializedControls(); // Pour activer des controles specifiques
     73  virtual void   But3Press(int x, int y);
    7474
    7575protected:
    7676  PIHisto2D*  mPih;
    77 
    7877};
    7978
     
    8180class H2WinArg : public PIWindow {
    8281public :
    83                H2WinArg(PIH2DWdg *par);
    84                ~H2WinArg();
    85           void SetPIH2DWdg(PIH2DWdg* h2wdg);
    86           void SetText();
    87           void GetText();
    88   virtual void Process(PIMessage msg, PIMsgHandler* sender, void* data=NULL);
     82  H2WinArg(PIH2DWdg *par);
     83  ~H2WinArg();
     84
     85  void SetPIH2DWdg(PIH2DWdg* h2wdg);
     86  void SetText();
     87
     88  virtual void Process(PIMessage msg,PIMsgHandler* sender,void* data=NULL);
    8989
    9090protected:
     
    9797  PIText    * mText[3];
    9898  PIScale   * mPScal;
     99  PICheckBox* mCkb;
    99100
    100   bool mFgCol;
    101   CMapId mCmap;
    102   unsigned short mTypScal;
    103   unsigned short mTypDisp;
    104   float mFPoints;
     101  bool mFgCol; CMapId mCmap; bool mRevCmap;
     102  unsigned short mTypScal; float mLogScale;
     103  unsigned short mTypDisp; float mFPoints;
    105104  float mHMin,mHMax;
    106105  float mFracMin,mFracMax;
    107   float mLogScale;
    108106};
    109107
Note: See TracChangeset for help on using the changeset viewer.