ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TMarker.h
Go to the documentation of this file.
1 // @(#)root/graf:$Id$
2 // Author: Rene Brun 12/05/95
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TMarker
13 #define ROOT_TMarker
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TMarker //
19 // //
20 // Marker. //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 
25 #ifndef ROOT_TAttMarker
26 #include "TAttMarker.h"
27 #endif
28 #ifndef ROOT_TNamed
29 #include "TNamed.h"
30 #endif
31 #ifndef ROOT_TAttBBox2D
32 #include "TAttBBox2D.h"
33 #endif
34 #ifndef ROOT_GuiTypes
35 #include "GuiTypes.h"
36 #endif
37 
38 class TPoint;
39 
40 class TMarker : public TObject, public TAttMarker, public TAttBBox2D {
41 
42 protected:
43  Double_t fX; //X position of marker (left,center,etc..)
44  Double_t fY; //Y position of marker (left,center,etc..)
45 
46 public:
47  // TMarker status bits
48  enum { kMarkerNDC = BIT(14) };
49 
50  TMarker();
51  TMarker(Double_t x, Double_t y, Int_t marker);
52  TMarker(const TMarker &marker);
53  virtual ~TMarker();
54 
55  void Copy(TObject &marker) const;
57  virtual void Draw(Option_t *option="");
58  virtual void DrawMarker(Double_t x, Double_t y);
59  virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
60  Double_t GetX() const {return fX;}
61  Double_t GetY() const {return fY;}
62  virtual void ls(Option_t *option="") const;
63  virtual void Paint(Option_t *option="");
64  virtual void PaintMarker(Double_t x, Double_t y);
65  virtual void PaintMarkerNDC(Double_t u, Double_t v);
66  virtual void Print(Option_t *option="") const;
67  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
68  virtual void SetNDC(Bool_t isNDC=kTRUE);
69  virtual void SetX(Double_t x) { fX = x;} // *MENU*
70  virtual void SetY(Double_t y) { fY = y;} // *MENU*
71 
72  virtual Rectangle_t GetBBox();
73  virtual TPoint GetBBoxCenter();
74  virtual void SetBBoxCenter(const TPoint &p);
75  virtual void SetBBoxCenterX(const Int_t x);
76  virtual void SetBBoxCenterY(const Int_t y);
77  virtual void SetBBoxX1(const Int_t x);
78  virtual void SetBBoxX2(const Int_t x);
79  virtual void SetBBoxY1(const Int_t y);
80  virtual void SetBBoxY2(const Int_t y);
81 
82  static void DisplayMarkerTypes();
83 
84  ClassDef(TMarker,3) //Marker
85 };
86 
87 #endif
88 
virtual void DrawMarker(Double_t x, Double_t y)
Draw this marker with new coordinates.
Definition: TMarker.cxx:148
virtual void SetX(Double_t x)
Definition: TMarker.h:69
virtual void SetNDC(Bool_t isNDC=kTRUE)
Set NDC mode on if isNDC = kTRUE, off otherwise.
Definition: TMarker.cxx:306
Double_t GetX() const
Definition: TMarker.h:60
ClassDef(TAttBBox2D, 0)
virtual void SetBBoxCenter(const TPoint &p)
Set center of the BoundingBox.
Definition: TMarker.cxx:366
const char Option_t
Definition: RtypesCore.h:62
virtual void SetBBoxCenterY(const Int_t y)
Set Y coordinate of the center of the BoundingBox.
Definition: TMarker.cxx:383
Double_t fX
Definition: TMarker.h:43
#define BIT(n)
Definition: Rtypes.h:120
virtual void Draw(Option_t *option="")
Draw this marker with its current attributes.
Definition: TMarker.cxx:139
virtual void SetBBoxX1(const Int_t x)
Set left hand side of BoundingBox to a value (resize in x direction on left)
Definition: TMarker.cxx:392
Manages Markers.
Definition: TMarker.h:40
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
Float_t py
Definition: hprod.C:33
virtual void SetBBoxCenterX(const Int_t x)
Set X coordinate of the center of the BoundingBox.
Definition: TMarker.cxx:375
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
Definition: TMarker.cxx:289
Marker Attributes class.
Definition: TAttMarker.h:32
Double_t GetY() const
Definition: TMarker.h:61
Double_t x[n]
Definition: legend1.C:17
static void DisplayMarkerTypes()
Display the table of markers with their numbers.
Definition: TMarker.cxx:85
virtual void PaintMarker(Double_t x, Double_t y)
Draw this marker with new coordinates.
Definition: TMarker.cxx:261
char * out
Definition: TBase64.cxx:29
Definition: TPoint.h:33
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
Definition: TMarker.cxx:164
virtual void PaintMarkerNDC(Double_t u, Double_t v)
Draw this marker with new coordinates in NDC.
Definition: TMarker.cxx:270
virtual void Paint(Option_t *option="")
Paint this marker with its current attributes.
Definition: TMarker.cxx:247
virtual void ls(Option_t *option="") const
List this marker with its attributes.
Definition: TMarker.cxx:238
void Copy(TObject &marker) const
Copy this marker to marker.
Definition: TMarker.cxx:74
SVector< double, 2 > v
Definition: Dict.h:5
virtual void SetBBoxX2(const Int_t x)
Set right hand side of BoundingBox to a value (resize in x direction on right)
Definition: TMarker.cxx:402
virtual Rectangle_t GetBBox()
Return the bounding Box of the Line.
Definition: TMarker.cxx:340
virtual void SetBBoxY1(const Int_t y)
Set top of BoundingBox to a value (resize in y direction on top)
Definition: TMarker.cxx:411
virtual ~TMarker()
Marker default destructor.
Definition: TMarker.cxx:57
virtual void Print(Option_t *option="") const
Dump this marker with its attributes.
Definition: TMarker.cxx:277
double Double_t
Definition: RtypesCore.h:55
Double_t y[n]
Definition: legend1.C:17
virtual void SetY(Double_t y)
Definition: TMarker.h:70
Mother of all ROOT objects.
Definition: TObject.h:58
Float_t px
Definition: hprod.C:33
Abstract base class for elements drawn in the editor.
Definition: TAttBBox2D.h:23
virtual void SetBBoxY2(const Int_t y)
Set bottom of BoundingBox to a value (resize in y direction on bottom)
Definition: TMarker.cxx:421
Double_t fY
Definition: TMarker.h:44
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a marker.
Definition: TMarker.cxx:117
const Bool_t kTRUE
Definition: Rtypes.h:91
virtual TPoint GetBBoxCenter()
Return the center of the BoundingBox as TPoint in pixels.
Definition: TMarker.cxx:355