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 ~TGraphNode() override;
44
45 void CreateGVNode(GVizAgraph_t *gv);
46 Int_t DistancetoPrimitive(Int_t px, Int_t py) override;
47 void ExecuteEvent(Int_t event, Int_t px, Int_t py) override;
48 void SetGVNode(GVizAgnode_t *gvn) {fGVNode = gvn;}
49 void SetTextAngle(Float_t) override {}
50 GVizAgnode_t *GetGVNode() {return fGVNode;}
51 void Layout();
52 void Paint(Option_t *option="") override;
53 void SavePrimitive(std::ostream &, Option_t *) override;
54 void SaveAttributes(std::ostream &);
55
56 ClassDefOverride(TGraphNode,2) //Graph node class
57};
58
59#endif
float Float_t
Definition RtypesCore.h:57
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
Option_t Option_t option
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
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to one event.
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
void SavePrimitive(std::ostream &, Option_t *) override
Save primitive as a C++ statement(s) on output stream out.
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Compute distance from point px,py to a node.
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.
void Paint(Option_t *option="") override
Paint this node with its current attributes.
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
void SetTextAngle(Float_t) override
Set the text angle.
Definition TGraphNode.h:49
void CreateGVNode(GVizAgraph_t *gv)
Create the GraphViz node into the GraphViz data structure gv.
void Layout()
Layout this node in the GraphViz space.
~TGraphNode() override
Graph Node default destructor.
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29