Box-and-arrow items

One of the main reasons for the existence of the Slate is because we want to be able to rapidly construct graphical editors for ``box-and-arrow'' diagrams. This is perhaps the most common structure present in visual languages and computer/software diagrams (followed by hierarchy), and includes all kinds of dataflow diagrams, state machines, flowcharts, class hierarchy diagrams, object models, dataflow-diagrams (as used in in structure analysis and design -- SA/SD), and circuit diagrams. At present, the Slate only has some experimental item types for these kinds of diagrams.

Terminal

Terminal is a line that represents a "terminal" on some graphical object. Its coordinates are the coordinates at which it "connects" to whatever it is that it is a terminal of. It has the following options:

Enhancements: The "arrow" style should perhaps put a "tail" on the wiring end of an input terminal (as in VEM).

Example: Create some terminals:

  source $tycho/editors/slate/doc/internals/newslate.itcl
  foreach {x y opts} {
   	100 50  {}
   	100 100 {-type output -fill red}
   	100 150 {-style blob  -fill blue}
   	100 200 {-direction {1 1} -style doublearrow}
  } {
   	eval $slate create Terminal $x $y $opts
  }

Node

Node is an item that represents a node of a computation graph of some kind. It is fully parameterized: the way the node is drawn and the appearance of its terminals if given by configuration options. For a specific application, you may prefer to write an item type dedicated to the application. The Node item has the following options:

Enhancements: In an earlier version of the Slate, Node items had primary and secondary "directions," so that you could flip the node about the vertical and horizontal axes.

Caveats: The current release has a serious bug in the way that tags and bindings to complex items that themselves contain complex items are handled. Because of this, dragging and resizing Nodes does not work.

Example: Create a node:

  source $tycho/editors/slate/doc/internals/newslate.itcl
  .t.s create Node 50 50 120 90 -inputs {0 50 50 0} -outputs 2 \
	-name Foo -tags moveable \
	-intype {Terminal -type input -style blob -fill red} \
	-outtype {Terminal -type output -style doublearrow -fill blue}
(If you drag different bits of the Node with the mouse, you will see the effect of the unsolved binding bug mentioned elsewhere in this documentation.)

SmartLine

A SmartLine is a line item that is able to draw itself between two arbitrary points using only vertical and horizontal lines. The line needs to be told from what direction to approach each of its endpoints. It is not included in this release.

Enhancements: SmartLine needs to support "manual" dragging of line segments and vertices.

Back up
Tycho Home Page


Copyright © 1996, The Regents of the University of California. All rights reserved.
Last updated: 96/12/11, comments to: johnr@eecs.berkeley.edu