Matt Gemmell

CHANGER is available now!

An action-thriller novel — book 1 in the KESTREL series.

★★★★★ — Amazon

Apple Pie

source 1 min read

Yet another Thing I Will Release Sometime This Year.
There's something I've been meaning to implement on OS X for a while, 
and yesterday evening I decided to finally spend a few hours on it. I 
worked on it a little more today too, and whilst it still has a hell 
of a long way to go, it works.

Just a quick <code>PieMenu *p = [[PieMenu alloc] init];</code> and 
you get this thing:
It takes care of managing the display of submenus, tracking the mouse, 
triggering menu item actions, and so forth. This is the top-level menu 
(the main menubar of the sample application I've embedded it in), so 
clicking the central circle will close the menu. The only reason I put 
an Apple logo there was because it seemed to be crying out for it. At 
sub-levels of the main menubar, the central circle shows the name of the 
menu you're currently in, and clicking it will redisplay the parent menu, 
as you'd probably expect. That all works fine right now.

The plan is to make this an Input Manager, so that you'll just drop a file 
into your Library folder and all Cocoa apps will immediately gain the ability 
to display a pie menu system as well as the regular linear menus. Probably also 
make it available for developers to use (for pay) in their own products, if 
anyone else is interested in this kind of thing. Needless to say, visual and 
behavioural customisation options will be ludicrously numerous.

Obligatory mention of words and phrases such as: gestural shortcuts, animations, 
and maybe some fancy stuff like trying to intelligently rearrange menu items to 
place common semantically opposite commands radially across from each other. We'll 
see how it goes.

I don't have time to say much more right now, but I have some very cool ideas 
about how to solve the classic problem with pie menus (namely that 
they're not at all well suited to menus with large numbers of items), 
and I have a few swishy UI niceties in mind just like you'd expect 
on OS X.

Anyway, I'm off to bed. More news as it happens.