.gvpr/default.gvpr
bdf38b08
 BEGIN
 {
     void object_url(obj_t o)
     {
         if (hasAttr(o, "URL"))
             return;
         string s;
         if (hasAttr(o, "label"))
             s = o.label;
         else
             s = o.name;
         if (match(s, "://[a-zA-Z0-9]") >= 0)
             o.URL = s;
         if (match(s, "/[a-zA-Z0-9]") == 0)
             o.URL = sprintf("file://%s", s);
     }
     void graph_label_url(graph_t g)
     {
         if (g) {
             g.label     = sub(g.name, "^cluster ");
             g.labelloc  = "t";
             g.labeljust = g.parent == NULL ? "c" : "l";
             object_url(g);
             graph_label_url(fstsubg(g));
             graph_label_url(nxtsubg(g));
         }
     }
 }
 END_G {
     $.fontname  = "Arial";
     $.color     = "grey";
     $.fontcolor = "grey";
     $.shape     = "box";
     $.style     = "rounded";
     graph_label_url($G);
 }
 N {
     $.fontname  = "Arial";
     $.color     = "black";
     $.fontcolor = "black";
     if (hasAttr($, "style") && $.style == "invis") {
         $.shape = "point";
         $.style = "invis";
     } else {
         $.shape = "box";
         $.style = "rounded";
     }
     object_url($);
 }
 E {
     object_url($);
 }