Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

LayoutStandards.h
Go to the documentation of this file.
1 
33 #pragma once
34 
35 #include <ogdf/basic/graphics.h>
36 
37 namespace ogdf {
38 
40 
44  static double s_defNodeWidth;
45  static double s_defNodeHeight;
49 
52 
55 
56  static double s_defNodeSeparation;
57  static double s_defCCSeparation;
58 
59 public:
64 
67  static double defaultNodeWidth() { return s_defNodeWidth; }
68 
70 
73  static void setDefaultNodeWidth(double w) {
74  if (w > 0.0) {
75  s_defNodeWidth = w;
76  }
77  }
78 
80  static double defaultNodeHeight() { return s_defNodeHeight; }
81 
83 
86  static void setDefaultNodeHeight(double h) {
87  if (h > 0.0) {
88  s_defNodeHeight = h;
89  }
90  }
91 
93  static Shape defaultNodeShape() { return s_defNodeShape; }
94 
96  static void setDefaultNodeShape(Shape s) { s_defNodeShape = s; }
97 
99  static Stroke defaultNodeStroke() { return s_defNodeStroke; }
100 
102  static Color defaultNodeStrokeColor() { return s_defNodeStroke.m_color; }
103 
105  static float defaultNodeStrokeWidth() { return s_defNodeStroke.m_width; }
106 
108  static void setDefaultNodeStroke(Stroke stroke) { s_defNodeStroke = stroke; }
109 
111  static Fill defaultNodeFill() { return s_defNodeFill; }
112 
114  static Color defaultNodeFillColor() { return s_defNodeFill.m_color; }
115 
117  static void setDefaultNodeFill(Fill fill) { s_defNodeFill = fill; }
118 
120 
124 
127  static Stroke defaultEdgeStroke() { return s_defEdgeStroke; }
128 
130  static Color defaultEdgeStrokeColor() { return s_defEdgeStroke.m_color; }
131 
133  static float defaultEdgeStrokeWidth() { return s_defEdgeStroke.m_width; }
134 
136  static void setDefaultEdgeStroke(Stroke stroke) { s_defEdgeStroke = stroke; }
137 
139  static EdgeArrow defaultEdgeArrow() { return s_defEdgeArrow; }
140 
142  static void setDefaultEdgeArrow(EdgeArrow arrow) { s_defEdgeArrow = arrow; }
143 
145 
149 
152  static Stroke defaultClusterStroke() { return s_defClusterStroke; }
153 
155  static Color defaultClusterStrokeColor() { return s_defClusterStroke.m_color; }
156 
158  static float defaultClusterStrokeWidth() { return s_defClusterStroke.m_width; }
159 
161  static void setDefaultClusterStroke(Stroke stroke) { s_defClusterStroke = stroke; }
162 
164  static Fill defaultClusterFill() { return s_defClusterFill; }
165 
167  static Color defaultClusterFillColor() { return s_defClusterFill.m_color; }
168 
170  static void setDefaultClusterFill(Fill fill) { s_defClusterFill = fill; }
171 
173 
177 
180  static double defaultNodeSeparation() { return s_defNodeSeparation; }
181 
183 
186  static void setDefaultNodeSeparation(double d) {
187  if (d > 0.0) {
188  s_defNodeSeparation = d;
189  }
190  }
191 
193  static double defaultCCSeparation() { return s_defCCSeparation; }
194 
196 
199  static void setDefaultCCSeparation(double d) {
200  if (d > 0.0) {
201  s_defCCSeparation = d;
202  }
203  }
204 
206 };
207 
208 }
ogdf::LayoutStandards::defaultClusterFill
static Fill defaultClusterFill()
Returns the global default fill for clusters.
Definition: LayoutStandards.h:164
ogdf::Color
Colors represented as RGBA values.
Definition: graphics.h:160
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::Fill
Properties of fills.
Definition: graphics.h:418
ogdf::LayoutStandards::setDefaultClusterFill
static void setDefaultClusterFill(Fill fill)
Sets the global default fill for clusters to fill.
Definition: LayoutStandards.h:170
ogdf::LayoutStandards::s_defNodeFill
static Fill s_defNodeFill
the default fill of a node.
Definition: LayoutStandards.h:48
graphics.h
Declaration of basic types for graphics.
ogdf::LayoutStandards::defaultNodeStrokeColor
static Color defaultNodeStrokeColor()
Returns the global default stroke color for nodes.
Definition: LayoutStandards.h:102
ogdf::LayoutStandards::s_defNodeShape
static Shape s_defNodeShape
the default shape of a node.
Definition: LayoutStandards.h:46
ogdf::LayoutStandards::defaultNodeFillColor
static Color defaultNodeFillColor()
Returns the global default fill color for nodes.
Definition: LayoutStandards.h:114
ogdf::LayoutStandards::defaultNodeFill
static Fill defaultNodeFill()
Returns the global default fill for nodes.
Definition: LayoutStandards.h:111
ogdf::LayoutStandards::setDefaultEdgeStroke
static void setDefaultEdgeStroke(Stroke stroke)
Sets the global default stroke for edges to stroke.
Definition: LayoutStandards.h:136
ogdf::LayoutStandards::defaultClusterStrokeColor
static Color defaultClusterStrokeColor()
Returns the global default stroke color for clusters.
Definition: LayoutStandards.h:155
ogdf::Stroke::m_color
Color m_color
stroke color
Definition: graphics.h:393
ogdf::LayoutStandards::setDefaultNodeHeight
static void setDefaultNodeHeight(double h)
Sets the global default height for nodes to h.
Definition: LayoutStandards.h:86
ogdf::LayoutStandards::defaultNodeHeight
static double defaultNodeHeight()
Returns the global default height for nodes.
Definition: LayoutStandards.h:80
ogdf::LayoutStandards::defaultClusterStrokeWidth
static float defaultClusterStrokeWidth()
Returns the global default stroke width for clusters.
Definition: LayoutStandards.h:158
ogdf::LayoutStandards::s_defNodeSeparation
static double s_defNodeSeparation
the default node separation (for layout algorithms) (must be positive).
Definition: LayoutStandards.h:56
ogdf::LayoutStandards::defaultNodeStrokeWidth
static float defaultNodeStrokeWidth()
Returns the global default stroke width for nodes.
Definition: LayoutStandards.h:105
ogdf::Stroke::m_width
float m_width
stroke width
Definition: graphics.h:394
ogdf::LayoutStandards::setDefaultNodeSeparation
static void setDefaultNodeSeparation(double d)
Sets the global default node separation to d.
Definition: LayoutStandards.h:186
ogdf::LayoutStandards::defaultClusterStroke
static Stroke defaultClusterStroke()
Returns the global default stroke for clusters.
Definition: LayoutStandards.h:152
ogdf::LayoutStandards::defaultCCSeparation
static double defaultCCSeparation()
Returns the global default separation between connected components.
Definition: LayoutStandards.h:193
ogdf::Stroke
Properties of strokes.
Definition: graphics.h:392
ogdf::LayoutStandards::s_defClusterStroke
static Stroke s_defClusterStroke
the default cluster stroke.
Definition: LayoutStandards.h:53
ogdf::LayoutStandards::setDefaultNodeShape
static void setDefaultNodeShape(Shape s)
Sets the global default shape for nodes to s.
Definition: LayoutStandards.h:96
ogdf::LayoutStandards::s_defClusterFill
static Fill s_defClusterFill
the default cluster fill.
Definition: LayoutStandards.h:54
ogdf::LayoutStandards::setDefaultNodeWidth
static void setDefaultNodeWidth(double w)
Sets the global default width for nodes to w.
Definition: LayoutStandards.h:73
ogdf::LayoutStandards
Standard values for graphical attributes and layouts.
Definition: LayoutStandards.h:43
ogdf::EdgeArrow
EdgeArrow
Types for edge arrows.
Definition: graphics.h:141
ogdf::LayoutStandards::defaultEdgeArrow
static EdgeArrow defaultEdgeArrow()
Returns the global default arrow type for edges.
Definition: LayoutStandards.h:139
ogdf::LayoutStandards::s_defNodeWidth
static double s_defNodeWidth
the default width of a node (must be positive).
Definition: LayoutStandards.h:44
ogdf::LayoutStandards::s_defNodeStroke
static Stroke s_defNodeStroke
the default stroke of a node.
Definition: LayoutStandards.h:47
ogdf::LayoutStandards::s_defCCSeparation
static double s_defCCSeparation
the default separation between connected components (for layout algorithms) (must be positive).
Definition: LayoutStandards.h:57
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::Fill::m_color
Color m_color
fill color
Definition: graphics.h:419
ogdf::Shape
Shape
Types for node shapes.
Definition: graphics.h:116
ogdf::LayoutStandards::setDefaultNodeFill
static void setDefaultNodeFill(Fill fill)
Sets the global default fill for nodes to fill.
Definition: LayoutStandards.h:117
ogdf::LayoutStandards::defaultEdgeStroke
static Stroke defaultEdgeStroke()
Returns the global default stroke for edges.
Definition: LayoutStandards.h:127
ogdf::LayoutStandards::setDefaultClusterStroke
static void setDefaultClusterStroke(Stroke stroke)
Sets the global default stroke for cluster to stroke.
Definition: LayoutStandards.h:161
ogdf::LayoutStandards::defaultNodeShape
static Shape defaultNodeShape()
Returns the global default shape for nodes.
Definition: LayoutStandards.h:93
ogdf::LayoutStandards::defaultEdgeStrokeWidth
static float defaultEdgeStrokeWidth()
Returns the global default stroke width for edges.
Definition: LayoutStandards.h:133
ogdf::LayoutStandards::defaultNodeStroke
static Stroke defaultNodeStroke()
Returns the global default stroke for nodes.
Definition: LayoutStandards.h:99
ogdf::LayoutStandards::s_defEdgeArrow
static EdgeArrow s_defEdgeArrow
the default arrow type of an edge .
Definition: LayoutStandards.h:51
ogdf::LayoutStandards::defaultNodeWidth
static double defaultNodeWidth()
Returns the global default width for nodes.
Definition: LayoutStandards.h:67
ogdf::LayoutStandards::setDefaultCCSeparation
static void setDefaultCCSeparation(double d)
Sets the global default separation between connected components to d.
Definition: LayoutStandards.h:199
ogdf::LayoutStandards::setDefaultNodeStroke
static void setDefaultNodeStroke(Stroke stroke)
Sets the global default stroke for nodes to stroke.
Definition: LayoutStandards.h:108
ogdf::LayoutStandards::defaultNodeSeparation
static double defaultNodeSeparation()
Returns the global default node separation.
Definition: LayoutStandards.h:180
ogdf::LayoutStandards::s_defNodeHeight
static double s_defNodeHeight
the default height of a node (must be positive).
Definition: LayoutStandards.h:45
ogdf::LayoutStandards::setDefaultEdgeArrow
static void setDefaultEdgeArrow(EdgeArrow arrow)
Sets the global default arrow type for edges to arrow.
Definition: LayoutStandards.h:142
ogdf::LayoutStandards::defaultClusterFillColor
static Color defaultClusterFillColor()
Returns the global default fill color for clusters.
Definition: LayoutStandards.h:167
ogdf::LayoutStandards::s_defEdgeStroke
static Stroke s_defEdgeStroke
the default stroke of an edge.
Definition: LayoutStandards.h:50
ogdf::LayoutStandards::defaultEdgeStrokeColor
static Color defaultEdgeStrokeColor()
Returns the global default stroke color for edges.
Definition: LayoutStandards.h:130