]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONPainterRegistry.h
Fixes for coding violations
[u/mrichter/AliRoot.git] / MUON / AliMUONPainterRegistry.h
1 #ifndef ALIMUONPAINTERREGISTRY_H
2 #define ALIMUONPAINTERREGISTRY_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice                               */
6
7 // $Id$
8
9 /// \ingroup graphics
10 /// \class AliMUONPainterRegistry
11 /// \brief Registry for a bunch of AliMUONVPainter related stuff
12 /// 
13 // Author Laurent Aphecetche, Subatech
14
15 #ifndef ROOT_TObject
16 #  include "TObject.h"
17 #endif
18 #ifndef ROOT_TQObject
19 #  include <TQObject.h>
20 #endif
21
22 class TGPopupMenu;
23 class TObjArray;
24 class AliMUONPainterMatrix;
25 class TGMenuBar;
26
27 class AliMUONPainterRegistry : public TObject, public TQObject
28 {
29 public:
30   virtual ~AliMUONPainterRegistry();
31
32   Int_t FindIndexOf(AliMUONPainterMatrix* group) const;
33   
34   void HistoryMenuActivated(Int_t i);
35   
36   static AliMUONPainterRegistry* Instance();
37   
38   Int_t NumberOfPainterMatrices() const;
39
40   AliMUONPainterMatrix* PainterMatrix(Int_t i) const;
41   
42   AliMUONPainterMatrix* PainterMatrix(const char* groupName) const;
43   
44   void AddToHistory(AliMUONPainterMatrix* group);
45     
46   void PainterMatrixWasRegistered(const AliMUONPainterMatrix* group); // *SIGNAL*
47   
48   void PainterMatrixWasUnregistered(const AliMUONPainterMatrix* group); // *SIGNAL*
49   
50   void PainterMatrixWantToShow(const AliMUONPainterMatrix* group); // *SIGNAL*
51   
52   void Print(Option_t* opt) const;
53   
54   Int_t Register(AliMUONPainterMatrix* group);
55   
56   /// Set the menu bar where to put the history menu
57   void SetMenuBar(TGMenuBar* bar) { fMenuBar = bar; }
58   
59   Bool_t Unregister(AliMUONPainterMatrix* group);
60   
61 private:
62   /// Not implemented
63   AliMUONPainterRegistry();
64   /// Not implemented
65   AliMUONPainterRegistry(const AliMUONPainterRegistry&);
66   /// Not implemented
67   AliMUONPainterRegistry& operator=(const AliMUONPainterRegistry&);
68   
69 private:
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
75   
76   ClassDef(AliMUONPainterRegistry,5) // Registry for AliMUONVPainter related stuff
77 };
78
79 #endif