ROOT  6.06/09
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 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TPaveLabel //
19 // //
20 // PaveLabel A Pave with a label. //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #ifndef ROOT_TPave
25 #include "TPave.h"
26 #endif
27 #ifndef ROOT_TAttText
28 #include "TAttText.h"
29 #endif
30 
31 
32 class TPaveLabel : public TPave, public TAttText {
33 
34 protected:
35  TString fLabel; //Label written at the center of Pave
36 
37 public:
38  TPaveLabel();
39  TPaveLabel(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2, const char *label, Option_t *option="br");
40  TPaveLabel(const TPaveLabel &pavelabel);
41  virtual ~TPaveLabel();
42 
43  void Copy(TObject &pavelabel) const;
44  virtual void Draw(Option_t *option="");
45  virtual void DrawPaveLabel(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
46  const char *label, Option_t *option="");
47  const char *GetLabel() const {return fLabel.Data();}
48  const char *GetTitle() const {return fLabel.Data();}
49  virtual void Paint(Option_t *option="");
50  virtual void PaintPaveLabel(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
51  const char *label, Option_t *option="");
52  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
53  virtual void SetLabel(const char *label) {fLabel = label;} // *MENU*
54 
55  ClassDef(TPaveLabel,1) //PaveLabel. A Pave with a label
56 };
57 
58 #endif
59 
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
ClassDef(TAttBBox2D, 0)
const char Option_t
Definition: RtypesCore.h:62
virtual ~TPaveLabel()
Pavelabel default destructor.
Definition: TPaveLabel.cxx:52
Basic string class.
Definition: TString.h:137
TString fLabel
Definition: TPaveLabel.h:35
A TBox with a bordersize and a shadow option.
Definition: TPave.h:31
const char * Data() const
Definition: TString.h:349
static const double x2[5]
char * out
Definition: TBase64.cxx:29
virtual void SetLabel(const char *label)
Definition: TPaveLabel.h:53
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
A Pave (see TPave) with a text centered in the Pave.
Definition: TPaveLabel.h:32
const char * GetTitle() const
Returns title of object.
Definition: TPaveLabel.h:48
Text Attributes class.
Definition: TAttText.h:32
static const double x1[5]
virtual void Draw(Option_t *option="")
Draw this pavelabel with its current attributes.
Definition: TPaveLabel.cxx:77
double Double_t
Definition: RtypesCore.h:55
const char * GetLabel() const
Definition: TPaveLabel.h:47
Mother of all ROOT objects.
Definition: TObject.h:58
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
Definition: TPaveLabel.cxx:187
virtual void Paint(Option_t *option="")
Paint this pavelabel with its current attributes.
Definition: TPaveLabel.cxx:99
void Copy(TObject &pavelabel) const
Copy this pavelabel to pavelabel.
Definition: TPaveLabel.cxx:67