⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vcg.h

📁 bison 2.0 主要可以用来做语法分析用的
💻 H
📖 第 1 页 / 共 3 页
字号:
/* VCG description handler for Bison.   Copyright (C) 2001, 2002 Free Software Foundation, Inc.   This file is part of Bison, the GNU Compiler Compiler.   Bison is free software; you can redistribute it and/or modify   it under the terms of the GNU General Public License as published by   the Free Software Foundation; either version 2, or (at your option)   any later version.   Bison is distributed in the hope that it will be useful,   but WITHOUT ANY WARRANTY; without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   GNU General Public License for more details.   You should have received a copy of the GNU General Public License   along with Bison; see the file COPYING.  If not, write to   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,   Boston, MA 02111-1307, USA.  */#ifndef VCG_H_# define VCG_H_/* VCG color map. The 32 prime predefined colors. */enum color{  white		= 0,  blue,  red,  green		= 3,  yellow,  magenta,  cyan		= 6,  darkgrey,  darkblue,  darkred	= 9,  darkgreen,  darkyellow,  darkmagenta	= 12,  darkcyan,  gold,  lightgrey	= 15,  lightblue,  lightred,  lightgreen	= 18,  lightyellow,  lightmagenta,  lightcyan	= 21,  lilac,  turquoise,  aquamarine	= 24,  khaki,  purple,  yellowgreen	= 27,  pink,  orange,  orchid,  black		= 31};/* VCG textmode. Specify the adjustement of the text within the border of a summary node. */enum textmode{  centered,  left_justify,  right_justify};/* VCG shapes. Used for nodes shapes. */enum shape{  box,  rhomb,  ellipse,  triangle};/* Structure for colorentries.  */struct colorentry{  int color_index;  int red_cp;  int green_cp;  int blue_cp;  struct colorentry *next;};/* Structure to construct lists of classnames. */struct classname{  int no; /* Class number */  const char *name; /* Name associated to the class no. */  struct classname *next; /* next name class association. */};/* Structure is in infoname.  */struct infoname{  int integer;  char const *chars;  struct infoname *next;};/* VCG decision yes/no. */enum decision{  yes,  no};/* VCG graph orientation. */enum orientation{  top_to_bottom,  bottom_to_top,  left_to_right,  right_to_left};/* VCG alignment for node alignement. */enum alignment{  center,  top,  bottom};/* VCG arrow mode. */enum arrow_mode{  fixed,  free_a};/* VCG crossing weight type. */enum crossing_type{  bary,  median,  barymedian,  medianbary};/* VCG views. */enum view{  normal_view,  cfish,  pfish,  fcfish,  fpfish};/*------------------------------------------------------.| Node attributs list. structure that describes a node. |`------------------------------------------------------*/struct node{  /* Title the unique string identifying the node. This attribute is     mandatory. */  const char *title;  /* Label the text displayed inside the node. If no label is specified     then the title of the node will be used. Note that this text may     contain control characters like NEWLINE that influences the size of     the node. */  const char *label;  /* loc is the location as x, y position relatively to the system of     coordinates of the graph. Locations are specified in the form     loc: - x: xpos y: ypos "". The locations of nodes are only valid,     if the whole graph is fully specified with locations and no part is     folded. The layout algorithm of the tool calculates appropriate x, y     positions, if at least one node that must be drawn (i.e., is not     hidden by folding or edge classes) does not have fixed specified     locations.     Default is none. */  int locx;  int locy;  /* vertical order is the level position (rank) of the node. We can also     specify level: int. Level specifications are only valid, if the     layout is calculated, i.e. if at least one node does not have a     fixed location specification. The layout algorithm partitioned all     nodes into levels 0...maxlevel. Nodes at the level 0 are on the     upper corner. The algorithm is able to calculate appropriate levels     for the nodes automatically, if no fixed levels are given.     Specifications of levels are additional constraints, that may be     ignored, if they are in conflict with near edge specifications.     Default values are unspecified. */  int vertical_order;  /* horizontal order is the horizontal position of the 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 unspecified. */  int horizontal_order;  /* width, height is the width and height of a node including the border.     If no value (in pixels) is given then width and height are     calculated from the size of the label.     Default are width and height of the label. */  int width;  int height;  /* shrink, stretch gives the shrinking and stretching factor of the     node. The values of the attributes width, height, borderwidth and     the size of the label text is scaled by ((stretch=shrink) \Lambda     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,     i.e. if (stretch,shrink) = (2,1) for the graph and (stretch,shrink)     = (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     specified by scaling: float.     Default are 1,1. */  int shrink;  int stretch;  /* folding specifies the default folding of the nodes. The folding k     (with k ? 0) means that the graph part that is reachable via edges     of a class less or equal to k is folded and displayed as one node.     There are commands to unfold such summary nodes, see section 5. If     no folding is specified for a node, then the node may be folded if     it is in the region of another node that starts the folding. If     folding 0 is specified, then the node is never folded. In this case     the folding stops at the predecessors of this node, if it is     reachable from another folding node. The summary node inherits some     attributes from the original node which starts the folding (all     color attributes, textmode and label, but not the location). A     folded region may contain folded regions with smaller folding class     values (nested foldings). If there is more than one node that start     the folding of the same region (this implies that the folding class     values are equal) then the attributes are inherited by one of these     nodes nondeterministically. If foldnode attributes are specified,     then the summary node attributes are inherited from these attributes.     Default is none. */  int folding;  /* shape specifies the visual appearance of a node: box, rhomb, ellipse,     and triangle. The drawing of ellipses is much slower than the drawing     of the other shapes.     Default is box. */  enum shape shape;  /* textmode specifies the adjustment of the text within the border of a     node. The possibilities are center, left.justify and right.justify.     Default is center. */  enum textmode textmode;  /* borderwidth specifies the thickness of the node's border in pixels.     color is the background color of the node. If none is given, the     node is white. For the possibilities, see the attribute color for     graphs.     Default is 2. */  int borderwidth;  /* node color.     Default is white or transparent, */  enum color color;  /* textcolor is the color for the label text. bordercolor is the color     of the border. Default color is the textcolor. info1, info2, info3     combines additional text labels with a node or a folded graph. info1,     Default is black. */  enum color textcolor;  /* info2, info3 can be selected from the menu. The corresponding text     labels can be shown by mouse clicks on nodes.     Default are null strings. */  const char *infos[3];  /* Node border color.     Default is textcolor. */  enum color bordercolor;  /* Next node node... */  struct node *next;};/* typedef alias. */typedef struct node node;/*-------------------------------------------------------.| Edge attributs list. Structure that describes an edge. |`-------------------------------------------------------*//* VCG Edge type. */enum edge_type{  normal_edge,  back_edge,  near_edge,  bent_near_edge};/* Structs enum definitions for edges. */enum linestyle{  continuous,  dashed,  dotted,  invisible};enum arrowstyle{  solid,  line,  none};/* The struct edge itself. */struct edge

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -