TPaletteAxis.h

Go to the documentation of this file.
00001 // @(#)root/histpainter:$Id: TPaletteAxis.h 27028 2008-12-19 12:45:24Z couet $
00002 // Author: Rene Brun   15/11/2002
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TPaletteAxis
00013 #define ROOT_TPaletteAxis
00014 
00015 
00016 //////////////////////////////////////////////////////////////////////////
00017 //                                                                      //
00018 // TPaletteAxis                                                         //
00019 //                                                                      //
00020 // class used to display a color palette axis for 2-d plots             //
00021 //                                                                      //
00022 //////////////////////////////////////////////////////////////////////////
00023 
00024 #ifndef ROOT_TPave
00025 #include "TPave.h"
00026 #endif
00027 #ifndef ROOT_TGaxis
00028 #include "TGaxis.h"
00029 #endif
00030 
00031 class TH1;
00032 
00033 class TPaletteAxis : public TPave {
00034 
00035 protected:
00036    TGaxis       fAxis;          //palette axis
00037    TH1         *fH;             //pointer to parent histogram
00038    TString      fName;          //Pave name
00039 
00040 public:
00041    // TPaletteAxis status bits
00042    enum { kHasView   = BIT(11)};
00043 
00044    TPaletteAxis();
00045    TPaletteAxis(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2, TH1 *h);
00046    TPaletteAxis(const TPaletteAxis &palette);
00047    virtual ~TPaletteAxis();
00048    void Copy(TObject &palette) const;
00049 
00050    virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
00051    virtual void  ExecuteEvent(Int_t event, Int_t px, Int_t py);
00052    TGaxis       *GetAxis() {return &fAxis;}
00053    Int_t         GetBinColor(Int_t i, Int_t j);
00054    Option_t     *GetName() const {return fName.Data();}
00055    virtual char *GetObjectInfo(Int_t px, Int_t py) const;
00056    Int_t         GetValueColor(Double_t zc);
00057    virtual void  Paint(Option_t *option="");
00058    virtual void  SavePrimitive(ostream &out, Option_t *option = "");
00059    virtual void  SetName(const char *name="") {fName = name;} // *MENU*
00060    virtual void  SetLabelColor(Int_t labelcolor) {fAxis.SetLabelColor(labelcolor);} // *MENU*
00061    virtual void  SetLabelFont(Int_t labelfont) {fAxis.SetLabelFont(labelfont);} // *MENU*
00062    virtual void  SetLabelOffset(Float_t labeloffset) {fAxis.SetLabelOffset(labeloffset);} // *MENU*
00063    virtual void  SetLabelSize(Float_t labelsize) {fAxis.SetLabelSize(labelsize);} // *MENU*
00064    virtual void  SetTitleOffset(Float_t titleoffset=1) {fAxis.SetTitleOffset(titleoffset);} // *MENU*
00065    virtual void  SetTitleSize(Float_t titlesize) {fAxis.SetTitleSize(titlesize);} // *MENU*
00066    virtual void  SetLineColor(Color_t linecolor) {fAxis.SetLineColor(linecolor);} // *MENU*
00067    virtual void  SetLineWidth(Width_t linewidth) {fAxis.SetLineWidth(linewidth);} // *MENU*
00068    virtual void  UnZoom();  // *MENU*
00069 
00070    ClassDef(TPaletteAxis,2)  //class used to display a color palette axis for 2-d plots
00071 };
00072 
00073 #endif
00074 

Generated on Tue Jul 5 14:24:23 2011 for ROOT_528-00b_version by  doxygen 1.5.1