PizzaTool Manual

The NeWS Toolkit version of PizzaTool was shipped with Solaris 2 / SVR4 Unix OpenWindows, with this helpful manual entry. It only contained one known bug, but it was a whopper.

BUGS: There is presently no way to pay off your tab.

pizzatool - a graphical pizza menu user interface SYNOPSIS

/usr/openwin/demo/pizzatool DESCRIPTION

PizzaTool is a NeWS and TNT application that lets you select a pizza by choosing toppings from checkboxes and menus, and preview a drawing of your pizza in a round spinning window. The main PizzaTool window has some buttons, menus, and text fields that you can use to configure your order. The “Pizza Parlor” menu selects between various pizza servers. The “Topping…” “Preview…” and “Edit…” buttons pop up associated control panels. The “Order!” button sends your order to the pizza server. You need to fill in your name and address so they know who you are and where to deliver your pizza. The Topping panel has a “Preview…” button that pops up the pizza preview panel, and an “Order!” button to send your order, like the main PizzaTool window. There are settings to select how big a pizza you want, and to choose a whole or a half pizza. There is an abbreviated menu button for selecting popular pizza styles, and lots and lots of checkboxes, for selecting individual toppings. The field at the bottom of the panel displays the estimated cost of the currently selected pizza. Popping up the pizza Preview panel paints a picture of the particular pizza you’ve picked. The round pizza is magically suspended in the hollow frame (it’s supposed to be that way), and you can resize the frame to get a closer look at the pizza. Pressing the MENU button over the pizza pops up a menu of popular pizza styles, and you can spin the pizza around with the SELECT button, to cook it. The Pizza Menu Editor panel is for use by authorized pizza parlor personnel only. It can be used to add, delete, rename, and edit pizza styles, and to change all the prices. SEE ALSO: The NeWS Toolkit Reference Manual, NeWS 2.1 Programmer’s Guide, OPEN LOOK Graphical User Interface Functional Specification NOTES: NeWS is a registered trademark of Sun Microsystems, Inc. OPEN LOOK is a trademark of AT&T. BUGS: There is presently no way to pay off your tab.

PizzaTool is written in object oriented PostScript for The NeWS Toolkit on OpenWindows. And it‘s got lots of comments to explain what’s going on.

It’s a programming example for The NeWS Toolkit, and it tests out and shows how to use all the different widgets, dialogs, drag and drop, lightweight threading, and PostScript drawing.

PizzaTool History

Ben Stoltz, a brilliant and creative user interface programmer at Sun, developed the original “tatool” at Sun Microsystems in October of 1990 with Sun’s Devguide tool for building XView user interfaces.

“TA” stood for “Tony & Alba’s”, the best pizza parlor in Mountain View, located conveniently nearby Sun. Late one Saturday night, Ben came into my office, jumped up and down, gave me a mind blowing demo, and then I accidentally ordered my first pizza over the internet!

I played around with it and put together a mondo pizza with lots of toppings I couldn’t even pronounce, then Ben told me to select the (Send Fax) menu button and choose Email Only so it would email the order form to me. But I fat-fingered it and selected Send Fax, so I had to call up Tony and Albas and tell them I had spazzed out with the mouse, and to ignore the next ridiculous pizza order that came over the fax.

Me and my big mouth!

I thought it was totally cool, useful and practical, so I sent the following email to some random internet mailing list full of friends, precisely describing my first experience ordering a pizza over the internet:

Date: Wed, 24 Oct 90 13:39:00 PDT

From: Don Hopkins

Subject: PizzaTool Last Saturday night this dude (Ben Stoltz) came by my office and jumped up and down and insisted I run this program he had just gotten working. It was called “tatool” — and its icon was a Tony & Albas pizza box. Opening the pizza box revealed a control panel with text fields automatically filled out with my Name:, Phone:, and Address:, an abbreviated Delivery: menu button (To Eat at T&A, To Pick Up, Take & Bake, Please Deliver), A total Estimated cost: text field, an email copies to: text field, buttons for (New Pizza), (Set Defaults), and a menu button for (Send Fax) (Tony & Albas, AD Fax, or Email Only) [for testing]. Then of course there’s a big scrolling text panel for Additional Instructions:. Pressing the (New Pizza) button pins up a New Pizza Properties Sheet. At the top, an exclusive setting to select a Pizza Size: of 10", 14", 16", or 18", and another exclusive setting to select between a Fraction: of Whole or Half. Next is an abbreviated menu button that selects the pizza Style: (Cheese, Ala Gilroy, All Meat Combo, Garlic Clam & Tomato, Keep Fit Special, Pesto Pizza Special, Tony’s Gourmet, Tony’s Special, Vegetarian Delight). Below the Style menu are two banks of Pizza Topping check boxes, for Meats: (14 checkboxes) and Vegetables: (13 checkboxes). Under that is an estimated cost field for the current pizza configuration. Naturally, selecting a pre-defined pizza Style will set all of the check boxes appropriately, then then you can customize your pizza order by adding and deleting toppings by clicking on the check boxes. I played around with it and put together a mondo pizza with lots of toppings I couldn’t even pronounce, then Ben told me to select the (Send Fax) menu button and choose Email Only so it would email the order form to me. But I fat-fingered it and selected Send Fax, so I had to call up Tony and Albas and tell them I had spazzed out with the mouse, and to ignore the next ridiculous pizza order that came over the fax. Last night I used the Pizza Tool to order a pizza on purpose, and it worked wonderfully! When we picked up the pizza the guy at Tony and Albas said they’d gotten several Pizza Tool orders that day, and he showed us a color screen dump of the Pizza Tool in action that somebody had brought him when they picked up their pizza! -Don

I Kept the Receipts

Here is the automatically generated receipt from “tatool” to the Fax server for the first pizza I ordered on purpose over the internet, by faxing the text order to the pizza parlor:

Date: Tue, 23 Oct 90 22:42:37 PDT

From: Don Hopkins

To: FAX:965–8882.Pizza_Order_Taker.Tony_&_Albas@akina.Eng

Subject: Ordering Pizza from PizzaTool Food order from: Don Hopkins

Phone: 336–3171

Address: 2400 Bayshore Parkway, Mountain View We will eat the food at Tony & Alba’s. 18 inch pie:

Ala Gilroy

add Artichoke hearts

add Provolone We’re *hungry* and we’re on our way!

And the receipt from the fax server:

Date: Tue, 23 Oct 90 22:46:54 PDT

From: daemon@akina (Fax Server)

Subject: ****FAX Xmt OK**** — — — — — — — — Transmission Summary — — — — — — —

Fax Server Version: FaxMail 0.2+

Fax Transmission Succeeded: 2 pages OK

Connected to 965–8882 () for 2 min 3 sec

2 pages out of a total of 2 pages sent

To: Pizza Order Taker Company: Tony & Albas

Subject:

— — — — — — — — — — — — — — — — — — — — — — — — — -

*** Transmission Transcript ***

fax modem ready

dexNET200 ready

dexNET200 ready

dexNET200 ready

dexNET200 ready

dexNET200 is dialing the remote fax machine

dexNET200 connected to G3 fax machine

page 1 sent or received ok

page 2 sent or received ok

Normal call termination

Soft reset

The Trouble Begins

As it turned out, I got into a bit of hot water for accidentally revealing Sun’s secret multimedia “Email-to-Pizza” strategy to the internet.

The NeWS Toolkit 2.0 for Sun OpenWindows

At the time, I was working for Sun on the NeWS window system, programming user interfaces in PostScript. As well as a window system, Sun was also using NeWS to develop a product they had just released called “NeWSPrint”, which turns your Sun workstation into a PostScript printer server.

On top of NeWSPrint, and not yet released, Sun was developing a PostScript-to-Fax rendering server with an Email-to-PostScript converter. So there was an email address to which you could send a text or PostScript file, which would render it to a bitmap and fax the bitmap to a phone number of your choosing. And that was the key piece of technology required that finally made it possible to order a pizza over the internet.

Weaponizing PostScript

You could do a whole lot more window manipulation, user interface customization, event handling, object oriented programming, debugging, multithreaded programming and networking with the NeWS window system than with Display PostScript. […] Sun sold a PostScript printer called NeWSPrint, which used a sandboxed version of the NeWS server running on a Sun workstation as a rendering engine, sandboxed so you didn’t have access to the file and networking operators.

First Ben got in trouble:

Date: Wed, 24 Oct 90 15:07:44 PDT

From: Vicky L. Schulman

To: Ben Stoltz

Subject: PizzaTool Otherwise known as tatool… In a round-about way this program has come to my attention. Did you write it? How do we get it?

So I tried to cheer up Ben and put a good spin on PizzaTool’s wide appeal:

Date: Wed, 24 Oct 90 15:52:26 PDT

From: Don Hopkins

To: Ben Stoltz

Subject: Me and my big mouth! I sent out the message enclosed at the end, and it looks like there’s a *great* demand for pizzatool! What do I tell these people?? Will it be in the next version of SunOS? -Don

Then I got in trouble too:

Date: Wed, 24 Oct 90 15:58:13 PDT

From: Ben Stoltz

To: Vicky L. Schulman

Subject: Re: PizzaTool Viki, I don’t know the first thing about the legal aspects of giving you a copy of the program. I have to consider them because the “pizza” program is directly related to the work we are doing in this department (I am serious, mostly.) — -pause — - Well, I just got some mail from Don Hopkins and it looks like this is not a secret anymore. I’m not sure what to do now. I will get back to you. Ben

PizzaTool Customer Demands

I tried to explain to Sun management that we were already getting demands for PizzaTool from Sun customers and Tony & Alba’s Pizza connoisseurs all across Silicon Valley and far away places .

The Window System Wars

The NeWS PostScript version of PizzaTool for The NeWS Toolkit 2.0 on OpenWindows

Part of my job was to test out the NeWS user interface toolkit by writing demos and small applications, as well as commenting and documenting so that developers could learn how to use it.

It was the time of the Window System Wars, and there was a rivalry between the NeWS window system developers and the X11 window system developers at Sun. There was a huge proxy war going on between XView and TNT. And of course I was on the Anti-X11, Pro-NeWS side of the war.

The X-Windows Disaster

X has had its share of $5,000 toilet seats — like Sun’s Open Look clock tool, which gobbles up 1.4 megabytes of real memory! If you sacrificed all the RAM from 22 Commodore 64s to clock tool, it still wouldn’t have enough to tell you the time. Even the vanilla X11R4 “xclock” utility consumed 656K to run. And X’s memory usage is increasing.

The PizzaTool Flame War

Ben’s original “tatool” was an XView application for X11, so I decided it was important for The NeWS Toolkit’s cause to develop a graphical version of PizzaTool in PostScript for the NeWS window system, that showed off its unique abilities by drawing a colorful preview of the pizza in PostScript, and using NeWSPrint to fax a picture of the pizza to Tony & Albas, instead of simply sending a text order.

Of course my obvious helpful and diplomatically worded suggestions touched off the epic PizzaTool Flame War at Sun about NeWS TNT -vs- X11 XView, which resulted in management banning further discussion of the issue.

To: lots of managers and mailing lists

Subject: FLAME, was: more on tnt vs XView

Date: Mon, 29 Oct 90 09:47:39 PST

From: Don Jackson 1) Boy, am I getting tired of discussing this. 2) Of all the important issues in MMPP that we should be discussing and attempting to resolve, the toolkit used for Pizzatool is not in the top 100 as far as I can tell, and we have already spent more time thinking about this, than any of the the “top 100”. 3) Ben Stoltz came into Sun one Saturday and spent 12 of his own personal hours coding Pizzatool. He used the tools he knew about, and had access to, and was comfortable with. As a long time Sun employee who was familiar with Sunview and C, Xview was a natural choice for this applications because

1) It did the job.

2) His previous investments in Sunview and C were highly relevant.

3) The goal of his project was do write a cool demo, and to finish it as soon as possible, since he was investing his own time in its creation. Given 1,2, and 3 above: 4) I hereby request Ben to spend no more “Work” time working on Pizzatool, or pizzatool post mortems. This should be simple because Ben hasn’t spent any significant work time on Pizzatool. If anyone wants to discuss this issue with Ben, they should make arrangements with Ben to talk after hours. An exercise left to the reader is to determine how to motivate/compensate Ben for discussing this critical, facinating issue in his “free” time. 5) I am no longer going to read or respond to email discussing why tnt versus xview W.R.T. pizzatool. I am no longer going to sit in meetings where this is discussed. 6) As always I will continue to read, respond, attend meetings, and attempt to remain civil during any other discussions of tNT versus xview. 7) Ben Stoltz: As a member of MMPP, I would like to express my thanks for your efforts to showcase MMPP fax technology via the pizzatool program, especially since you spent your own time to create this program. I’m happy to work with creative, hard working people like you. Don Jackson. 8) Pizzatool: CASE CLOSED!

Programming a PostScript PizzaTool

So I ignored the warning not to spend any more time on PizzaTool, kept my head down, and continued to hack away on the TNT version of PizzaTool in my spare time.

Painta the Pizza Toppings

I wrote a bunch of little PostScript programs to draw every different type of pizza topping on Tony & Alba’s extensive menu.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Pizza Toppings



% TODO: Order all of these toppings to see what they really

% look like!



/Dairy (Cheese) 150 {

1 1 0 setrgbcolor

.018 setlinewidth

} {

0 0

random .1 mul .1 add

0 random 100 mul 30 add

arc

stroke

} maketopping

Processa the Pizza in PostScript

NeWS would fork off a bunch of light weight PostScript processes to draw each of the toppings, and one more to spin the pizza crust, and they all worked together in harmony to render and cook the toppings and melt the cheese by repeatedly rotating the bitmap image around again and again until the jaggies melted the pixels together.

/Paint { % - => -

PizzaLock { % monitor:

/reset self send

/PaintProcess { % fork:

pause

/PaintNewPizza self send



% Wait a second until things settle down ...

% If /paint is called again within the next second,

% this process will be killed and a new paint process

% will sleep for a second.

[1 0] SLEEP



% If our parent window frame isn't opened,

% then it's hiding and we shouldn't draw the toppings.

/opened? Parent send { % if:

% Draw all the toppings at once! Weeee!

4 { % Lots of cheese, repeat:

Cheese /StartSprinkle self send

} repeat

/toppings Pizza send { % forall:

/StartSprinkle self send

} forall



% Wait around for all the sprinklers to finish.

{ % loop:

Sprinklers length 0 eq { exit } if

% push one of the sprinklers, doesn't matter which.

Sprinklers { pop exit } forall

waitprocess pop

} loop

} if

/StopPaint self send

} fork def

PaintProcess /ProcessName (Pizza Painter) put

} monitor

} def

Starta the Pizza Spinning

Thanks to the wonder of NeWS, it was easy to spin the crust by dragging the mouse, and then you could check the boxes to sprinkle toppings onto the pizza as it spun around!

% Start spinning the pizza, to cook it.

%

/StartSpin { % - => -

/StopSpin self send

/SpinProcess { % fork:

clear

/PaintSetup self send

/ClipCrust self send

initmatrix

{ % loop:

SpinPause { pause } repeat

/Spin self send

} loop

SpinProcess currentprocess eq { % if:

/SpinProcess unpromote

} if

} fork promote

} def

Spina the Pizza Pixels Arounda the Center

Every time it spins the pixels around the center of the pizza, they become jaggier and jaggier, so it looks like the pizza is cooking.

% Spin the pizza around a bit.

%

/Spin { % - => -

gsave

/size self send % w h

2 div exch 2 div exch % w/2 h/2

2 copy translate

SpinAngle random add rotate

neg exch neg exch translate %

self imagecanvas

grestore

} def

Dropa the Picture ona the Pizza

Then I integrated it with other fun NeWS graphical tools and toys like RasterRap, by adding support for dragging and dropping images into your pizza!

% Deal the a selection dropped or pasted into this pizza.

%

/HandleReception { % event selection => bool

exch % selection event

//is_v2? not { self } if

/begintransfer 3 index send % selection event

/Raster /query 3 index send { % ifelse: % selection event canvas

/RasterReception self send % selection bool

} { % else: % selection event

/Canvas /query 3 index send { % ifelse: % selection event canvas

/RasterReception self send % selection bool

} { % else: % selection event

pop false % selection bool

} ifelse

} ifelse % selection bool

dup /endtransfer 4 -1 roll % bool bool /endt selection

send % bool

} def

I left a pizza spinning over Christmas to see what happens, and it was really a mess when I came back!

Finda the Pope in the Pizza