ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 #ifndef ROOT_TObject
24 #include "TObject.h"
25 #endif
26 
27 class TClass;
28 class TH1;
29 class TF1;
30 class TList;
31 
32 class TVirtualHistPainter : public TObject {
33 
34 private:
35  static TClass *fgPainter; //Pointer to class painter
36 
37 public:
39  virtual ~TVirtualHistPainter() { }
40  virtual Int_t DistancetoPrimitive(Int_t px, Int_t py) = 0;
41  virtual void DrawPanel() = 0;
42  virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py) = 0;
43  virtual TList *GetContourList(Double_t contour) const = 0;
44  virtual char *GetObjectInfo(Int_t px, Int_t py) const = 0;
45  virtual TList *GetStack() const = 0;
46  virtual Bool_t IsInside(Int_t x, Int_t y) = 0;
47  virtual Bool_t IsInside(Double_t x, Double_t y) = 0;
48  virtual void Paint(Option_t *option="") = 0;
49  virtual void PaintStat(Int_t dostat, TF1 *fit) = 0;
50  virtual void ProcessMessage(const char *mess, const TObject *obj) = 0;
51  virtual void SetHistogram(TH1 *h) = 0;
52  virtual void SetStack(TList *stack) = 0;
53  virtual Int_t MakeCuts(char *cutsopt) = 0;
54  virtual void SetShowProjection(const char *option, Int_t nbins) = 0;
55 
57  static void SetPainter(const char *painter);
58 
59  ClassDef(TVirtualHistPainter,0) //Abstract interface for histogram painters
60 };
61 
62 #endif
static void SetPainter(const char *painter)
Static function to set an alternative histogram painter.
virtual void SetHistogram(TH1 *h)=0
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)=0
Computes distance from point (px,py) to the object.
virtual char * GetObjectInfo(Int_t px, Int_t py) const =0
Returns string containing info about the object at position (px,py).
const char Option_t
Definition: RtypesCore.h:62
virtual TList * GetStack() const =0
TH1 * h
Definition: legend2.C:5
virtual Int_t MakeCuts(char *cutsopt)=0
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
int nbins[3]
virtual Bool_t IsInside(Int_t x, Int_t y)=0
Float_t py
Definition: hprod.C:33
virtual void PaintStat(Int_t dostat, TF1 *fit)=0
virtual void Paint(Option_t *option="")=0
This method must be overridden if a class wants to paint itself.
Double_t x[n]
Definition: legend1.C:17
#define ClassDef(name, id)
Definition: Rtypes.h:254
Abstract interface to a histogram painter.
virtual void DrawPanel()=0
virtual void ProcessMessage(const char *mess, const TObject *obj)=0
A doubly linked list.
Definition: TList.h:47
virtual TList * GetContourList(Double_t contour) const =0
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)=0
Execute action corresponding to an event at (px,py).
virtual void SetStack(TList *stack)=0
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:81
static TClass * fgPainter
double Double_t
Definition: RtypesCore.h:55
virtual void SetShowProjection(const char *option, Int_t nbins)=0
Double_t y[n]
Definition: legend1.C:17
The TH1 histogram class.
Definition: TH1.h:80
Mother of all ROOT objects.
Definition: TObject.h:58
Float_t px
Definition: hprod.C:33
static TVirtualHistPainter * HistPainter(TH1 *obj)
1-Dim function class
Definition: TF1.h:149
TObject * obj