// @(#)root/graf:$Id$
// Author: Rene Brun   16/10/95

/*************************************************************************
 * 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_TPave
#define ROOT_TPave


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TPave                                                                //
//                                                                      //
// Pave class.                                                          //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TBox
#include "TBox.h"
#endif
#ifndef ROOT_TString
#include "TString.h"
#endif

class TPave : public TBox {

protected:
   Double_t     fX1NDC;         //X1 point in NDC coordinates
   Double_t     fY1NDC;         //Y1 point in NDC coordinates
   Double_t     fX2NDC;         //X2 point in NDC coordinates
   Double_t     fY2NDC;         //Y2 point in NDC coordinates
   Int_t        fBorderSize;    //window box bordersize in pixels
   Int_t        fInit;          //(=0 if transformation to NDC not yet done)
   Int_t        fShadowColor;   //Color of the pave's shadow
   Double_t     fCornerRadius;  //Corner radius in case of option arc
   TString      fOption;        //Pave style
   TString      fName;          //Pave name

public:
   // TPave status bits
   enum {
      kNameIsAction = BIT(11)   // double clicking on TPave will execute action
   };

   TPave();
   TPave(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
         Int_t bordersize=4 ,Option_t *option="br");
   TPave(const TPave &pave);
   virtual ~TPave();
   void  Copy(TObject &pave) const;
   virtual void  ConvertNDCtoPad();
   virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
   virtual void  Draw(Option_t *option="");
   virtual void  DrawPave(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
                          Int_t bordersize=4 ,Option_t *option="br");
   virtual void  ExecuteEvent(Int_t event, Int_t px, Int_t py);
   Int_t       GetBorderSize() const { return fBorderSize;}
   Double_t    GetCornerRadius() const {return fCornerRadius;}
   Option_t   *GetName() const {return fName.Data();}
   Option_t   *GetOption() const {return fOption.Data();}
   Int_t       GetShadowColor() const {return fShadowColor;}
   Double_t    GetX1NDC() const {return fX1NDC;}
   Double_t    GetX2NDC() const {return fX2NDC;}
   Double_t    GetY1NDC() const {return fY1NDC;}
   Double_t    GetY2NDC() const {return fY2NDC;}
   virtual ULong_t  Hash() const { return fName.Hash(); }
   virtual Bool_t   IsSortable() const { return kTRUE; }
   virtual void  ls(Option_t *option="") const;
   virtual void  Paint(Option_t *option="");
   virtual void  PaintPave(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
                           Int_t bordersize=4 ,Option_t *option="br");
   virtual void  PaintPaveArc(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
                              Int_t bordersize=4 ,Option_t *option="br");
   virtual void  Print(Option_t *option="") const;
   virtual void  SavePrimitive(std::ostream &out, Option_t *option = "");
   virtual void  SetBorderSize(Int_t bordersize=4) {fBorderSize = bordersize;} // *MENU*
   virtual void  SetCornerRadius(Double_t rad = 0.2) {fCornerRadius = rad;} // *MENU*
   virtual void  SetName(const char *name="") {fName = name;} // *MENU*
   virtual void  SetOption(Option_t *option="br") {fOption = option;}
   virtual void  SetShadowColor(Int_t color) {fShadowColor=color;} // *MENU*
   virtual void  SetX1NDC(Double_t x1) {fX1NDC=x1;}
   virtual void  SetX2NDC(Double_t x2) {fX2NDC=x2;}
   virtual void  SetY1NDC(Double_t y1) {fY1NDC=y1;}
   virtual void  SetY2NDC(Double_t y2) {fY2NDC=y2;}
   virtual void  SetX1(Double_t x1);
   virtual void  SetX2(Double_t x2);
   virtual void  SetY1(Double_t y1);
   virtual void  SetY2(Double_t y2);

   ClassDef(TPave,3)  //Pave. A box with shadowing
};

#endif

 TPave.h:1
 TPave.h:2
 TPave.h:3
 TPave.h:4
 TPave.h:5
 TPave.h:6
 TPave.h:7
 TPave.h:8
 TPave.h:9
 TPave.h:10
 TPave.h:11
 TPave.h:12
 TPave.h:13
 TPave.h:14
 TPave.h:15
 TPave.h:16
 TPave.h:17
 TPave.h:18
 TPave.h:19
 TPave.h:20
 TPave.h:21
 TPave.h:22
 TPave.h:23
 TPave.h:24
 TPave.h:25
 TPave.h:26
 TPave.h:27
 TPave.h:28
 TPave.h:29
 TPave.h:30
 TPave.h:31
 TPave.h:32
 TPave.h:33
 TPave.h:34
 TPave.h:35
 TPave.h:36
 TPave.h:37
 TPave.h:38
 TPave.h:39
 TPave.h:40
 TPave.h:41
 TPave.h:42
 TPave.h:43
 TPave.h:44
 TPave.h:45
 TPave.h:46
 TPave.h:47
 TPave.h:48
 TPave.h:49
 TPave.h:50
 TPave.h:51
 TPave.h:52
 TPave.h:53
 TPave.h:54
 TPave.h:55
 TPave.h:56
 TPave.h:57
 TPave.h:58
 TPave.h:59
 TPave.h:60
 TPave.h:61
 TPave.h:62
 TPave.h:63
 TPave.h:64
 TPave.h:65
 TPave.h:66
 TPave.h:67
 TPave.h:68
 TPave.h:69
 TPave.h:70
 TPave.h:71
 TPave.h:72
 TPave.h:73
 TPave.h:74
 TPave.h:75
 TPave.h:76
 TPave.h:77
 TPave.h:78
 TPave.h:79
 TPave.h:80
 TPave.h:81
 TPave.h:82
 TPave.h:83
 TPave.h:84
 TPave.h:85
 TPave.h:86
 TPave.h:87
 TPave.h:88
 TPave.h:89
 TPave.h:90
 TPave.h:91
 TPave.h:92
 TPave.h:93
 TPave.h:94
 TPave.h:95
 TPave.h:96
 TPave.h:97
 TPave.h:98
 TPave.h:99
 TPave.h:100