Logo ROOT  
Reference Guide
TEveText.h
Go to the documentation of this file.
1 // @(#)root/eve:$Id$
2 // Authors: Alja & Matevz Tadel 2008
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2007, 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_TEveText
13 #define ROOT_TEveText
14 
15 #include "TNamed.h"
16 #include "TAtt3D.h"
17 #include "TAttBBox.h"
18 
19 #include "TEveElement.h"
20 
21 class TEveText : public TEveElement,
22  public TNamed,
23  public TAtt3D,
24  public TAttBBox
25 {
26 private:
27  TEveText(const TEveText&); // Not implemented
28  TEveText& operator=(const TEveText&); // Not implemented
29 
30 protected:
31  TString fText; // text
32  Color_t fTextColor; // text color
33 
34  Int_t fFontSize; // FTFont face size
35  Int_t fFontFile; // FTFont file name
36  Int_t fFontMode; // FTFont FTGL class id
37 
38  Float_t fExtrude; // extrude depth
39 
40  Bool_t fAutoLighting; // use default lighting
41  Bool_t fLighting; // force lighting
42 
43  Float_t fPolygonOffset[2]; // depth test
44 
45 public:
46  TEveText(const char* txt="");
47  virtual ~TEveText() {}
48 
49  Int_t GetFontSize() const { return fFontSize; }
50  Int_t GetFontFile() const { return fFontFile; }
51  Int_t GetFontMode() const { return fFontMode; }
52  void SetFontSize(Int_t size, Bool_t validate = kTRUE);
54  void SetFontFile(const char* name);
55  void SetFontMode(Int_t mode);
56 
57  const char* GetText() const { return fText.Data(); }
58  void SetText(const char* t) { fText = t; }
59 
60  Bool_t GetLighting() const { return fLighting; }
61  void SetLighting(Bool_t isOn) { fLighting = isOn; }
62 
63  Bool_t GetAutoLighting() const { return fAutoLighting; }
64  void SetAutoLighting(Bool_t isOn) { fAutoLighting = isOn; }
65 
66  Float_t GetExtrude() const { return fExtrude; }
67  void SetExtrude(Float_t x) { fExtrude = x; }
68 
69  Float_t GetPolygonOffset(Int_t i) const { return fPolygonOffset[i]; }
70  void SetPolygonOffset(Float_t factor, Float_t units);
71 
72  virtual void Paint(Option_t* option="");
73  virtual void ComputeBBox();
74 
75  virtual const TGPicture* GetListTreeIcon(Bool_t open=kFALSE);
76 
77  ClassDef(TEveText, 0); // Class for visualisation of text with FTGL font.
78 };
79 
80 #endif
TEveText::GetListTreeIcon
virtual const TGPicture * GetListTreeIcon(Bool_t open=kFALSE)
Return TEveText icon.
Definition: TEveText.cxx:134
TEveElement
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition: TEveElement.h:36
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:100
TEveText::GetFontMode
Int_t GetFontMode() const
Definition: TEveText.h:51
TGPicture
The TGPicture class implements pictures and icons used in the different GUI elements and widgets.
Definition: TGPicture.h:25
TEveText::fFontMode
Int_t fFontMode
Definition: TEveText.h:36
Option_t
const char Option_t
Definition: RtypesCore.h:66
TEveText::fFontFile
Int_t fFontFile
Definition: TEveText.h:35
TEveText::SetText
void SetText(const char *t)
Definition: TEveText.h:58
TEveText::GetPolygonOffset
Float_t GetPolygonOffset(Int_t i) const
Definition: TEveText.h:69
TString::Data
const char * Data() const
Definition: TString.h:369
TNamed.h
TEveText
TEveElement class used for displaying FreeType GL fonts.
Definition: TEveText.h:25
TEveText::fLighting
Bool_t fLighting
Definition: TEveText.h:41
Float_t
float Float_t
Definition: RtypesCore.h:57
Int_t
int Int_t
Definition: RtypesCore.h:45
TEveText::SetFontSize
void SetFontSize(Int_t size, Bool_t validate=kTRUE)
Set valid font size.
Definition: TEveText.cxx:60
x
Double_t x[n]
Definition: legend1.C:17
TEveText::fTextColor
Color_t fTextColor
Definition: TEveText.h:32
TEveElement.h
TString
Basic string class.
Definition: TString.h:136
ROOT::Math::detail::open
@ open
Definition: GenVectorIO.h:35
TAtt3D
Use this attribute class when an object should have 3D capabilities.
Definition: TAtt3D.h:19
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
Color_t
short Color_t
Definition: RtypesCore.h:92
bool
TAttBBox
Helper for management of bounding-box information.
Definition: TAttBBox.h:18
TEveText::fFontSize
Int_t fFontSize
Definition: TEveText.h:34
TEveText::GetText
const char * GetText() const
Definition: TEveText.h:57
TEveText::fPolygonOffset
Float_t fPolygonOffset[2]
Definition: TEveText.h:43
TEveText::GetAutoLighting
Bool_t GetAutoLighting() const
Definition: TEveText.h:63
TAtt3D.h
TEveText::SetAutoLighting
void SetAutoLighting(Bool_t isOn)
Definition: TEveText.h:64
TEveText::GetLighting
Bool_t GetLighting() const
Definition: TEveText.h:60
TEveText::~TEveText
virtual ~TEveText()
Definition: TEveText.h:47
size
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
TAttBBox.h
TEveText::SetExtrude
void SetExtrude(Float_t x)
Definition: TEveText.h:67
TNamed
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:101
TEveText::SetPolygonOffset
void SetPolygonOffset(Float_t factor, Float_t units)
Set the scale and units used to calculate depth values.
Definition: TEveText.cxx:107
TEveText::ComputeBBox
virtual void ComputeBBox()
Fill bounding-box information.
Definition: TEveText.cxx:126
TEveText::fExtrude
Float_t fExtrude
Definition: TEveText.h:38
TEveText::operator=
TEveText & operator=(const TEveText &)
TEveText::SetFontFile
void SetFontFile(Int_t file)
Definition: TEveText.h:53
file
Definition: file.py:1
TEveText::GetExtrude
Float_t GetExtrude() const
Definition: TEveText.h:66
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
name
char name[80]
Definition: TGX11.cxx:110
TEveText::SetFontMode
void SetFontMode(Int_t mode)
Set FTFont class ID.
Definition: TEveText.cxx:93
TEveText::SetLighting
void SetLighting(Bool_t isOn)
Definition: TEveText.h:61
TEveText::GetFontSize
Int_t GetFontSize() const
Definition: TEveText.h:49
TEveText::TEveText
TEveText(const TEveText &)
TEveText::fText
TString fText
Definition: TEveText.h:31
TEveText::fAutoLighting
Bool_t fAutoLighting
Definition: TEveText.h:40
TEveText::GetFontFile
Int_t GetFontFile() const
Definition: TEveText.h:50
TEveText::Paint
virtual void Paint(Option_t *option="")
Paint this object. Only direct rendering is supported.
Definition: TEveText.cxx:116
int