Warning, file /include/root/TBox.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TBox
0013 #define ROOT_TBox
0014
0015 #include "TObject.h"
0016 #include "TAttLine.h"
0017 #include "TAttFill.h"
0018 #include "TAttBBox2D.h"
0019
0020 class TPoint;
0021
0022 class TBox : public TObject, public TAttLine, public TAttFill, public TAttBBox2D {
0023
0024 private:
0025 TObject *fTip{nullptr};
0026
0027 protected:
0028 Double_t fX1;
0029 Double_t fY1;
0030 Double_t fX2;
0031 Double_t fY2;
0032 Bool_t fResizing;
0033
0034 public:
0035
0036 enum {
0037 kCannotMove = BIT(12)
0038 };
0039 TBox();
0040 TBox(Double_t x1, Double_t y1,Double_t x2, Double_t y2);
0041 TBox(const TBox &box);
0042 TBox& operator=(const TBox&);
0043 ~TBox() override;
0044
0045 void Copy(TObject &box) const override;
0046 Int_t DistancetoPrimitive(Int_t px, Int_t py) override;
0047 void Draw(Option_t *option="") override;
0048 virtual TBox *DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2);
0049 void ExecuteEvent(Int_t event, Int_t px, Int_t py) override;
0050 Bool_t IsBeingResized() const { return fResizing; }
0051 Double_t GetX1() const { return fX1; }
0052 Double_t GetX2() const { return fX2; }
0053 Double_t GetY1() const { return fY1; }
0054 Double_t GetY2() const { return fY2; }
0055 virtual void HideToolTip(Int_t event);
0056 virtual Int_t IsInside(Double_t x, Double_t y) const;
0057 void ls(Option_t *option="") const override;
0058 void Paint(Option_t *option="") override;
0059 virtual void PaintBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Option_t *option="");
0060 void Print(Option_t *option="") const override;
0061 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
0062 virtual void SetX1(Double_t x1) {fX1=x1;}
0063 virtual void SetX2(Double_t x2) {fX2=x2;}
0064 virtual void SetY1(Double_t y1) {fY1=y1;}
0065 virtual void SetY2(Double_t y2) {fY2=y2;}
0066 virtual void SetToolTipText(const char *text, Long_t delayms = 1000);
0067 Rectangle_t GetBBox() override;
0068 TPoint GetBBoxCenter() override;
0069 void SetBBoxCenter(const TPoint &p) override;
0070 void SetBBoxCenterX(const Int_t x) override;
0071 void SetBBoxCenterY(const Int_t y) override;
0072 void SetBBoxX1(const Int_t x) override;
0073 void SetBBoxX2(const Int_t x) override;
0074 void SetBBoxY1(const Int_t y) override;
0075 void SetBBoxY2(const Int_t y) override;
0076
0077 ClassDefOverride(TBox,3)
0078 };
0079
0080 #endif
0081