Mark Weiser's Pie Menus for Suntools - January 1987

While snowed in with his Sun workstation at home during January 1987, Mark Weiser implemented pie menus for Sunview. He used the Sunview pie menus for his classic "SDI" game.

Date: Fri, 23 Jan 87 20:12:37 EST
From: (Mark Weiser)
Subject: pies in sunview

I used the snow to hack pies into sunview. It works now without walking menus. Will have walking over the weekend.

Date: Sun, 25 Jan 87 18:09:26 EST
Subject: pie menus in suntools

I integrated pie menus into a version of suntools(.c), so they are used for all the background menus. Its running as the standard suntools on markshome right now.

The method was to completely emulate all the standard sun menu library calls so the source of suntools.c did not change at all. Just a relink does it. I used walkmenu.h to hold all the local information as well, so some of the standard menu calls still will work with these (like menu_get(CLIENT_DATA)) But--I only emulated those calls and options used by suntools, so it is not a general library replacement.

It still needs tuning to make the menus really look good, and for some mouse click response glitches, but basically its all in.

Now the pie paper has two implementation data points, and I'll get back to work on it.


Date: Sun, 25 Jan 87 14:10:07 EST
From: Don Hopkins <>
Subject: pies in sunview

When you invoke a menu with mouse down (either my clicking a turd on the screen or having a button bound to it): a) Only the corresponding mouse up should select from it; other mouse ups are ignored or dealt with in other ways. b) Another mouse down will choose from the menu, put up the next menu, and start tracking immediatly. See how these fit together? Now you can go:

1. Left button down. ; Invoke menu, put it up, start tracking.
2. Move mouse up. ; Up selection highlighted.
3. Middle button down. ; Choose submenu from first menu, ; put up next, start tracking.
4. Move mouse right. ; Right selection highlighted.
5. Middle and left buttons up. ; Choose selection from submenu.

Since the mouse button ups that do not match the mouse button down that invoked the current menu are ignored, you can actually release the button at any time later. This is instead of requiring a) that a mouse down initially invoke a menu, and b) that you to use the same mouse button to choose a submenu. Enforcing both of those two rules is inefficient because the button you will want to use will always be in the wrong state. It seems more reasonable to relax b) than a) to me, because I feel it will make dumdu and dmu clicking easier, and it just seems more natural (although I haven't figured out why yet.) I have to sit down and think it out. I won't be at the lab in the extremely immediate future due to snow, or I'd hack it up in Forth to see how it works, so if you have the time and want to put it into SunView and see how it feels, do so and tell me what ways you discover to use it. See how deep you can nest menus, how long you can hold the buttons down till you have to let them up, when are natural times to let them up, if you can get them to do both dmu and dumdu, how the transition between dmu and dumdu is between menus, how you can make them support as many ways of doing the most convenient things as possible, how you can do multiple clicks (i.e. like the lispm does) and how you can take advantage of the buttons your holding down. (i.e. use the other button up of a two stroke delete window command to point at the window to delete. Or to choose from a sub-submenu.)

For both direction and distance, you can specify a menu start value, a menu range, and a menu granularity. (An integer, or infinity for real output. (maybe map 0 to infinity?)) The menu will encompass "start" to "start+range", with "granularity" divisions. Continuous menu output is different than discrete menu output in that it has a linear ordering. Continuous menus are more generic because a discrete menu is a continuous menu with non-infinite granularity, whose output is usually mapped to something else.

If you have continuous direction|distance menus, and you want to make a finer selection, you could zoom in on a part of the menu: when you're in a menu, indicate the slice|layer start somehow (perhaps by pressing another button down with different shift key modifiers, or from the keyboard), and move to a different direction|distance and indicate the slice|layer end. Then the menu is redisplayed, with the start, range, and granularity rescaled to encompass the range of directions|distance you indicated. You can even zoom in on both an direction and distance at once. Think about how this interacts with all the things input from a pie menu can represent.

Sit down in a chair, with your legs crossed: the part above your left|right ankle should rest above your right|left knee. Now put your hands in your lap with your wrists resting on your upper thighs so that your fingers all touch your left|right calf. Start typing on the keyboard on your calf. You may use the touch screen that pops up to a convenient viewing angle from around the front of your calf. When you're tired, you can cross your legs the other way and play music on the piano keyboard on your other calf. You can even sit down on the floor or in a bean bag chair and use both at once. Power supply, mass storage, speakers, and the CPU itsself are in the sole and heels. You've got a few interface plugs in the heels (for your cell phone, power, RS232, MIDI, Ethernet tap, etc, etc, etc...), and lots of velcro to fasten everything together. And they come in all sorts of different styles, to boot!


Date: Fri, 30 Jan 87 00:24:27 EST
Subject: sunview pies

images work.

Date: Fri, 30 Jan 87 01:07:49 EST
Subject: pie tester in sunview

markssun:~mark/pie/test is the binary for a little pies in sunview tester. You just hand it a bunch of arguments and it makes a pie menu out of them. It takes your last item, and makes it arbitrarily makes it a submenu pointing to another copy of the original menu (to a depth of 5).

Items are selected by clicking down/up on them.

Any argument to 'test' which ends in '.icon' is assumed to be the name of an image file in icon format. Otherwise the string itself is used as the argument.

Current bugs:
1. sometimes it doesn't notice the selection until you move the mouse slightly.
2. whena submenu is deselected (by clicking on the null middle region) the submenu does not go away (it just becomes overlaid by the old parent and is no longer active).

Both of these bugs seem to be strange sunview things that I have not yet discovered workarounds for.

I do have a suntools.c which uses pies, but it seems to only work with 3.2.