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/basic.h>
36 #include <ogdf/basic/graphics.h>
37 
38 namespace ogdf {
39 
41 
45  static double s_defNodeWidth;
46  static double s_defNodeHeight;
50 
53 
56 
57  static double s_defNodeSeparation;
58  static double s_defCCSeparation;
59 
60 public:
65 
68  static double defaultNodeWidth() { return s_defNodeWidth; }
69 
71 
74  static void setDefaultNodeWidth(double w) {
75  if (w > 0.0) {
76  s_defNodeWidth = w;
77  }
78  }
79 
81  static double defaultNodeHeight() { return s_defNodeHeight; }
82 
84 
87  static void setDefaultNodeHeight(double h) {
88  if (h > 0.0) {
89  s_defNodeHeight = h;
90  }
91  }
92 
94  static Shape defaultNodeShape() { return s_defNodeShape; }
95 
97  static void setDefaultNodeShape(Shape s) { s_defNodeShape = s; }
98 
100  static Stroke defaultNodeStroke() { return s_defNodeStroke; }
101 
103  static Color defaultNodeStrokeColor() { return s_defNodeStroke.m_color; }
104 
106  static float defaultNodeStrokeWidth() { return s_defNodeStroke.m_width; }
107 
109  static void setDefaultNodeStroke(Stroke stroke) { s_defNodeStroke = stroke; }
110 
112  static Fill defaultNodeFill() { return s_defNodeFill; }
113 
115  static Color defaultNodeFillColor() { return s_defNodeFill.m_color; }
116 
118  static void setDefaultNodeFill(Fill fill) { s_defNodeFill = fill; }
119 
121 
125 
128  static Stroke defaultEdgeStroke() { return s_defEdgeStroke; }
129 
131  static Color defaultEdgeStrokeColor() { return s_defEdgeStroke.m_color; }
132 
134  static float defaultEdgeStrokeWidth() { return s_defEdgeStroke.m_width; }
135 
137  static void setDefaultEdgeStroke(Stroke stroke) { s_defEdgeStroke = stroke; }
138 
140  static EdgeArrow defaultEdgeArrow() { return s_defEdgeArrow; }
141 
143  static void setDefaultEdgeArrow(EdgeArrow arrow) { s_defEdgeArrow = arrow; }
144 
146 
150 
153  static Stroke defaultClusterStroke() { return s_defClusterStroke; }
154 
156  static Color defaultClusterStrokeColor() { return s_defClusterStroke.m_color; }
157 
159  static float defaultClusterStrokeWidth() { return s_defClusterStroke.m_width; }
160 
162  static void setDefaultClusterStroke(Stroke stroke) { s_defClusterStroke = stroke; }
163 
165  static Fill defaultClusterFill() { return s_defClusterFill; }
166 
168  static Color defaultClusterFillColor() { return s_defClusterFill.m_color; }
169 
171  static void setDefaultClusterFill(Fill fill) { s_defClusterFill = fill; }
172 
174 
178 
181  static double defaultNodeSeparation() { return s_defNodeSeparation; }
182 
184 
187  static void setDefaultNodeSeparation(double d) {
188  if (d > 0.0) {
189  s_defNodeSeparation = d;
190  }
191  }
192 
194  static double defaultCCSeparation() { return s_defCCSeparation; }
195 
197 
200  static void setDefaultCCSeparation(double d) {
201  if (d > 0.0) {
202  s_defCCSeparation = d;
203  }
204  }
205 
207 };
208 
209 }
ogdf::LayoutStandards::defaultClusterFill
static Fill defaultClusterFill()
Returns the global default fill for clusters.
Definition: LayoutStandards.h:165
ogdf::Color
Colors represented as RGBA values.
Definition: graphics.h:164
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
ogdf::Fill
Properties of fills.
Definition: graphics.h:422
ogdf::LayoutStandards::setDefaultClusterFill
static void setDefaultClusterFill(Fill fill)
Sets the global default fill for clusters to fill.
Definition: LayoutStandards.h:171
ogdf::LayoutStandards::s_defNodeFill
static Fill s_defNodeFill
the default fill of a node.
Definition: LayoutStandards.h:49
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:103
ogdf::LayoutStandards::s_defNodeShape
static Shape s_defNodeShape
the default shape of a node.
Definition: LayoutStandards.h:47
ogdf::LayoutStandards::defaultNodeFillColor
static Color defaultNodeFillColor()
Returns the global default fill color for nodes.
Definition: LayoutStandards.h:115
ogdf::LayoutStandards::defaultNodeFill
static Fill defaultNodeFill()
Returns the global default fill for nodes.
Definition: LayoutStandards.h:112
ogdf::LayoutStandards::setDefaultEdgeStroke
static void setDefaultEdgeStroke(Stroke stroke)
Sets the global default stroke for edges to stroke.
Definition: LayoutStandards.h:137
ogdf::LayoutStandards::defaultClusterStrokeColor
static Color defaultClusterStrokeColor()
Returns the global default stroke color for clusters.
Definition: LayoutStandards.h:156
ogdf::Stroke::m_color
Color m_color
stroke color
Definition: graphics.h:397
ogdf::LayoutStandards::setDefaultNodeHeight
static void setDefaultNodeHeight(double h)
Sets the global default height for nodes to h.
Definition: LayoutStandards.h:87
ogdf::LayoutStandards::defaultNodeHeight
static double defaultNodeHeight()
Returns the global default height for nodes.
Definition: LayoutStandards.h:81
ogdf::LayoutStandards::defaultClusterStrokeWidth
static float defaultClusterStrokeWidth()
Returns the global default stroke width for clusters.
Definition: LayoutStandards.h:159
ogdf::LayoutStandards::s_defNodeSeparation
static double s_defNodeSeparation
the default node separation (for layout algorithms) (must be positive).
Definition: LayoutStandards.h:57
ogdf::LayoutStandards::defaultNodeStrokeWidth
static float defaultNodeStrokeWidth()
Returns the global default stroke width for nodes.
Definition: LayoutStandards.h:106
ogdf::Stroke::m_width
float m_width
stroke width
Definition: graphics.h:398
ogdf::LayoutStandards::setDefaultNodeSeparation
static void setDefaultNodeSeparation(double d)
Sets the global default node separation to d.
Definition: LayoutStandards.h:187
ogdf::LayoutStandards::defaultClusterStroke
static Stroke defaultClusterStroke()
Returns the global default stroke for clusters.
Definition: LayoutStandards.h:153
ogdf::LayoutStandards::defaultCCSeparation
static double defaultCCSeparation()
Returns the global default separation between connected components.
Definition: LayoutStandards.h:194
ogdf::Stroke
Properties of strokes.
Definition: graphics.h:396
ogdf::LayoutStandards::s_defClusterStroke
static Stroke s_defClusterStroke
the default cluster stroke.
Definition: LayoutStandards.h:54
ogdf::LayoutStandards::setDefaultNodeShape
static void setDefaultNodeShape(Shape s)
Sets the global default shape for nodes to s.
Definition: LayoutStandards.h:97
ogdf::LayoutStandards::s_defClusterFill
static Fill s_defClusterFill
the default cluster fill.
Definition: LayoutStandards.h:55
ogdf::LayoutStandards::setDefaultNodeWidth
static void setDefaultNodeWidth(double w)
Sets the global default width for nodes to w.
Definition: LayoutStandards.h:74
ogdf::LayoutStandards
Standard values for graphical attributes and layouts.
Definition: LayoutStandards.h:44
ogdf::EdgeArrow
EdgeArrow
Types for edge arrows.
Definition: graphics.h:145
ogdf::LayoutStandards::defaultEdgeArrow
static EdgeArrow defaultEdgeArrow()
Returns the global default arrow type for edges.
Definition: LayoutStandards.h:140
ogdf::LayoutStandards::s_defNodeWidth
static double s_defNodeWidth
the default width of a node (must be positive).
Definition: LayoutStandards.h:45
ogdf::LayoutStandards::s_defNodeStroke
static Stroke s_defNodeStroke
the default stroke of a node.
Definition: LayoutStandards.h:48
ogdf::LayoutStandards::s_defCCSeparation
static double s_defCCSeparation
the default separation between connected components (for layout algorithms) (must be positive).
Definition: LayoutStandards.h:58
basic.h
Basic declarations, included by all source files.
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:423
ogdf::Shape
Shape
Types for node shapes.
Definition: graphics.h:120
ogdf::LayoutStandards::setDefaultNodeFill
static void setDefaultNodeFill(Fill fill)
Sets the global default fill for nodes to fill.
Definition: LayoutStandards.h:118
ogdf::LayoutStandards::defaultEdgeStroke
static Stroke defaultEdgeStroke()
Returns the global default stroke for edges.
Definition: LayoutStandards.h:128
ogdf::LayoutStandards::setDefaultClusterStroke
static void setDefaultClusterStroke(Stroke stroke)
Sets the global default stroke for cluster to stroke.
Definition: LayoutStandards.h:162
ogdf::LayoutStandards::defaultNodeShape
static Shape defaultNodeShape()
Returns the global default shape for nodes.
Definition: LayoutStandards.h:94
ogdf::LayoutStandards::defaultEdgeStrokeWidth
static float defaultEdgeStrokeWidth()
Returns the global default stroke width for edges.
Definition: LayoutStandards.h:134
ogdf::LayoutStandards::defaultNodeStroke
static Stroke defaultNodeStroke()
Returns the global default stroke for nodes.
Definition: LayoutStandards.h:100
ogdf::LayoutStandards::s_defEdgeArrow
static EdgeArrow s_defEdgeArrow
the default arrow type of an edge .
Definition: LayoutStandards.h:52
ogdf::LayoutStandards::defaultNodeWidth
static double defaultNodeWidth()
Returns the global default width for nodes.
Definition: LayoutStandards.h:68
ogdf::LayoutStandards::setDefaultCCSeparation
static void setDefaultCCSeparation(double d)
Sets the global default separation between connected components to d.
Definition: LayoutStandards.h:200
ogdf::LayoutStandards::setDefaultNodeStroke
static void setDefaultNodeStroke(Stroke stroke)
Sets the global default stroke for nodes to stroke.
Definition: LayoutStandards.h:109
ogdf::LayoutStandards::defaultNodeSeparation
static double defaultNodeSeparation()
Returns the global default node separation.
Definition: LayoutStandards.h:181
ogdf::LayoutStandards::s_defNodeHeight
static double s_defNodeHeight
the default height of a node (must be positive).
Definition: LayoutStandards.h:46
ogdf::LayoutStandards::setDefaultEdgeArrow
static void setDefaultEdgeArrow(EdgeArrow arrow)
Sets the global default arrow type for edges to arrow.
Definition: LayoutStandards.h:143
ogdf::LayoutStandards::defaultClusterFillColor
static Color defaultClusterFillColor()
Returns the global default fill color for clusters.
Definition: LayoutStandards.h:168
ogdf::LayoutStandards::s_defEdgeStroke
static Stroke s_defEdgeStroke
the default stroke of an edge.
Definition: LayoutStandards.h:51
ogdf::LayoutStandards::defaultEdgeStrokeColor
static Color defaultEdgeStrokeColor()
Returns the global default stroke color for edges.
Definition: LayoutStandards.h:131