Logo ROOT  
Reference Guide
TPaveLabel.h
Go to the documentation of this file.
1 // @(#)root/graf:$Id$
2 // Author: Rene Brun 17/10/95
3 
4 /*************************************************************************
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 
12 #ifndef ROOT_TPaveLabel
13 #define ROOT_TPaveLabel
14 
15 
16 #include "TPave.h"
17 #include "TAttText.h"
18 
19 
20 class TPaveLabel : public TPave, public TAttText {
21 
22 protected:
23  TString fLabel; ///< Label written at the center of Pave
24 
25 public:
26  TPaveLabel();
27  TPaveLabel(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2, const char *label, Option_t *option="br");
28  TPaveLabel(const TPaveLabel &pavelabel);
29  virtual ~TPaveLabel();
30 
31  void Copy(TObject &pavelabel) const;
32  virtual void Draw(Option_t *option="");
33  virtual void DrawPaveLabel(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
34  const char *label, Option_t *option="");
35  const char *GetLabel() const {return fLabel.Data();}
36  const char *GetTitle() const {return fLabel.Data();}
37  virtual void Paint(Option_t *option="");
38  virtual void PaintPaveLabel(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
39  const char *label, Option_t *option="");
40  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
41  virtual void SetLabel(const char *label) {fLabel = label;} // *MENU*
42 
43  ClassDef(TPaveLabel,1) //PaveLabel. A Pave with a label
44 };
45 
46 #endif
47 
TAttText
Text Attributes class.
Definition: TAttText.h:18
Option_t
const char Option_t
Definition: RtypesCore.h:66
TPaveLabel::GetTitle
const char * GetTitle() const
Returns title of object.
Definition: TPaveLabel.h:36
TPaveLabel::fLabel
TString fLabel
Label written at the center of Pave.
Definition: TPaveLabel.h:23
TString::Data
const char * Data() const
Definition: TString.h:369
TAttText.h
TPaveLabel::PaintPaveLabel
virtual void PaintPaveLabel(Double_t x1, Double_t y1, Double_t x2, Double_t y2, const char *label, Option_t *option="")
Draw this pavelabel with new coordinates.
Definition: TPaveLabel.cxx:110
TPaveLabel::Paint
virtual void Paint(Option_t *option="")
Paint this pavelabel with its current attributes.
Definition: TPaveLabel.cxx:99
TString
Basic string class.
Definition: TString.h:136
TPaveLabel::SavePrimitive
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
Definition: TPaveLabel.cxx:189
TPaveLabel::Draw
virtual void Draw(Option_t *option="")
Draw this pavelabel with its current attributes.
Definition: TPaveLabel.cxx:77
x1
static const double x1[5]
Definition: RooGaussKronrodIntegrator1D.cxx:346
TPaveLabel::Copy
void Copy(TObject &pavelabel) const
Copy this pavelabel to pavelabel.
Definition: TPaveLabel.cxx:67
TPave
A TBox with a bordersize and a shadow option.
Definition: TPave.h:19
TPaveLabel::SetLabel
virtual void SetLabel(const char *label)
Definition: TPaveLabel.h:41
TPaveLabel::DrawPaveLabel
virtual void DrawPaveLabel(Double_t x1, Double_t y1, Double_t x2, Double_t y2, const char *label, Option_t *option="")
Draw this pavelabel with new coordinates.
Definition: TPaveLabel.cxx:89
TPaveLabel
A Pave (see TPave) with a text centered in the Pave.
Definition: TPaveLabel.h:20
TPaveLabel::~TPaveLabel
virtual ~TPaveLabel()
Pavelabel default destructor.
Definition: TPaveLabel.cxx:52
Double_t
double Double_t
Definition: RtypesCore.h:59
TPaveLabel::TPaveLabel
TPaveLabel()
Pavelabel default constructor.
Definition: TPaveLabel.cxx:32
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TPave.h
x2
static const double x2[5]
Definition: RooGaussKronrodIntegrator1D.cxx:364
TPaveLabel::GetLabel
const char * GetLabel() const
Definition: TPaveLabel.h:35