Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TPieSlice.h
Go to the documentation of this file.
1/*************************************************************************
2 * Copyright (C) 1995-2026, 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
16class TPie;
17
18class TPieSlice : public TNamed, public TAttFill, public TAttLine {
19
20protected:
21 TPie *fPie = nullptr; ///< The TPie object that contain this slice
22 Double_t fValue = 0; ///< value value of this slice
23 Double_t fRadiusOffset = 0; ///< offset from the center of the pie
24
25public:
26 TPieSlice();
27 TPieSlice(const char *, const char *, TPie *, Double_t val = 0);
28 ~TPieSlice() override {}
29
30 void Copy(TObject &slice) const override;
32 void ExecuteEvent(Int_t,Int_t,Int_t) override;
34 Double_t GetValue() const;
35 void SavePrimitive(std::ostream &out, Option_t *opts="") override;
36 void SetIsActive(Bool_t) R__DEPRECATED(6, 46, "No longer used.") {}
37 void SetRadiusOffset(Double_t); // *MENU*
38 void SetValue(Double_t); // *MENU*
39
40 ClassDefOverride(TPieSlice,1) // Slice of a pie chart graphics class
41};
42
43#endif
#define R__DEPRECATED(MAJOR, MINOR, REASON)
Definition RConfig.hxx:486
int Int_t
Signed integer 4 bytes (int)
Definition RtypesCore.h:60
double Double_t
Double 8 bytes.
Definition RtypesCore.h:74
const char Option_t
Option string (const char)
Definition RtypesCore.h:81
#define ClassDefOverride(name, id)
Definition Rtypes.h:347
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Fill Area Attributes class.
Definition TAttFill.h:21
Line Attributes class.
Definition TAttLine.h:21
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
Mother of all ROOT objects.
Definition TObject.h:42
A slice of a piechart, see the TPie class.
Definition TPieSlice.h:18
Int_t DistancetoPrimitive(Int_t, Int_t) override
Eval if the mouse is over the area associated with this slice.
Definition TPieSlice.cxx:56
Double_t fRadiusOffset
offset from the center of the pie
Definition TPieSlice.h:23
void SetIsActive(Bool_t) R__DEPRECATED(6
Double_t fValue
value value of this slice
Definition TPieSlice.h:22
void SetValue(Double_t)
Set the value for this slice.
void ExecuteEvent(Int_t, Int_t, Int_t) override
Execute event, redirect to TPie object.
Definition TPieSlice.cxx:73
Double_t GetRadiusOffset() const
return the value of the offset in radial direction for this slice.
Definition TPieSlice.cxx:82
void Copy(TObject &slice) const override
Copy TPieSlice.
Double_t GetValue() const
Return the value of this slice.
Definition TPieSlice.cxx:90
~TPieSlice() override
Definition TPieSlice.h:28
void SavePrimitive(std::ostream &out, Option_t *opts="") override
Save as C++ macro, used directly from TPie.
Definition TPieSlice.cxx:98
TPieSlice()
This is the default constructor, used to create the standard.
Definition TPieSlice.cxx:35
TPie * fPie
The TPie object that contain this slice.
Definition TPieSlice.h:21
Define a Pie Chart.
Definition TPie.h:26