Warning, file /include/root/TPaletteAxis.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TPaletteAxis
0013 #define ROOT_TPaletteAxis
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #include "TPave.h"
0025 #include "TGaxis.h"
0026 #include "TH1.h"
0027
0028 class TPaletteAxis : public TPave {
0029
0030 protected:
0031 TGaxis fAxis;
0032 TH1 *fH;
0033
0034 public:
0035
0036 enum EStatusBits { kHasView = BIT(11) };
0037
0038 TPaletteAxis();
0039 TPaletteAxis(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2, TH1 *h);
0040 TPaletteAxis(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2, Double_t min, Double_t max);
0041 TPaletteAxis(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2, TAxis *ax);
0042 TPaletteAxis(const TPaletteAxis &palette);
0043 ~TPaletteAxis() override;
0044 void Copy(TObject &palette) const override;
0045 TPaletteAxis& operator=(const TPaletteAxis&);
0046
0047 Int_t DistancetoPrimitive(Int_t px, Int_t py) override;
0048 void ExecuteEvent(Int_t event, Int_t px, Int_t py) override;
0049 TGaxis *GetAxis() {return &fAxis;}
0050 Int_t GetBinColor(Int_t i, Int_t j);
0051 TH1* GetHistogram(){return fH;}
0052 char *GetObjectInfo(Int_t px, Int_t py) const override;
0053 Int_t GetValueColor(Double_t zc);
0054 void Paint(Option_t *option="") override;
0055 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
0056 void SetHistogram(TH1* h) {fH = h;}
0057 virtual void SetNdivisions(Int_t ndiv=10) {if (fH) fH->GetZaxis()->SetNdivisions(ndiv); else fAxis.SetNdivisions(ndiv);}
0058 virtual void SetLabelColor(Int_t color=1) {if (fH) fH->GetZaxis()->SetLabelColor(color); else fAxis.SetLabelColor(color);}
0059 virtual void SetLabelFont(Int_t font=42) {if (fH) fH->GetZaxis()->SetLabelFont(font); else fAxis.SetLabelFont(font);}
0060 virtual void SetLabelOffset(Float_t offset=0.005) {if (fH) fH->GetZaxis()->SetLabelOffset(offset); else fAxis.SetLabelOffset(offset);}
0061 virtual void SetLabelSize(Float_t size=0.035) {if (fH) fH->GetZaxis()->SetLabelSize(size); else fAxis.SetLabelSize(size);}
0062 virtual void SetMaxDigits(Float_t maxdigits=5) {if (fH) fH->GetZaxis()->SetMaxDigits(maxdigits); else fAxis.SetMaxDigits(maxdigits);}
0063 virtual void SetTickLength(Float_t length=0.03) {if (fH) fH->GetZaxis()->SetTickLength(length); else fAxis.SetTickLength(length);}
0064 virtual void SetTitleOffset(Float_t offset=1) {if (fH) fH->GetZaxis()->SetTitleOffset(offset); else fAxis.SetTitleOffset(offset);}
0065 virtual void SetTitleSize(Float_t size=0.035) {if (fH) fH->GetZaxis()->SetTitleSize(size); else fAxis.SetTitleSize(size);}
0066 virtual void SetTitleColor(Int_t color=1) {if (fH) fH->GetZaxis()->SetTitleColor(color); else fAxis.SetTitleColor(color);}
0067 virtual void SetTitleFont(Int_t font=42) {if (fH) fH->GetZaxis()->SetTitleFont(font); else fAxis.SetTitleFont(font);}
0068 virtual void SetTitle(const char *title="") {if (fH) fH->GetZaxis()->SetTitle(title); else fAxis.SetTitle(title);}
0069 virtual void SetAxisColor(Int_t color=1, Float_t alpha=1) {if (fH) fH->GetZaxis()->SetAxisColor(color,alpha);}
0070 void SetLineWidth(Width_t width) override {fAxis.SetLineWidth(width);}
0071
0072 virtual void UnZoom();
0073
0074 ClassDefOverride(TPaletteAxis,4)
0075 };
0076
0077 #endif
0078