Changeset 1850 in Sophya for trunk/SophyaPI/PIext/pihisto2d.h
- Timestamp:
- Jan 7, 2002, 4:56:32 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/pihisto2d.h
r1297 r1850 18 18 class PIHisto2D : public PIDrawer { 19 19 public: 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(); 31 22 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);} 43 46 44 47 protected: … … 48 51 Histo2D* mHisto; 49 52 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; 55 56 float mHMin,mHMax; 56 57 float mFracMin,mFracMax; 57 float mLogScale;58 58 }; 59 59 … … 61 61 class PIH2DWdg : public PIScDrawWdg { 62 62 public: 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(); 66 65 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); 70 68 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); 74 74 75 75 protected: 76 76 PIHisto2D* mPih; 77 78 77 }; 79 78 … … 81 80 class H2WinArg : public PIWindow { 82 81 public : 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); 89 89 90 90 protected: … … 97 97 PIText * mText[3]; 98 98 PIScale * mPScal; 99 PICheckBox* mCkb; 99 100 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; 105 104 float mHMin,mHMax; 106 105 float mFracMin,mFracMax; 107 float mLogScale;108 106 }; 109 107
Note:
See TracChangeset
for help on using the changeset viewer.