File indexing completed on 2025-01-18 10:11:40
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TEveCaloLegoOverlay
0013 #define ROOT_TEveCaloLegoOverlay
0014
0015 #include "TGLCameraOverlay.h"
0016 #include "TEveElement.h"
0017
0018 class TEveCaloLego;
0019
0020 class TEveCaloLegoOverlay : public TGLCameraOverlay
0021 {
0022 private:
0023 TEveCaloLegoOverlay(const TEveCaloLegoOverlay&);
0024 TEveCaloLegoOverlay& operator=(const TEveCaloLegoOverlay&);
0025
0026 Bool_t SetSliderVal(Event_t* event,TGLRnrCtx& rnrCtx );
0027
0028
0029 protected:
0030 void RenderLogaritmicScales(TGLRnrCtx& rnrCtx);
0031 void RenderPaletteScales(TGLRnrCtx& rnrCtx);
0032 void RenderPlaneInterface(TGLRnrCtx& rnrCtx);
0033 void RenderHeader(TGLRnrCtx& rnrCtx);
0034
0035 TEveCaloLego* fCalo;
0036
0037
0038 Bool_t fShowScales;
0039 Color_t fScaleColor;
0040 Char_t fScaleTransparency;
0041 Double_t fScaleCoordX;
0042 Double_t fScaleCoordY;
0043 Double_t fScaleW;
0044 Double_t fScaleH;
0045 Double_t fCellX;
0046 Double_t fCellY;
0047
0048 Color_t fFrameColor;
0049 Char_t fFrameLineTransp;
0050 Char_t fFrameBgTransp;
0051
0052
0053 Int_t fMouseX, fMouseY;
0054 Bool_t fInDrag;
0055
0056
0057 TString fHeaderTxt;
0058 Bool_t fHeaderSelected;
0059
0060
0061 TAxis *fPlaneAxis;
0062 Color_t fAxisPlaneColor;
0063 Bool_t fShowPlane;
0064
0065 Float_t fMenuW;
0066 Float_t fButtonW;
0067 Bool_t fShowSlider;
0068 Float_t fSliderH;
0069 Float_t fSliderPosY;
0070 Float_t fSliderVal;
0071
0072 Int_t fActiveID;
0073 Color_t fActiveCol;
0074
0075
0076 public:
0077 TEveCaloLegoOverlay();
0078 ~TEveCaloLegoOverlay() override{}
0079
0080
0081 void Render(TGLRnrCtx& rnrCtx) override;
0082
0083
0084 Bool_t MouseEnter(TGLOvlSelectRecord& selRec) override;
0085 Bool_t Handle(TGLRnrCtx& rnrCtx, TGLOvlSelectRecord& selRec, Event_t* event) override;
0086 void MouseLeave() override;
0087
0088
0089 TEveCaloLego* GetCaloLego() {return fCalo;}
0090 void SetCaloLego(TEveCaloLego* c) {fCalo = c;}
0091
0092 void SetShowPlane (Bool_t x) { fShowPlane = x; }
0093 Bool_t GetShowPlane() const { return fShowPlane; }
0094
0095 void SetHeaderTxt(const char *txt) {fHeaderTxt = txt; }
0096 const char* GetHeaderTxt() const { return fHeaderTxt; }
0097
0098 void SetShowScales(Bool_t x) { fShowScales = x;}
0099 void SetScaleColorTransparency(Color_t colIdx, Char_t transp);
0100 void SetScalePosition(Double_t x, Double_t y);
0101
0102 void SetFrameAttribs(Color_t frameCol, Char_t lineTransp, Char_t bgTransp);
0103
0104 ClassDefOverride(TEveCaloLegoOverlay, 0);
0105 };
0106
0107 #endif