]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/EveDet/AliEveITSModuleStepper.h
remove dependency on AliTRDrawFastStream
[u/mrichter/AliRoot.git] / EVE / EveDet / AliEveITSModuleStepper.h
CommitLineData
d810d0de 1// $Id$
2// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
4/**************************************************************************
5 * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
51346b82 7 * full copyright notice. *
d810d0de 8 **************************************************************************/
82b3616d 9
a15e6d7d 10#ifndef AliEveITSModuleStepper_H
11#define AliEveITSModuleStepper_H
09edeb17 12
84aff7a4 13#include <TEveElement.h>
a15e6d7d 14#include <TGLOverlay.h>
c87a8d78 15#include <TEveGridStepper.h>
16#include <TGLFontManager.h>
a15e6d7d 17
82b3616d 18#include <vector>
19
32e219c2 20
c87a8d78 21class TEveRGBAPalette;
d810d0de 22class AliEveITSDigitsInfo;
23class AliEveDigitScaleInfo;
82b3616d 24
c87a8d78 25class TGLAxis;
26
27
d810d0de 28class AliEveITSModuleStepper : public TEveElementList,
c76ea574 29 public TGLOverlayElement
82b3616d 30{
31public:
09edeb17 32 typedef std::vector<UInt_t> vpInt_t;
33 typedef std::vector<UInt_t>::iterator vpInt_i;
d7e36bcf 34
4b456ebb 35 AliEveITSModuleStepper(AliEveITSDigitsInfo* di);
36 virtual ~AliEveITSModuleStepper();
37
c87a8d78 38 TEveGridStepper* GetStepper() { return fStepper; }
39 void SetStepper(TEveGridStepper* s) { fStepper = s; Apply(); }
4b456ebb 40
c87a8d78 41 // overlay
4b456ebb 42 virtual Bool_t MouseEnter(TGLOvlSelectRecord& selRec);
c87a8d78 43 virtual Bool_t Handle(TGLRnrCtx& rnrCtx, TGLOvlSelectRecord& selRec, Event_t* event);
44 virtual void MouseLeave();
4b456ebb 45
c87a8d78 46 // menu callbacks
47 void DisplayDet(Int_t det, Int_t layer = -1);
4b456ebb 48 Int_t GetCurrentPage() const;
49 Int_t GetPages();
50 void Start();
51 void Next();
52 void Previous();
53 void End();
54 void Apply();
55 void Capacity();
56
c87a8d78 57 virtual void Render(TGLRnrCtx& rnrCtx);
82b3616d 58
59protected:
698e2c9b 60 AliEveITSDigitsInfo *fDigitsInfo; // Source of data and geometry.
61 AliEveDigitScaleInfo *fScaleInfo; // Parameters for digit-scaling.
698e2c9b 62 TEveGridStepper *fStepper; // Module placement.
c87a8d78 63
64 vpInt_t fModuleIDs; // Vector of module IDs to be displayed.
65 UInt_t fPosition; // Position of top corner ITS module in vector fIDs.
66 Int_t fSubDet; // Sub-det, 0~SPD, 1~SDD, 2~SSD.
67
68 mutable TGLFont fModuleFont; // Pixmap font for module ids.
69 mutable TGLFont fTextFont; // Texture font for text tool bar.
70 mutable TGLFont fSymbolFont; // Webdings font for pager and scale actions.
71 TGLAxis* fAxis;
72
73 Float_t fMenuHeight; // Height of a tool bar.
74 Int_t fTextSize; // Size of texture for menu font.
75 Color_t fTextCol; // Default text color in menu.
76 Color_t fActiveCol; // Color of selected menu item.
77
78 Int_t fActiveID; // Id of active menu item.
79
80 // ITS module ID navigation
84aff7a4 81 Int_t Nxy() const { return fStepper->GetNx()*fStepper->GetNy(); }
c87a8d78 82 void AddToList(Int_t modID) { fModuleIDs.push_back(modID);}
83 void ResetList() { fModuleIDs.clear();}
32e219c2 84 void SetFirst(Int_t first);
82b3616d 85
32e219c2 86
c87a8d78 87private:
4b456ebb 88 AliEveITSModuleStepper(const AliEveITSModuleStepper&); // Not implemented
89 AliEveITSModuleStepper& operator=(const AliEveITSModuleStepper&); // Not implemented
09edeb17 90
c87a8d78 91 // GUI
92 void RenderModuleIDs();
ba5a649d 93 void RenderText(const char* tex ,Int_t id, const TGLFont &font, Float_t step=-1);
c87a8d78 94 void RenderPalette(TEveRGBAPalette* p);
95 void RenderMenu(Int_t currP, Int_t MaxP, Int_t scaleX, Int_t scaleZ);
96
698e2c9b 97 ClassDef(AliEveITSModuleStepper, 0); // Display scaled ITS modules in a paged layout, also providing GL-overaly control GUI.
d7e36bcf 98};
82b3616d 99
82b3616d 100#endif