Subject: pie menus

From: Don Hopkins <[email-masked]>
Date: Mon, 28 Mar 88 20:43:02 EST

It's certianly true that a pie menu with a lot of choices can get
quite large. In my NeWS implementation, the labels are not confined to
the wedges, though. An inner radius is calculated around which all the
labels are justified. Lines delimiting the slices are drawn inside of
the inner radius, and the labels are justified around the outside of
it. (Respectivly,) the labels on the (left/right) side of the menu
have their (right/left) edge vertically centered at points on the
inner radius, and the very (top/bottom) labels are horizontally
centered on their (bottom/top) edge. i.e.:

+---B---+
R label L
+---T---+

If a label is on the (Right/Left/Bottom/Top) of the menu, the label is
positioned so that point (R/L/B/T) is on the inner radius, in the
direction of the center of the slice. (Does that make any sense?)

The inner radius is calculated by guessing an initial inner radius,
and going around the menu checking to see of the bounding boxes of any
two adjacent labels overlap. If they do, the inner radius is pushed
out until they don't, and the loop is continued. When it gets all the
way around, the inner radius will be big enought so that no labels
will overlap. The outer radius (of the menu window) is then calculated
by finding the distance to the corner that is the furthest point from
the menu center.

I have found that 8 choices is a very good number for pie menus. Using
the layout scheme described above, the labels do not generally need to
be pushed out very much, if at all. 8 items gives you 4 sets of
opposite directions, good for expressing opposite and orthogonal
relationships between menu items. It's also easy to mouse ahead
reliably into an 8 item menu. Mouse ahead works well enough with pie
menus that I have implemented menu display suppression when the events
that would determine a menu choice are read within a certian ammount
of time, and I find that it speeds up interaction considerably.  Also,
if you mouse ahead into a submenu, and then pause, the submenu that
you're at will pop up first, then finally the menu you've already
choosen from, underneath.

One way of supporting 2 dimensional input is to use the distance as an
argument. (You can't reliably mouse ahead to a certian distance like
you can with direction, though, and if you use distance as an
argument, you can't just move out further to get more angular
precision.)

Just for jollies, I've enclosed a uuencoded pixrect dump of the NeWS
root menu! Enjoy!

	-Don