TGraphNode.h

Go to the documentation of this file.
00001 // @(#)root/hist:$Id: TGraphNode.h 30204 2009-09-16 14:55:06Z couet $
00002 // Author: Olivier Couet 13/07/09
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TGraphNode
00013 #define ROOT_TGraphNode
00014 
00015 #ifndef ROOT_TNamed
00016 #include "TNamed.h"
00017 #endif
00018 
00019 #ifndef ROOT_TAttText
00020 #include "TAttText.h"
00021 #endif
00022 
00023 #ifndef ROOT_TAttFill
00024 #include "TAttFill.h"
00025 #endif
00026 
00027 #ifndef ROOT_TAttLine
00028 #include "TAttLine.h"
00029 #endif
00030 
00031 struct Agraph_t;
00032 struct Agnode_t;
00033 
00034 
00035 //////////////////////////////////////////////////////////////////////////
00036 //                                                                      //
00037 // TGraphNode                                                           //
00038 //                                                                      //
00039 // Interface to the graphviz package.                                   //
00040 //                                                                      //
00041 //////////////////////////////////////////////////////////////////////////
00042 
00043 
00044 class TGraphNode : public TNamed, public TAttText, public TAttFill, public TAttLine  {
00045 
00046 protected:
00047 
00048    Agnode_t *fGVNode; // Graphviz node
00049    Double_t fX;       // Node's center X coordinate
00050    Double_t fY;       // Node's center Y coordinate
00051    Double_t fH;       // Node height
00052    Double_t fW;       // Node width
00053 
00054 public:
00055 
00056    TGraphNode();
00057    TGraphNode(const char *name, const char *title="");
00058    virtual ~TGraphNode();
00059 
00060    void           CreateGVNode(Agraph_t *gv);
00061    virtual Int_t  DistancetoPrimitive(Int_t px, Int_t py);   
00062    virtual void   ExecuteEvent(Int_t event, Int_t px, Int_t py);
00063    void           SetGVNode(Agnode_t *gvn) {fGVNode = gvn;}  
00064    virtual void   SetTextAngle(Float_t) {;}
00065    Agnode_t      *GetGVNode() {return fGVNode;}
00066    void           Layout();
00067    virtual void   Paint(Option_t *option="");   
00068    virtual void   SavePrimitive(ostream &, Option_t *);                 
00069    void           SaveAttributes(ostream &);                 
00070 
00071    ClassDef(TGraphNode,1)  //Graph node class
00072 };
00073 
00074 #endif

Generated on Tue Jul 5 14:14:28 2011 for ROOT_528-00b_version by  doxygen 1.5.1