Best is to have a look at the textmode IDE of Free Pascal (the binary "fp" installable by most Linux distros). That UI is available in library form in FPC, and is called "Free Vision".
It is more something like RHIDE, and that is no coincidence, they have similar roots.