ROOT  6.06/09
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 #ifndef ROOT_TObject
12 #include "TObject.h"
13 #endif
14 #ifndef ROOT_TString
15 #include <TString.h>
16 #endif
17 #ifndef ROOT_TAttText
18 #include <TAttText.h>
19 #endif
20 #ifndef ROOT_TAttFill
21 #include <TAttFill.h>
22 #endif
23 #ifndef ROOT_TAttLine
24 #include <TAttLine.h>
25 #endif
26 #ifndef ROOT_TPie
27 #include <TPie.h>
28 #endif
29 
30 class TPieSlice : public TNamed, public TAttFill, public TAttLine {
31 
32 private:
33  Bool_t fIsActive; //! True if is the slice under the mouse pointer
34 
35 protected:
36  TPie *fPie; // The TPie object that contain this slice
37  Double_t fValue; //value value of this slice
38  Double_t fRadiusOffset; //roffset offset from the center of the pie
39 
40 public:
41  TPieSlice();
42  TPieSlice(const char *, const char *, TPie*, Double_t val=0);
43  virtual ~TPieSlice() {;}
44 
48  void SavePrimitive(std::ostream &out, Option_t *opts="");
49  void SetIsActive(Bool_t is) { fIsActive = is; }
50  void SetRadiusOffset(Double_t); // *MENU*
51  void SetValue(Double_t); // *MENU*
52 
53  friend class TPie;
54 
55  ClassDef(TPieSlice,1) // Slice of a pie chart graphics class
56 };
57 
58 #endif
TPie * fPie
True if is the slice under the mouse pointer.
Definition: TPieSlice.h:36
const char Option_t
Definition: RtypesCore.h:62
void SavePrimitive(std::ostream &out, Option_t *opts="")
Do nothing.
Definition: TPieSlice.cxx:91
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
Fill Area Attributes class.
Definition: TAttFill.h:32
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:33
A slice of a piechart, see the TPie class.
Definition: TPieSlice.h:30
ClassDef(TAttLine, 2)
void SetRadiusOffset(Double_t)
Set the radial offset of this slice.
Definition: TPieSlice.cxx:98
Bool_t fIsActive
Definition: TPieSlice.h:33
char * out
Definition: TBase64.cxx:29
virtual ~TPieSlice()
Definition: TPieSlice.h:43
Double_t fValue
Definition: TPieSlice.h:37
virtual Int_t DistancetoPrimitive(Int_t, Int_t)
Eval if the mouse is over the area associated with this slice.
Definition: TPieSlice.cxx:59
void SetValue(Double_t)
Set the value for this slice.
Definition: TPieSlice.cxx:108
double Double_t
Definition: RtypesCore.h:55
Double_t GetValue()
Return the value of this slice.
Definition: TPieSlice.cxx:83
Draw a Pie Chart,.
Definition: TPie.h:31
Double_t fRadiusOffset
Definition: TPieSlice.h:38
Double_t GetRadiusOffset()
return the value of the offset in radial direction for this slice.
Definition: TPieSlice.cxx:75
void SetIsActive(Bool_t is)
Definition: TPieSlice.h:49
Line Attributes class.
Definition: TAttLine.h:32