► |  | Mr Lib: Extra GUI Libraries

1 | Aligned Pasteboard
2 | Bitmap Label
3 | Cache-image Snip
4 | Close Icon
5 | GIF and Animated GIF Writing
6 | Graphs
7 | Hierarchical List Control
8 | Include Bitmap
9 | Interactive Value Port
10 | Name Message
11 | Path Dialog
12 | Plot
13 | Switchable Button
14 | Te X Table
15 | Acknowledgments
| Index

▼ | 6 | Graphs

6.1 | graph-pasteboard<%>
6.2 | graph-pasteboard-mixin
6.3 | graph-snip<%>
6.4 | graph-snip-mixin
6.5 | Graph Functions

On this page:

get-arrowhead-params
on-mouse-over-snips
set-arrowhead-params
set-draw-arrow-heads?
draw-edges

Version: 4.1.4
top← prev up next →

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.

top← prev up next →