Back to index.html

Edge Attributes

An edge is a record with features id, to, kind, kinds, and some edge attributes. These attributes are specified by DaVinci and taken over by this interface. We now specify the types of values of the edge attributes.
		type Edge.'OBJECT' = VirtualString 
This attribute is used to set an edge label. The label is displayed with the edge in grey in the background. When the edge is selected, the label is displayed in the foreground using the color of the edge. Multi-line text is possible using \\n inside the attribute value. The default value for this attribute is the empty string.
(Only supported by DV-Presenter 3.0)
		type Edge.'FONTFAMILY' = Family 
                type Family = lucida + times + helvetica + courier 
This is used to visualize the text of an edge in a different font.
(Only supported by DV-Presenter 3.0)
		type Edge.'FONTSTYLE' = Style
                type Style = normal + bold %default + italic + bold_italic
This attribute is used to visualize the text of an edge in a different font.
(Only supported by DV-Presenter 3.0)
		type Edge.'INFO' = VirtualString 
This is used to define the tooltip text that appears after a delay when the mouse pointer is over the edge.
(Only supported by DV-Presenter 3.0)
		type Edge.'EDGECOLOR' = Color
can be used to define the color of an edge. Color may be any X-Window colorname (see file lib/rgb.txt in your X11 directory) or any RGB color specification in a format like '#0f331e', where 0f is the hexadecimal value for the red part of the color, 33 is the green part and 1e is the blue. Defaults to black.
		type Edge.'EDGEPATTERN' = Pattern
                type Pattern = solid %default + dotted + dashed + thick + double

particularizes the pattern style of an edge

This attribute underwent major changes in DV-Presenter 3.0 version: It is now composed by 4 parameters, separated by ';'.
Therefore the type of Pattern is now:

type Pattern = 'Type;Shape;Width;Spline'
type Type    = single + double 
type Shape   = solid + dotted + dashed
type Width   = Int 
type Spline  = 0 + 1
So, to visualize an edge using a solid, double-lined spline with a width of 3 pixels, you use:
type Edge.'EDGEPATTERN' = 'double;solid;3;1'
The old values of daVinci 2.x versions are still supported and are translated to the new style using the following conventions:
solid  => single;solid;1;0
dotted => single;dotted;1;0
dashed => single;dashed;1;0
thick  => single;solid;3;0
double => double;solid;5;0
		type Edge.'_DIR' = Direction
                type Direction = normal (=last)%default + inverse (=first) + both + none

This attribute is used to control the arrow of an edge. In a graph visualization, each edge usually has an arrow pointing to the child node. This attribute can be used to let the arrow be drawn inverse (i.e. pointing to the parent), to get an arrow at both sides of an edge or to suppress arrows for a particular edge. The italic values are DV-Presenter 3.0 syntax.

		type Edge.'HEAD' = Head
                type Head = farrow %default + arrow + fcircle + circle
DaVinci will draw a little image at no, one or both ends of an edge. This behaviour is controlled with the attribute "_DIR". With the attribute "HEAD" you can define which image this should be.
		type Edge.menu = MenuList = list(MenuEntry) 
states the menu entries that will be shown as a popup menu at the edge.
   type MenuEntry  = menu_entry(MenuAction VirtualString) 
                     + submenu_entry(VirtualString MenuList)  
		     + edge_entry(EdgeAction VirtualString)
		     + submenu_edge_entry(VirtualString MenuList)
                     + blank  
   type MenuAction = Edge x DaVinci -> 
   type EdgeAction = Edge -> 
A MenuAction identifies the action to be executed when choosing this entry. A VirtualString represents the label of the entry (i.e. what is shown at the menu bar). The MenuAction receives two arguments, the first being the Edge, the second denoting the DaVinci environment built from the parameters. This enviroment will provide some defaults like removing items or changing attributes. blank serves as a seperator. (cf.example2.oz)

Back to index.html