Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TPaletteAxis.h
Go to the documentation of this file.
1// @(#)root/histpainter:$Id$
2// Author: Rene Brun 15/11/2002
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
12#ifndef ROOT_TPaletteAxis
13#define ROOT_TPaletteAxis
14
15
16//////////////////////////////////////////////////////////////////////////
17// //
18// TPaletteAxis //
19// //
20// class used to display a color palette axis for 2-d plots //
21// //
22//////////////////////////////////////////////////////////////////////////
23
24#include "TPave.h"
25#include "TGaxis.h"
26
27class TH1;
28
29class TPaletteAxis : public TPave {
30
31protected:
32 TGaxis fAxis; ///< Palette axis
33 TH1 *fH; ///<! Pointer to parent histogram
34
35public:
36 // TPaletteAxis status bits
37 enum EStatusBits { kHasView = BIT(11) };
38
41 TPaletteAxis(const TPaletteAxis &palette);
42 virtual ~TPaletteAxis();
43 void Copy(TObject &palette) const;
45
46 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
47 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
48 TGaxis *GetAxis() {return &fAxis;}
50 TH1* GetHistogram(){return fH;}
51 virtual char *GetObjectInfo(Int_t px, Int_t py) const;
53 virtual void Paint(Option_t *option="");
54 virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
55 void SetHistogram(TH1* h) {fH = h;}
56 virtual void SetLabelColor(Int_t labelcolor) {fAxis.SetLabelColor(labelcolor);} // *MENU*
57 virtual void SetLabelFont(Int_t labelfont) {fAxis.SetLabelFont(labelfont);} // *MENU*
58 virtual void SetLabelOffset(Float_t labeloffset) {fAxis.SetLabelOffset(labeloffset);} // *MENU*
59 virtual void SetLabelSize(Float_t labelsize) {fAxis.SetLabelSize(labelsize);} // *MENU*
60 virtual void SetTitleOffset(Float_t titleoffset=1) {fAxis.SetTitleOffset(titleoffset);} // *MENU*
61 virtual void SetTitleSize(Float_t titlesize) {fAxis.SetTitleSize(titlesize);} // *MENU*
62 virtual void SetLineColor(Color_t linecolor) {fAxis.SetLineColor(linecolor);} // *MENU*
63 virtual void SetLineWidth(Width_t linewidth) {fAxis.SetLineWidth(linewidth);} // *MENU*
64 virtual void UnZoom(); // *MENU*
65
66 ClassDef(TPaletteAxis,4) //class used to display a color palette axis for 2-d plots
67};
68
69#endif
70
#define h(i)
Definition RSha256.hxx:106
static const double x2[5]
static const double x1[5]
int Int_t
Definition RtypesCore.h:45
short Width_t
Definition RtypesCore.h:91
double Double_t
Definition RtypesCore.h:59
short Color_t
Definition RtypesCore.h:92
float Float_t
Definition RtypesCore.h:57
const char Option_t
Definition RtypesCore.h:66
#define ClassDef(name, id)
Definition Rtypes.h:325
#define BIT(n)
Definition Rtypes.h:85
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Definition TAttLine.h:43
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Definition TAttLine.h:40
The axis painter class.
Definition TGaxis.h:23
void SetTitleOffset(Float_t titleoffset=1)
Definition TGaxis.h:124
void SetLabelFont(Int_t labelfont)
Definition TGaxis.h:105
void SetTitleSize(Float_t titlesize)
Definition TGaxis.h:125
void SetLabelOffset(Float_t labeloffset)
Definition TGaxis.h:106
void SetLabelColor(Int_t labelcolor)
Definition TGaxis.h:104
void SetLabelSize(Float_t labelsize)
Definition TGaxis.h:107
TH1 is the base class of all histogram classes in ROOT.
Definition TH1.h:58
Mother of all ROOT objects.
Definition TObject.h:41
The palette painting class.
void Copy(TObject &palette) const
Copy a palette to a palette.
virtual ~TPaletteAxis()
Palette destructor.
virtual void SetLabelSize(Float_t labelsize)
TGaxis fAxis
Palette axis.
void SetHistogram(TH1 *h)
TGaxis * GetAxis()
TPaletteAxis & operator=(const TPaletteAxis &)
Assignment operator.
virtual void SetTitleOffset(Float_t titleoffset=1)
TPaletteAxis()
Palette default constructor.
virtual void SetLabelOffset(Float_t labeloffset)
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Check if mouse on the axis region.
Int_t GetBinColor(Int_t i, Int_t j)
Returns the color index of the bin (i,j).
virtual void SetLineColor(Color_t linecolor)
Set the line color.
TH1 * fH
! Pointer to parent histogram
virtual void SetLabelColor(Int_t labelcolor)
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Check if mouse on the axis region.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
virtual void Paint(Option_t *option="")
Paint the palette.
virtual void SetTitleSize(Float_t titlesize)
virtual void UnZoom()
Unzoom the palette.
virtual void SetLineWidth(Width_t linewidth)
Set the line width.
TH1 * GetHistogram()
virtual void SetLabelFont(Int_t labelfont)
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Displays the z value corresponding to cursor position py.
Int_t GetValueColor(Double_t zc)
Returns the color index of the given z value.
A TBox with a bordersize and a shadow option.
Definition TPave.h:19