Logo ROOT  
Reference Guide
TVirtualHistPainter.h
Go to the documentation of this file.
1 // @(#)root/hist:$Id$
2 // Author: Rene Brun 30/08/99
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 #ifndef ROOT_TVirtualHistPainter
12 #define ROOT_TVirtualHistPainter
13 
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TVirtualHistPainter //
18 // //
19 // Abstract base class for Histogram painters //
20 // //
21 //////////////////////////////////////////////////////////////////////////
22 
23 #include "TObject.h"
24 
25 class TClass;
26 class TH1;
27 class TF1;
28 class TList;
29 
30 class TVirtualHistPainter : public TObject {
31 
32 private:
33  static TClass *fgPainter; //Pointer to class painter
34 
35 public:
37  virtual ~TVirtualHistPainter() { }
38  virtual Int_t DistancetoPrimitive(Int_t px, Int_t py) = 0;
39  virtual void DrawPanel() = 0;
40  virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py) = 0;
41  virtual TList *GetContourList(Double_t contour) const = 0;
42  virtual char *GetObjectInfo(Int_t px, Int_t py) const = 0;
43  virtual TList *GetStack() const = 0;
44  virtual Bool_t IsInside(Int_t x, Int_t y) = 0;
45  virtual Bool_t IsInside(Double_t x, Double_t y) = 0;
46  virtual void Paint(Option_t *option="") = 0;
47  virtual void PaintStat(Int_t dostat, TF1 *fit) = 0;
48  virtual void ProcessMessage(const char *mess, const TObject *obj) = 0;
49  virtual void SetHighlight() = 0;
50  virtual void SetHistogram(TH1 *h) = 0;
51  virtual void SetStack(TList *stack) = 0;
52  virtual Int_t MakeCuts(char *cutsopt) = 0;
53  virtual void SetShowProjection(const char *option, Int_t nbins) = 0;
54 
55  static TVirtualHistPainter *HistPainter(TH1 *obj);
56  static void SetPainter(const char *painter);
57 
58  ClassDef(TVirtualHistPainter,0) //Abstract interface for histogram painters
59 };
60 
61 #endif
TVirtualHistPainter::SetShowProjection
virtual void SetShowProjection(const char *option, Int_t nbins)=0
TVirtualHistPainter::TVirtualHistPainter
TVirtualHistPainter()
Definition: TVirtualHistPainter.h:36
TVirtualHistPainter::HistPainter
static TVirtualHistPainter * HistPainter(TH1 *obj)
Static function returning a pointer to the current histogram painter.
Definition: TVirtualHistPainter.cxx:31
Int_t
int Int_t
Definition: RtypesCore.h:45
TVirtualHistPainter::GetContourList
virtual TList * GetContourList(Double_t contour) const =0
x
Double_t x[n]
Definition: legend1.C:17
TVirtualHistPainter::ExecuteEvent
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)=0
Execute action corresponding to an event at (px,py).
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
TVirtualHistPainter
Definition: TVirtualHistPainter.h:30
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
h
#define h(i)
Definition: RSha256.hxx:124
TVirtualHistPainter::IsInside
virtual Bool_t IsInside(Int_t x, Int_t y)=0
TVirtualHistPainter::SetPainter
static void SetPainter(const char *painter)
Static function to set an alternative histogram painter.
Definition: TVirtualHistPainter.cxx:56
TVirtualHistPainter::SetStack
virtual void SetStack(TList *stack)=0
TVirtualHistPainter::Paint
virtual void Paint(Option_t *option="")=0
This method must be overridden if a class wants to paint itself.
TVirtualHistPainter::fgPainter
static TClass * fgPainter
Definition: TVirtualHistPainter.h:33
y
Double_t y[n]
Definition: legend1.C:17
TVirtualHistPainter::MakeCuts
virtual Int_t MakeCuts(char *cutsopt)=0
TVirtualHistPainter::SetHighlight
virtual void SetHighlight()=0
TVirtualHistPainter::GetObjectInfo
virtual char * GetObjectInfo(Int_t px, Int_t py) const =0
Returns string containing info about the object at position (px,py).
TVirtualHistPainter::ProcessMessage
virtual void ProcessMessage(const char *mess, const TObject *obj)=0
Double_t
double Double_t
Definition: RtypesCore.h:59
TObject.h
TVirtualHistPainter::DistancetoPrimitive
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)=0
Computes distance from point (px,py) to the object.
TClass
Definition: TClass.h:80
TVirtualHistPainter::~TVirtualHistPainter
virtual ~TVirtualHistPainter()
Definition: TVirtualHistPainter.h:37
TObject
Definition: TObject.h:37
TVirtualHistPainter::SetHistogram
virtual void SetHistogram(TH1 *h)=0
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TH1
Definition: TH1.h:57
TVirtualHistPainter::PaintStat
virtual void PaintStat(Int_t dostat, TF1 *fit)=0
TVirtualHistPainter::GetStack
virtual TList * GetStack() const =0
TVirtualHistPainter::DrawPanel
virtual void DrawPanel()=0
TF1
1-Dim function class
Definition: TF1.h:212
TList
Definition: TList.h:44