Logo ROOT  
Reference Guide
TPieSlice.h
Go to the documentation of this file.
1 /*************************************************************************
2  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
3  * All rights reserved. *
4  * *
5  * For the licensing terms see $ROOTSYS/LICENSE. *
6  * For the list of contributors see $ROOTSYS/README/CREDITS. *
7  *************************************************************************/
8 
9 #ifndef ROOT_TPieSlice
10 #define ROOT_TPieSlice
11 
12 #include <TNamed.h>
13 #include <TAttFill.h>
14 #include <TAttLine.h>
15 
16 class TPie;
17 
18 class TPieSlice : public TNamed, public TAttFill, public TAttLine {
19 
20 private:
21  Bool_t fIsActive; ///<! True if is the slice under the mouse pointer
22 
23 protected:
24  TPie *fPie; ///< The TPie object that contain this slice
25  Double_t fValue; ///< value value of this slice
26  Double_t fRadiusOffset; ///< offset from the center of the pie
27 
28 public:
29  TPieSlice();
30  TPieSlice(const char *, const char *, TPie*, Double_t val=0);
31  virtual ~TPieSlice() {;}
32 
36  void SavePrimitive(std::ostream &out, Option_t *opts="");
37  void SetIsActive(Bool_t is) { fIsActive = is; }
38  void SetRadiusOffset(Double_t); // *MENU*
39  void SetValue(Double_t); // *MENU*
40 
41  friend class TPie;
42 
43  ClassDef(TPieSlice,1) // Slice of a pie chart graphics class
44 };
45 
46 #endif
TPieSlice::GetValue
Double_t GetValue()
Return the value of this slice.
Definition: TPieSlice.cxx:76
TPieSlice::GetRadiusOffset
Double_t GetRadiusOffset()
return the value of the offset in radial direction for this slice.
Definition: TPieSlice.cxx:68
TNamed.h
TPieSlice::DistancetoPrimitive
virtual Int_t DistancetoPrimitive(Int_t, Int_t)
Eval if the mouse is over the area associated with this slice.
Definition: TPieSlice.cxx:52
TPieSlice::fPie
TPie * fPie
The TPie object that contain this slice.
Definition: TPieSlice.h:24
Int_t
int Int_t
Definition: RtypesCore.h:45
TPie
Definition: TPie.h:23
TPieSlice::SavePrimitive
void SavePrimitive(std::ostream &out, Option_t *opts="")
Do nothing.
Definition: TPieSlice.cxx:84
TPieSlice::fIsActive
Bool_t fIsActive
! True if is the slice under the mouse pointer
Definition: TPieSlice.h:21
bool
TAttLine.h
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
TAttFill.h
TAttLine
Definition: TAttLine.h:18
TNamed
Definition: TNamed.h:29
TPieSlice
Definition: TPieSlice.h:18
TPieSlice::SetValue
void SetValue(Double_t)
Set the value for this slice.
Definition: TPieSlice.cxx:101
TPieSlice::SetRadiusOffset
void SetRadiusOffset(Double_t)
Set the radial offset of this slice.
Definition: TPieSlice.cxx:91
TPieSlice::~TPieSlice
virtual ~TPieSlice()
Definition: TPieSlice.h:31
Double_t
double Double_t
Definition: RtypesCore.h:59
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TPieSlice::fValue
Double_t fValue
value value of this slice
Definition: TPieSlice.h:25
TAttFill
Definition: TAttFill.h:19
TPieSlice::SetIsActive
void SetIsActive(Bool_t is)
Definition: TPieSlice.h:37
TPieSlice::TPieSlice
TPieSlice()
This is the default constructor, used to create the standard.
Definition: TPieSlice.cxx:28
TPieSlice::fRadiusOffset
Double_t fRadiusOffset
offset from the center of the pie
Definition: TPieSlice.h:26