12 #ifndef ROOT_TGLAnnotation
13 #define ROOT_TGLAnnotation
25 class TGLAnnotation :
public TGLOverlayElement
28 TGLAnnotation(
const TGLAnnotation&);
29 TGLAnnotation& operator=(
const TGLAnnotation&);
32 enum EDrag { kMove, kResize, kNone };
33 enum ENameStack { kMoveID, kEditID, kDeleteID, kResizeID };
36 Char_t GetLineTransparency()
const;
43 Int_t fMouseX, fMouseY;
45 Float_t fDrawW, fDrawH;
46 Float_t fTextSizeDrag;
51 TGMainFrame *fMainFrame;
52 TGTextEdit *fTextEdit;
54 static Color_t fgBackColor;
55 static Color_t fgTextColor;
63 TGLFont::ETextAlignH_e fTextAlign;
74 TGLAnnotation(TGLViewerBase *parent,
const char *text, Float_t posx, Float_t posy);
75 TGLAnnotation(TGLViewerBase *parent,
const char *text, Float_t posx, Float_t posy, TGLVector3 ref);
76 virtual ~TGLAnnotation();
78 void SetText(
const TString& x) { fText = x; }
79 const TString& GetText()
const {
return fText; }
81 void SetTransparency(Char_t x) { fTransparency = x; }
82 Char_t GetTransparency()
const {
return fTransparency; }
84 void SetUseColorSet(Bool_t x) { fUseColorSet = x; }
85 Bool_t GetUseColorSet()
const {
return fUseColorSet; }
87 void SetBackColor(Color_t x) { fBackColor = x; }
88 Color_t GetBackColor()
const {
return fBackColor; }
90 void SetTextColor(Color_t x) { fTextColor = x; }
91 Color_t GetTextColor()
const {
return fTextColor; }
93 void SetTextSize(Float_t x) { fTextSize = x; }
94 Float_t GetTextSize()
const {
return fTextSize; }
96 void SetAllowClose(Bool_t x) { fAllowClose = x; }
97 Bool_t GetAllowClose()
const {
return fAllowClose; }
99 TGLFont::ETextAlignH_e GetTextAlign()
const {
return fTextAlign; }
100 void SetTextAlign(TGLFont::ETextAlignH_e a) { fTextAlign = a; }
102 virtual Bool_t MouseEnter(TGLOvlSelectRecord& selRec);
103 virtual Bool_t Handle(TGLRnrCtx& rnrCtx, TGLOvlSelectRecord& selRec,
105 virtual void MouseLeave();
111 virtual void Render(TGLRnrCtx& rnrCtx);
113 ClassDef(TGLAnnotation, 0);