Back to index.html
A node is a record with features id
,
edges
, kind
, kinds
,
and some node attributes. These attributes are specified by
DaVinci
and taken over by this interface.
We now specify the types of values of the attributes.
will be the text shown in the node (i.e. the label).
Multi-line text is possible using Node.'OBJECT' = VirtualString
\\n
inside the attribute value. The default value for this attribute is the empty string.
This is used to define the tooltip text that appears after a delay when the mouse pointer is over the node.
Node.'INFO' = VirtualString
(Only supported by DV-Presenter 3.0)
This is used to visualize the text of a node in a different font.
Node.'FONTFAMILY' = Family
type Family = lucida + times + helvetica + courier
(Only supported by DV-Presenter 3.0)
This attribute is used to visualize the text of a node in a different font.
The default is type Node.'FONTSTYLE' = Style
type Style = normal + bold + italic + bold_italic
normal
.
can be used to define the background color of a node. type Node.'COLOR' = Color
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. The default color for nodes is white.
is used when the subgraph of the node is hidden, defaults to the value of type Node.'CCOLOR' = Color
'COLOR'
particularizes the geometrical form of the nodes. The default is type Node.'_GO' = GraphicalObject
type GraphicalObject = box + circle + ellipse + rhombus + triangle + text
+ invisible + icon + image + scissors
box
When using icon
(DV Version 2.x) or image
(DV-Presenter 3.0) an additional attribute (i.e. ICON
or IMAGE
) must be specified to declare the URI of the icon/image to be drawn into the node. scissors
is usually used to display nodes with hidden subgraphs.
similar to type Node.'_CGO' = GraphicalObject
'_GO'
, used when the subgraph of the node is hidden, defaults to scissors
This is used as a supplement for attribute type Node.'ICONFILE' = URI
'_GO'
when
its value is set to icon
.
similar to type Node.'CICONFILE' = URI
'ICONFILE'
, used when the subgraph of the node is hidden.
This is used as a supplement for attribute type Node.'IMAGE' = URI
_GO
when its value is set to image
. Attribute 'IMAGE'
specifies the
file name of the image used to draw the node as icon.
The URI
specified in the attribute value must address a file
in gif, xbm, xpm or bmp format. The Mozart resolver is resolving this URI
into a file name.
(Only supported by DV-Presenter 3.0)
similar to type Node.'CIMAGE' = URI
'IMAGE'
, used when the subgraph of the node is hidden
(Only supported by DV-Presenter 3.0)
used to hide the subgraph of a node initially, defaults to false
type Node.'HIDDEN' = Bool
defines the border of the graphical object (see attribute "_GO"), defaults to type Node.'BORDER' = none + single + double
single
states the menu entries that will be shown as a popup menu at the node
type Node.menu = list(MenuEntry)
type MenuEntry = menu_entry(MenuAction VirtualString)
+ submenu_entry(VirtualString MenuList)
+ node_entry(NodeAction VirtualString)
+ submenu_node_entry(VirtualString MenuList)
+ blank
type MenuAction = Node x davinci ->
type NodeAction = Node ->
MenuAction
identifies the action to be executed when choosing this entry, the VirtualString
represents the label of the entry (i.e. what is shown at the menu bar).
The MenuAction
is a procedure getting two arguments, the first being the Node
, the second denoting the DaVinci environment built from the parameters. This enviroment will provide some defaults like removing items or changing attributes.
NodeAction
is a procedure getting as the only argument the value of the node.
blank
serves as a seperator.
(cf.example2.oz)
Back to index.html