00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TBox
00013 #define ROOT_TBox
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef ROOT_TObject
00025 #include "TObject.h"
00026 #endif
00027 #ifndef ROOT_TAttLine
00028 #include "TAttLine.h"
00029 #endif
00030 #ifndef ROOT_TAttFill
00031 #include "TAttFill.h"
00032 #endif
00033
00034 class TBox : public TObject, public TAttLine, public TAttFill {
00035
00036 private:
00037 TObject *fTip;
00038
00039 protected:
00040 Double_t fX1;
00041 Double_t fY1;
00042 Double_t fX2;
00043 Double_t fY2;
00044 Bool_t fResizing;
00045
00046 public:
00047
00048 enum {
00049 kCannotMove = BIT(12)
00050 };
00051 TBox();
00052 TBox(Double_t x1, Double_t y1,Double_t x2, Double_t y2);
00053 TBox(const TBox &box);
00054 TBox& operator=(const TBox&);
00055 virtual ~TBox();
00056 void Copy(TObject &box) const;
00057 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
00058 virtual void Draw(Option_t *option="");
00059 virtual TBox *DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2);
00060 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
00061 Bool_t IsBeingResized() const { return fResizing; }
00062 Double_t GetX1() const { return fX1; }
00063 Double_t GetX2() const { return fX2; }
00064 Double_t GetY1() const { return fY1; }
00065 Double_t GetY2() const { return fY2; }
00066 virtual void HideToolTip(Int_t event);
00067 virtual Int_t IsInside(Double_t x, Double_t y) const;
00068 virtual void ls(Option_t *option="") const;
00069 virtual void Paint(Option_t *option="");
00070 virtual void PaintBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Option_t *option="");
00071 virtual void Print(Option_t *option="") const;
00072 virtual void SavePrimitive(ostream &out, Option_t *option = "");
00073 virtual void SetX1(Double_t x1) {fX1=x1;}
00074 virtual void SetX2(Double_t x2) {fX2=x2;}
00075 virtual void SetY1(Double_t y1) {fY1=y1;}
00076 virtual void SetY2(Double_t y2) {fY2=y2;}
00077 virtual void SetToolTipText(const char *text, Long_t delayms = 1000);
00078
00079 ClassDef(TBox,2)
00080 };
00081
00082 #endif
00083