Added copy constructor and assignement operator (I. Hrivnacova)
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpVPainter.h
CommitLineData
5f91c9e8 1// $Id$
2// Category: graphics
3//
4// Class AliMpVPainter
5// --------------
6// Class for drawing objects into canvas
7//
8// Authors: David Guez, IPN Orsay
9
10#ifndef ALI_MP_V_PAINTER_H
11#define ALI_MP_V_PAINTER_H
12
13#include <TObject.h>
5f91c9e8 14#include <TVector2.h>
2998a151 15
16class TList;
5f91c9e8 17
18class AliMpVPainter : public TObject
19{
20 public:
21 AliMpVPainter();
22 virtual ~AliMpVPainter();
fb1bf5c0 23
5f91c9e8 24 void DumpObject() const; // *MENU*
25 virtual void Paint(Option_t *option)=0;
26 virtual TObject* Clone(const char* newname="") const;
27 virtual TObject* DrawClone(Option_t* option) const; // *MENU*
fb1bf5c0 28
5f91c9e8 29 // get methods
30 TVector2 GetPadPosition() const {return fPadPosition;}
31 TVector2 GetPadDimensions() const {return fPadDimensions;}
32 Int_t GetColor() const {return fColor;}
33
34 // set methods
35 void SetPadPosition(const TVector2 &padPosition){fPadPosition=padPosition;}
36 void SetPadDimension(const TVector2 &padDimensions){fPadDimensions=padDimensions;}
37 void SetColor(Int_t color){fColor=color;}
38
39 // methods
40 Bool_t IsInside(const TVector2 &point,const TVector2& pos,const TVector2& dim);
41 virtual TVector2 GetPosition() const=0;
42 virtual TVector2 GetDimensions() const=0;
43 void InitGraphContext();
44 void PaintWholeBox(Bool_t fill=kTRUE);
45 virtual Int_t DistancetoPrimitive(Int_t x, Int_t y);
46 TVector2 RealToPad(const TVector2& realPos);
47
48 static AliMpVPainter *CreatePainter(TObject *object);
fb1bf5c0 49
5f91c9e8 50 protected:
fb1bf5c0 51 AliMpVPainter(const AliMpVPainter& right);
52 AliMpVPainter& operator = (const AliMpVPainter& right);
53
5f91c9e8 54 void AddPainter(AliMpVPainter *painter);
55 AliMpVPainter *DrawObject(TObject *object,Option_t *option="");
fb1bf5c0 56
5f91c9e8 57 private:
58 Int_t fColor; // color
59 TVector2 fPadPosition; // position inside the graphics pad
60 TVector2 fPadDimensions; // dimensions inside the graphics pad
61 TList *fTrashList; // list of painter object created
62 ClassDef(AliMpVPainter,1) // abstract object painter
63};
64
65#endif //ALI_MP_V_PAINTER_H