source: Sophya/trunk/SophyaPI/PIext/pintuple.h@ 2463

Last change on this file since 2463 was 2383, checked in by ansari, 22 years ago

Ajout methode GetInfoString() aux ObjAdapter + attributs de gestion de position de stat pour PINtuple/PIHisto + positionnement par defaut de stat (statposoff=) lors de disp same - Reza 16/5/2003

File size: 2.5 KB
Line 
1// This may look like C code, but it is really -*- C++ -*-
2// Module PI : Peida Interactive PINTuple et PINTupleWdg
3// Traceur d objet de type NTupleInterface
4
5#ifndef PINTUPLE_H
6#define PINTUPLE_H
7
8#include "ntupintf.h"
9#include "pidrawer.h"
10
11class PINTuple : public PIDrawer {
12public:
13 PINTuple(NTupleInterface* nt, bool ad);
14 virtual ~PINTuple();
15
16
17 virtual void Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax);
18 virtual void UpdateLimits();
19
20 virtual void SelectXY(const char* px, const char* py);
21 virtual void SelectWt(const char* pw=NULL);
22 virtual void SelectErrBar(const char* erbx=NULL, const char* erby=NULL);
23 virtual void SelectLabel(const char* plabel=NULL);
24
25 inline void ConnectPoints(bool fg=false) { connectPts = fg; }
26
27 // Gestion de la representation de poids
28 inline void UseSizeScale(bool fg=true, int nbins=5)
29 { mrkSzScale = fg; if (nbins>0) nWbins = nbins; }
30 inline void UseColorScale(bool fg=true) { colorScale = fg; }
31
32 inline bool GetSizeScale(int& nbins)
33 { nbins = nWbins; return mrkSzScale; }
34 inline bool GetColScale() { return colorScale; }
35
36 inline void SetStats(bool fg=true) { stats = fg; }
37 inline void SetStatPosOffset(float ofx=-0.01, float ofy=-0.01)
38 {spoX=ofx; spoY=ofy; }
39
40 virtual void AppendTextInfo(string& info, double xmin, double ymin, double xmax, double ymax);
41
42// Methode de decodage des options
43 virtual int DecodeOptionString(vector<string> & opt, bool rmdecopt=true);
44// Texte d'aide des options disponibles
45 virtual void GetOptionsHelpInfo(string& info);
46
47protected:
48 NTupleInterface* mNT;
49 bool mAdDO;
50 int xK, yK; // Index du nom de variable en X/Y ds le ntuple
51 int xebK, yebK; // Index du nom de variable en ErrBarX/Y ds le ntuple
52 int wK; // Index du nom de variable poids
53 int lK; // Index du nom de variable label (affiche en texte)
54 double wMin, wMax; // Valeurs de poids min/max
55 bool mrkSzScale; // true -> Taille de markers variable suivant poids
56 int nWbins; // Nombre de bins taille de marker variable
57 bool colorScale; // true -> Couleur de marker variable suivant poids
58 bool stats; // true -> indication du nb de points
59 bool connectPts; // true -> les points sont relies par une ligne
60 float spoX, spoY; // Stat pos offset par rapport a position defaut
61};
62
63#endif
64
65
66
67
Note: See TracBrowser for help on using the repository browser.