forked from root-project/root
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TEveText.h
80 lines (59 loc) · 2.6 KB
/
TEveText.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// @(#)root/eve:$Id$
// Authors: Alja & Matevz Tadel 2008
/*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifndef ROOT_TEveText
#define ROOT_TEveText
#include "TNamed.h"
#include "TAtt3D.h"
#include "TAttBBox.h"
#include "TEveElement.h"
class TEveText : public TEveElement,
public TNamed,
public TAtt3D,
public TAttBBox
{
private:
TEveText(const TEveText&); // Not implemented
TEveText& operator=(const TEveText&); // Not implemented
protected:
TString fText; // text
Color_t fTextColor; // text color
Int_t fFontSize; // FTFont face size
Int_t fFontFile; // FTFont file name
Int_t fFontMode; // FTFont FTGL class id
Float_t fExtrude; // extrude depth
Bool_t fAutoLighting; // use default lighting
Bool_t fLighting; // force lighting
Float_t fPolygonOffset[2]; // depth test
public:
TEveText(const char* txt="");
virtual ~TEveText() {}
Int_t GetFontSize() const { return fFontSize; }
Int_t GetFontFile() const { return fFontFile; }
Int_t GetFontMode() const { return fFontMode; }
void SetFontSize(Int_t size, Bool_t validate = kTRUE);
void SetFontFile(Int_t file){ fFontFile = file; }
void SetFontFile(const char* name);
void SetFontMode(Int_t mode);
const char* GetText() const { return fText.Data(); }
void SetText(const char* t) { fText = t; }
Bool_t GetLighting() const { return fLighting; }
void SetLighting(Bool_t isOn) { fLighting = isOn; }
Bool_t GetAutoLighting() const { return fAutoLighting; }
void SetAutoLighting(Bool_t isOn) { fAutoLighting = isOn; }
Float_t GetExtrude() const { return fExtrude; }
void SetExtrude(Float_t x) { fExtrude = x; }
Float_t GetPolygonOffset(Int_t i) const { return fPolygonOffset[i]; }
void SetPolygonOffset(Float_t factor, Float_t units);
virtual void Paint(Option_t* option="");
virtual void ComputeBBox();
virtual const TGPicture* GetListTreeIcon(Bool_t open=kFALSE);
ClassDef(TEveText, 0); // Class for visualisation of text with FTGL font.
};
#endif