source: Sophya/trunk/SophyaPI/PIext/pihisto.h@ 3125

Last change on this file since 3125 was 3125, checked in by ansari, 19 years ago

1/ Introduction d'une classe P1DHistoWrapper (fichier phistwrapper.h) pour rendre PIHisto independant de SOPHYA et des objets Histo, HistErr, HProf ...
2/ Ecriture du wrapper/adaptateur pour SOPHYA::Histo,HProf,HistErr
3/ mise en conformite des ObjAdapter piapp pour Histo,HistErr, chgt numero de version

Reza 11/01/2007

File size: 1.6 KB
Line 
1// This may look like C code, but it is really -*- C++ -*-
2// Classe traceur d histogramme 96-99
3// C. Magneville / R. Ansari 2000-2007
4// CEA-DAPNIA LAL-IN2P3/CNRS
5
6#ifndef PIHISTO_H
7#define PIHISTO_H
8
9#include "pidrawer.h"
10#include "phistwrapper.h"
11
12
13class PIHisto : public PIDrawer {
14public:
15 PIHisto(P1DHistoWrapper* histo, bool ad=true);
16 virtual ~PIHisto();
17 virtual void Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax);
18 virtual void UpdateLimits();
19 inline void SetStats(bool fg=true) {stats=fg;}
20 inline void SetStatPosOffset(float ofx=-0.01, float ofy=-0.01)
21 {spoX=ofx; spoY=ofy; }
22 // fg=-1 pas de barre d'erreur, 1=barres d'erreurs,
23 // 0=barres d'erreurs automatiques: trace si HProf ou markeur demande
24 inline void SetError(short fg=0) {error=fg;}
25 inline void SetFilled(bool fg=false) {filled=fg;}
26 inline P1DHistoWrapper* HistoWrapper() {return(mHisto);}
27
28// Methode de decodage des options
29 virtual int DecodeOptionString(vector<string> & opt, bool rmdecopt=true);
30 virtual int OptionToString(vector<string> & opt) const;
31 virtual void GetOptionsHelpInfo(string& info);
32
33// Renvoie une distance au point x,y
34 virtual double GetDistanceToPoint(double x, double y);
35
36protected:
37 virtual void DrawStats(PIGraphicUC* g);
38 P1DHistoWrapper* mHisto;
39 bool mAdDO;
40 bool stats,filled;
41 short error;
42 float spoX, spoY; // Stat pos offset par rapport a position defaut
43};
44
45#endif
Note: See TracBrowser for help on using the repository browser.