Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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:
37 ~TVirtualHistPainter() override { }
38 Int_t DistancetoPrimitive(Int_t px, Int_t py) override = 0;
39 virtual void DrawPanel() = 0;
40 void ExecuteEvent(Int_t event, Int_t px, Int_t py) override = 0;
41 virtual TList *GetContourList(Double_t contour) const = 0;
42 char *GetObjectInfo(Int_t px, Int_t py) const override = 0;
43 virtual TList *GetStack() const = 0;
44 virtual Bool_t IsInside(Int_t x, Int_t y) = 0;
46 void Paint(Option_t *option="") override = 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 virtual void SetShowProjectionXY(const char *option, Int_t nbinsY, Int_t nbinsX) = 0;
55
57 static void SetPainter(const char *painter);
58
59 ClassDefOverride(TVirtualHistPainter,0) //Abstract interface for histogram painters
60};
61
62#endif
#define h(i)
Definition RSha256.hxx:106
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t option
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition TClass.h:81
1-Dim function class
Definition TF1.h:233
TH1 is the base class of all histogram classes in ROOT.
Definition TH1.h:59
A doubly linked list.
Definition TList.h:38
Mother of all ROOT objects.
Definition TObject.h:41
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
Int_t DistancetoPrimitive(Int_t px, Int_t py) override=0
Computes distance from point (px,py) to the object.
virtual Int_t MakeCuts(char *cutsopt)=0
static TClass * fgPainter
Pointer to class painter.
virtual TList * GetStack() const =0
char * GetObjectInfo(Int_t px, Int_t py) const override=0
Returns string containing info about the object at position (px,py).
virtual void SetStack(TList *stack)=0
virtual Bool_t IsInside(Int_t x, Int_t y)=0
virtual void SetShowProjectionXY(const char *option, Int_t nbinsY, Int_t nbinsX)=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 void ProcessMessage(const char *mess, const TObject *obj)=0
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override=0
Execute action corresponding to an event at (px,py).
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
void Paint(Option_t *option="") override=0
This method must be overridden if a class wants to paint itself.
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17