Universitaet Bremen
FB3->Group BKB

->Main->Term Representation->Attributes
Home
uDraw(Graph)
Download
Service & Support
Legal



Attributes

Attributes

Attributes are used in the term representation to specify the visualization properties of individual nodes and edges. Each node and edge has its own attributes which is a list of string pairs with a constructor "a" followed by an attribute name and an attribute value in parentheses, or a constructor "m" followed by a list of pop-up menus. Here is an example for a list of attributes that can be used in the subterm of a node:

[a("OBJECT","Node Text"),
 a("COLOR","red"),
 a("FONTFAMILY","times"),
 m([menu_entry("MenuID","Menu Text")])
]

If a particular attribute is specified for a node or edge, it will overwrite the default value for this attribute which would be used otherwise. Please look at the concepts chapter to learn more about the evaluation order for attributes.

Node attributes and edge attributes are distinguished from each other. For example, there are different attributes (more precisely: attribute names) to set the color of nodes ("COLOR") and edges ("EDGECOLOR"). Edge attributes cannot be used for nodes and vice versa. Unknown attribute names and values are simply ignored without any warning. This way, the term representation is both up- and backward compatible with previous and future releases of uDraw(Graph). Some attributes, starting with character '_', are needed for internal purposes, but can also be used in a term representation. The usage of attributes is demonstrated in the example below.