Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
23struct GVizAgraph_t;
24struct GVizAgnode_t;
25
26
27class TGraphNode : public TNamed, public TAttText, public TAttFill, public TAttLine {
28
29protected:
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
39public:
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
double Double_t
Definition RtypesCore.h:59
float Float_t
Definition RtypesCore.h:57
const char Option_t
Definition RtypesCore.h:66
#define ClassDef(name, id)
Definition Rtypes.h:325
char name[80]
Definition TGX11.cxx:110
Fill Area Attributes class.
Definition TAttFill.h:19
Line Attributes class.
Definition TAttLine.h:18
Text Attributes class.
Definition TAttText.h:18
A graph node object which can be added in a TGraphStruct.
Definition TGraphNode.h:27
GVizAgnode_t * fGVNode
Graphviz node.
Definition TGraphNode.h:33
Double_t fY
Node's center Y coordinate.
Definition TGraphNode.h:35
Double_t fW
Node width.
Definition TGraphNode.h:37
virtual void SetTextAngle(Float_t)
Set the text angle.
Definition TGraphNode.h:49
GVizAgnode_t * GetGVNode()
Definition TGraphNode.h:50
Double_t fH
Node height.
Definition TGraphNode.h:36
void SaveAttributes(std::ostream &)
Save attributes as a C++ statement(s) on output stream out called by TGraphStruct::SavePrimitive.
virtual void Paint(Option_t *option="")
Paint this node with its current attributes.
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a node.
virtual void SavePrimitive(std::ostream &, Option_t *)
Save primitive as a C++ statement(s) on output stream out.
Double_t fX
Node's center X coordinate.
Definition TGraphNode.h:34
TGraphNode()
Graph node default constructor.
void SetGVNode(GVizAgnode_t *gvn)
Definition TGraphNode.h:48
virtual ~TGraphNode()
Graph Node default destructor.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
void CreateGVNode(GVizAgraph_t *gv)
Create the GraphViz node into the GraphViz data structure gv.
void Layout()
Layout this node in the GraphViz space.
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29