1 #ifndef ALIMUONPAINTERREGISTRY_H
2 #define ALIMUONPAINTERREGISTRY_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 /// \class AliMUONPainterRegistry
11 /// \brief Registry for a bunch of AliMUONVPainter related stuff
13 // Author Laurent Aphecetche, Subatech
19 # include <TQObject.h>
24 class AliMUONPainterMatrix;
27 class AliMUONPainterRegistry : public TObject, public TQObject
30 virtual ~AliMUONPainterRegistry();
32 Int_t FindIndexOf(AliMUONPainterMatrix* group) const;
34 void HistoryMenuActivated(Int_t i);
36 static AliMUONPainterRegistry* Instance();
38 Int_t NumberOfPainterMatrices() const;
40 AliMUONPainterMatrix* PainterMatrix(Int_t i) const;
42 AliMUONPainterMatrix* PainterMatrix(const char* groupName) const;
44 void AddToHistory(AliMUONPainterMatrix* group);
46 void PainterMatrixWasRegistered(AliMUONPainterMatrix* group); // *SIGNAL*
48 void PainterMatrixWasUnregistered(AliMUONPainterMatrix* group); // *SIGNAL*
50 void PainterMatrixWantToShow(AliMUONPainterMatrix* group); // *SIGNAL*
52 void Print(Option_t* opt) const;
54 Int_t Register(AliMUONPainterMatrix* group);
56 /// Set the menu bar where to put the history menu
57 void SetMenuBar(TGMenuBar* bar) { fMenuBar = bar; }
59 Bool_t Unregister(AliMUONPainterMatrix* group);
63 AliMUONPainterRegistry();
65 AliMUONPainterRegistry(const AliMUONPainterRegistry&);
67 AliMUONPainterRegistry& operator=(const AliMUONPainterRegistry&);
70 static AliMUONPainterRegistry* fgInstance; ///< unique instance
71 TObjArray* fPainterMatrices; ///< painter matrices
72 TGPopupMenu* fHistoryMenu; ///< history menu
73 TGMenuBar* fMenuBar; ///< Menu bar where to put the history menu
74 Int_t fHistoryCounter; ///< index to get back history menu items
76 ClassDef(AliMUONPainterRegistry,5) // Registry for AliMUONVPainter related stuff