Pie Menus for OLPC Sugar User Interface, in Python with GTK, Cairo and Pango modules.

Pie Menus on Python/GTK/Cairo for OLPC Sugar, by Don Hopkins.

Python Source Code

Tar File with Source, Demos and Icons.

Demos of Pie Menus for OLPC (One Laptop Per Child) Sugar User Interface on XO Laptop

I've been doing some fun OLPC user interface programming in Python. The OLPC's open source software environment includes Linux (for operating), Python (for scripting), GTK (for widgets), Cairo (for structured/stencil/paint/outline graphics) and Pango (for formatted text with markup), and it totally rocks!

Four item pie menu with submenus:

Pop up the "Compass" pie submenu, which has eight pie items and three linear overflow items and select "NE". These menus support pure pie menus, pure linear menus, and hybrid pie/linear menus. They can limit the number of pie items to a convenient number like 8, and make the rest linear items.


Pop up a ridiculously complex "Ringed" pie submenu, which has four rings of items, the inner ring with only four, which are very easy to select, the next ring with eight, which are easy to select because they're further out, the next ring with 24, and the next ring with a bunch more, which are harder but possible to select. This is the ultimate stress test of ringed pie menus. (Well actually there is no limit to the number of rings, but too many rings and menu items may result in heavy, unstable, radioactive pie menus!)


Example SimCity Pie Menus

To demonstrate how icons can work together with help text in the footer, I've made a set of example pie menus for selecting SimCity editing tools (based on the graphics and layout of the old X11/TCL/Tk SimCity interface), in simcity_piemenus.py. Note: They do not actually do anything -- it's just a simulated simulation!

SimCity tool selection menu, with two submenus ("Zone..." and "Build..."), and six important quickly selectable editing tool items. Shows icons without labels, and descriptive help text in the footers.

SimCity Zone pie submenu. Six items for zoning residential, commercial and industrial, fire stations, police stations, and querying zones.

SimCity Build pie submenu. Six items for building parks, stadiums, seaports, coal power plants, nuclear power plants, and airports.

Source code is clean but

1. I wish there was more commentary about what's going on. . . . . . . . . . . . . . 2. I wish every web page had a way to fix it or at least comment about it. . . . . . . . . . . . . . 3. Would you please consider dumping this stuff into a wiki so we could all help with the details of every little aspect? This stuff is fine and deserves more discussion and elaboration etc. . . . . . . . . . . . . . . . . . . . . . . . . . . Richard Karpinski, World class nitpicker . . . . . . . . . . . . . Dick@CFCL.com . . . . . . . . . . . . . Put Nitpicker in subject line to get past filters. . . . . . . . . . . . . .

Improving pie menus even further

I love pie menus. They are quick, almost obvious, easy to learn, easy to use, and they make automaticity easy. That's where you can use them without thinking, and thus without distraction from the task that brought you here. . . . . . . . . . . . . . But icons without words are hard to use at first. I believe that the initial experience would be enhanced if even one word of the caption which shows up upon highlighting a choice were there already. The image is indeed more busy that way, but the net effect, I'd wager is positive. . . . . . . . . . . . . . I tried to get more information about formatting options but got an unsatisfying page with no pertinent content. . . . . . . . . . . . . . Richard Karpinski, World class nitpicker . . . . . . . . . . . . . Dick@CFCL.com . . . . . . . . . . . . . Put Nitpicker in subject line to get past filters. . . . . . . . . . . . . .