AliRoot Core  v5-06-15 (45dab64)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMpVPainter.h
Go to the documentation of this file.
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.8 2006/05/24 13:58:13 ivana Exp $
6 
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 
19 class TList;
20 
21 class AliMpVPainter : public TObject
22 {
23  public:
24  AliMpVPainter();
25  virtual ~AliMpVPainter();
26 
27  void DumpObject() const; // *MENU*
29  virtual void Paint(Option_t *option)=0;
30  virtual TObject* Clone(const char* newname="") const;
31  virtual TObject* DrawClone(Option_t* option) const; // *MENU*
32 
33  //
34  // get methods
35  //
37  TVector2 GetPadPosition() const {return fPadPosition;}
39  TVector2 GetPadDimensions() const {return fPadDimensions;}
41  Int_t GetColor() const {return fColor;}
42 
43  //
44  // set methods
45  //
47  void SetPadPosition(const TVector2 &padPosition){fPadPosition=padPosition;}
49  void SetPadDimension(const TVector2 &padDimensions){fPadDimensions=padDimensions;}
51  void SetColor(Int_t color){fColor=color;}
52 
53  //
54  // methods
55  //
56  Bool_t IsInside(const TVector2 &point,const TVector2& pos,const TVector2& dim);
58  virtual TVector2 GetPosition() const=0;
60  virtual TVector2 GetDimensions() const=0;
61  void InitGraphContext();
62  void PaintWholeBox(Bool_t fill=kTRUE);
63  virtual Int_t DistancetoPrimitive(Int_t x, Int_t y);
64  TVector2 RealToPad(const TVector2& realPos);
65 
66  static AliMpVPainter *CreatePainter(TObject *object);
67 
68  protected:
70  void AddPainter(AliMpVPainter *painter);
72  AliMpVPainter *DrawObject(TObject *object,Option_t *option="");
73 
74  private:
76  AliMpVPainter(const AliMpVPainter& right);
79 
80  Int_t fColor;
81  TVector2 fPadPosition;
82  TVector2 fPadDimensions;
83  TList *fTrashList;
84 
85  ClassDef(AliMpVPainter,1) // abstract object painter
86 };
87 
88 #endif //ALI_MP_V_PAINTER_H
static AliMpVPainter * CreatePainter(TObject *object)
void SetColor(Int_t color)
Set the color.
Definition: AliMpVPainter.h:51
Int_t GetColor() const
Return the color.
Definition: AliMpVPainter.h:41
AliMpVPainter & operator=(const AliMpVPainter &right)
Not implemented.
virtual TVector2 GetPosition() const =0
Return the owned object's position.
Bool_t IsInside(const TVector2 &point, const TVector2 &pos, const TVector2 &dim)
TVector2 fPadPosition
position inside the graphics pad
Definition: AliMpVPainter.h:81
Int_t fColor
color
Definition: AliMpVPainter.h:80
virtual TVector2 GetDimensions() const =0
Return the owned object's dimensions.
void SetPadDimension(const TVector2 &padDimensions)
Set the dimensions inside the graphics pad.
Definition: AliMpVPainter.h:49
virtual ~AliMpVPainter()
Abstract base class for drawing objects into canvas.
Definition: AliMpVPainter.h:21
TVector2 GetPadDimensions() const
Return the dimensions inside the graphics pad.
Definition: AliMpVPainter.h:39
virtual TObject * Clone(const char *newname="") const
TVector2 RealToPad(const TVector2 &realPos)
TVector2 fPadDimensions
dimensions inside the graphics pad
Definition: AliMpVPainter.h:82
void PaintWholeBox(Bool_t fill=kTRUE)
AliMpVPainter * DrawObject(TObject *object, Option_t *option="")
Not implemented.
void AddPainter(AliMpVPainter *painter)
Not implemented.
void SetPadPosition(const TVector2 &padPosition)
Set the position inside the graphics pad.
Definition: AliMpVPainter.h:47
TVector2 GetPadPosition() const
Return the position inside the graphics pad.
Definition: AliMpVPainter.h:37
virtual Int_t DistancetoPrimitive(Int_t x, Int_t y)
virtual TObject * DrawClone(Option_t *option) const
TList * fTrashList
list of painter object created
Definition: AliMpVPainter.h:83
virtual void Paint(Option_t *option)=0
Paint the associated object.
void InitGraphContext()
void DumpObject() const