// @(#)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
 TEveText.h:1
 TEveText.h:2
 TEveText.h:3
 TEveText.h:4
 TEveText.h:5
 TEveText.h:6
 TEveText.h:7
 TEveText.h:8
 TEveText.h:9
 TEveText.h:10
 TEveText.h:11
 TEveText.h:12
 TEveText.h:13
 TEveText.h:14
 TEveText.h:15
 TEveText.h:16
 TEveText.h:17
 TEveText.h:18
 TEveText.h:19
 TEveText.h:20
 TEveText.h:21
 TEveText.h:22
 TEveText.h:23
 TEveText.h:24
 TEveText.h:25
 TEveText.h:26
 TEveText.h:27
 TEveText.h:28
 TEveText.h:29
 TEveText.h:30
 TEveText.h:31
 TEveText.h:32
 TEveText.h:33
 TEveText.h:34
 TEveText.h:35
 TEveText.h:36
 TEveText.h:37
 TEveText.h:38
 TEveText.h:39
 TEveText.h:40
 TEveText.h:41
 TEveText.h:42
 TEveText.h:43
 TEveText.h:44
 TEveText.h:45
 TEveText.h:46
 TEveText.h:47
 TEveText.h:48
 TEveText.h:49
 TEveText.h:50
 TEveText.h:51
 TEveText.h:52
 TEveText.h:53
 TEveText.h:54
 TEveText.h:55
 TEveText.h:56
 TEveText.h:57
 TEveText.h:58
 TEveText.h:59
 TEveText.h:60
 TEveText.h:61
 TEveText.h:62
 TEveText.h:63
 TEveText.h:64
 TEveText.h:65
 TEveText.h:66
 TEveText.h:67
 TEveText.h:68
 TEveText.h:69
 TEveText.h:70
 TEveText.h:71
 TEveText.h:72
 TEveText.h:73
 TEveText.h:74
 TEveText.h:75
 TEveText.h:76
 TEveText.h:77
 TEveText.h:78
 TEveText.h:79
 TEveText.h:80