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
25class TClass;
26class TH1;
27class TF1;
28class TList;
29
31
32private:
33 static TClass *fgPainter; //Pointer to class painter
34
35public:
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;
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
56 static void SetPainter(const char *painter);
57
58 ClassDef(TVirtualHistPainter,0) //Abstract interface for histogram painters
59};
60
61#endif
#define h(i)
Definition: RSha256.hxx:106
double Double_t
Definition: RtypesCore.h:57
const char Option_t
Definition: RtypesCore.h:64
#define ClassDef(name, id)
Definition: Rtypes.h:322
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:80
1-Dim function class
Definition: TF1.h:210
The TH1 histogram class.
Definition: TH1.h:56
A doubly linked list.
Definition: TList.h:44
Mother of all ROOT objects.
Definition: TObject.h:37
Abstract interface to a histogram painter.
virtual void DrawPanel()=0
virtual void SetShowProjection(const char *option, Int_t nbins)=0
virtual TList * GetContourList(Double_t contour) const =0
virtual Int_t MakeCuts(char *cutsopt)=0
static TClass * fgPainter
virtual char * GetObjectInfo(Int_t px, Int_t py) const =0
Returns string containing info about the object at position (px,py).
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)=0
Execute action corresponding to an event at (px,py).
virtual void Paint(Option_t *option="")=0
This method must be overridden if a class wants to paint itself.
virtual TList * GetStack() const =0
virtual void SetStack(TList *stack)=0
virtual Bool_t IsInside(Int_t x, Int_t y)=0
static void SetPainter(const char *painter)
Static function to set an alternative histogram painter.
virtual Bool_t IsInside(Double_t x, Double_t y)=0
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)=0
Computes distance from point (px,py) to the object.
virtual void ProcessMessage(const char *mess, const TObject *obj)=0
virtual void SetHistogram(TH1 *h)=0
virtual void SetHighlight()=0
static TVirtualHistPainter * HistPainter(TH1 *obj)
Static function returning a pointer to the current histogram painter.
virtual void PaintStat(Int_t dostat, TF1 *fit)=0
Double_t y[n]
Definition: legend1.C:17
Double_t x[n]
Definition: legend1.C:17