2 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
4 /**************************************************************************
5 * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
7 * full copyright notice. *
8 **************************************************************************/
10 #ifndef ALIEVE_ITSModuleStepper_H
11 #define ALIEVE_ITSModuleStepper_H
14 #include <TGLOverlay.h>
16 #include <TEveElement.h>
17 #include <TEveGridStepper.h>
24 class AliEveITSDigitsInfo;
25 class AliEveDigitScaleInfo;
27 class AliEveITSModuleStepper : public TEveElementList,
28 public TGLOverlayElement
30 friend class ITSModuleStepperGL;
33 typedef std::vector<UInt_t> vpInt_t;
34 typedef std::vector<UInt_t>::iterator vpInt_i;
38 UInt_t fPosition; // position of top corner ITS module in vector fIDs
40 AliEveITSModuleStepper(const AliEveITSModuleStepper&); // Not implemented
41 AliEveITSModuleStepper& operator=(const AliEveITSModuleStepper&); // Not implemented
44 AliEveITSDigitsInfo *fDigitsInfo;
45 AliEveDigitScaleInfo *fScaleInfo;
48 TEveGridStepper *fStepper;
55 // module configuration
57 Color_t fModuleFrameCol;
59 // palette configuratiom
60 Float_t fPaletteOffset;
61 Float_t fPaletteLength;
63 // symbol configuration
67 Float_t fWOff; // offset relative to widget size
73 Float_t TextLength(const char* txt);
74 void RenderString(TString tex ,Int_t id = -1);
75 void RenderFrame(Float_t dx, Float_t dy, Int_t id);
76 void RenderSymbol(Float_t dx, Float_t dy, Int_t id);
77 void RenderPalette(Float_t dx, Float_t x, Float_t y);
81 // module ID navigation
82 Int_t Nxy() const { return fStepper->GetNx()*fStepper->GetNy(); }
83 void AddToList(Int_t modID) { fIDs.push_back(modID);}
84 void ResetList() { fIDs.clear();}
85 void SetFirst(Int_t first);
88 AliEveITSModuleStepper(AliEveITSDigitsInfo* di);
89 virtual ~AliEveITSModuleStepper();
92 void DisplayDet(Int_t det, Int_t layer = -1);
93 void DisplayTheta(Float_t min, Float_t max);
96 virtual Bool_t MouseEnter(TGLOvlSelectRecord& selRec);
97 virtual Bool_t Handle(TGLRnrCtx& rnrCtx, TGLOvlSelectRecord& selRec,
99 virtual void MouseLeave();
100 virtual void Render(TGLRnrCtx& rnrCtx);
103 TEveGridStepper* GetStepper() { return fStepper; }
104 void SetStepper(TEveGridStepper* s) { fStepper = s; Apply(); }
106 Int_t GetCurrentPage();
116 Color_t GetWColor() { return fWCol; }
117 void SetWColor(Color_t c) { fWCol = c; }
118 TGLText* GetFont() { return fText; }
119 void SetGLText(TGLText* t) { fText = t; }
121 ClassDef(AliEveITSModuleStepper, 0);