Logo ROOT  
Reference Guide
No Matches
Go to the documentation of this file.
1// @(#)root/graf:$Id$
2// Author: Rene Brun 15/03/99
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11#ifndef ROOT_TPaveStats
12#define ROOT_TPaveStats
15#include "TPaveText.h"
16#include "TVirtualPaveStats.h"
18class TPaveStats : public TPaveText, public TVirtualPaveStats {
21 Int_t fOptFit; ///< option Fit
22 Int_t fOptStat; ///< option Stat
23 TString fFitFormat; ///< Printing format for fit parameters
24 TString fStatFormat; ///< Printing format for stats
25 TObject *fParent{nullptr}; ///< owner of this TPaveStats
28 TPaveStats();
30 ~TPaveStats() override;
31 TBox *AddBox(Double_t , Double_t , Double_t , Double_t) override {return nullptr;}
32 TLine *AddLine(Double_t , Double_t , Double_t, Double_t) override {return nullptr;}
33 void DeleteText() override {}
34 void EditText() override {}
35 virtual const char *GetFitFormat() const {return fFitFormat.Data();}
36 virtual const char *GetStatFormat() const {return fStatFormat.Data();}
37 Int_t GetOptFit() const;
38 Int_t GetOptStat() const;
39 TObject *GetParent() const override { return fParent; }
40 void Paint(Option_t *option="") override;
41 void InsertText(const char *) override { }
42 void InsertLine() override { }
43 void ReadFile(const char *, Option_t *, Int_t, Int_t) override {}
44 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
45 virtual void SaveStyle(); // *MENU*
46 void SetAllWith(const char *, Option_t *, Double_t) override {}
47 void SetMargin(Float_t) override { }
48 virtual void SetFitFormat(const char *format="5.4g"); // *MENU*
49 virtual void SetStatFormat(const char *format="6.4g"); // *MENU*
50 void SetOptFit(Int_t fit=1); // *MENU*
51 void SetOptStat(Int_t stat=1); // *MENU*
52 void SetParent(TObject*obj) override { fParent = obj; }
53 void UseCurrentStyle() override;
55 ClassDefOverride(TPaveStats,5) //A special TPaveText to draw histogram statistics.
int Int_t
Definition RtypesCore.h:45
float Float_t
Definition RtypesCore.h:57
double Double_t
Definition RtypesCore.h:59
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t option
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t format
Option_t Option_t TPoint TPoint const char y1
Create a Box.
Definition TBox.h:22
Use the TLine constructor to create a simple line.
Definition TLine.h:22
Mother of all ROOT objects.
Definition TObject.h:41
The histogram statistics painter class.
Definition TPaveStats.h:18
TPaveStats default constructor.
Int_t GetOptStat() const
Return the stat option.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save primitive as a C++ statement(s) on output stream out.
void EditText() override
Edit text at the mouse position.
Definition TPaveStats.h:34
void UseCurrentStyle() override
Replace current attributes by current style.
void InsertText(const char *) override
Add a new Text line at the mouse position.
Definition TPaveStats.h:41
void InsertLine() override
Add a new line at the mouse position.
Definition TPaveStats.h:42
virtual void SetStatFormat(const char *format="6.4g")
Change (i.e. set) the format for printing statistics.
void SetOptStat(Int_t stat=1)
Set the stat option.
Int_t fOptStat
option Stat
Definition TPaveStats.h:22
TLine * AddLine(Double_t, Double_t, Double_t, Double_t) override
Add a new graphics line to this pavetext.
Definition TPaveStats.h:32
Int_t fOptFit
option Fit
Definition TPaveStats.h:21
TString fFitFormat
Printing format for fit parameters.
Definition TPaveStats.h:23
void DeleteText() override
Delete text at the mouse position.
Definition TPaveStats.h:33
TBox * AddBox(Double_t, Double_t, Double_t, Double_t) override
Add a new graphics box to this pavetext.
Definition TPaveStats.h:31
virtual const char * GetFitFormat() const
Definition TPaveStats.h:35
void SetMargin(Float_t) override
Definition TPaveStats.h:47
~TPaveStats() override
TPaveStats default destructor.
virtual void SetFitFormat(const char *format="5.4g")
Change (i.e. set) the format for printing fit parameters in statistics box.
TObject * fParent
owner of this TPaveStats
Definition TPaveStats.h:25
Int_t GetOptFit() const
Return the fit option.
TObject * GetParent() const override
Definition TPaveStats.h:39
virtual void SaveStyle()
Save This TPaveStats options in current style.
void SetParent(TObject *obj) override
Definition TPaveStats.h:52
void ReadFile(const char *, Option_t *, Int_t, Int_t) override
Read lines of filename in this pavetext.
Definition TPaveStats.h:43
void SetOptFit(Int_t fit=1)
Set the fit option.
virtual const char * GetStatFormat() const
Definition TPaveStats.h:36
void SetAllWith(const char *, Option_t *, Double_t) override
Set attribute option for all lines containing string text.
Definition TPaveStats.h:46
void Paint(Option_t *option="") override
Paint the pave stat.
TString fStatFormat
Printing format for stats.
Definition TPaveStats.h:24
A Pave (see TPave) with text, lines or/and boxes inside.
Definition TPaveText.h:21
Basic string class.
Definition TString.h:139
const char * Data() const
Definition TString.h:380