// @(#)root/histpainter:$Id$
// Author: Rene Brun   15/11/2002

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TPaletteAxis
#define ROOT_TPaletteAxis


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TPaletteAxis                                                         //
//                                                                      //
// class used to display a color palette axis for 2-d plots             //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TPave
#include "TPave.h"
#endif
#ifndef ROOT_TGaxis
#include "TGaxis.h"
#endif

class TH1;

class TPaletteAxis : public TPave {

protected:
   TGaxis       fAxis;          //palette axis
   TH1         *fH;             //pointer to parent histogram
   TString      fName;          //Pave name

public:
   // TPaletteAxis status bits
   enum { kHasView   = BIT(11)};

   TPaletteAxis();
   TPaletteAxis(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2, TH1 *h);
   TPaletteAxis(const TPaletteAxis &palette);
   virtual ~TPaletteAxis();
   void Copy(TObject &palette) const;
   TPaletteAxis& operator=(const TPaletteAxis&);

   virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
   virtual void  ExecuteEvent(Int_t event, Int_t px, Int_t py);
   TGaxis       *GetAxis() {return &fAxis;}
   Int_t         GetBinColor(Int_t i, Int_t j);
   Option_t     *GetName() const {return fName.Data();}
   virtual char *GetObjectInfo(Int_t px, Int_t py) const;
   Int_t         GetValueColor(Double_t zc);
   virtual void  Paint(Option_t *option="");
   virtual void  SavePrimitive(std::ostream &out, Option_t *option = "");
   virtual void  SetName(const char *name="") {fName = name;} // *MENU*
   virtual void  SetLabelColor(Int_t labelcolor) {fAxis.SetLabelColor(labelcolor);} // *MENU*
   virtual void  SetLabelFont(Int_t labelfont) {fAxis.SetLabelFont(labelfont);} // *MENU*
   virtual void  SetLabelOffset(Float_t labeloffset) {fAxis.SetLabelOffset(labeloffset);} // *MENU*
   virtual void  SetLabelSize(Float_t labelsize) {fAxis.SetLabelSize(labelsize);} // *MENU*
   virtual void  SetTitleOffset(Float_t titleoffset=1) {fAxis.SetTitleOffset(titleoffset);} // *MENU*
   virtual void  SetTitleSize(Float_t titlesize) {fAxis.SetTitleSize(titlesize);} // *MENU*
   virtual void  SetLineColor(Color_t linecolor) {fAxis.SetLineColor(linecolor);} // *MENU*
   virtual void  SetLineWidth(Width_t linewidth) {fAxis.SetLineWidth(linewidth);} // *MENU*
   virtual void  UnZoom();  // *MENU*

   ClassDef(TPaletteAxis,2)  //class used to display a color palette axis for 2-d plots
};

#endif

 TPaletteAxis.h:1
 TPaletteAxis.h:2
 TPaletteAxis.h:3
 TPaletteAxis.h:4
 TPaletteAxis.h:5
 TPaletteAxis.h:6
 TPaletteAxis.h:7
 TPaletteAxis.h:8
 TPaletteAxis.h:9
 TPaletteAxis.h:10
 TPaletteAxis.h:11
 TPaletteAxis.h:12
 TPaletteAxis.h:13
 TPaletteAxis.h:14
 TPaletteAxis.h:15
 TPaletteAxis.h:16
 TPaletteAxis.h:17
 TPaletteAxis.h:18
 TPaletteAxis.h:19
 TPaletteAxis.h:20
 TPaletteAxis.h:21
 TPaletteAxis.h:22
 TPaletteAxis.h:23
 TPaletteAxis.h:24
 TPaletteAxis.h:25
 TPaletteAxis.h:26
 TPaletteAxis.h:27
 TPaletteAxis.h:28
 TPaletteAxis.h:29
 TPaletteAxis.h:30
 TPaletteAxis.h:31
 TPaletteAxis.h:32
 TPaletteAxis.h:33
 TPaletteAxis.h:34
 TPaletteAxis.h:35
 TPaletteAxis.h:36
 TPaletteAxis.h:37
 TPaletteAxis.h:38
 TPaletteAxis.h:39
 TPaletteAxis.h:40
 TPaletteAxis.h:41
 TPaletteAxis.h:42
 TPaletteAxis.h:43
 TPaletteAxis.h:44
 TPaletteAxis.h:45
 TPaletteAxis.h:46
 TPaletteAxis.h:47
 TPaletteAxis.h:48
 TPaletteAxis.h:49
 TPaletteAxis.h:50
 TPaletteAxis.h:51
 TPaletteAxis.h:52
 TPaletteAxis.h:53
 TPaletteAxis.h:54
 TPaletteAxis.h:55
 TPaletteAxis.h:56
 TPaletteAxis.h:57
 TPaletteAxis.h:58
 TPaletteAxis.h:59
 TPaletteAxis.h:60
 TPaletteAxis.h:61
 TPaletteAxis.h:62
 TPaletteAxis.h:63
 TPaletteAxis.h:64
 TPaletteAxis.h:65
 TPaletteAxis.h:66
 TPaletteAxis.h:67
 TPaletteAxis.h:68
 TPaletteAxis.h:69
 TPaletteAxis.h:70
 TPaletteAxis.h:71
 TPaletteAxis.h:72
 TPaletteAxis.h:73
 TPaletteAxis.h:74
 TPaletteAxis.h:75