]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - MUON/mapping/AliMpVPainter.h
Correction in the loop over track references. Upper bound has been affected
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpVPainter.h
... / ...
CommitLineData
1/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
3
4// $Id$
5// $MpId: AliMpVPainter.h,v 1.6 2005/08/26 15:43:36 ivana Exp $
6
7/// \ingroup graphics
8/// \class AliMpVPainter
9/// \brief Abstract base class for drawing objects into canvas
10///
11/// Authors: David Guez, IPN Orsay
12
13#ifndef ALI_MP_V_PAINTER_H
14#define ALI_MP_V_PAINTER_H
15
16#include <TObject.h>
17#include <TVector2.h>
18
19class TList;
20
21class AliMpVPainter : public TObject
22{
23 public:
24 AliMpVPainter();
25 virtual ~AliMpVPainter();
26
27 void DumpObject() const; // *MENU*
28 virtual void Paint(Option_t *option)=0;
29 virtual TObject* Clone(const char* newname="") const;
30 virtual TObject* DrawClone(Option_t* option) const; // *MENU*
31
32 // get methods
33 TVector2 GetPadPosition() const {return fPadPosition;}
34 TVector2 GetPadDimensions() const {return fPadDimensions;}
35 Int_t GetColor() const {return fColor;}
36
37 // set methods
38 void SetPadPosition(const TVector2 &padPosition){fPadPosition=padPosition;}
39 void SetPadDimension(const TVector2 &padDimensions){fPadDimensions=padDimensions;}
40 void SetColor(Int_t color){fColor=color;}
41
42 // methods
43 Bool_t IsInside(const TVector2 &point,const TVector2& pos,const TVector2& dim);
44 virtual TVector2 GetPosition() const=0;
45 virtual TVector2 GetDimensions() const=0;
46 void InitGraphContext();
47 void PaintWholeBox(Bool_t fill=kTRUE);
48 virtual Int_t DistancetoPrimitive(Int_t x, Int_t y);
49 TVector2 RealToPad(const TVector2& realPos);
50
51 static AliMpVPainter *CreatePainter(TObject *object);
52
53 protected:
54 AliMpVPainter(const AliMpVPainter& right);
55 AliMpVPainter& operator = (const AliMpVPainter& right);
56
57 void AddPainter(AliMpVPainter *painter);
58 AliMpVPainter *DrawObject(TObject *object,Option_t *option="");
59
60 private:
61 Int_t fColor; // color
62 TVector2 fPadPosition; // position inside the graphics pad
63 TVector2 fPadDimensions; // dimensions inside the graphics pad
64 TList *fTrashList; // list of painter object created
65 ClassDef(AliMpVPainter,1) // abstract object painter
66};
67
68#endif //ALI_MP_V_PAINTER_H