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:
get-arrowhead-params
on-mouse-over-snips
set-arrowhead-params
set-draw-arrow-heads?
draw-edges
Version: 4.0.2

 

graph-pasteboard<%> : interface?

(send a-graph-pasteboard get-arrowhead-params)

 

 

number

 

number

 

number

Returns the current settings for the arrowhead’s drawing.

(send a-graph-pasteboard on-mouse-over-snips lst)  void?

  lst : (listof (is-a?/c snip%))

This method is called when the mouse passes over any snips in the editor. It is only called when the list of snips under the editor changes (ie, if the mouse moves, but remains over the same list of snips, the method is not called). Also, this method is called with the empty list if the mouse leaves the pasteboard.

(send a-graph-pasteboard set-arrowhead-params

 

angle-width

 

 

 

short-side

 

 

 

long-size)

 

  void?

  angle-width : real?

  short-side : real?

  long-size : real?

Sets drawing parameters for the arrowhead. The first is the angle of the arrowhead’s point, in radians. The second is the length of the outside line of the arrowhead and the last is the distance from the arrowhead’s point to the place where the arrowhead comes together.

(send a-graph-pasteboard set-draw-arrow-heads? draw-arrow-heads?)

  void?

  draw-arrow-heads? : any/c

Sets a boolean controlling whether or not arrow heads are drawn on the edges between nodes.

This setting does not affect self-links – only links between two different nodes.

(send a-graph-pasteboard draw-edges

 

dc

 

 

 

 

 

 

left

 

 

 

 

 

 

top

 

 

 

 

 

 

right

 

 

 

 

 

 

bottom

 

 

 

 

 

 

dx

 

 

 

 

 

 

dy)

 

 

void?

  dc : (is-a?/c dc<%>)

  left : real?

  top : real?

  right : real?

  bottom : real?

  dx : real?

  dy : real?

This is called by the on-paint callback of a graph pasteboard, and is expected to draw the edges between the snips. The argments are a subset of those passed to on-paint and it is only called when the before? argument to on-paint is #t.