00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TPave
00013 #define ROOT_TPave
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef ROOT_TBox
00025 #include "TBox.h"
00026 #endif
00027 #ifndef ROOT_TString
00028 #include "TString.h"
00029 #endif
00030
00031 class TPave : public TBox {
00032
00033 protected:
00034 Double_t fX1NDC;
00035 Double_t fY1NDC;
00036 Double_t fX2NDC;
00037 Double_t fY2NDC;
00038 Int_t fBorderSize;
00039 Int_t fInit;
00040 Int_t fShadowColor;
00041 Double_t fCornerRadius;
00042 TString fOption;
00043 TString fName;
00044
00045 public:
00046
00047 enum {
00048 kNameIsAction = BIT(11)
00049 };
00050
00051 TPave();
00052 TPave(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
00053 Int_t bordersize=4 ,Option_t *option="br");
00054 TPave(const TPave &pave);
00055 virtual ~TPave();
00056 void Copy(TObject &pave) const;
00057 virtual void ConvertNDCtoPad();
00058 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
00059 virtual void Draw(Option_t *option="");
00060 virtual void DrawPave(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
00061 Int_t bordersize=4 ,Option_t *option="br");
00062 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
00063 Int_t GetBorderSize() const { return fBorderSize;}
00064 Double_t GetCornerRadius() const {return fCornerRadius;}
00065 Option_t *GetName() const {return fName.Data();}
00066 Option_t *GetOption() const {return fOption.Data();}
00067 Int_t GetShadowColor() const {return fShadowColor;}
00068 Double_t GetX1NDC() const {return fX1NDC;}
00069 Double_t GetX2NDC() const {return fX2NDC;}
00070 Double_t GetY1NDC() const {return fY1NDC;}
00071 Double_t GetY2NDC() const {return fY2NDC;}
00072 virtual ULong_t Hash() const { return fName.Hash(); }
00073 virtual Bool_t IsSortable() const { return kTRUE; }
00074 virtual void ls(Option_t *option="") const;
00075 virtual void Paint(Option_t *option="");
00076 virtual void PaintPave(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
00077 Int_t bordersize=4 ,Option_t *option="br");
00078 virtual void PaintPaveArc(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
00079 Int_t bordersize=4 ,Option_t *option="br");
00080 virtual void Print(Option_t *option="") const;
00081 virtual void SavePrimitive(ostream &out, Option_t *option = "");
00082 virtual void SetBorderSize(Int_t bordersize=4) {fBorderSize = bordersize;}
00083 virtual void SetCornerRadius(Double_t rad = 0.2) {fCornerRadius = rad;}
00084 virtual void SetName(const char *name="") {fName = name;}
00085 virtual void SetOption(Option_t *option="br") {fOption = option;}
00086 virtual void SetShadowColor(Int_t color) {fShadowColor=color;}
00087 virtual void SetX1NDC(Double_t x1) {fX1NDC=x1;}
00088 virtual void SetX2NDC(Double_t x2) {fX2NDC=x2;}
00089 virtual void SetY1NDC(Double_t y1) {fY1NDC=y1;}
00090 virtual void SetY2NDC(Double_t y2) {fY2NDC=y2;}
00091
00092 ClassDef(TPave,3)
00093 };
00094
00095 #endif
00096