in reply to console editor

I'd like to throw in another suggestion, S-Lang, which is roughly comparable to curses/ncurses in its abstraction level. The description from its home page probably summarizes it better:

S-Lang is a multi-platform programmer's library designed to allow a developer to create robust multi-platform software. It provides facilities required by interactive applications such as display/screen management, keyboard input, keymaps, and so on. (...)

And, as to the support beyond the Unix world (from the INSTALL.pc file):

The slang library is available for OS/2, MSDOS, and WIN32 (windows 9x/NT) systems. This _includes_ the various GNU environments such as DJGPP, and MINGW32. For CYGWIN, follow the UNIX instructions.

(Actually, it's not only that, but also a full programming language / interpreter, etc., but the cited part should about fit what you're interested in...)

One advantage is that it's both stable (been around since the mid-90's) and actively maintained (latest release June 2007).

A number of well-known programs with a text-based UI make use of it (or optionally may be linked against it, instead of ncurses), like for example mc (Midnight Commander file manager), mutt (mail client), slrn (newsreader), lynx (html browser), and various text editors.

In principle, there's also a Perl binding for it Term::Slang. Unfortunately, it dates back to the year 2K, and doesn't seem to be maintained any longer. Anyhow, the module is a decent start, and it should be rather straightforward to upgrade/extend for anyone determined (or even addicted to programming, like you :).

Actually, I just tried building it against the most recent S-lang library v2.1.1. As expected, it did no longer work, but it took me only about half an hour to come up with fixes/workarounds for the fatal errors. There are still 7 compile warnings left that need to be taken care of... but that should be doable as well. (Most incompatibilities were related to changed function names and/or argument lists, in particular with respect to readline functionality). /msg me privately if you want the diffs.

Anyhow, now it builds, and you (well, I, at the moment :) can run the Perl examples that come with Term::Slang, e.g. draw-bow, which draws a typical text UI dialog box with a message and Yes/No/Cancel buttons and a line-chars frame around it, centered within the terminal.

That's about 80 lines of Perl code (including the boilerplate), so you'll probably want to abstract away often used functionality in libs (widgets like dialog boxes, etc.).

(BTW, if you get anything along these lines working properly, please let me know — I'm personally a big fan of text-based user interfaces, and being able to easily create them with Perl would definitely be a plus...)