Logo ROOT   6.10/09
Reference Guide
TEveCaloLegoOverlay.h
Go to the documentation of this file.
1 // @(#)root/eve:$Id$
2 // Author: Alja Mrak-Tadel 2007
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_TEveCaloLegoOverlay
13 #define ROOT_TEveCaloLegoOverlay
14 
15 #include "TGLCameraOverlay.h"
16 #include "TEveElement.h"
17 
18 class TEveCaloLego;
19 
21 {
22 private:
23  TEveCaloLegoOverlay(const TEveCaloLegoOverlay&); // Not implemented
24  TEveCaloLegoOverlay& operator=(const TEveCaloLegoOverlay&); // Not implemented
25 
26  Bool_t SetSliderVal(Event_t* event,TGLRnrCtx& rnrCtx );
27 
28 
29 protected:
30  void RenderLogaritmicScales(TGLRnrCtx& rnrCtx);
31  void RenderPaletteScales(TGLRnrCtx& rnrCtx);
32  void RenderPlaneInterface(TGLRnrCtx& rnrCtx);
33  void RenderHeader(TGLRnrCtx& rnrCtx);
34 
35  TEveCaloLego* fCalo; // model
36 
37  // 2D scales
40  Char_t fScaleTransparency; //transaprency in %
47 
51 
52  // move of scales
53  Int_t fMouseX, fMouseY; //! last mouse position
55 
56  // text top right corner
59 
60  // plane ojects
64  // plane state
68  Float_t fSliderH; // slider height in % of viewport
69  Float_t fSliderPosY; // y position of slider bottom up
71  // plane event-handling
74 
75 
76 public:
79 
80  //rendering
81  virtual void Render(TGLRnrCtx& rnrCtx);
82 
83  // event handling
84  virtual Bool_t MouseEnter(TGLOvlSelectRecord& selRec);
85  virtual Bool_t Handle(TGLRnrCtx& rnrCtx, TGLOvlSelectRecord& selRec, Event_t* event);
86  virtual void MouseLeave();
87 
88 
90  void SetCaloLego(TEveCaloLego* c) {fCalo = c;}
91 
92  void SetShowPlane (Bool_t x) { fShowPlane = x; }
93  Bool_t GetShowPlane() const { return fShowPlane; }
94 
95  void SetHeaderTxt(const char *txt) {fHeaderTxt = txt; }
96  const char* GetHeaderTxt() const { return fHeaderTxt; }
97 
98  void SetShowScales(Bool_t x) { fShowScales = x;}
99  void SetScaleColorTransparency(Color_t colIdx, Char_t transp);
101 
102  void SetFrameAttribs(Color_t frameCol, Char_t lineTransp, Char_t bgTransp);
103 
104  ClassDef(TEveCaloLegoOverlay, 0); // GL-overaly control GUI for TEveCaloLego.
105 };
106 
107 #endif
const char * GetHeaderTxt() const
A GL overlay element which displays camera furstum.
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
Definition: TGLRnrCtx.h:40
virtual Bool_t Handle(TGLRnrCtx &rnrCtx, TGLOvlSelectRecord &selRec, Event_t *event)
Handle overlay event.
float Float_t
Definition: RtypesCore.h:53
Bool_t GetShowPlane() const
void SetShowPlane(Bool_t x)
Bool_t SetSliderVal(Event_t *event, TGLRnrCtx &rnrCtx)
void RenderLogaritmicScales(TGLRnrCtx &rnrCtx)
void SetScalePosition(Double_t x, Double_t y)
Set scale coordinates in range [0,1].
Basic string class.
Definition: TString.h:129
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual void Render(TGLRnrCtx &rnrCtx)
Display coordinates info of current frustum.
Bool_t fInDrag
last mouse position
void SetHeaderTxt(const char *txt)
Double_t x[n]
Definition: legend1.C:17
#define ClassDef(name, id)
Definition: Rtypes.h:297
TEveCaloLegoOverlay()
Constructor.
virtual void MouseLeave()
Mouse has left overlay area.
virtual Bool_t MouseEnter(TGLOvlSelectRecord &selRec)
Mouse has entered overlay area.
void RenderPlaneInterface(TGLRnrCtx &rnrCtx)
Render menu for plane-value and the plane if marked.
TEveCaloLego * GetCaloLego()
short Color_t
Definition: RtypesCore.h:79
void SetCaloLego(TEveCaloLego *c)
Class to manage histogram axis.
Definition: TAxis.h:30
TEveCaloLegoOverlay & operator=(const TEveCaloLegoOverlay &)
void RenderPaletteScales(TGLRnrCtx &rnrCtx)
void SetFrameAttribs(Color_t frameCol, Char_t lineTransp, Char_t bgTransp)
Set frame attributes.
void SetScaleColorTransparency(Color_t colIdx, Char_t transp)
Set color and transparency of scales.
void RenderHeader(TGLRnrCtx &rnrCtx)
void SetShowScales(Bool_t x)
Visualization of calorimeter data as eta/phi histogram.
Definition: TEveCalo.h:249
double Double_t
Definition: RtypesCore.h:55
Double_t y[n]
Definition: legend1.C:17
char Char_t
Definition: RtypesCore.h:29
Selection record for overlay objects.
GL-overlay control GUI for TEveCaloLego.