Let's write a toy UI library
33 points by indigo
33 points by indigo
UI toolkits are one of those things that are easy to throw together but very hard to make good. There's a million little details that users will expect of a UI widget. Some of them (line-editing shortcuts, typing in a popup menu to jump to an option) will just annoy power users if they're missing, others (integrating with screen readers and non-Latin input methods) are absolutely essential for some users, even though you probably never use them.
I'm don't like to discourage these sorts of toy projects - they're super cool! But I do always worry that someone will see something like this, find it superficially does everything they need, and end up shipping a substantially worse product than they'd have had if they used a more mature library. I'm not sure how you solve this.
Nakst's UI library tutorial continues on in Luigi. The library is somewhat similar to the Win32 API (with a message procedure for each "class") and uses lots of message passing. This is quite different from GTK or Motif which might make it interesting for people who want a C library "in the spirit of" Win32 but without the horrible Hungarian notation.