1 Aligned Pasteboard
2 Bitmap Label
3 Cache-image Snip
4 GIF and Animated GFI Writing
5 Graphs
6 Hierarchical List Control
7 Include Bitmap
8 Interactive Value Port
9 Name Message
10 Path Dialog
11 Plot
12 Switchable Button
13 Acknowledgments
Index
On this page:
add-links
add-links/ text-colors
Version: 4.0.2

 

5.5 Graph Functions

(add-links parent child)  void?

  parent : (is-a?/c graph-snip<%>)

  child : (is-a?/c graph-snip<%>)

(add-links parent child)  void?

  parent : (is-a?/c graph-snip<%>)

  child : (is-a?/c graph-snip<%>)

(add-links

 

parent

 

 

 

 

 

 

child

 

 

 

 

 

 

dark-pen

 

 

 

 

 

 

light-pen

 

 

 

 

 

 

dark-brush

 

 

 

 

 

 

light-brush

 

 

 

 

 

 [

label])

 

 

void?

  parent : (is-a?/c graph-snip<%>)

  child : (is-a?/c graph-snip<%>)

  dark-pen : (or/c (is-a?/c pen) false/c)

  light-pen : (or/c (is-a?/c pen) false/c)

  dark-brush : (or/c (is-a?/c brush%) false/c)

  light-brush : (or/c (is-a?/c brush%) false/c)

  label : (or/c string? false/c) = #f

(add-links

 

parent

 

 

 

 

 

 

child

 

 

 

 

 

 

dark-pen

 

 

 

 

 

 

light-pen

 

 

 

 

 

 

dark-brush

 

 

 

 

 

 

light-brush

 

 

 

 

 

 

dx

 

 

 

 

 

 

dy

 

 

 

 

 

 [

label])

 

 

void?

  parent : (is-a?/c graph-snip<%>)

  child : (is-a?/c graph-snip<%>)

  dark-pen : (or/c (is-a?/c pen) false/c)

  light-pen : (or/c (is-a?/c pen) false/c)

  dark-brush : (or/c (is-a?/c brush%) false/c)

  light-brush : (or/c (is-a?/c brush%) false/c)

  dx : real?

  dy : real?

  label : (or/c string? false/c) = #f

Connects a parent snip to a child snip within a pasteboard.

The default dark-pen/dark-brush and light-pen/light-brush are blue and purple, respectively. The dark-pen and dark-brush are used when the mouse cursor is over the snip (or a child or parent), and the light-pen and light-brush are used when the mouse cursor is not over the snip. The brush is used to draw inside the arrow head and the pen is used to draw the border of the arrowhead and the line connecting the two snips.

if label is provided and not #f, it is used as a label on the edge.

When dx and dy are provided, the are offsets for the head and the tail of the arrow. Otherwise, 0 offsets are used.

(add-links/text-colors

 

parent

 

 

 

 

 

 

child

 

 

 

 

 

 

dark-pen

 

 

 

 

 

 

light-pen

 

 

 

 

 

 

dark-brush

 

 

 

 

 

 

light-brush

 

 

 

 

 

 

dark-text

 

 

 

 

 

 

light-text

 

 

 

 

 

 

dx

 

 

 

 

 

 

dy

 

 

 

 

 

 

label)

 

 

void?

  parent : (is-a?/c graph-snip<%>)

  child : (is-a?/c graph-snip<%>)

  dark-pen : (or/c (is-a?/c pen) false/c)

  light-pen : (or/c (is-a?/c pen) false/c)

  dark-brush : (or/c (is-a?/c brush%) false/c)

  light-brush : (or/c (is-a?/c brush%) false/c)

  dark-text : (or/c (is-a?/c color%) false/c)

  light-text : (or/c (is-a?/c color) false/c)

  dx : real?

  dy : real?

  label : (or/c string? false/c)

Like add-links, but with extra dark-text and light-text arguments to set the colors of the label.