Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TPieSlice.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*************************************************************************
0002  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
0003  * All rights reserved.                                                  *
0004  *                                                                       *
0005  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0006  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0007  *************************************************************************/
0008 
0009 #ifndef ROOT_TPieSlice
0010 #define ROOT_TPieSlice
0011 
0012 #include <TNamed.h>
0013 #include <TAttFill.h>
0014 #include <TAttLine.h>
0015 
0016 class TPie;
0017 
0018 class TPieSlice : public TNamed, public TAttFill, public TAttLine {
0019 
0020    friend class TPie;
0021 
0022 private:
0023    Bool_t   fIsActive;     ///<! True if is the slice under the mouse pointer
0024 
0025 protected:
0026    TPie *fPie{nullptr};    ///< The TPie object that contain this slice
0027    Double_t fValue;        ///< value value of this slice
0028    Double_t fRadiusOffset; ///< offset from the center of the pie
0029 
0030 public:
0031    TPieSlice();
0032    TPieSlice(const char *, const char *, TPie *, Double_t val = 0);
0033    ~TPieSlice() override {}
0034 
0035    void           Copy(TObject &slice) const override;
0036    Int_t          DistancetoPrimitive(Int_t,Int_t) override;
0037    Double_t       GetRadiusOffset() const;
0038    Double_t       GetValue() const;
0039    void           SavePrimitive(std::ostream &out, Option_t *opts="") override;
0040    void           SetIsActive(Bool_t is) { fIsActive = is; }
0041    void           SetRadiusOffset(Double_t);  // *MENU*
0042    void           SetValue(Double_t);         // *MENU*
0043 
0044    ClassDefOverride(TPieSlice,1)            // Slice of a pie chart graphics class
0045 };
0046 
0047 #endif