mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 16:53:02 +00:00
(enum color): Renamed from enum color_e.
(enum textmode): Renamed from enum textmode_e. (enum shape): Renamed from enum shape_e. (struct colorentry): Renamed from struct colorentry_s. (struct classname): Renamed from struct classname_s. (struct infoname): Renamed from struct infoname_s. (enum layoutalgorithm): Renamed from enum layoutalgorithm_e. (enum decision): Renamed from enum decision_e. (enum orientation): Renamed from enum orientation_e. (enum alignment): Renamed from enum alignment_e. (enum arrow_mode): Renamed form enum arrow_mode_e. (enum crossing_type): Renamed from enum crossing_type_e. (enum view): Renamed from enum view_e. (struct node): Renamed from struct node_s. (node): Renamed from node_t. (enum linestyle): Renamed from enum linestyle_e. (enum arrowstyle): Renamed from enum arrowstyle_e. (struct edge): Renamed from struct edge. (edge): Renamed from edge_t. (struct graph): Renamed from struct graph_s. (graph): Renamed from graph_t. (struct node_s.expand): Renamed from struct node_s.stretch. (struct graph_s.expand): Renamed from struct graph_s.stretch. (enum_alignment_e): Renamed from enum_alignement_e.
This commit is contained in:
201
src/vcg.h
201
src/vcg.h
@@ -1,5 +1,6 @@
|
|||||||
/* VCG description handler for Bison.
|
/* VCG description handler for Bison.
|
||||||
Copyright 2001 Free Software Foundation, Inc.
|
|
||||||
|
Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of Bison, the GNU Compiler Compiler.
|
This file is part of Bison, the GNU Compiler Compiler.
|
||||||
|
|
||||||
@@ -22,7 +23,7 @@
|
|||||||
# define VCG_H_
|
# define VCG_H_
|
||||||
|
|
||||||
/* VCG color map. The 32 prime predefined colors. */
|
/* VCG color map. The 32 prime predefined colors. */
|
||||||
enum color_e
|
enum color
|
||||||
{
|
{
|
||||||
white = 0,
|
white = 0,
|
||||||
blue,
|
blue,
|
||||||
@@ -59,7 +60,7 @@ enum color_e
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* VCG textmode. Specify the adjustement of the text within the border of a summary node. */
|
/* VCG textmode. Specify the adjustement of the text within the border of a summary node. */
|
||||||
enum textmode_e
|
enum textmode
|
||||||
{
|
{
|
||||||
centered,
|
centered,
|
||||||
left_justify,
|
left_justify,
|
||||||
@@ -67,7 +68,7 @@ enum textmode_e
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* VCG shapes. Used for nodes shapes. */
|
/* VCG shapes. Used for nodes shapes. */
|
||||||
enum shape_e
|
enum shape
|
||||||
{
|
{
|
||||||
box,
|
box,
|
||||||
rhomb,
|
rhomb,
|
||||||
@@ -76,34 +77,34 @@ enum shape_e
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* Structure for colorentries. */
|
/* Structure for colorentries. */
|
||||||
struct colorentry_s
|
struct colorentry
|
||||||
{
|
{
|
||||||
int color_index;
|
int color_index;
|
||||||
int red_cp;
|
int red_cp;
|
||||||
int green_cp;
|
int green_cp;
|
||||||
int blue_cp;
|
int blue_cp;
|
||||||
struct colorentry_s *next;
|
struct colorentry *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Structure to construct lists of classnames. */
|
/* Structure to construct lists of classnames. */
|
||||||
struct classname_s
|
struct classname
|
||||||
{
|
{
|
||||||
int no; /* Class number */
|
int no; /* Class number */
|
||||||
const char *name; /* Name associated to the class no. */
|
const char *name; /* Name associated to the class no. */
|
||||||
struct classname_s *next; /* next name class association. */
|
struct classname *next; /* next name class association. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Structure is in infoname. */
|
/* Structure is in infoname. */
|
||||||
struct infoname_s
|
struct infoname
|
||||||
{
|
{
|
||||||
int integer;
|
int integer;
|
||||||
const char *string;
|
char const *chars;
|
||||||
struct infoname_s *next;
|
struct infoname *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Layout Algorithms which can be found in VCG.
|
/* Layout Algorithms which can be found in VCG.
|
||||||
Details about each algoithm can be found below. */
|
Details about each algoithm can be found below. */
|
||||||
enum layoutalgorithm_e
|
enum layoutalgorithm
|
||||||
{
|
{
|
||||||
normal,
|
normal,
|
||||||
maxdepth,
|
maxdepth,
|
||||||
@@ -122,14 +123,14 @@ enum layoutalgorithm_e
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* VCG decision yes/no. */
|
/* VCG decision yes/no. */
|
||||||
enum decision_e
|
enum decision
|
||||||
{
|
{
|
||||||
yes,
|
yes,
|
||||||
no
|
no
|
||||||
};
|
};
|
||||||
|
|
||||||
/* VCG graph orientation. */
|
/* VCG graph orientation. */
|
||||||
enum orientation_e
|
enum orientation
|
||||||
{
|
{
|
||||||
top_to_bottom,
|
top_to_bottom,
|
||||||
bottom_to_top,
|
bottom_to_top,
|
||||||
@@ -137,8 +138,8 @@ enum orientation_e
|
|||||||
right_to_left
|
right_to_left
|
||||||
};
|
};
|
||||||
|
|
||||||
/* VCG alignement for node alignement. */
|
/* VCG alignment for node alignement. */
|
||||||
enum alignement_e
|
enum alignment
|
||||||
{
|
{
|
||||||
center,
|
center,
|
||||||
top,
|
top,
|
||||||
@@ -146,14 +147,14 @@ enum alignement_e
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* VCG arrow mode. */
|
/* VCG arrow mode. */
|
||||||
enum arrow_mode_e
|
enum arrow_mode
|
||||||
{
|
{
|
||||||
fixed,
|
fixed,
|
||||||
free_a
|
free_a
|
||||||
};
|
};
|
||||||
|
|
||||||
/* VCG crossing weight type. */
|
/* VCG crossing weight type. */
|
||||||
enum crossing_type_e
|
enum crossing_type
|
||||||
{
|
{
|
||||||
bary,
|
bary,
|
||||||
median,
|
median,
|
||||||
@@ -162,7 +163,7 @@ enum crossing_type_e
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* VCG views. */
|
/* VCG views. */
|
||||||
enum view_e
|
enum view
|
||||||
{
|
{
|
||||||
normal_view,
|
normal_view,
|
||||||
cfish,
|
cfish,
|
||||||
@@ -175,7 +176,7 @@ enum view_e
|
|||||||
| Node attributs list. structure that describes a node. |
|
| Node attributs list. structure that describes a node. |
|
||||||
`------------------------------------------------------*/
|
`------------------------------------------------------*/
|
||||||
|
|
||||||
struct node_s
|
struct node
|
||||||
{
|
{
|
||||||
/* Title the unique string identifying the node. This attribute is
|
/* Title the unique string identifying the node. This attribute is
|
||||||
mandatory. */
|
mandatory. */
|
||||||
@@ -231,18 +232,18 @@ struct node_s
|
|||||||
int width;
|
int width;
|
||||||
int height;
|
int height;
|
||||||
|
|
||||||
/* shrink, stretch gives the shrinking and stretching factor of the
|
/* shrink, expand gives the shrinking and expanding factor of the
|
||||||
node. The values of the attributes width, height, borderwidth and
|
node. The values of the attributes width, height, borderwidth and
|
||||||
the size of the label text is scaled by ((stretch=shrink) \Lambda
|
the size of the label text is scaled by ((expand=shrink) \Lambda
|
||||||
100) percent. Note that the actual scale value is determined by the
|
100) percent. Note that the actual scale value is determined by the
|
||||||
scale value of a node relatively to a scale value of the graph,
|
scale value of a node relatively to a scale value of the graph,
|
||||||
i.e. if (stretch,shrink) = (2,1) for the graph and (stretch,shrink)
|
i.e. if (expand,shrink) = (2,1) for the graph and (expand,shrink)
|
||||||
= (2,1) for the node of the graph, then the node is scaled by the
|
= (2,1) for the node of the graph, then the node is scaled by the
|
||||||
factor 4 compared to the normal size. The scale value can also be
|
factor 4 compared to the normal size. The scale value can also be
|
||||||
specified by scaling: float.
|
specified by scaling: float.
|
||||||
Default are 1,1. */
|
Default are 1,1. */
|
||||||
int shrink;
|
int shrink;
|
||||||
int stretch;
|
int expand;
|
||||||
|
|
||||||
/* folding specifies the default folding of the nodes. The folding k
|
/* folding specifies the default folding of the nodes. The folding k
|
||||||
(with k ? 0) means that the graph part that is reachable via edges
|
(with k ? 0) means that the graph part that is reachable via edges
|
||||||
@@ -268,12 +269,12 @@ struct node_s
|
|||||||
and triangle. The drawing of ellipses is much slower than the drawing
|
and triangle. The drawing of ellipses is much slower than the drawing
|
||||||
of the other shapes.
|
of the other shapes.
|
||||||
Default is box. */
|
Default is box. */
|
||||||
enum shape_e shape;
|
enum shape shape;
|
||||||
|
|
||||||
/* textmode specifies the adjustment of the text within the border of a
|
/* textmode specifies the adjustment of the text within the border of a
|
||||||
node. The possibilities are center, left.justify and right.justify.
|
node. The possibilities are center, left.justify and right.justify.
|
||||||
Default is center. */
|
Default is center. */
|
||||||
enum textmode_e textmode;
|
enum textmode textmode;
|
||||||
|
|
||||||
/* borderwidth specifies the thickness of the node's border in pixels.
|
/* borderwidth specifies the thickness of the node's border in pixels.
|
||||||
color is the background color of the node. If none is given, the
|
color is the background color of the node. If none is given, the
|
||||||
@@ -284,13 +285,13 @@ struct node_s
|
|||||||
|
|
||||||
/* node color.
|
/* node color.
|
||||||
Default is white or transparent, */
|
Default is white or transparent, */
|
||||||
enum color_e color;
|
enum color color;
|
||||||
|
|
||||||
/* textcolor is the color for the label text. bordercolor is the color
|
/* textcolor is the color for the label text. bordercolor is the color
|
||||||
of the border. Default color is the textcolor. info1, info2, info3
|
of the border. Default color is the textcolor. info1, info2, info3
|
||||||
combines additional text labels with a node or a folded graph. info1,
|
combines additional text labels with a node or a folded graph. info1,
|
||||||
Default is black. */
|
Default is black. */
|
||||||
enum color_e textcolor;
|
enum color textcolor;
|
||||||
|
|
||||||
/* info2, info3 can be selected from the menu. The corresponding text
|
/* info2, info3 can be selected from the menu. The corresponding text
|
||||||
labels can be shown by mouse clicks on nodes.
|
labels can be shown by mouse clicks on nodes.
|
||||||
@@ -299,14 +300,14 @@ struct node_s
|
|||||||
|
|
||||||
/* Node border color.
|
/* Node border color.
|
||||||
Default is textcolor. */
|
Default is textcolor. */
|
||||||
enum color_e bordercolor;
|
enum color bordercolor;
|
||||||
|
|
||||||
/* Next node node... */
|
/* Next node node... */
|
||||||
struct node_s *next;
|
struct node *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* typedef alias. */
|
/* typedef alias. */
|
||||||
typedef struct node_s node_t;
|
typedef struct node node;
|
||||||
|
|
||||||
/*-------------------------------------------------------.
|
/*-------------------------------------------------------.
|
||||||
| Edge attributs list. Structure that describes an edge. |
|
| Edge attributs list. Structure that describes an edge. |
|
||||||
@@ -322,7 +323,7 @@ enum edge_type
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* Structs enum definitions for edges. */
|
/* Structs enum definitions for edges. */
|
||||||
enum linestyle_e
|
enum linestyle
|
||||||
{
|
{
|
||||||
continuous,
|
continuous,
|
||||||
dashed,
|
dashed,
|
||||||
@@ -330,15 +331,15 @@ enum linestyle_e
|
|||||||
invisible
|
invisible
|
||||||
};
|
};
|
||||||
|
|
||||||
enum arrowstyle_e
|
enum arrowstyle
|
||||||
{
|
{
|
||||||
solid,
|
solid,
|
||||||
line,
|
line,
|
||||||
none
|
none
|
||||||
};
|
};
|
||||||
|
|
||||||
/* The struct edge_s itself. */
|
/* The struct edge itself. */
|
||||||
struct edge_s
|
struct edge
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Edge type.
|
/* Edge type.
|
||||||
@@ -365,7 +366,7 @@ struct edge_s
|
|||||||
drawn. The attributes of its shape (color, thickness) are ignored.
|
drawn. The attributes of its shape (color, thickness) are ignored.
|
||||||
To draw a dashed or dotted line needs more time than solid lines.
|
To draw a dashed or dotted line needs more time than solid lines.
|
||||||
Default is continuous. */
|
Default is continuous. */
|
||||||
enum linestyle_e linestyle;
|
enum linestyle linestyle;
|
||||||
|
|
||||||
/* Thickness is the thickness of an edge.
|
/* Thickness is the thickness of an edge.
|
||||||
Default is 2. */
|
Default is 2. */
|
||||||
@@ -379,7 +380,7 @@ struct edge_s
|
|||||||
|
|
||||||
/* color is the color of the edge.
|
/* color is the color of the edge.
|
||||||
Default is black. */
|
Default is black. */
|
||||||
enum color_e color;
|
enum color color;
|
||||||
|
|
||||||
/* textcolor is the color of the label of the edge. arrowcolor,
|
/* textcolor is the color of the label of the edge. arrowcolor,
|
||||||
backarrowcolor is the color of the arrow head and of the backarrow
|
backarrowcolor is the color of the arrow head and of the backarrow
|
||||||
@@ -388,15 +389,15 @@ struct edge_s
|
|||||||
of edges that pull a node into its position. The priority of an edges
|
of edges that pull a node into its position. The priority of an edges
|
||||||
corresponds to the strength of the rubberband.
|
corresponds to the strength of the rubberband.
|
||||||
Default is color. */
|
Default is color. */
|
||||||
enum color_e textcolor;
|
enum color textcolor;
|
||||||
|
|
||||||
/* Arrow color.
|
/* Arrow color.
|
||||||
Default is color. */
|
Default is color. */
|
||||||
enum color_e arrowcolor;
|
enum color arrowcolor;
|
||||||
|
|
||||||
/* BackArrow color.
|
/* BackArrow color.
|
||||||
Default is color. */
|
Default is color. */
|
||||||
enum color_e backarrowcolor;
|
enum color backarrowcolor;
|
||||||
|
|
||||||
/* arrowsize, backarrowsize The arrow head is a right-angled, isosceles
|
/* arrowsize, backarrowsize The arrow head is a right-angled, isosceles
|
||||||
triangle and the cathetuses have length arrowsize.
|
triangle and the cathetuses have length arrowsize.
|
||||||
@@ -415,10 +416,10 @@ struct edge_s
|
|||||||
backarrowstyle is the style of the backarrow head. Styles are none,
|
backarrowstyle is the style of the backarrow head. Styles are none,
|
||||||
i.e. no arrow head, solid, and line.
|
i.e. no arrow head, solid, and line.
|
||||||
Default is solid. */
|
Default is solid. */
|
||||||
enum arrowstyle_e arrowstyle;
|
enum arrowstyle arrowstyle;
|
||||||
|
|
||||||
/* Default is none. */
|
/* Default is none. */
|
||||||
enum arrowstyle_e backarrowstyle;
|
enum arrowstyle backarrowstyle;
|
||||||
|
|
||||||
/* Default is 1. */
|
/* Default is 1. */
|
||||||
int priority;
|
int priority;
|
||||||
@@ -448,20 +449,20 @@ struct edge_s
|
|||||||
/*
|
/*
|
||||||
** Next edge node...
|
** Next edge node...
|
||||||
*/
|
*/
|
||||||
struct edge_s *next;
|
struct edge *next;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** typedef alias.
|
** typedef alias.
|
||||||
*/
|
*/
|
||||||
typedef struct edge_s edge_t;
|
typedef struct edge edge;
|
||||||
|
|
||||||
/*--------------------------------------------------------.
|
/*--------------------------------------------------------.
|
||||||
| Graph attributs list. Structure that describes a graph. |
|
| Graph attributs list. Structure that describes a graph. |
|
||||||
`--------------------------------------------------------*/
|
`--------------------------------------------------------*/
|
||||||
|
|
||||||
struct graph_s
|
struct graph
|
||||||
{
|
{
|
||||||
/* Graph title or name.
|
/* Graph title or name.
|
||||||
Title specifies the name (a string) associated with the graph. The
|
Title specifies the name (a string) associated with the graph. The
|
||||||
@@ -501,19 +502,19 @@ struct graph_s
|
|||||||
index 2, green has index 3, etc.
|
index 2, green has index 3, etc.
|
||||||
Default is white for background and white or transparent for summary
|
Default is white for background and white or transparent for summary
|
||||||
nodes. */
|
nodes. */
|
||||||
enum color_e color;
|
enum color color;
|
||||||
|
|
||||||
/* Textcolor.
|
/* Textcolor.
|
||||||
need explainations ???
|
need explainations ???
|
||||||
defalut is black for summary nodes. */
|
defalut is black for summary nodes. */
|
||||||
enum color_e textcolor;
|
enum color textcolor;
|
||||||
|
|
||||||
/* Bordercolor is the color of the summary node's border. Default color
|
/* Bordercolor is the color of the summary node's border. Default color
|
||||||
is the textcolor. width, height are width and height of the
|
is the textcolor. width, height are width and height of the
|
||||||
displayed part of the window of the outermost graph in pixels, or
|
displayed part of the window of the outermost graph in pixels, or
|
||||||
width and height of the summary node of inner subgraphs.
|
width and height of the summary node of inner subgraphs.
|
||||||
Default is the defalut of the textcolor. */
|
Default is the defalut of the textcolor. */
|
||||||
enum color_e bordercolor;
|
enum color bordercolor;
|
||||||
|
|
||||||
/* Width, height are width and height of the displayed part of the
|
/* Width, height are width and height of the displayed part of the
|
||||||
window of the outermost graph in pixels, or width and height of the
|
window of the outermost graph in pixels, or width and height of the
|
||||||
@@ -541,22 +542,22 @@ struct graph_s
|
|||||||
Defalut value is 0 */
|
Defalut value is 0 */
|
||||||
int folding;
|
int folding;
|
||||||
|
|
||||||
/* Shrink, stretch gives the shrinking and stretching factor for the
|
/* Shrink, expand gives the shrinking and expanding factor for the
|
||||||
graph's representation (default is 1, 1). ((stretch=shrink) \Lambda
|
graph's representation (default is 1, 1). ((expand=shrink) \Lambda
|
||||||
100) is the scaling of the graph in percentage, e.g.,
|
100) is the scaling of the graph in percentage, e.g.,
|
||||||
(stretch,shrink) = (1,1) or (2,2) or (3,3) : : : is normal size,
|
(expand,shrink) = (1,1) or (2,2) or (3,3) : : : is normal size,
|
||||||
(stretch,shrink) = (1,2) is half size, (stretch,shrink) = (2,1) is
|
(expand,shrink) = (1,2) is half size, (expand,shrink) = (2,1) is
|
||||||
double size. For subgraphs, it is also the scaling factor of the
|
double size. For subgraphs, it is also the scaling factor of the
|
||||||
summary node. The scaling factor can also be specified by scaling:
|
summary node. The scaling factor can also be specified by scaling:
|
||||||
float (here, scaling 1.0 means normal size). */
|
float (here, scaling 1.0 means normal size). */
|
||||||
int shrink;
|
int shrink;
|
||||||
int stretch;
|
int expand;
|
||||||
|
|
||||||
/* textmode specifies the adjustment of the text within the border of a
|
/* textmode specifies the adjustment of the text within the border of a
|
||||||
summary node. The possibilities are center, left.justify and
|
summary node. The possibilities are center, left.justify and
|
||||||
right.justify.
|
right.justify.
|
||||||
Default value is center.*/
|
Default value is center.*/
|
||||||
enum textmode_e textmode;
|
enum textmode textmode;
|
||||||
|
|
||||||
/* Shape can be specified for subgraphs only. It is the shape of the
|
/* Shape can be specified for subgraphs only. It is the shape of the
|
||||||
subgraph summary node that appears if the subgraph is folded: box,
|
subgraph summary node that appears if the subgraph is folded: box,
|
||||||
@@ -575,7 +576,7 @@ struct graph_s
|
|||||||
influences only the order of the child nodes at a node, but not the
|
influences only the order of the child nodes at a node, but not the
|
||||||
order of the whole level.
|
order of the whole level.
|
||||||
Defalut is box, other: rhomb, ellipse, triangle. */
|
Defalut is box, other: rhomb, ellipse, triangle. */
|
||||||
enum shape_e shape;
|
enum shape shape;
|
||||||
|
|
||||||
/* Vertical order is the level position (rank) of the summary node of an
|
/* Vertical order is the level position (rank) of the summary node of an
|
||||||
inner subgraph, if this subgraph is folded. We can also specify
|
inner subgraph, if this subgraph is folded. We can also specify
|
||||||
@@ -605,7 +606,7 @@ struct graph_s
|
|||||||
int xmax;
|
int xmax;
|
||||||
int ymax;
|
int ymax;
|
||||||
|
|
||||||
/* xy-base: specify the upper left corner coordonates of the graph
|
/* xy-base: specify the upper left corner coordinates of the graph
|
||||||
relatively to the root window.
|
relatively to the root window.
|
||||||
Defaults are 5, 5. */
|
Defaults are 5, 5. */
|
||||||
int xbase;
|
int xbase;
|
||||||
@@ -661,13 +662,13 @@ struct graph_s
|
|||||||
additional text labels. The names are used in the menus.
|
additional text labels. The names are used in the menus.
|
||||||
defaults are 1,2,3...
|
defaults are 1,2,3...
|
||||||
By default, no class names. */
|
By default, no class names. */
|
||||||
struct classname_s *classname;
|
struct classname *classname;
|
||||||
|
|
||||||
/* Infoname allows to introduce names for the additional text labels.
|
/* Infoname allows to introduce names for the additional text labels.
|
||||||
The names are used in the menus.
|
The names are used in the menus.
|
||||||
Infoname is given by an integer and a string.
|
Infoname is given by an integer and a string.
|
||||||
The default value is NULL. */
|
The default value is NULL. */
|
||||||
struct infoname_s *infoname;
|
struct infoname *infoname;
|
||||||
|
|
||||||
/* Colorentry allows to fill the color map. A color is a triplet of integer
|
/* Colorentry allows to fill the color map. A color is a triplet of integer
|
||||||
values for the red/green/blue-part. Each integer is between 0 (off) and
|
values for the red/green/blue-part. Each integer is between 0 (off) and
|
||||||
@@ -675,7 +676,7 @@ struct graph_s
|
|||||||
colorentry 75 : 70 130 180 sets the map entry 75 to steel blue. This
|
colorentry 75 : 70 130 180 sets the map entry 75 to steel blue. This
|
||||||
color can be used by specifying just the number 75.
|
color can be used by specifying just the number 75.
|
||||||
Default id NULL. */
|
Default id NULL. */
|
||||||
struct colorentry_s *colorentry;
|
struct colorentry *colorentry;
|
||||||
|
|
||||||
/* layoutalgorithm chooses different graph layout algorithms
|
/* layoutalgorithm chooses different graph layout algorithms
|
||||||
Possibilities are maxdepth, mindepth, maxdepthslow, mindepthslow,
|
Possibilities are maxdepth, mindepth, maxdepthslow, mindepthslow,
|
||||||
@@ -703,7 +704,7 @@ struct graph_s
|
|||||||
trees. It is much faster on such tree-like graphs and results in a
|
trees. It is much faster on such tree-like graphs and results in a
|
||||||
balanced layout.
|
balanced layout.
|
||||||
Default is normal. */
|
Default is normal. */
|
||||||
enum layoutalgorithm_e layoutalgorithm;
|
enum layoutalgorithm layoutalgorithm;
|
||||||
|
|
||||||
/* Layout downfactor, layout upfactor, layout nearfactor The layout
|
/* Layout downfactor, layout upfactor, layout nearfactor The layout
|
||||||
algorithm partitions the set of edges into edges pointing upward,
|
algorithm partitions the set of edges into edges pointing upward,
|
||||||
@@ -731,40 +732,40 @@ struct graph_s
|
|||||||
labels and then partitions the graph, which yield a more compact
|
labels and then partitions the graph, which yield a more compact
|
||||||
layout, but may have more crossings.
|
layout, but may have more crossings.
|
||||||
Default is no. */
|
Default is no. */
|
||||||
enum decision_e late_edge_labels;
|
enum decision late_edge_labels;
|
||||||
|
|
||||||
/* Display edge labels yes means display labels and no means don't
|
/* Display edge labels yes means display labels and no means don't
|
||||||
display edge labels.
|
display edge labels.
|
||||||
Default vaule is no. */
|
Default vaule is no. */
|
||||||
enum decision_e display_edge_labels;
|
enum decision display_edge_labels;
|
||||||
|
|
||||||
/* Dirty edge labels yes enforces a fast layout of edge labels, which
|
/* Dirty edge labels yes enforces a fast layout of edge labels, which
|
||||||
may very ugly because several labels may be drawn at the same place.
|
may very ugly because several labels may be drawn at the same place.
|
||||||
Dirty edge labels cannot be used if splines are used.
|
Dirty edge labels cannot be used if splines are used.
|
||||||
Default is no.
|
Default is no.
|
||||||
*/
|
*/
|
||||||
enum decision_e dirty_edge_labels;
|
enum decision dirty_edge_labels;
|
||||||
|
|
||||||
/* Finetuning no switches the fine tuning phase of the graph layout
|
/* Finetuning no switches the fine tuning phase of the graph layout
|
||||||
algorithm off, while it is on as default. The fine tuning phase
|
algorithm off, while it is on as default. The fine tuning phase
|
||||||
tries to give all edges the same length.
|
tries to give all edges the same length.
|
||||||
Default is yes. */
|
Default is yes. */
|
||||||
enum decision_e finetuning;
|
enum decision finetuning;
|
||||||
|
|
||||||
/* Ignore singles yes hides all nodes which would appear single and
|
/* Ignore singles yes hides all nodes which would appear single and
|
||||||
unconnected from the remaining graph. Such nodes have no edge at all
|
unconnected from the remaining graph. Such nodes have no edge at all
|
||||||
and are sometimes very ugly. Default is to show all nodes.
|
and are sometimes very ugly. Default is to show all nodes.
|
||||||
Default is no. */
|
Default is no. */
|
||||||
enum decision_e ignore_singles;
|
enum decision ignore_singles;
|
||||||
|
|
||||||
/* Straight phase yes initiates an additional phase that tries to avoid
|
/* Long straight phase yes initiates an additional phase that tries to avoid
|
||||||
bendings in long edges.
|
bendings in long edges.
|
||||||
Long edges are laid out by long straight vertical lines with
|
Long edges are laid out by long straight vertical lines with
|
||||||
gradient 90 degree. Thus, this phase is not very appropriate for
|
gradient 90 degree. Thus, this phase is not very appropriate for
|
||||||
normal layout, but it is recommended, if an orthogonal layout is
|
normal layout, but it is recommended, if an orthogonal layout is
|
||||||
selected (see manhattan.edges).
|
selected (see manhattan.edges).
|
||||||
Default is no. */
|
Default is no. */
|
||||||
enum decision_e straight_phase;
|
enum decision long_straight_phase;
|
||||||
|
|
||||||
/* priority phase yes replaces the normal pendulum method by a
|
/* priority phase yes replaces the normal pendulum method by a
|
||||||
specialized method: It forces straight long edges with 90 degree,
|
specialized method: It forces straight long edges with 90 degree,
|
||||||
@@ -772,7 +773,7 @@ struct graph_s
|
|||||||
tune phase of the priority method. This phase is also recommended,
|
tune phase of the priority method. This phase is also recommended,
|
||||||
if an orthogonal layout is selected (see manhattan.edges).
|
if an orthogonal layout is selected (see manhattan.edges).
|
||||||
Default is no. */
|
Default is no. */
|
||||||
enum decision_e priority_phase;
|
enum decision priority_phase;
|
||||||
|
|
||||||
/* manhattan edges yes switches the orthogonal layout on. Orthogonal
|
/* manhattan edges yes switches the orthogonal layout on. Orthogonal
|
||||||
layout (or manhattan layout) means that all edges consist of line
|
layout (or manhattan layout) means that all edges consist of line
|
||||||
@@ -784,7 +785,7 @@ struct graph_s
|
|||||||
on, too, unless priority layout and straight line tuning are
|
on, too, unless priority layout and straight line tuning are
|
||||||
switched off explicitly.
|
switched off explicitly.
|
||||||
Default is no. */
|
Default is no. */
|
||||||
enum decision_e manhattan_edges;
|
enum decision manhattan_edges;
|
||||||
|
|
||||||
/* Smanhattan edges yes switches a specialized orthogonal layout on:
|
/* Smanhattan edges yes switches a specialized orthogonal layout on:
|
||||||
Here, all horizontal edge segments between two levels share the same
|
Here, all horizontal edge segments between two levels share the same
|
||||||
@@ -793,12 +794,12 @@ struct graph_s
|
|||||||
looks nice for trees but might be too confusing in general, because
|
looks nice for trees but might be too confusing in general, because
|
||||||
the location of an edge might be ambiguously.
|
the location of an edge might be ambiguously.
|
||||||
Default is no. */
|
Default is no. */
|
||||||
enum decision_e smanhattan_edges;
|
enum decision smanhattan_edges;
|
||||||
|
|
||||||
/* Near edges no suppresses near edges and bent near edges in the
|
/* Near edges no suppresses near edges and bent near edges in the
|
||||||
graph layout.
|
graph layout.
|
||||||
Default is yes. */
|
Default is yes. */
|
||||||
enum decision_e near_edges;
|
enum decision near_edges;
|
||||||
|
|
||||||
/* Orientation specifies the orientation of the graph: top.to.bottom,
|
/* Orientation specifies the orientation of the graph: top.to.bottom,
|
||||||
bottom.to.top, left.to.right or right.to.left. Note: the normal
|
bottom.to.top, left.to.right or right.to.left. Note: the normal
|
||||||
@@ -807,7 +808,7 @@ struct graph_s
|
|||||||
is left to right, the attribute xlspace is not the horizontal but
|
is left to right, the attribute xlspace is not the horizontal but
|
||||||
the vertical distance between lines, etc.
|
the vertical distance between lines, etc.
|
||||||
Default is to_to_bottom. */
|
Default is to_to_bottom. */
|
||||||
enum orientation_e orientation;
|
enum orientation orientation;
|
||||||
|
|
||||||
/* Node alignment specified the vertical alignment of nodes at the
|
/* Node alignment specified the vertical alignment of nodes at the
|
||||||
horizontal reference line of the levels. If top is specified, the
|
horizontal reference line of the levels. If top is specified, the
|
||||||
@@ -815,7 +816,7 @@ struct graph_s
|
|||||||
the bottoms have the same y-coordinate, on center the nodes are
|
the bottoms have the same y-coordinate, on center the nodes are
|
||||||
centered at the levels.
|
centered at the levels.
|
||||||
Default is center. */
|
Default is center. */
|
||||||
enum alignement_e node_alignement;
|
enum alignment node_alignment;
|
||||||
|
|
||||||
/* Port sharing no suppresses the sharing of ports of edges at the
|
/* Port sharing no suppresses the sharing of ports of edges at the
|
||||||
nodes. Normally, if multiple edges are adjacent to the same node,
|
nodes. Normally, if multiple edges are adjacent to the same node,
|
||||||
@@ -827,7 +828,7 @@ struct graph_s
|
|||||||
is used, each edge has its own port, i.e. its own place where it is
|
is used, each edge has its own port, i.e. its own place where it is
|
||||||
adjacent to the node.
|
adjacent to the node.
|
||||||
Default is yes. */
|
Default is yes. */
|
||||||
enum decision_e port_sharing;
|
enum decision port_sharing;
|
||||||
|
|
||||||
/* Arrow mode fixed (default) should be used, if port sharing is used,
|
/* Arrow mode fixed (default) should be used, if port sharing is used,
|
||||||
because then, only a fixed set of rotations for the arrow heads are
|
because then, only a fixed set of rotations for the arrow heads are
|
||||||
@@ -838,7 +839,7 @@ struct graph_s
|
|||||||
arrow mode is fixed, then the arrow head is rotated only in steps of
|
arrow mode is fixed, then the arrow head is rotated only in steps of
|
||||||
45 degree, and only one arrow head occurs at each port.
|
45 degree, and only one arrow head occurs at each port.
|
||||||
Default is fixed. */
|
Default is fixed. */
|
||||||
enum arrow_mode_e arrow_mode;
|
enum arrow_mode arrow_mode;
|
||||||
|
|
||||||
/* Treefactor The algorithm tree for downward laid out trees tries to
|
/* Treefactor The algorithm tree for downward laid out trees tries to
|
||||||
produce a medium dense, balanced tree-like layout. If the tree
|
produce a medium dense, balanced tree-like layout. If the tree
|
||||||
@@ -868,21 +869,21 @@ struct graph_s
|
|||||||
different nodes are not very probable, thus the crossing reduction
|
different nodes are not very probable, thus the crossing reduction
|
||||||
phase 2 might be very fast.
|
phase 2 might be very fast.
|
||||||
Default is bary. */
|
Default is bary. */
|
||||||
enum crossing_type_e crossing_weight;
|
enum crossing_type crossing_weight;
|
||||||
|
|
||||||
/* Crossing phase2 is the most time consuming phase of the crossing
|
/* Crossing phase2 is the most time consuming phase of the crossing
|
||||||
reduction. In this phase, the nodes that happen to have equal
|
reduction. In this phase, the nodes that happen to have equal
|
||||||
crossing weights are permuted. By specifying no, this phase is
|
crossing weights are permuted. By specifying no, this phase is
|
||||||
suppressed.
|
suppressed.
|
||||||
Default is yes. */
|
Default is yes. */
|
||||||
enum decision_e crossing_phase2;
|
enum decision crossing_phase2;
|
||||||
|
|
||||||
/* Crossing optimization is a postprocessing phase after the normal
|
/* Crossing optimization is a postprocessing phase after the normal
|
||||||
crossing reduction: we try to optimize locally, by exchanging pairs
|
crossing reduction: we try to optimize locally, by exchanging pairs
|
||||||
of nodes to reduce the crossings. Although this phase is not very
|
of nodes to reduce the crossings. Although this phase is not very
|
||||||
time consuming, it can be suppressed by specifying no.
|
time consuming, it can be suppressed by specifying no.
|
||||||
Default is yes. */
|
Default is yes. */
|
||||||
enum decision_e crossing_optimization;
|
enum decision crossing_optimization;
|
||||||
|
|
||||||
/* View allows to select the fisheye views. Because
|
/* View allows to select the fisheye views. Because
|
||||||
of the fixed size of the window that shows the graph, we normally
|
of the fixed size of the window that shows the graph, we normally
|
||||||
@@ -907,15 +908,15 @@ struct graph_s
|
|||||||
selected that shows the whole graph, and with fpfish the fixed
|
selected that shows the whole graph, and with fpfish the fixed
|
||||||
radius polar fisheye is selected.
|
radius polar fisheye is selected.
|
||||||
Defalut is normal view. */
|
Defalut is normal view. */
|
||||||
enum view_e view;
|
enum view view;
|
||||||
|
|
||||||
/* Edges no suppresses the drawing of edges.
|
/* Edges no suppresses the drawing of edges.
|
||||||
Default is yes. */
|
Default is yes. */
|
||||||
enum decision_e edges;
|
enum decision edges;
|
||||||
|
|
||||||
/* Nodes no suppresses the drawing of nodes.
|
/* Nodes no suppresses the drawing of nodes.
|
||||||
Default is yes. */
|
Default is yes. */
|
||||||
enum decision_e nodes;
|
enum decision nodes;
|
||||||
|
|
||||||
/* Splines specifies whether splines are used to draw edges (yes or no).
|
/* Splines specifies whether splines are used to draw edges (yes or no).
|
||||||
As default, polygon segments are used to draw edges, because this is
|
As default, polygon segments are used to draw edges, because this is
|
||||||
@@ -923,7 +924,7 @@ struct graph_s
|
|||||||
validated, and is very slow. Its use is mainly to prepare high
|
validated, and is very slow. Its use is mainly to prepare high
|
||||||
quality PostScript output for very small graphs.
|
quality PostScript output for very small graphs.
|
||||||
Default is no. */
|
Default is no. */
|
||||||
enum decision_e splines;
|
enum decision splines;
|
||||||
|
|
||||||
/* Bmax set the maximal number of iterations that are done for the
|
/* Bmax set the maximal number of iterations that are done for the
|
||||||
reduction of edge bendings.
|
reduction of edge bendings.
|
||||||
@@ -976,44 +977,44 @@ struct graph_s
|
|||||||
|
|
||||||
/* Generic values.
|
/* Generic values.
|
||||||
*/
|
*/
|
||||||
node_t node;
|
node node;
|
||||||
edge_t edge;
|
edge edge;
|
||||||
|
|
||||||
/* List of nodes declared.
|
/* List of nodes declared.
|
||||||
Pointer. */
|
Pointer. */
|
||||||
node_t *node_list;
|
node *node_list;
|
||||||
|
|
||||||
/* List of edges declared.
|
/* List of edges declared.
|
||||||
Pointer. */
|
Pointer. */
|
||||||
edge_t *edge_list;
|
edge *edge_list;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Graph typedefs. */
|
/* Graph typedefs. */
|
||||||
typedef struct graph_s graph_t;
|
typedef struct graph graph;
|
||||||
|
|
||||||
void new_graph (graph_t *g);
|
void new_graph (graph *g);
|
||||||
void new_node (node_t *node);
|
void new_node (node *n);
|
||||||
void new_edge (edge_t *edge);
|
void new_edge (edge *e);
|
||||||
|
|
||||||
void add_node (graph_t *graph, node_t *node);
|
void add_node (graph *g, node *n);
|
||||||
void add_edge (graph_t *graph, edge_t *edge);
|
void add_edge (graph *g, edge *e);
|
||||||
|
|
||||||
void add_colorentry (graph_t *g, int color_idx, int red_cp,
|
void add_colorentry (graph *g, int color_idx, int red_cp,
|
||||||
int green_cp, int blue_cp);
|
int green_cp, int blue_cp);
|
||||||
void add_classname (graph_t *g, int val, const char *name);
|
void add_classname (graph *g, int val, const char *name);
|
||||||
void add_infoname (graph_t *g, int val, const char *name);
|
void add_infoname (graph *g, int val, const char *name);
|
||||||
|
|
||||||
void open_node (FILE *fout);
|
void open_node (FILE *fout);
|
||||||
void output_node (node_t *node, FILE *fout);
|
void output_node (node *n, FILE *fout);
|
||||||
void close_node (FILE *fout);
|
void close_node (FILE *fout);
|
||||||
|
|
||||||
void open_edge (edge_t *edge, FILE *fout);
|
void open_edge (edge *e, FILE *fout);
|
||||||
void output_edge (edge_t *edge, FILE *fout);
|
void output_edge (edge *e, FILE *fout);
|
||||||
void close_edge (FILE *fout);
|
void close_edge (FILE *fout);
|
||||||
|
|
||||||
void open_graph (FILE *fout);
|
void open_graph (FILE *fout);
|
||||||
void output_graph (graph_t *graph, FILE *fout);
|
void output_graph (graph *g, FILE *fout);
|
||||||
void close_graph (graph_t *graph, FILE *fout);
|
void close_graph (graph *g, FILE *fout);
|
||||||
|
|
||||||
#endif /* VCG_H_ */
|
#endif /* VCG_H_ */
|
||||||
|
|||||||
Reference in New Issue
Block a user