ROOT logo
// @(#)root/hist:$Id$
// Author: Olivier Couet 13/07/09

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TGraphNode
#define ROOT_TGraphNode

#ifndef ROOT_TNamed
#include "TNamed.h"
#endif

#ifndef ROOT_TAttText
#include "TAttText.h"
#endif

#ifndef ROOT_TAttFill
#include "TAttFill.h"
#endif

#ifndef ROOT_TAttLine
#include "TAttLine.h"
#endif

struct GVizAgraph_t;
struct GVizAgnode_t;

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TGraphNode                                                           //
//                                                                      //
// Interface to the graphviz package.                                   //
//                                                                      //
//////////////////////////////////////////////////////////////////////////


class TGraphNode : public TNamed, public TAttText, public TAttFill, public TAttLine  {

protected:

   GVizAgnode_t *fGVNode; // Graphviz node
   Double_t fX;           // Node's center X coordinate
   Double_t fY;           // Node's center Y coordinate
   Double_t fH;           // Node height
   Double_t fW;           // Node width
   
public:

   TGraphNode();
   TGraphNode(const char *name, const char *title="");
   virtual ~TGraphNode();

   void           CreateGVNode(GVizAgraph_t *gv);
   virtual Int_t  DistancetoPrimitive(Int_t px, Int_t py);   
   virtual void   ExecuteEvent(Int_t event, Int_t px, Int_t py);
   void           SetGVNode(GVizAgnode_t *gvn) {fGVNode = gvn;}  
   virtual void   SetTextAngle(Float_t) {;}
   GVizAgnode_t  *GetGVNode() {return fGVNode;}
   void           Layout();
   virtual void   Paint(Option_t *option="");   
   virtual void   SavePrimitive(std::ostream &, Option_t *);
   void           SaveAttributes(std::ostream &);

   ClassDef(TGraphNode,2)  //Graph node class
};

#endif
 TGraphNode.h:1
 TGraphNode.h:2
 TGraphNode.h:3
 TGraphNode.h:4
 TGraphNode.h:5
 TGraphNode.h:6
 TGraphNode.h:7
 TGraphNode.h:8
 TGraphNode.h:9
 TGraphNode.h:10
 TGraphNode.h:11
 TGraphNode.h:12
 TGraphNode.h:13
 TGraphNode.h:14
 TGraphNode.h:15
 TGraphNode.h:16
 TGraphNode.h:17
 TGraphNode.h:18
 TGraphNode.h:19
 TGraphNode.h:20
 TGraphNode.h:21
 TGraphNode.h:22
 TGraphNode.h:23
 TGraphNode.h:24
 TGraphNode.h:25
 TGraphNode.h:26
 TGraphNode.h:27
 TGraphNode.h:28
 TGraphNode.h:29
 TGraphNode.h:30
 TGraphNode.h:31
 TGraphNode.h:32
 TGraphNode.h:33
 TGraphNode.h:34
 TGraphNode.h:35
 TGraphNode.h:36
 TGraphNode.h:37
 TGraphNode.h:38
 TGraphNode.h:39
 TGraphNode.h:40
 TGraphNode.h:41
 TGraphNode.h:42
 TGraphNode.h:43
 TGraphNode.h:44
 TGraphNode.h:45
 TGraphNode.h:46
 TGraphNode.h:47
 TGraphNode.h:48
 TGraphNode.h:49
 TGraphNode.h:50
 TGraphNode.h:51
 TGraphNode.h:52
 TGraphNode.h:53
 TGraphNode.h:54
 TGraphNode.h:55
 TGraphNode.h:56
 TGraphNode.h:57
 TGraphNode.h:58
 TGraphNode.h:59
 TGraphNode.h:60
 TGraphNode.h:61
 TGraphNode.h:62
 TGraphNode.h:63
 TGraphNode.h:64
 TGraphNode.h:65
 TGraphNode.h:66
 TGraphNode.h:67
 TGraphNode.h:68
 TGraphNode.h:69
 TGraphNode.h:70
 TGraphNode.h:71
 TGraphNode.h:72
 TGraphNode.h:73