Logo ROOT   6.21/01
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
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
virtual Int_t MakeCuts(char *cutsopt)=0
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual Bool_t IsInside(Int_t x, Int_t y)=0
virtual void PaintStat(Int_t dostat, TF1 *fit)=0
static TVirtualHistPainter * HistPainter(TH1 *obj)
Static function returning a pointer to the current histogram painter.
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:326
Abstract interface to a histogram painter.
virtual void SetHighlight()=0
virtual void DrawPanel()=0
virtual void ProcessMessage(const char *mess, const TObject *obj)=0
A doubly linked list.
Definition: TList.h:44
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
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:75
#define h(i)
Definition: RSha256.hxx:106
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:56
Mother of all ROOT objects.
Definition: TObject.h:37
1-Dim function class
Definition: TF1.h:211