📄 vcg.h
字号:
{ /* Edge type. Default is normal edge. */ enum edge_type type; /* Sourcename is the title of the source node of the edge. Default: none. */ const char *sourcename; /* Mandatory. */ /* Targetname is the title of the target node of the edge. Default: none. */ const char *targetname; /* Mandatory. */ /* Label specifies the label of the edge. It is drawn if display.edge.labels is set to yes. Default: no label. */ const char *label; /* Linestyle specifies the style the edge is drawn. Possibilities are: ffl continuous a solid line is drawn ( -- ) ffl dashed the edge consists of single dashes ( - - - ) ffl dotted the edge is made of single dots ( \Delta \Delta \Delta ) ffl invisible the edge is not drawn. The attributes of its shape (color, thickness) are ignored. To draw a dashed or dotted line needs more time than solid lines. Default is continuous. */ enum linestyle linestyle; /* Thickness is the thickness of an edge. Default is 2. */ int thickness; /* Class specifies the folding class of the edge. Nodes reachable by edges of a class less or equal to a constant k specify folding regions of k. See the node attribute folding and the folding commands. Default is 1. */ int class; /* color is the color of the edge. Default is black. */ enum color color; /* textcolor is the color of the label of the edge. arrowcolor, backarrowcolor is the color of the arrow head and of the backarrow head. priority The positions of the nodes are mainly determined by the incoming and outgoing edges. One can think of rubberbands instead of edges that pull a node into its position. The priority of an edges corresponds to the strength of the rubberband. Default is color. */ enum color textcolor; /* Arrow color. Default is color. */ enum color arrowcolor; /* BackArrow color. Default is color. */ enum color backarrowcolor; /* arrowsize, backarrowsize The arrow head is a right-angled, isosceles triangle and the cathetuses have length arrowsize. Default is 10. */ int arrowsize; /* Backarrow size Default is 0. */ int backarrowsize; /* arrowstyle, backarrowstyle Each edge has two arrow heads: the one appears at the target node (the normal arrow head), the other appears at the source node (the backarrow head). Normal edges only have the normal solid arrow head, while the backarrow head is not drawn, i.e. it is none. Arrowstyle is the style of the normal arrow head, and backarrowstyle is the style of the backarrow head. Styles are none, i.e. no arrow head, solid, and line. Default is solid. */ enum arrowstyle arrowstyle; /* Default is none. */ enum arrowstyle backarrowstyle; /* Default is 1. */ int priority; /* Anchor. An anchor point describes the vertical position in a node where an edge goes out. This is useful, if node labels are several lines long, and outgoing edges are related to label lines. (E.g., this allows a nice visualization of structs containing pointers as fields.). Default is none. */ int anchor; /* Horizontal order is the horizontal position the edge. This is of interest only if the edge crosses several levels because it specifies the point where the edge crosses the level. within a level. The nodes which are specified with horizontal positions are ordered according to these positions within a level. The horizontal position of a long edge that crosses the level specifies between which two node of that level the edge has to be drawn. Other edges which do not have this attribute are inserted into this ordering by the crossing reduction mechanism. Note that connected components are handled separately, thus it is not possible to intermix such components by specifying a horizontal order. Default is unspcified. */ int horizontal_order; /* ** Next edge node... */ struct edge *next;};/*** typedef alias.*/typedef struct edge edge;/*--------------------------------------------------------.| Graph attributs list. Structure that describes a graph. |`--------------------------------------------------------*/struct graph{ /* Graph title or name. Title specifies the name (a string) associated with the graph. The default name of a subgraph is the name of the outer graph, and the name of the outmost graph is the name of the specification input file. The name of a graph is used to identify this graph, e.g., if we want to express that an edge points to a subgraph. Such edges point to the root of the graph, i.e. the first node of the graph or the root of the first subgraph in the graph, if the subgraph is visualized explicitly. By default, it's the name of the vcg graph file description. */ const char *title; /* Graph label. Label the text displayed inside the node, when the graph is folded to a node. If no label is specified then the title of the graph will be used. Note that this text may contain control characters like NEWLINE that influences the size of the node. By default, it takes the title value */ const char *label; /* Any informations. Info1, info2, info3 combines additional text labels with a node or a folded graph. info1, info2, info3 can be selected from the menu interactively. The corresponding text labels can be shown by mouse clicks on nodes. Default values are empty strings (here NULL pointers) */ const char *infos[3]; /* Background color and summary node colors Color specifies the background color for the outermost graph, or the color of the summary node for subgraphs. Colors are given in the enum declared above. If more than these default colors are needed, a color map with maximal 256 entries can be used. The first 32 entries correspond to the colors just listed. A color of the color map can selected by the color map index, an integer, for instance red has index 2, green has index 3, etc. Default is white for background and white or transparent for summary nodes. */ enum color color; /* Textcolor. need explanations ??? default is black for summary nodes. */ enum color textcolor; /* Bordercolor is the color of the summary node's border. Default color is the textcolor. 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 summary node of inner subgraphs. Default is the default of the textcolor. */ enum color bordercolor; /* 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 summary node of inner subgraphs. Default value is 100. */ int width; int height; /* Specify the thickness if summary node's border in pixels. default value is 2. */ int borderwidth; /* x, y are the x-position and y-position of the graph's window in pixels, relatively to the root screen, if it is the outermost graph. The origin of the window is upper, left hand. For inner subgraphs, it is the position of the folded summary node. The position can also be specified in the form loc: fx:int y:intg. The default value is 0. */ int x; int y; /* folding of a subgraph is 1, if the subgraph is fused, and 0, if the subgraph is visualized explicitly. There are commands to unfold such summary nodes. Default value is 0 */ int folding; /* Shrink, stretch gives the shrinking and stretching factor for the graph's representation (default is 1, 1). ((stretch=shrink) \Lambda 100) is the scaling of the graph in percentage, e.g., (stretch,shrink) = (1,1) or (2,2) or (3,3) : : : is normal size, (stretch,shrink) = (1,2) is half size, (stretch,shrink) = (2,1) is double size. For subgraphs, it is also the scaling factor of the summary node. The scaling factor can also be specified by scaling: float (here, scaling 1.0 means normal size). */ int shrink; int stretch; /* textmode specifies the adjustment of the text within the border of a summary node. The possibilities are center, left.justify and right.justify. Default value is center.*/ enum textmode textmode; /* Shape can be specified for subgraphs only. It is the shape of the subgraph summary node that appears if the subgraph is folded: box, rhomb, ellipse, and triangle. vertical order is the level position (rank) of the summary node of an inner subgraph, if this subgraph is folded. We can also specify level: int. The level is only recognized, if an automatical layout is calculated. horizontal order is the horizontal position of the summary node within a level. The nodes which are specified with horizontal positions are ordered according to these positions within the levels. The nodes which do not have this attribute are inserted into this ordering by the crossing reduction mechanism. Note that connected components are handled separately, thus it is not possible to intermix such components by specifying a horizontal order. If the algorithm for downward laid out trees is used, the horizontal order influences only the order of the child nodes at a node, but not the order of the whole level. Default is box, other: rhomb, ellipse, triangle. */ enum shape shape; /* Vertical order is the level position (rank) of the summary node of an inner subgraph, if this subgraph is folded. We can also specify level: int. The level is only recognized, if an automatical layout is calculated. */ int vertical_order; /* Horizontal order is the horizontal position of the summary node within a level. The nodes which are specified with horizontal positions are ordered according to these positions within the levels. The nodes which do not have this attribute are inserted into this ordering by the crossing reduction mechanism. Note that connected components are handled separately, thus it is not possible to intermix such components by specifying a horizontal order. If the algorithm for downward laid out trees is used, the horizontal order influences only the order of the child nodes at a node, but not the order of the whole level. */ int horizontal_order; /* xmax, ymax specify the maximal size of the virtual window that is used to display the graph. This is usually larger than the displayed part, thus the width and height of the displayed part cannot be greater than xmax and ymax. Only those parts of the graph are drawn that are inside the virtual window. The virtual window can be moved over the potential infinite system of coordinates by special positioning commands. Defaults are 90 and 90. */ int xmax; int ymax; /* xy-base: specify the upper left corner coordinates of the graph relatively to the root window. Defaults are 5, 5. */ int xbase; int ybase; /* xspace, yspace the minimum horizontal and vertical distance between nodes. xlspace is the horizontal distance between lines at the points where they cross the levels. (At these points, dummy nodes are used. In fact, this is the horizontal distance between dummy nodes.) It is recommended to set xlspace to a larger value, if splines are used to draw edges, to prevent sharp bendings. Default are 20 and 70. */ int xspace; int yspace; /* The horizontal space between lines at the point where they cross the levels. defaults value is 1/2 xspace (polygone) and 4/5 xspace (splines)*/ int xlspace; /* xraster, yraster specifies the raster distance for the position of the nodes. The center of a node is aligned to this raster. xlraster is the horizontal raster for the positions of the line control points (the dummy nodes). It should be a divisor of xraster. defaults are 1,1. */ int xraster; int yraster; /* xlraster is the horizontal raster for the positions of the line control points (the dummy nodes). It should be a divisor of xraster. defaults is 1. */ int xlraster; /* hidden specifies the classes of edges that are hidden. Edges that are within such a class are not laid out nor drawn. Nodes that are only reachable (forward or backward) by edges of an hidden class are not drawn. However, nodes that are not reachable at all are drawn. (But see attribute ignore.singles.) Specification of classes of hidden edges allows to hide parts of a graph, e.g., annotations of a syntax tree. This attribute is only allowed at the outermost level. More than one settings are possible to specify exactly the set of classes that are hidden. Note the important difference between hiding of edges and the edge line style invisible. Hidden edges are not existent in the layout. Edges with line style invisible are existent in the layout; they need space and may produce crossings and influence the layout, but you cannot see them. No default value. */ int hidden; /* Classname allows to introduce names for the edge classes. The names are used in the menus. infoname allows to introduce names for the additional text labels. The names are used in the menus. defaults are 1,2,3... By default, no class names. */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -