Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

TBox.h

Go to the documentation of this file.
00001 // @(#)root/graf:$Name:  $:$Id: TBox.h,v 1.4 2002/10/31 07:27:34 brun Exp $
00002 // Author: Rene Brun   12/12/94
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TBox
00013 #define ROOT_TBox
00014 
00015 
00017 //                                                                      //
00018 // TBox                                                                 //
00019 //                                                                      //
00020 // Box class.                                                           //
00021 //                                                                      //
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;           //X of 1st point
00041    Double_t     fY1;           //Y of 1st point
00042    Double_t     fX2;           //X of 2nd point
00043    Double_t     fY2;           //Y of 2nd point
00044    Bool_t       fResizing;     
00045 
00046 public:
00047    TBox();
00048    TBox(Double_t x1, Double_t y1,Double_t x2, Double_t  y2);
00049    TBox(const TBox &box);
00050    virtual ~TBox();
00051            void  Copy(TObject &box) const;
00052    virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
00053    virtual void  Draw(Option_t *option="");
00054    virtual void  DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t  y2);
00055    virtual void  ExecuteEvent(Int_t event, Int_t px, Int_t py);
00056    Bool_t        IsBeingResized() const { return fResizing; }
00057    Double_t      GetX1() const { return fX1; }
00058    Double_t      GetX2() const { return fX2; }
00059    Double_t      GetY1() const { return fY1; }
00060    Double_t      GetY2() const { return fY2; }
00061    virtual void  HideToolTip(Int_t event);
00062    virtual void  ls(Option_t *option="") const;
00063    virtual void  Paint(Option_t *option="");
00064    virtual void  PaintBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Option_t *option="");
00065    virtual void  Print(Option_t *option="") const;
00066    virtual void  SavePrimitive(ofstream &out, Option_t *option);
00067    virtual void  SetX1(Double_t x1) {fX1=x1;}
00068    virtual void  SetX2(Double_t x2) {fX2=x2;}
00069    virtual void  SetY1(Double_t y1) {fY1=y1;}
00070    virtual void  SetY2(Double_t y2) {fY2=y2;}
00071    virtual void  SetToolTipText(const char *text, Long_t delayms = 1000);
00072 
00073    ClassDef(TBox,2)  //Box class
00074 };
00075 
00076 #endif
00077 

Generated on Thu Dec 18 14:52:16 2003 for ROOT by doxygen1.2.16