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>
25 class AliEveITSDigitsInfo;
26 class AliEveDigitScaleInfo;
28 class AliEveITSModuleStepper : public TEveElementList,
29 public TGLOverlayElement
31 friend class ITSModuleStepperGL;
34 typedef std::vector<UInt_t> vpInt_t;
35 typedef std::vector<UInt_t>::iterator vpInt_i;
39 UInt_t fPosition; // position of top corner ITS module in vector fIDs
41 AliEveITSModuleStepper(const AliEveITSModuleStepper&); // Not implemented
42 AliEveITSModuleStepper& operator=(const AliEveITSModuleStepper&); // Not implemented
45 AliEveITSDigitsInfo* fDigitsInfo;
46 AliEveDigitScaleInfo* fScaleInfo;
49 TEveGridStepper* fStepper;
56 // module configuration
58 Color_t fModuleFrameCol;
60 // palette configuratiom
61 Float_t fPaletteOffset;
62 Float_t fPaletteLength;
64 // symbol configuration
68 Float_t fWOff; ///offset relative to widget size
74 Float_t TextLength(const char* txt);
75 void RenderString(TString tex ,Int_t id = -1);
76 void RenderFrame(Float_t dx, Float_t dy, Int_t id);
77 void RenderSymbol(Float_t dx, Float_t dy, Int_t id);
78 void RenderPalette(Float_t dx, Float_t x, Float_t y);
82 // module ID navigation
83 Int_t Nxy() const { return fStepper->GetNx()*fStepper->GetNy(); }
84 void AddToList(Int_t modID) { fIDs.push_back(modID);}
85 void ResetList() { fIDs.clear();}
86 void SetFirst(Int_t first);
89 AliEveITSModuleStepper(AliEveITSDigitsInfo* di);
90 virtual ~AliEveITSModuleStepper();
93 void DisplayDet(Int_t det, Int_t layer = -1);
94 void DisplayTheta(Float_t min, Float_t max);
97 virtual Bool_t MouseEnter(TGLOvlSelectRecord& selRec);
98 virtual Bool_t Handle(TGLRnrCtx& rnrCtx, TGLOvlSelectRecord& selRec,
100 virtual void MouseLeave();
101 virtual void Render(TGLRnrCtx& rnrCtx);
104 TEveGridStepper* GetStepper() { return fStepper; }
105 void SetStepper(TEveGridStepper* s) { fStepper = s; Apply(); }
107 Int_t GetCurrentPage();
117 Color_t GetWColor() { return fWCol; }
118 void SetWColor(Color_t c) { fWCol = c; }
119 TGLText* GetFont() { return fText; }
120 void SetGLText(TGLText* t) { fText = t; }
122 ClassDef(AliEveITSModuleStepper, 0);