Old-school scientific calculators have always had a space problem, packing in more features than they have available buttons. They've traditionally solved the problem by adding a "2nd" button which, like Shift or Control keys on a keyboard, lets each calculator button have a second function. On the iPhone, virtual keypads improve on this tradition, letting you change the keypad's physical look and layout on demand. PCalc's virtual keypad offers different layouts tuned to different needs (engineering, programming, common scientific functions, and so on). PCalc's savvy use of virtual keypads means the app can offer its full range of features without crowding the keypad. Theme settings, meanwhile, let you choose your own color scheme.
James: Given limited screen space, a complex application can't present everything on a single screen. For PCalc, I chose to focus some of the layouts on one task and some on others. I can imagine adding new layouts for financial tasks, for example, where you wouldn't need the scientific features. Ultimately, since the layouts are just built from simple XML files, I hope to add an editing feature so that users can customize the layouts themselves.
Figure 3-16. PCalc offers several keypad layouts, each tailored to specific calculation categories. PCalc's Basic and Engineering layouts are shown here.
I think my typical users are happy to explore a user interface to see what it can do, but that doesn't work for all kinds of apps or people. On the whole, I don't think PCalc is that much more obscure than some of the classic calculators that inspired it, so it perhaps helps that my audience is used to somewhat cryptic key markings on calculators.
The style customizations offered by themes are perhaps less easy to justify than the keypad layouts. One argument against themes is that they are proof that you couldn't come up with one single good visual design and would rather have ten average ones. But I think people like the choices, and it lets them make PCalc "theirs." The themes are popular, too, judging by the number of people who buy the additional theme pack via in-app purchase in the free app.
Originally, all the button graphics were pre-rendered bitmaps. But, when I was making the additional layouts, I found I was constantly creating new graphics to cover all the different button sizes. It made sense to draw the buttons live, rather than rely on bitmaps, so I wrote some code, a theme engine based on XML files, to create looks and draw all the buttons that I previously had to make in Photoshop. So, the choice of using a theme engine was originally made to support the functional layouts, but once it was in there, the temptation was to use it to create different looks, too.