Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TGraphNode.h
Go to the documentation of this file.
1 // @(#)root/hist:$Id$
2 // Author: Olivier Couet 13/07/09
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_TGraphNode
13 #define ROOT_TGraphNode
14 
15 #include "TNamed.h"
16 
17 #include "TAttText.h"
18 
19 #include "TAttFill.h"
20 
21 #include "TAttLine.h"
22 
23 struct GVizAgraph_t;
24 struct GVizAgnode_t;
25 
26 
27 class TGraphNode : public TNamed, public TAttText, public TAttFill, public TAttLine {
28 
29 protected:
30 
31 
32 
33  GVizAgnode_t *fGVNode; ///< Graphviz node
34  Double_t fX; ///< Node's center X coordinate
35  Double_t fY; ///< Node's center Y coordinate
36  Double_t fH; ///< Node height
37  Double_t fW; ///< Node width
38 
39 public:
40 
41  TGraphNode();
42  TGraphNode(const char *name, const char *title="");
43  virtual ~TGraphNode();
44 
45  void CreateGVNode(GVizAgraph_t *gv);
46  virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
47  virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
48  void SetGVNode(GVizAgnode_t *gvn) {fGVNode = gvn;}
49  virtual void SetTextAngle(Float_t) {;}
50  GVizAgnode_t *GetGVNode() {return fGVNode;}
51  void Layout();
52  virtual void Paint(Option_t *option="");
53  virtual void SavePrimitive(std::ostream &, Option_t *);
54  void SaveAttributes(std::ostream &);
55 
56  ClassDef(TGraphNode,2) //Graph node class
57 };
58 
59 #endif