TPieSlice.h

Go to the documentation of this file.
00001 /*************************************************************************
00002  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00003  * All rights reserved.                                                  *
00004  *                                                                       *
00005  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00006  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00007  *************************************************************************/
00008 
00009 #ifndef ROOT_TPieSlice
00010 #define ROOT_TPieSlice
00011 #ifndef ROOT_TObject
00012 #include "TObject.h"
00013 #endif
00014 #ifndef ROOT_TString
00015 #include <TString.h>
00016 #endif
00017 #ifndef ROOT_TAttText
00018 #include <TAttText.h>
00019 #endif
00020 #ifndef ROOT_TAttFill
00021 #include <TAttFill.h>
00022 #endif
00023 #ifndef ROOT_TAttLine
00024 #include <TAttLine.h>
00025 #endif
00026 #ifndef ROOT_TPie
00027 #include <TPie.h>
00028 #endif
00029 
00030 class TPieSlice : public TNamed, public TAttFill, public TAttLine {
00031 
00032 private:
00033    Bool_t   fIsActive;        //! True if is the slice under the mouse pointer
00034 
00035 protected:
00036    TPie *fPie;             // The TPie object that contain this slice
00037    Double_t fValue;        //value value of this slice
00038    Double_t fRadiusOffset; //roffset offset from the center of the pie
00039 
00040 public:
00041    TPieSlice();
00042    TPieSlice(const char *, const char *, TPie*, Double_t val=0);
00043    virtual ~TPieSlice() {;}
00044 
00045    virtual Int_t  DistancetoPrimitive(Int_t,Int_t);
00046    Double_t       GetRadiusOffset();
00047    Double_t       GetValue();
00048    void           SavePrimitive(ostream &out, Option_t *opts="");
00049    void           SetIsActive(Bool_t is) { fIsActive = is; }
00050    void           SetRadiusOffset(Double_t);  // *MENU*
00051    void           SetValue(Double_t);         // *MENU*
00052 
00053    friend class TPie;
00054 
00055    ClassDef(TPieSlice,1)            // Slice of a pie chart graphics class
00056 };
00057 
00058 #endif

Generated on Tue Jul 5 14:14:10 2011 for ROOT_528-00b_version by  doxygen 1.5.1