ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
Int_t GetFontFile() const
Definition: TEveText.h:50
Int_t fFontSize
Definition: TEveText.h:34
Color_t fTextColor
Definition: TEveText.h:32
void SetAutoLighting(Bool_t isOn)
Definition: TEveText.h:64
Float_t GetExtrude() const
Definition: TEveText.h:66
float Float_t
Definition: RtypesCore.h:53
const char Option_t
Definition: RtypesCore.h:62
Bool_t GetAutoLighting() const
Definition: TEveText.h:63
void SetPolygonOffset(Float_t factor, Float_t units)
Set the scale and units used to calculate depth values.
Definition: TEveText.cxx:107
Int_t GetFontMode() const
Definition: TEveText.h:51
Use this attribute class when an object should have 3D capabilities.
Definition: TAtt3D.h:29
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
TEveText(const TEveText &)
void SetText(const char *t)
Definition: TEveText.h:58
const char * Data() const
Definition: TString.h:349
Double_t x[n]
Definition: legend1.C:17
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:33
virtual void ComputeBBox()
Fill bounding-box information.
Definition: TEveText.cxx:126
Bool_t fAutoLighting
Definition: TEveText.h:40
Int_t fFontMode
Definition: TEveText.h:36
Float_t GetPolygonOffset(Int_t i) const
Definition: TEveText.h:69
short Color_t
Definition: RtypesCore.h:79
virtual void Paint(Option_t *option="")
Paint this object. Only direct rendering is supported.
Definition: TEveText.cxx:116
TEveText & operator=(const TEveText &)
TThread * t[5]
Definition: threadsh1.C:13
Float_t fPolygonOffset[2]
Definition: TEveText.h:43
Float_t fExtrude
Definition: TEveText.h:38
virtual const TGPicture * GetListTreeIcon(Bool_t open=kFALSE)
Return TEveText icon.
Definition: TEveText.cxx:134
Int_t fFontFile
Definition: TEveText.h:35
Bool_t GetLighting() const
Definition: TEveText.h:60
const char * GetText() const
Definition: TEveText.h:57
tuple file
Definition: fildir.py:20
Bool_t fLighting
Definition: TEveText.h:41
void SetExtrude(Float_t x)
Definition: TEveText.h:67
void SetFontSize(Int_t size, Bool_t validate=kTRUE)
Set valid font size.
Definition: TEveText.cxx:60
TEveElement class used for displaying FreeType GL fonts.
Definition: TEveText.h:21
void SetFontMode(Int_t mode)
Set FTFont class ID.
Definition: TEveText.cxx:93
#define name(a, b)
Definition: linkTestLib0.cpp:5
void SetFontFile(Int_t file)
Definition: TEveText.h:53
ClassDef(TEveText, 0)
Int_t GetFontSize() const
Definition: TEveText.h:49
Helper for management of bounding-box information.
Definition: TAttBBox.h:19
void SetLighting(Bool_t isOn)
Definition: TEveText.h:61
virtual ~TEveText()
Definition: TEveText.h:47
const Bool_t kTRUE
Definition: Rtypes.h:91
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition: TEveElement.h:33
TString fText
Definition: TEveText.h:31